Changeset 260 for ccr/trunk


Ignore:
Timestamp:
Nov 4, 2008, 1:10:49 PM (16 years ago)
Author:
George Lilly
Message:

corrected Test code interpretation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/GPLLABS.m

    r255 r260  
    3838LIST ; LIST THE HL7 MESSAGE
    3939 ;
    40  ; N C0CI,C0CJ,C0COBT,C0CHB
     40 ; N C0CI,C0CJ,C0COBT,C0CHB,C0CVAR
    4141 ; D EXTRACT^GPLLABS(,1,)
    4242 S C0CTAB=$NA(^KBAI) ; BASE OF OBX TABLE
     
    4444 S C0CI=""
    4545 F  S C0CI=$O(@C0CHB@(C0CI)) Q:C0CI=""  D  ; FOR ALL RECORDS IN HL7 MSG
     46 . K C0CVAR,XV ; CLEAR OUT VARIABLE VALUES
    4647 . S C0CTYP=$P(@C0CHB@(C0CI),"|",1)
    47  . D LTYP(@C0CHB@(C0CI),C0CTYP)
     48 . D LTYP(@C0CHB@(C0CI),C0CTYP,.C0CVAR)
     49 . M XV=C0CVAR ;
     50 . I C0CTYP="OBX" D  ; SPECIAL CASE FOR OBX3
     51 . . ; RESULTTESTCODEVALUE
     52 . . ; RESULTTESTDESCRIPTIONTEXT
     53 . . I C0CVAR("C3")="LN" D  ; PRIMARY CODE IS LOINC
     54 . . . S XV("RESULTTESTCODEVALUE")=C0CVAR("C1") ; THE LOINC CODE VALUE
     55 . . . S XV("RESULTTESTCODINGSYSTEM")="LOINC" ; DISPLAY NAME FOR LOINC
     56 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C2") ; DESCRIPTION TEXT
     57 . . E  I C0CVAR("C6")="LN" D  ; SECONDARY CODE IS LOINC
     58 . . . S XV("RESULTTESTCODEVALUE")=C0CVAR("C4") ; THE LOINC CODE VALUE
     59 . . . S XV("RESULTTESTCODINGSYSTEM")="LOINC" ; DISPLAY NAME FOR LOINC
     60 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C5") ; DESCRIPTION TEXT
     61 . . E  I C0CVAR("C6")'="" D  ; NO LOINC CODES, USE SECONDARY IF PRESENT
     62 . . . S XV("RESULTTESTCODEVALUE")=C0CVAR("C4") ; SECONDARY CODE VALUE
     63 . . . S XV("RESULTTESTCODINGSYSTEM")=C0CVAR("C6") ; SECONDARY CODE NAME
     64 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C5") ; SECONDARY TEXT
     65 . . E  D  ; NO SECONDARY, USE PRIMARY
     66 . . . S XV("RESULTTESTCODEVALUE")=C0CVAR("C1") ; PRIMARY CODE VALUE
     67 . . . S XV("RESULTTESTCODINGSYSTEM")=C0CVAR("C3") ; PRIMARY DISPLAY NAME
     68 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C2") ; USE PRIMARY TEXT
     69 . . ZWR XV
    4870 . W C0CI," ",C0CTYP,!
    4971 . ; S C0CI=$O(@C0CHB@(C0CI))
    5072 Q
    51 LTYP(OSEG,OTYP) ;
     73LTYP(OSEG,OTYP,OVARA) ;
    5274 S OTAB=$NA(@C0CTAB@(OTYP)) ; TABLE FOR SEGMENT TYPE
    5375 I 1 D  ; FOR HL7 SEGMENT TYPE
     
    6082 . . . S OI2=$P(OTI,";",2) ; THE SUB-INDEX
    6183 . . . S OV=$P(OV,"^",OI2) ; PULL OUT SUB-VALUE
     84 . . S OVARA(OVAR)=OV ; PASS BACK VARIABLE AND VALUE
    6285 . . I OV'="" W OI_": "_$P(@OTAB@(OI),"^",3),": ",OVAR,": ",OV,!
    6386 Q
     
    168191 S X("OBX","OBX2")="2^00676^Value Type"
    169192 S X("OBX","OBX3")="3^00560^Observation Identifier"
    170  S X("OBX","OBX3;LOINC")="3;4^00560^Observation Identifier^RESULTTESTCODEVALUE"
    171  S X("OBX","OBX3;DESC")="3;5^00560^Observation Identifier^RESULTTESTDESCRIPTIONTEXT"
    172  S X("OBX","OBX3;VACODE")="3;6^00560^Observation Identifier"
     193 S X("OBX","OBX3;C1")="3;1^00560^Observation Identifier^C1"
     194 S X("OBX","OBX3;C2")="3;2^00560^Observation Identifier^C2"
     195 S X("OBX","OBX3;C3")="3;3^00560^Observation Identifier^C3"
     196 S X("OBX","OBX3;C4")="3;4^00560^Observation Identifier^C4"
     197 S X("OBX","OBX3;C5")="3;5^00560^Observation Identifier^C5"
     198 S X("OBX","OBX3;C6")="3;6^00560^Observation Identifier^C6"
    173199 S X("OBX","OBX4")="4^00769^Observation Sub-Id"
    174200 S X("OBX","OBX5")="5^00561^Observation Results^RESULTTESTVALUE"
    175201 S X("OBX","OBX6")="6^00562^Units^RESULTTESTUNITS"
    176  S X("OBX","OBX7")="7^00563^Reference Range^"
     202 S X("OBX","OBX7")="7^00563^Reference Range^RESULTTESTNORMALDESCRIPTIONTEXT"
    177203 S X("OBX","OBX8")="8^00564^Abnormal Flags"
    178204 S X("OBX","OBX9")="9^00639^Probability"
Note: See TracChangeset for help on using the changeset viewer.