Changeset 368 for ccr/trunk


Ignore:
Timestamp:
Feb 14, 2009, 10:56:46 PM (16 years ago)
Author:
George Lilly
Message:

initial CCR ELEMENT FILE

Location:
ccr/trunk/p
Files:
2 added
1 edited

Legend:

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

    r347 r368  
    8484 . ;D QOPEN^GPLXPATH("C0CRBLD",C0CRTMP,C0CIS) ;1ST PART OF XML
    8585 . D QUEUE^GPLXPATH("C0CRBLD",C0CRTMP,2,@C0CRTMP@(0)-4) ;UP TO <Test>
    86  . I $D(@C0CMAP@("M","TESTS",0)) D  ; TESTS EXIST
    87  . . S C0CJN=@C0CMAP@("M","TESTS",0) ; NUMBER OF TESTS
     86 . I $D(@C0CMAP@("M","TEST",0)) D  ; TESTS EXIST
     87 . . S C0CJN=@C0CMAP@("M","TEST",0) ; NUMBER OF TESTS
    8888 . . K C0CTO ; CLEAR OUTPUT VARIABLE
    8989 . . F C0CJ=1:1:C0CJN D   ;FOR EACH TEST RESULT
    9090 . . . K C0CTMAP ; EMPTY MAPS FOR TEST RESULTS
    9191 . . . S C0CTMP=$NA(@C0CRBASE@(C0CI,C0CJ)) ;WORK AREA FOR TEST RESULTS
    92  . . . S C0CTMAP=$NA(@C0CMAP@("M","TESTS",C0CJ)) ;
     92 . . . S C0CTMAP=$NA(@C0CMAP@("M","TEST",C0CJ)) ;
    9393 . . . I 'C0CQT W "MAPOBX:",C0CTMAP,!
    9494 . . . D MAP^GPLXPATH("C0CTT",C0CTMAP,C0CTMP) ; MAP TO TMP
     
    142142 . W "LAB LOOKUP FAILED, NO SSN",!
    143143 . 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
    153149 S C0CR=$$GCPR^LA7QRY(C0CPTID,C0CSDT,C0CEDT,C0CSPC,C0CSPC) ; CALL LAB LOOKUP
    154150 Q
     
    161157 I '$D(DFN) S DFN=1 ; DEFAULT TEST PATIENT
    162158 I '$D(^KVAI(0)) D SETTBL ; INITIALIZE LAB TABLE
    163  I ^TMP("GPLCCR","LABTBL",0)'="V2" D SETTBL ; NEED NEWEST VERSION
     159 I ^KBAI(0)'="V2" D SETTBL ; NEED NEWEST VERSION
    164160 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 TABLE
     161 S C0CTAB=$NA(^KBAI) ; BASE OF OBX TABLE
    166162 S C0CHB=$NA(^TMP("HLS",$J))
    167163 S C0CI=""
     
    203199 . . . S XV("RESULTTESTCODINGSYSTEM")=C0CVAR("C3") ; PRIMARY DISPLAY NAME
    204200 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C2") ; USE PRIMARY TEXT
    205  . . N C0CZG S C0CZG=XV("RESULTTESTNORMALDESCRIPTIONTEXT") ;
    206  . . S XV("RESULTTESTNORMALDESCRIPTIONTEXT")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE
     201 . . N C0CZG S C0CZG=XV("RESULTTESTNORMALDESCTEXT") ;
     202 . . S XV("RESULTTESTNORMALDESCTEXT")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE
    207203 . . S C0CZG=XV("RESULTTESTVALUE")
    208204 . . S XV("RESULTTESTVALUE")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE
    209205 . I C0CTYP="OBX" D  ; PROCESS TEST RESULTS
    210206 . . I C0CLOBX=0 D  ; FIRST TEST RESULT FOR THIS SECTION
    211  . . . S C0CLB2=$NA(@C0CLB@(C0CLI,"M","TESTS")) ; INDENT FOR TEST RESULTS
     207 . . . S C0CLB2=$NA(@C0CLB@(C0CLI,"M","TEST")) ; INDENT FOR TEST RESULTS
    212208 . . S C0CLOBX=C0CLOBX+1 ; INCREMENT TEST COUNT
    213209 . . S @C0CLB2@(0)=C0CLOBX ; STORE THE TEST COUNT
     
    368364 S X("OBX","OBX5")="5^00561^Observation Results^RESULTTESTVALUE"
    369365 S X("OBX","OBX6")="6^00562^Units^RESULTTESTUNITS"
    370  S X("OBX","OBX7")="7^00563^Reference Range^RESULTTESTNORMALDESCRIPTIONTEXT"
     366 S X("OBX","OBX7")="7^00563^Reference Range^RESULTTESTNORMALDESCTEXT"
    371367 S X("OBX","OBX8")="8^00564^Abnormal Flags^RESULTTESTFLAG"
    372368 S X("OBX","OBX9")="9^00639^Probability"
     
    379375 S X("OBX","OBX16")="16^00584^Responsible Observer"
    380376 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.