- Timestamp:
- Nov 3, 2008, 10:11:17 AM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR0.m
r164 r254 552 552 ;;<Text>@@RESULTTESTDESCRIPTIONTEXT@@</Text> 553 553 ;;<Code> 554 ;;<Value>@@RESULTTEST VALUE@@</Value>554 ;;<Value>@@RESULTTESTCODEVALUE@@</Value> 555 555 ;;<CodingSystem>@@RESULTTESTCODINGSYSTEM@@</CodingSystem> 556 556 ;;</Code> -
ccr/trunk/p/GPLLABS.m
r253 r254 51 51 LTYP(OSEG,OTYP) ; 52 52 S OTAB=$NA(@C0CTAB@(OTYP)) ; TABLE FOR SEGMENT TYPE 53 I 1 D ; RIGHT NOW JUST OBX 54 . S OI="" ; INDEX INTO SEGS 55 . F S OI=$O(@OTAB@(OI)) Q:OI="" D ; FOR EACH ELEMENT OF THE SEGMENT 56 . . S OV=$P(OSEG,"|",$P(@OTAB@(OI),"^",1)+1) ; PULL OUT VALUE 57 . . I OV'="" W OI_": "_$P(@OTAB@(OI),"^",3),": ",OV,! 53 I 1 D ; FOR HL7 SEGMENT TYPE 54 . S OI="" ; INDEX INTO FIELDS IN SEG 55 . F S OI=$O(@OTAB@(OI)) Q:OI="" D ; FOR EACH FIELD OF THE SEGMENT 56 . . S OTI=$P(@OTAB@(OI),"^",1) ; TABLE INDEX 57 . . S OVAR=$P(@OTAB@(OI),"^",4) ; CCR VARIABLE IF DEFINED 58 . . S OV=$P(OSEG,"|",OTI+1) ; PULL OUT VALUE 59 . . I $P(OI,";",2)'="" D ; THIS IS DEFINING A SUB-VALUE 60 . . . S OI2=$P(OTI,";",2) ; THE SUB-INDEX 61 . . . S OV=$P(OV,"^",OI2) ; PULL OUT SUB-VALUE 62 . . I OV'="" W OI_": "_$P(@OTAB@(OI),"^",3),": ",OVAR,": ",OV,! 58 63 Q 59 64 LOBX ; … … 63 68 K X ; CLEAR X 64 69 S X("PID","PID1")="1^00104^Set ID - Patient ID" 65 S X("PID","PID2")="2^00105^Patient ID (External ID) CX (20)"66 S X("PID","PID3")="3^00106^Patient ID (Internal ID) R CX (20) ( )"67 S X("PID","PID4")="4^00107^Alternate Patient ID CX (20) ( )"68 S X("PID","PID5")="5^00108^Patient's Name R XPN (48) ( )"69 S X("PID","PID6")="6^00109^Mother's Maiden Name XPN (48)"70 S X("PID","PID7")="7^00110^Date of Birth TS (26)"71 S X("PID","PID8")="8^00111^Sex IS (1) (0001)"72 S X("PID","PID9")="9^00112^Patient Alias XPN (48) ( )"73 S X("PID","PID10")="10^00113^Race IS (1) (0005)"74 S X("PID","PID11")="11^00114^Patient Address XAD (106) ( )"75 S X("PID","PID12")="12^00115^County Code B IS (4)"76 S X("PID","PID13")="13^00116^Phone Number - Home XTN (40) ( )"77 S X("PID","PID14")="14^00117^Phone Number - Business XTN (40) ( )"78 S X("PID","PID15")="15^00118^Language - Patient CE (60) (0296)"79 S X("PID","PID16")="16^00119^Marital Status IS (1) (0002)"80 S X("PID","PID17")="17^00120^Religion IS (3) (0006)"81 S X("PID","PID18")="18^00121^Patient Account Number CX (20)"82 S X("PID","PID19")="19^00122^SSN Number - Patient ST (16)"83 S X("PID","PID20")="20^00123^Drivers License - Patient DLN (25)"84 S X("PID","PID21")="21^00124^Mother's Identifier CX (20) ( )"85 S X("PID","PID22")="22^00125^Ethnic Group IS (3) (0189)"86 S X("PID","PID23")="23^00126^Birth Place ST (60)"87 S X("PID","PID24")="24^00127^Multiple Birth Indicator ID (2) (0136)"88 S X("PID","PID25")="25^00128^Birth Order NM (2)"89 S X("PID","PID26")="26^00129^Citizenship IS (4) ( ) (0171)"90 S X("PID","PID27")="27^00130^Veteran.s Military Status CE (60) (0172)"91 S X("PID","PID28")="28^00739^Nationality CE (80)"92 S X("PID","PID29")="29^00740^Patient Death Date/Time TS (26)"70 S X("PID","PID2")="2^00105^Patient ID (External ID)" 71 S X("PID","PID3")="3^00106^Patient ID (Internal ID)" 72 S X("PID","PID4")="4^00107^Alternate Patient ID" 73 S X("PID","PID5")="5^00108^Patient's Name" 74 S X("PID","PID6")="6^00109^Mother's Maiden Name" 75 S X("PID","PID7")="7^00110^Date of Birth" 76 S X("PID","PID8")="8^00111^Sex" 77 S X("PID","PID9")="9^00112^Patient Alias" 78 S X("PID","PID10")="10^00113^Race" 79 S X("PID","PID11")="11^00114^Patient Address" 80 S X("PID","PID12")="12^00115^County Code" 81 S X("PID","PID13")="13^00116^Phone Number - Home" 82 S X("PID","PID14")="14^00117^Phone Number - Business" 83 S X("PID","PID15")="15^00118^Language - Patient" 84 S X("PID","PID16")="16^00119^Marital Status" 85 S X("PID","PID17")="17^00120^Religion" 86 S X("PID","PID18")="18^00121^Patient Account Number" 87 S X("PID","PID19")="19^00122^SSN Number - Patient" 88 S X("PID","PID20")="20^00123^Drivers License - Patient" 89 S X("PID","PID21")="21^00124^Mother's Identifier" 90 S X("PID","PID22")="22^00125^Ethnic Group" 91 S X("PID","PID23")="23^00126^Birth Place" 92 S X("PID","PID24")="24^00127^Multiple Birth Indicator" 93 S X("PID","PID25")="25^00128^Birth Order" 94 S X("PID","PID26")="26^00129^Citizenship" 95 S X("PID","PID27")="27^00130^Veteran.s Military Status" 96 S X("PID","PID28")="28^00739^Nationality" 97 S X("PID","PID29")="29^00740^Patient Death Date/Time" 93 98 S X("PID","PID30")="30^00741^Patient Death Indicator" 94 S X("NTE","NTE1")="1^00573^Set ID - NTE SI (4)"95 S X("NTE","NTE2")="2^00574^Source of Comment ID (8) (0105)"99 S X("NTE","NTE1")="1^00573^Set ID - NTE" 100 S X("NTE","NTE2")="2^00574^Source of Comment" 96 101 S X("NTE","NTE3")="3^00575^Comment" 97 S X("ORC","ORC1")="1^00215^Order Control R ID (2)"98 S X("ORC","ORC2")="2^00216^Placer Order Number EI (22)"99 S X("ORC","ORC3")="3^00217^Filler Order Number EI (22)"100 S X("ORC","ORC4")="4^00218^Placer Order Number EI (22)"101 S X("ORC","ORC5")="5^00219^Order Status ID (2) (0038)"102 S X("ORC","ORC6")="6^00220^Response Flag ID (1) (0121)"103 S X("ORC","ORC7")="7^00221^Quantity/Timing TQ (200)"104 S X("ORC","ORC8")="8^00222^Parent CM (200)"105 S X("ORC","ORC9")="9^00223^Date/Time of Transaction TS (26)"106 S X("ORC","ORC10")="10^00224^Entered By XCN (120)"107 S X("ORC","ORC11")="11^00225^Verified By XCN (120)"108 S X("ORC","ORC12")="12^00226^Ordering Provider XCN (120)"109 S X("ORC","ORC13")="13^00227^Enterer's Location PL (80)"110 S X("ORC","ORC14")="14^00228^Call Back Phone Number XTN (40) ( )"111 S X("ORC","ORC15")="15^00229^Order Effective Date/Time TS (26)"112 S X("ORC","ORC16")="16^00230^Order Control Code Reason CE (200)"113 S X("ORC","ORC17")="17^00231^Entering Organization CE (60)"114 S X("ORC","ORC18")="18^00232^Entering Device CE (60)"102 S X("ORC","ORC1")="1^00215^Order Control" 103 S X("ORC","ORC2")="2^00216^Placer Order Number" 104 S X("ORC","ORC3")="3^00217^Filler Order Number" 105 S X("ORC","ORC4")="4^00218^Placer Order Number" 106 S X("ORC","ORC5")="5^00219^Order Status" 107 S X("ORC","ORC6")="6^00220^Response Flag" 108 S X("ORC","ORC7")="7^00221^Quantity/Timing" 109 S X("ORC","ORC8")="8^00222^Parent" 110 S X("ORC","ORC9")="9^00223^Date/Time of Transaction" 111 S X("ORC","ORC10")="10^00224^Entered By" 112 S X("ORC","ORC11")="11^00225^Verified By" 113 S X("ORC","ORC12")="12^00226^Ordering Provider" 114 S X("ORC","ORC13")="13^00227^Enterer's Location" 115 S X("ORC","ORC14")="14^00228^Call Back Phone Number" 116 S X("ORC","ORC15")="15^00229^Order Effective Date/Time" 117 S X("ORC","ORC16")="16^00230^Order Control Code Reason" 118 S X("ORC","ORC17")="17^00231^Entering Organization" 119 S X("ORC","ORC18")="18^00232^Entering Device" 115 120 S X("ORC","ORC19")="19^00233^Action By" 116 S X("OBR","OBR1")="1^00237^Set ID - Observation Request C SI (4)" 117 S X("OBR","OBR2")="2^00216^Placer Order Number C EI (75)" 118 S X("OBR","OBR3")="3^00217^Filler Order Number C EI (75)" 119 S X("OBR","OBR4")="4^00238^Universal Service ID R CE (200)" 120 S X("OBR","OBR5")="5^00239^Priority B ID (2)" 121 S X("OBR","OBR6")="6^00240^Requested Date/Time B TS (26)" 122 S X("OBR","OBR7")="7^00241^Observation Date/Time C TS (26)" 123 S X("OBR","OBR8")="8^00242^Observation End Date/Time TS (26)" 124 S X("OBR","OBR9")="9^00243^Collection Volume CQ (20)" 125 S X("OBR","OBR10")="10^00244^Collector Identifier XCN (60) ( )" 126 S X("OBR","OBR11")="11^00245^Specimen Action Code ID (1) (0065)" 127 S X("OBR","OBR12")="12^00246^Danger Code CE (60)" 128 S X("OBR","OBR13")="13^00247^Relevant Clinical Info. ST (300)" 129 S X("OBR","OBR14")="14^00248^Specimen Rcv'd. Date/Time C TS (26)" 130 S X("OBR","OBR15")="15^00249^Specimen Source CM (300) (0070)" 131 S X("OBR","OBR16")="16^00226^Ordering Provider XCN (80) ( )" 132 S X("OBR","OBR17")="17^00250^Order Callback Phone Number XTN (40) ( )" 133 S X("OBR","OBR18")="18^00251^Placers Field 1 ST (60)" 121 S X("OBR","OBR1")="1^00237^Set ID - Observation Request" 122 S X("OBR","OBR2")="2^00216^Placer Order Number" 123 S X("OBR","OBR3")="3^00217^Filler Order Number" 124 S X("OBR","OBR4")="4^00238^Universal Service ID" 125 S X("OBR","OBR4;LOINC")="4;1^00238^Universal Service ID - LOINC^RESULTCODE" 126 S X("OBR","OBR4;DESC")="4;2^00238^Universal Service ID - DESC^RESULTDESCRIPTIONTEXT" 127 S X("OBR","OBR4;VACODE")="4;3^00238^Universal Service ID - VACODE" 128 S X("OBR","OBR5")="5^00239^Priority" 129 S X("OBR","OBR6")="6^00240^Requested Date/Time" 130 S X("OBR","OBR7")="7^00241^Observation Date/Time^RESULTASSESSMENTDATETIME" 131 S X("OBR","OBR8")="8^00242^Observation End Date/Time" 132 S X("OBR","OBR9")="9^00243^Collection Volume" 133 S X("OBR","OBR10")="10^00244^Collector Identifier" 134 S X("OBR","OBR11")="11^00245^Specimen Action Code" 135 S X("OBR","OBR12")="12^00246^Danger Code" 136 S X("OBR","OBR13")="13^00247^Relevant Clinical Info." 137 S X("OBR","OBR14")="14^00248^Specimen Rcv'd. Date/Time" 138 S X("OBR","OBR15")="15^00249^Specimen Source" 139 S X("OBR","OBR16")="16^00226^Ordering Provider XCN^RESULTSOURCEACTORID" 140 S X("OBR","OBR17")="17^00250^Order Callback Phone Number" 141 S X("OBR","OBR18")="18^00251^Placers Field 1" 134 142 S X("OBR","OBR19")="19^00252^Placers Field 2" 135 S X("OBR","OBR20")="20^00253^Filler Field 1 ST (60)"136 S X("OBR","OBR21")="21^00254^Filler Field 2 ST (60)"137 S X("OBR","OBR22")="22^00255^Results Rpt./Status Change C TS (26)"138 S X("OBR","OBR23")="23^00256^Charge to Practice CM (40)"139 S X("OBR","OBR24")="24^00257^Diagnostic Service Sect ID ID (10) (0074)"140 S X("OBR","OBR25")="25^00258^Result Status C ID (1) (0123)"141 S X("OBR","OBR26")="26^00259^Parent Result CM (400)"142 S X("OBR","OBR27")="27^00221^Quantity/Timing TQ (200) ( )"143 S X("OBR","OBR28")="28^00260^Result Copies to CN (150) ( )"144 S X("OBR","OBR29")="29^00261^Parent Number CM (150)"145 S X("OBR","OBR30")="30^00262^Transportation Mode ID (20) (0124)"146 S X("OBR","OBR31")="31^00263^Reason for Study CE (300) ( )"147 S X("OBR","OBR32")="32^00264^Principal Result Interpreter CM (200)"148 S X("OBR","OBR33")="33^00265^Assistant Result Interpreter CM (200) ( )"149 S X("OBR","OBR34")="34^00266^Technician CM (200) ( )"150 S X("OBR","OBR35")="35^00267^Transcriptionist CM (200) ( )"151 S X("OBR","OBR36")="36^00268^Scheduled Date/Time TS (26)"152 S X("OBR","OBR37")="37^01028^Number of Sample Containers NM (4)"153 S X("OBR","OBR38")="38^38^01029 Transport Logistics of Collected Sample CE (60) ( )"154 S X("OBR","OBR39")="39^01030^Collector.s Comment CE (200) ( )"155 S X("OBR","OBR40")="40^01031^Transport Arrangement Responsibility CE (60)"156 S X("OBR","OBR41")="41^01032^Transport Arranged ID (30) (0224)"157 S X("OBR","OBR42")="42^01033^Escort Required ID (1) (0225)"143 S X("OBR","OBR20")="20^00253^Filler Field 1" 144 S X("OBR","OBR21")="21^00254^Filler Field 2" 145 S X("OBR","OBR22")="22^00255^Results Rpt./Status Change" 146 S X("OBR","OBR23")="23^00256^Charge to Practice" 147 S X("OBR","OBR24")="24^00257^Diagnostic Service Sect" 148 S X("OBR","OBR25")="25^00258^Result Status^RESULTSTATUS" 149 S X("OBR","OBR26")="26^00259^Parent Result" 150 S X("OBR","OBR27")="27^00221^Quantity/Timing" 151 S X("OBR","OBR28")="28^00260^Result Copies to" 152 S X("OBR","OBR29")="29^00261^Parent Number" 153 S X("OBR","OBR30")="30^00262^Transportation Mode" 154 S X("OBR","OBR31")="31^00263^Reason for Study" 155 S X("OBR","OBR32")="32^00264^Principal Result Interpreter" 156 S X("OBR","OBR33")="33^00265^Assistant Result Interpreter" 157 S X("OBR","OBR34")="34^00266^Technician" 158 S X("OBR","OBR35")="35^00267^Transcriptionist" 159 S X("OBR","OBR36")="36^00268^Scheduled Date/Time" 160 S X("OBR","OBR37")="37^01028^Number of Sample Containers" 161 S X("OBR","OBR38")="38^38^01029 Transport Logistics of Collected Sample" 162 S X("OBR","OBR39")="39^01030^Collector.s Comment" 163 S X("OBR","OBR40")="40^01031^Transport Arrangement Responsibility" 164 S X("OBR","OBR41")="41^01032^Transport Arranged" 165 S X("OBR","OBR42")="42^01033^Escort Required" 158 166 S X("OBR","OBR43")="43^01034^Planned Patient Transport Comment" 159 167 S X("OBX","OBX1")="1^00559^Set ID - OBX" 160 168 S X("OBX","OBX2")="2^00676^Value Type" 161 169 S X("OBX","OBX3")="3^00560^Observation Identifier" 170 S X("OBX","OBX3;LOINC")="3;1^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" 162 173 S X("OBX","OBX4")="4^00769^Observation Sub-Id" 163 S X("OBX","OBX5")="5^00561^Observation Results "164 S X("OBX","OBX6")="6^00562^Units "165 S X("OBX","OBX7")="7^00563^Reference Range "174 S X("OBX","OBX5")="5^00561^Observation Results^RESULTTESTVALUE" 175 S X("OBX","OBX6")="6^00562^Units^RESULTTESTUNITS" 176 S X("OBX","OBX7")="7^00563^Reference Range^" 166 177 S X("OBX","OBX8")="8^00564^Abnormal Flags" 167 178 S X("OBX","OBX9")="9^00639^Probability" 168 179 S X("OBX","OBX10")="10^00565^Nature of Abnormal Test" 169 S X("OBX","OBX11")="11^00566^Observ. Result Status "180 S X("OBX","OBX11")="11^00566^Observ. Result Status^RESULTTESTSTATUSTEXT" 170 181 S X("OBX","OBX12")="12^00567^Date Last Normal Value" 171 182 S X("OBX","OBX13")="13^00581^User Defined Access Checks" 172 S X("OBX","OBX14")="14^00582^Date/Time of Observation "173 S X("OBX","OBX15")="15^00583^Producer.s ID "183 S X("OBX","OBX14")="14^00582^Date/Time of Observation^RESULTTESTDATETIME" 184 S X("OBX","OBX15")="15^00583^Producer.s ID^RESULTTESTSOURCEACTORID" 174 185 S X("OBX","OBX16")="16^00584^Responsible Observer" 175 186 S X("OBX","OBX17")="17^00936^Observation Method"
Note:
See TracChangeset
for help on using the changeset viewer.