Vitals date limits and restored Labs date limits
This commit is contained in:
parent
3bda354e18
commit
a5c3cc42af
|
@ -35,6 +35,8 @@ SET(INPARMS) ;INITIALIZE RUNTIME PARMS USING INPARMS TO OVERRIDE DEFAULTS
|
|||
; IF THEY FAIL, THE FOLLOWING WILL BE HARDCODED DEFAULTS
|
||||
I '$D(@C0CPARMS@("LABLIMIT")) S @C0CPARMS@("LABLIMIT")="T-360" ;ONE YR WORTH
|
||||
I '$D(@C0CPARMS@("LABSTART")) S @C0CPARMS@("LABSTART")="T" ;TODAY
|
||||
I '$D(@C0CPARMS@("VITLIMIT")) S @C0CPARMS@("VITLIMIT")="T-360" ;ONE YEAR VITALS
|
||||
I '$D(@C0CPARMS@("VITSTART")) S @C0CPARMS@("VITSTART")="T" ;TODAY
|
||||
Q
|
||||
;
|
||||
CHECK ; CHECK TO SEE IF PARMS ARE PRESENT, ELSE RUN SET
|
||||
|
|
24
p/GPLLABS.m
24
p/GPLLABS.m
|
@ -142,10 +142,15 @@ GHL7 ; GET HL7 MESSAGE FOR LABS FOR THIS PATIENT
|
|||
. W "LAB LOOKUP FAILED, NO SSN",!
|
||||
. S C0CNSSN=1 ; SET NO SSN FLAG
|
||||
S C0CSPC="*" ; LOOKING FOR ALL LABS
|
||||
I $D(^TMP("GPLCCR","RPMS")) D ; RUNNING RPMS
|
||||
. D DT^DILF(,"T-365",.C0CSDT) ; START DATE ONE YEAR AGO TO LIMIT VOLUME
|
||||
E D DT^DILF(,"T-5000",.C0CSDT) ; START DATE LONG AGO TO GET EVERYTHING
|
||||
D DT^DILF(,"T",.C0CEDT) ; END DATE TODAY
|
||||
;I $D(^TMP("GPLCCR","RPMS")) D ; RUNNING RPMS
|
||||
;. D DT^DILF(,"T-365",.C0CSDT) ; START DATE ONE YEAR AGO TO LIMIT VOLUME
|
||||
;E D DT^DILF(,"T-5000",.C0CSDT) ; START DATE LONG AGO TO GET EVERYTHING
|
||||
;D DT^DILF(,"T",.C0CEDT) ; END DATE TODAY
|
||||
S C0CLLMT=$$GET^C0CPARMS("LABLIMIT") ; GET THE LIMIT PARM
|
||||
S C0CLSTRT=$$GET^C0CPARMS("LABSTART") ; GET START PARM
|
||||
D DT^DILF(,C0CLLMT,.C0CSDT) ;
|
||||
W "LAB LIMIT: ",C0CLLMT,!
|
||||
D DT^DILF(,C0CLSTRT,.C0CEDT) ; END DATE TODAY - IMPLEMENT END DATE PARM
|
||||
S C0CR=$$GCPR^LA7QRY(C0CPTID,C0CSDT,C0CEDT,C0CSPC,C0CSPC) ; CALL LAB LOOKUP
|
||||
Q
|
||||
;
|
||||
|
@ -155,10 +160,10 @@ LIST ; LIST THE HL7 MESSAGE; ALSO, EXTRACT THE RESULT VARIABLES TO C0CLB
|
|||
I '$D(C0CLB) S C0CLB=$NA(^TMP("GPLCCR",$J,"RESULTS")) ; BASE GLB FOR LABS VARS
|
||||
I '$D(C0CQT) S C0CQT=0
|
||||
I '$D(DFN) S DFN=1 ; DEFAULT TEST PATIENT
|
||||
I '$D(^KVAI(0)) D SETTBL ; INITIALIZE LAB TABLE
|
||||
I ^KBAI(0)'="V2" D SETTBL ; NEED NEWEST VERSION
|
||||
I '$D(^TMP("GPLCCR","LABTBL",0)) D SETTBL ;INITIALIZE LAB TABLE
|
||||
I ^TMP("GPLCCR","LABTBL",0)'="V3" D SETTBL ;NEED NEWEST VERSION
|
||||
I '$D(^TMP("HLS",$J,1)) D GHL7 ; GET HL7 MGS IF NOT ALREADY DONE
|
||||
S C0CTAB=$NA(^KBAI) ; BASE OF OBX TABLE
|
||||
S C0CTAB=$NA(^TMP("GPLCCR","LABTBL")) ; BASE OF OBX TABLE
|
||||
S C0CHB=$NA(^TMP("HLS",$J))
|
||||
S C0CI=""
|
||||
S @C0CLB@(0)=0 ; INITALIZE RESULTS VARS COUNT
|
||||
|
@ -374,7 +379,8 @@ SETTBL ;
|
|||
S X("OBX","OBX15")="15^00583^Producer.s ID^RESULTTESTSOURCEACTORID"
|
||||
S X("OBX","OBX16")="16^00584^Responsible Observer"
|
||||
S X("OBX","OBX17")="17^00936^Observation Method"
|
||||
M ^KBAI=X ; SET VALUES IN ^KBAI
|
||||
S ^KBAI(0)="V2"
|
||||
K ^TMP("GPLCCR","LABTBL")
|
||||
M ^TMP("GPLCCR","LABTBL")=X ; SET VALUES IN LAB TBL
|
||||
S ^TMP("GPLCCR","LABTBL",0)="V3"
|
||||
Q
|
||||
;
|
||||
|
|
|
@ -26,7 +26,12 @@ EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE
|
|||
; IVITXML CONTAINS ONLY THE VITALS SECTION OF THE OVERALL TEMPLATE
|
||||
;
|
||||
N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF,VORDR
|
||||
D VITALS^ORQQVI(.VITRSLT,DFN,"","")
|
||||
S C0CVLMT=$$GET^C0CPARMS("VITLIMIT") ; GET THE LIMIT PARM
|
||||
S C0CVSTRT=$$GET^C0CPARMS("VITSTART") ; GET START PARM
|
||||
D DT^DILF(,C0CVLMT,.C0CSDT) ;
|
||||
W "VITALS START: ",C0CVSTRT," LIMIT: ",C0CVLMT,!
|
||||
D DT^DILF(,C0CVSTRT,.C0CEDT) ; END DATE TODAY - IMPLEMENT END DATE PARM
|
||||
D VITALS^ORQQVI(.VITRSLT,DFN,C0CSDT,C0CEDT)
|
||||
I '$D(VITRSLT(1)) S @VITOUTXML@(0)=0 Q ; RETURN NOT FOUND AND QUIT
|
||||
I $P(VITRSLT(1),U,2)="No vitals found." D Q ; NULL RESULT FROM RPC
|
||||
. I DEBUG W "NO VITALS FOUND FROM VITALS RPC",!
|
||||
|
|
Loading…
Reference in New Issue