From bb6d3ad36837b4a3e823d596a352f9dc2bbaf34f Mon Sep 17 00:00:00 2001 From: cje Date: Thu, 5 Nov 2009 19:52:39 +0000 Subject: [PATCH] Added dynamic units for vital signs (uses what is returned in RPC) --- p/C0CVITAL.m | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/p/C0CVITAL.m b/p/C0CVITAL.m index d3a6e57..474dc87 100644 --- a/p/C0CVITAL.m +++ b/p/C0CVITAL.m @@ -1,4 +1,4 @@ -C0CVITAL ; CCDCCR/CJE/GPL - CCR/CCD PROCESSING FOR VITALS ; 07/16/08 +C0CVITAL ; CCDCCR/CJE/GPL - CCR/CCD PROCESSING FOR VITALS ; 07/16/08 ;;1.0;C0C;;May 19, 2009; ;Copyright 2008,2009 George Lilly, University of Minnesota and others. ;Licensed under the terms of the GNU General Public License. @@ -21,7 +21,7 @@ C0CVITAL ; CCDCCR/CJE/GPL - CCR/CCD PROCESSING FOR VITALS ; 07/16/08 W "NO ENTRY FROM TOP",! Q ; -EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE +EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE ; ; VITXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED ; IVITXML CONTAINS ONLY THE VITALS SECTION OF THE OVERALL TEMPLATE @@ -38,7 +38,7 @@ EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE ;E D VITVISTA Q ; -VITVISTA ; EXTRACT VITALS FROM VISTA INTO PROVIDED XML TEMPLATE +VITVISTA ; EXTRACT VITALS FROM VISTA INTO PROVIDED XML TEMPLATE D VITALS^ORQQVI(.VITRSLT,DFN,C0CSDT,C0CEDT) ;D VITALS^ORQQVI(.VITRSLT,DFN,C0CVSTRT,C0CVLMT) ; GPL LET GMR HANDLE THE DATES I '$D(VITRSLT(1)) S @VITOUTXML@(0)=0 Q ; RETURN NOT FOUND AND QUIT @@ -198,7 +198,7 @@ VITVISTA ; EXTRACT VITALS FROM VISTA INTO PROVIDED XML TEMPLATE . F I=1:1:VITTMP(0) W VITTMP(I),! Q ; -VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE +VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE ; RPMS VITAL RPC ONLY RETURNS LATEST VITAL IN SPECIFIED DATE RANGE NOT ALL VITALS IN DATE RANGE ; WE NEED TO SETUP THE VARIABLES THE INTERNAL CALL NEEDS TO BYPASS A HARD CODE OF ONE VITAL FOR DATE RANGE N END,START,DATA @@ -240,7 +240,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="in" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E I $P(VITPTMP,U,3)="WT" D . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT") @@ -254,7 +254,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="lbs" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E I $P(VITPTMP,U,3)="BP" D . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT") @@ -268,7 +268,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E I $P(VITPTMP,U,3)="TMP" D . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT") @@ -282,7 +282,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="F" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E I $P(VITPTMP,U,3)="RS" D . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT") @@ -296,7 +296,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E I $P(VITPTMP,U,3)="PU" D . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT") @@ -310,7 +310,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E I $P(VITPTMP,U,3)="PA" D . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT") @@ -324,7 +324,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE . . . S @VITVMAP@("VITALSIGNSCODEVERSION")="" . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4) . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1) - . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="" + . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2) . . E D . . . ;W "IN VITAL: OTHER",! . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" @@ -360,7 +360,7 @@ VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE K ^TMP("CIAVMRPC",$J) Q ; -VITDRPMS(VDT) ; RUN DATE SORTING ALGORITHM FOR RPMS +VITDRPMS(VDT) ; RUN DATE SORTING ALGORITHM FOR RPMS ; VDT IS PASSED BY REFERENCE AND WILL CONTAIN THE ARRAY ; OF DATES IN THE VITALS RESULTS N VDTI,VDTJ,VTDCNT @@ -373,7 +373,7 @@ VITDRPMS(VDT) ; RUN DATE SORTING ALGORITHM FOR RPMS S VDT(0)=VTDCNT Q ; -VITDVISTA(VDT) ; RUN DATE SORTING ALGORITHM FOR VISTA +VITDVISTA(VDT) ; RUN DATE SORTING ALGORITHM FOR VISTA ; VDT IS PASSED BY REFERENCE AND WILL CONTAIN THE ARRAY ; OF DATES IN THE VITALS RESULTS N VDTI,VDTJ,VTDCNT @@ -385,4 +385,4 @@ VITDVISTA(VDT) ; RUN DATE SORTING ALGORITHM FOR VISTA . S VDT(VTDCNT)=$P(VITRSLT(VDTJ),U,4) ; PULL OUT THE DATE S VDT(0)=VTDCNT Q - ; \ No newline at end of file + ;