VBECDCX ;hoifo/gjc-data conversion & pre-implementation data extract;Nov 21, 2002
Source file <VBECDCX.m>
| Name | Comments | DBIA/ICR reference |
|---|---|---|
| PAT(DFN,LRDFN) | ; build the primary patient identifier string.
; convert specific patient attributes from VistA to SQL tables. ; Values to covert and maximum string lengths: ; LRDFN=ien of the patient record in the Lab Data (#63) file (12) ; DFN=ien of the patient in the Patient (#2) file (12) ; LRNAM=LRNAM("FAMILY")^LRNAM("GIVEN")^LRNAM("MIDDLE")^LRNAM("SUFFIX") ; LRNAM(patient name) subcomponents above concatenated (30) ; LRSEX(sex)='M' or 'F', (1) ; LRDOB(date of birth)='mm/dd/yy<sp>time' time optional, (18) ; LRSSN(ssn)='123456789' (9) ; LRICN(ICN)='100072010000' (12) ; $P(LRBO,U) (blood type)='AB' (2) ; $P(LRBLD,U,2) (RH type)='N' or 'P' (1) |
|
| ANTI(DFN,LRDFN,LRCHAR) | ; extract 'RBC ANTIGENS PRESENT/ABSENT' or 'ANTIBODIES
; IDENTIFIED' data from the legacy Blood Bank application. Notice the ; practice of swapping out the VistA ien for the antibodies equivalent ; SQL GUID. ; Input: DFN=patient DFN ; LRDFN=lab patient ien in the Lab Data (#63) file ; LRCHAR=char, 'AP' for antigens present, 'AI' for antigens ; identified and 'AA' for antibodies absent |
|
| TCTRC(DFN,LRDFN,LRD1) | ; save off the transfusion or transfusion
; reaction comments. called from both TRANS & TRANSR ; from TRANS ; Input: DFN=patient DFN ; LRDFN=lab patient ien in the Lab Data (#63) file ; LRD1=second level subscript; equivalent to FileMan's D1 |
|
| TRD(DFN,LRDFN) | ; Extract transfusion reaction date data; date/time, reaction
; type, person entering reaction ; Input: DFN=patient DFN ; LRDFN=lab patient ien in the Lab Data (#63) file |
|
| TRTOT | ;
|
|
| KILL | ; kill variables
|