source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVLGQU.m@ 1608

Last change on this file since 1608 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1GMRVLGQU ;HIRMFO/YH-UTILITY FOR LEGEND, PO2 AND QUALIFIER ;2/4/99
2 ;;4.0;Vitals/Measurements;**1,7**;Apr 25, 1997
3LEGEND ;CREATE VITAL/QUALIFIER/SYNONYM LEGEND STORED IN GLINE LOCAL GLOBAL
4 N I,X,J,K,G,B S (I,J,B)=0,(X,GLINE(1),GLINE(2),GLINE(3),GLINE(4),GLINE(5),GLINE)=""
5 F G(1)="T","P","R","B","H","W","PO2","CG","CVP","PN" I $D(GMRQUAL(G(1))) D LEGEND1
6 S J=J+1,GLINE(J)=X
7 K ^UTILITY($J),DIWF,DIWL,WIWR Q
8LEGEND1 ;
9 S G=$S(G(1)="CG":"CIRC/GIRTH",G(1)="PO2":"PULSE OX",G(1)="B":"BP",G(1)="W":"WT",G(1)="H":"HT",G(1)="T":"TEMP",G(1)="P":"PULSE",G(1)="R":"RESP",G(1)="PN":"PAIN",1:G(1))_" - "
10 S X=X_$S(B=0:"",1:" ")_G S B=1 D:$L(X)>150 CUT D
11 . S G="" F S G=$O(GMRQUAL(G(1),G)) Q:G="" S X=X_G_" " I $L(X)>150 D CUT
12 Q
13CUT ;
14 S DIWF="",DIWL=0,DIWR=$S(+$G(GLPRNTR):120,1:150) K ^UTILITY($J) D ^DIWP
15 S I=+$P(^UTILITY($J,"W",0),"^")
16 S J=J+1,GLINE(J)=$G(^UTILITY($J,"W",0,1,0)),X=$G(^UTILITY($J,"W",0,2,0))
17 K ^UTILITY($J)
18 Q
19SYNOARY ;
20 K GG S GG=$L(GMRSITE(1),";") F GG(1)=1:1:GG S GG(2)=$P(GMRSITE(1),";",GG(1)) S GG(3)=$O(^GMRD(120.52,"B",GG(2),0)) D:GG(3)>0
21 . S GMRSITE=GMRSITE_$S(GMRSITE="":"",1:" "),GSYNO=""
22 . I $P($G(^GMRD(120.52,GG(3),0)),"^",2)'="" S GSYNO=$P(^(0),"^",2)
23 . E S GCHA=GG(2) D
24 . . I GCHA["-" S GCHA=$P(GCHA,"-")_" "_$P(GCHA,"-",2)
25 . . I $L(GCHA," ")<2 S GSYNO=$E(GCHA)_$$LOW^XLFSTR($E(GCHA,2,3))
26 . . E S GLEN=$L(GCHA," ") F I=1:1:GLEN S GSYNO=GSYNO_$S($E($P(GCHA," ",I))'="(":$E($P(GCHA," ",I)),1:"")
27 . I GG(2)'="" S GG(2)=$E(GG(2))_$$LOW^XLFSTR($E(GG(2),2,30))
28 . S GMRSITE=GMRSITE_GSYNO S:GI'="C" GMRQUAL(GI,GSYNO_": "_GG(2))="" K GLEN
29 Q
30PO2(X) ;
31 I X="" Q
32 I X["%" D
33 . S X(2)=$P(X,"%")
34 . I X(2)["l/min" S X(2)=$P(X(2),"l/min",2)
35 I X["l/min" D
36 . S X(1)=$P(X,"l/min")
37 . I X(1)["%" S X(1)=$P(X(1),"%",2)
38 S X(1)=$$STRIP^XLFSTR(X(1)," "),X(2)=$$STRIP^XLFSTR(X(2)," ")
39 Q
Note: See TracBrowser for help on using the repository browser.