Changeset 599


Ignore:
Timestamp:
Nov 5, 2009, 2:52:39 PM (15 years ago)
Author:
Christopher Edwards
Message:

Added dynamic units for vital signs (uses what is returned in RPC)

File:
1 edited

Legend:

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

    r569 r599  
    1 C0CVITAL        ; CCDCCR/CJE/GPL - CCR/CCD PROCESSING FOR VITALS ; 07/16/08
     1C0CVITAL ; CCDCCR/CJE/GPL - CCR/CCD PROCESSING FOR VITALS ; 07/16/08
    22 ;;1.0;C0C;;May 19, 2009;
    33 ;Copyright 2008,2009 George Lilly, University of Minnesota and others.
     
    2222 Q
    2323 ;
    24 EXTRACT(VITXML,DFN,VITOUTXML)   ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE
     24EXTRACT(VITXML,DFN,VITOUTXML) ; EXTRACT VITALS INTO PROVIDED XML TEMPLATE
    2525 ;
    2626 ; VITXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
     
    3939 Q
    4040 ;
    41 VITVISTA        ; EXTRACT VITALS FROM VISTA INTO PROVIDED XML TEMPLATE
     41VITVISTA ; EXTRACT VITALS FROM VISTA INTO PROVIDED XML TEMPLATE
    4242 D VITALS^ORQQVI(.VITRSLT,DFN,C0CSDT,C0CEDT)
    4343 ;D VITALS^ORQQVI(.VITRSLT,DFN,C0CVSTRT,C0CVLMT) ; GPL LET GMR HANDLE THE DATES
     
    199199 Q
    200200 ;
    201 VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE
     201VITRPMS ; EXTRACT VITALS FROM RPMS INTO PROVIDED XML TEMPLATE
    202202 ; RPMS VITAL RPC ONLY RETURNS LATEST VITAL IN SPECIFIED DATE RANGE NOT ALL VITALS IN DATE RANGE
    203203 ; WE NEED TO SETUP THE VARIABLES THE INTERNAL CALL NEEDS TO BYPASS A HARD CODE OF ONE VITAL FOR DATE RANGE
     
    241241 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    242242 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    243  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="in"
     243 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    244244 . . E  I $P(VITPTMP,U,3)="WT" D
    245245 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     
    255255 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    256256 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    257  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="lbs"
     257 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    258258 . . E  I $P(VITPTMP,U,3)="BP" D
    259259 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     
    269269 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    270270 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    271  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
     271 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    272272 . . E  I $P(VITPTMP,U,3)="TMP" D
    273273 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     
    283283 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    284284 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    285  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="F"
     285 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    286286 . . E  I $P(VITPTMP,U,3)="RS" D
    287287 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     
    297297 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    298298 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    299  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
     299 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    300300 . . E  I $P(VITPTMP,U,3)="PU" D
    301301 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     
    311311 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    312312 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    313  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
     313 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    314314 . . E  I $P(VITPTMP,U,3)="PA" D
    315315 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
     
    325325 . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^AUPNVMSR($P(VITPTMP,U,1),12)),U,4)
    326326 . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P($P(VITPTMP,U,5)," ",1)
    327  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
     327 . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=$P($P(VITPTMP,U,5)," ",2)
    328328 . . E  D
    329329 . . . ;W "IN VITAL:  OTHER",!
     
    361361 Q
    362362 ;
    363 VITDRPMS(VDT)   ; RUN DATE SORTING ALGORITHM FOR RPMS
     363VITDRPMS(VDT) ; RUN DATE SORTING ALGORITHM FOR RPMS
    364364 ; VDT IS PASSED BY REFERENCE AND WILL CONTAIN THE ARRAY
    365365 ; OF DATES IN THE VITALS RESULTS
     
    374374 Q
    375375 ;
    376 VITDVISTA(VDT)  ; RUN DATE SORTING ALGORITHM FOR VISTA
     376VITDVISTA(VDT) ; RUN DATE SORTING ALGORITHM FOR VISTA
    377377 ; VDT IS PASSED BY REFERENCE AND WILL CONTAIN THE ARRAY
    378378 ; OF DATES IN THE VITALS RESULTS
Note: See TracChangeset for help on using the changeset viewer.