Fixed variable reference for VistA vitals

This commit is contained in:
cje 2010-02-19 16:56:58 +00:00
parent 5fb42ec163
commit 8f0eb38f0a
1 changed files with 9 additions and 9 deletions

View File

@ -87,14 +87,14 @@ GETVISTA(DFN,C0CVIT) ; CALLS VITALS^ORQQVI TO GET VITAL SIGNS.
F C0CC=1:1:VSORT(0) S C0CVI=VSORT(C0CC) D ; FOR EACH VITAL SIGN IN THE LIST F C0CC=1:1:VSORT(0) S C0CVI=VSORT(C0CC) D ; FOR EACH VITAL SIGN IN THE LIST
. I DEBUG W VIT(C0CVI),! . I DEBUG W VIT(C0CVI),!
. ; FIGURE OUT WHICH TYPE OF VITAL SIGN IT IS (HEIGHT, WEIGHT, BLOOD PRESSURE, TEMPERATURE, RESPIRATION, PULSE, PAIN, OTHER) . ; FIGURE OUT WHICH TYPE OF VITAL SIGN IT IS (HEIGHT, WEIGHT, BLOOD PRESSURE, TEMPERATURE, RESPIRATION, PULSE, PAIN, OTHER)
. D:$P(VIT(C0CVI),U,3)="HT" HEIGHT1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"in") . D:$P(VIT(C0CVI),U,3)="HT" HEIGHT1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"in")
. D:$P(VIT(C0CVI),U,3)="WT" WEIGHT1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"lbs") . D:$P(VIT(C0CVI),U,3)="WT" WEIGHT1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"lbs")
. D:$P(VIT(C0CVI),U,3)="BP" BP1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"") . D:$P(VIT(C0CVI),U,3)="BP" BP1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"")
. D:$P(VIT(C0CVI),U,3)="T" TMP1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"F") . D:$P(VIT(C0CVI),U,3)="T" TMP1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"F")
. D:$P(VIT(C0CVI),U,3)="R" RESP1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"") . D:$P(VIT(C0CVI),U,3)="R" RESP1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"")
. D:$P(VIT(C0CVI),U,3)="P" PULSE1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"") . D:$P(VIT(C0CVI),U,3)="P" PULSE1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"")
. D:$P(VIT(C0CVI),U,3)="PN" PAIN1($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"") . D:$P(VIT(C0CVI),U,3)="PN" PAIN1($$FMDTOUTC^C0CUTIL($P(VIT(C0CVI),U,4),"DT"),$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"")
. D:'$D(ZRNF) OTHER($$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT"),"OTHER VITAL",$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6),$P(VITPTMP,U,3),"UNKNOWN") ;IF THE VITAL ISN'T DEFINED IT IS OTHER . D:'$D(ZRNF) OTHER($$FMDTOUTC^C0CUTIL($P(C0CVI,U,4),"DT"),"OTHER VITAL",$P(^GMR(120.5,$P(VIT(C0CVI),U,1),0),U,6),$P(VIT(C0CVI),U,3),"UNKNOWN") ;IF THE VITAL ISN'T DEFINED IT IS OTHER
. D RNF1TO2^C0CRNF(C0CVIT,"ZRNF") ;ADD THIS ROW TO THE ARRAY . D RNF1TO2^C0CRNF(C0CVIT,"ZRNF") ;ADD THIS ROW TO THE ARRAY
. K ZRNF . K ZRNF
; SAVE RIM VARIABLES SEE C0CRIMA ; SAVE RIM VARIABLES SEE C0CRIMA
@ -123,7 +123,7 @@ GETRPMS(DFN,C0CVIT) ; CALLS QUERY^BEHOVM TO GET VITAL SIGNS.
; RPC OUTPUT FORMAT: ; RPC OUTPUT FORMAT:
; vfile ien^vital name^vital abbr^date/time taken(FM FORMAT)^value+units (US & metric) ; vfile ien^vital name^vital abbr^date/time taken(FM FORMAT)^value+units (US & metric)
D QUERY^BEHOVM("LISTX") ; RUN QUERY VITALS CALL D QUERY^BEHOVM("LISTX") ; RUN QUERY VITALS CALL
I '$D(^TMP("CIAVMRPC",$J)) S @VITOUTXML@(0)=0 K ^TMP("CIAVMRPC",$J) Q ; RETURN NOT FOUND, KILL ARRAY AND QUIT I '$D(^TMP("CIAVMRPC",$J)) S @VITOUT@(0)=0 K ^TMP("CIAVMRPC",$J) Q ; RETURN NOT FOUND, KILL ARRAY AND QUIT
; MOVE THE ARRAY TO LOCAL VARIABLE ; MOVE THE ARRAY TO LOCAL VARIABLE
M VIT=^TMP("CIAVMRPC",$J,0) M VIT=^TMP("CIAVMRPC",$J,0)
; RPC CLEANUP ; RPC CLEANUP