- Timestamp:
- Feb 14, 2009, 10:56:46 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLLABS.m
r347 r368 84 84 . ;D QOPEN^GPLXPATH("C0CRBLD",C0CRTMP,C0CIS) ;1ST PART OF XML 85 85 . D QUEUE^GPLXPATH("C0CRBLD",C0CRTMP,2,@C0CRTMP@(0)-4) ;UP TO <Test> 86 . I $D(@C0CMAP@("M","TEST S",0)) D ; TESTS EXIST87 . . S C0CJN=@C0CMAP@("M","TEST S",0) ; NUMBER OF TESTS86 . I $D(@C0CMAP@("M","TEST",0)) D ; TESTS EXIST 87 . . S C0CJN=@C0CMAP@("M","TEST",0) ; NUMBER OF TESTS 88 88 . . K C0CTO ; CLEAR OUTPUT VARIABLE 89 89 . . F C0CJ=1:1:C0CJN D ;FOR EACH TEST RESULT 90 90 . . . K C0CTMAP ; EMPTY MAPS FOR TEST RESULTS 91 91 . . . S C0CTMP=$NA(@C0CRBASE@(C0CI,C0CJ)) ;WORK AREA FOR TEST RESULTS 92 . . . S C0CTMAP=$NA(@C0CMAP@("M","TEST S",C0CJ)) ;92 . . . S C0CTMAP=$NA(@C0CMAP@("M","TEST",C0CJ)) ; 93 93 . . . I 'C0CQT W "MAPOBX:",C0CTMAP,! 94 94 . . . D MAP^GPLXPATH("C0CTT",C0CTMAP,C0CTMP) ; MAP TO TMP … … 142 142 . W "LAB LOOKUP FAILED, NO SSN",! 143 143 . S C0CNSSN=1 ; SET NO SSN FLAG 144 S C0CSPC="*" ; LOOKING FOR ALL LAB TYPES 145 ;I $D(^TMP("GPLCCR","LABLIMIT")) D ; IS LAB LIMIT SET? MOVE THIS TO PARMS 146 ;. S C0CLLMT=^TMP("GPLCCR","LABLIMIT") ;USE THE LAB LIMIT PARAMATER 147 ;E S C0CLLMT="T-360" ;START DATE LONG AGO TO GET EVERYTHING 148 S C0CLLMT=$$GET^C0CPARMS("LABLIMIT") ; GET THE LIMIT PARM 149 S C0CLSTRT=$$GET^C0CPARMS("LABSTART") ; GET START PARM 150 D DT^DILF(,C0CLLMT,.C0CSDT) ; 151 W "LAB LIMIT: ",C0CLLMT,! 152 D DT^DILF(,C0CLSTRT,.C0CEDT) ; END DATE TODAY - IMPLEMENT END DATE PARM 144 S C0CSPC="*" ; LOOKING FOR ALL LABS 145 I $D(^TMP("GPLCCR","RPMS")) D ; RUNNING RPMS 146 . D DT^DILF(,"T-365",.C0CSDT) ; START DATE ONE YEAR AGO TO LIMIT VOLUME 147 E D DT^DILF(,"T-5000",.C0CSDT) ; START DATE LONG AGO TO GET EVERYTHING 148 D DT^DILF(,"T",.C0CEDT) ; END DATE TODAY 153 149 S C0CR=$$GCPR^LA7QRY(C0CPTID,C0CSDT,C0CEDT,C0CSPC,C0CSPC) ; CALL LAB LOOKUP 154 150 Q … … 161 157 I '$D(DFN) S DFN=1 ; DEFAULT TEST PATIENT 162 158 I '$D(^KVAI(0)) D SETTBL ; INITIALIZE LAB TABLE 163 I ^ TMP("GPLCCR","LABTBL",0)'="V2" D SETTBL ; NEED NEWEST VERSION159 I ^KBAI(0)'="V2" D SETTBL ; NEED NEWEST VERSION 164 160 I '$D(^TMP("HLS",$J,1)) D GHL7 ; GET HL7 MGS IF NOT ALREADY DONE 165 S C0CTAB=$NA(^ TMP("GPLCCR","LABTBL")) ; BASE OF OBX TABLE161 S C0CTAB=$NA(^KBAI) ; BASE OF OBX TABLE 166 162 S C0CHB=$NA(^TMP("HLS",$J)) 167 163 S C0CI="" … … 203 199 . . . S XV("RESULTTESTCODINGSYSTEM")=C0CVAR("C3") ; PRIMARY DISPLAY NAME 204 200 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C2") ; USE PRIMARY TEXT 205 . . N C0CZG S C0CZG=XV("RESULTTESTNORMALDESC RIPTIONTEXT") ;206 . . S XV("RESULTTESTNORMALDESC RIPTIONTEXT")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE201 . . N C0CZG S C0CZG=XV("RESULTTESTNORMALDESCTEXT") ; 202 . . S XV("RESULTTESTNORMALDESCTEXT")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE 207 203 . . S C0CZG=XV("RESULTTESTVALUE") 208 204 . . S XV("RESULTTESTVALUE")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE 209 205 . I C0CTYP="OBX" D ; PROCESS TEST RESULTS 210 206 . . I C0CLOBX=0 D ; FIRST TEST RESULT FOR THIS SECTION 211 . . . S C0CLB2=$NA(@C0CLB@(C0CLI,"M","TEST S")) ; INDENT FOR TEST RESULTS207 . . . S C0CLB2=$NA(@C0CLB@(C0CLI,"M","TEST")) ; INDENT FOR TEST RESULTS 212 208 . . S C0CLOBX=C0CLOBX+1 ; INCREMENT TEST COUNT 213 209 . . S @C0CLB2@(0)=C0CLOBX ; STORE THE TEST COUNT … … 368 364 S X("OBX","OBX5")="5^00561^Observation Results^RESULTTESTVALUE" 369 365 S X("OBX","OBX6")="6^00562^Units^RESULTTESTUNITS" 370 S X("OBX","OBX7")="7^00563^Reference Range^RESULTTESTNORMALDESC RIPTIONTEXT"366 S X("OBX","OBX7")="7^00563^Reference Range^RESULTTESTNORMALDESCTEXT" 371 367 S X("OBX","OBX8")="8^00564^Abnormal Flags^RESULTTESTFLAG" 372 368 S X("OBX","OBX9")="9^00639^Probability" … … 379 375 S X("OBX","OBX16")="16^00584^Responsible Observer" 380 376 S X("OBX","OBX17")="17^00936^Observation Method" 381 M ^ TMP("GPLCCR","LABTBL")=X ; SET VALUES IN ^TMP("GPLCCR","LABTBL")382 S ^ TMP("GPLCCR","LABTBL",0)="V2"383 Q 384 ; 377 M ^KBAI=X ; SET VALUES IN ^KBAI 378 S ^KBAI(0)="V2" 379 Q 380 ;
Note:
See TracChangeset
for help on using the changeset viewer.