source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVVS1.m@ 1396

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

initial load of WorldVistAEHR

File size: 4.8 KB
Line 
1GMRVVS1 ;HIRMFO/YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 1 ;3/17/97
2 ;;4.0;Vitals/Measurements;**1,9,11**;Apr 25, 1997
3GRAPH ;
4 S GMRPGC=0,GMRX1="" F X=1:1:111 S GMRX1=GMRX1_$S(X#11:" ",1:"|")
5 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
6 S GMRPG=GMRTNM\10+$S(GMRTNM#10>0:1,1:0) I GMRPG=0 D HEADER^GMRVVS2 W !,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMRVVS2 Q
7 F GMRPGS=1:1:GMRPG S GMRTLO=105.8335,GMRPLO=198.335 D PAGE Q:GMROUT
8 Q
9PAGE ;
10 K GMRQUAL,GLINE,GVAR D HEADER^GMRVVS2 W "T: Temperature P: Pulse BMI: Body Mass Index C/G: Circumference/Girth * - Abnormal value ** - Abnormal value off of graph",! D DATES^GMRVVS2 W !,?10,"|",?11,GMRX
11 F GMRI=0:0 Q:$Y>51 W ! D SETHD^GMRVVS4 W GMRHDR1,?9,$S(GMR3!($Y=28):"-",1:""),?10,"|" D DATAPRT^GMRVVS4 W $S(GMR3!($Y=28):"-",1:""),?106,GMRHDR2
12 W !,?10,"|",GMRX2 F GMRI="T","P","R","B","B1","B2","W","H","P1","BMI" S GMRLINE(GMRI)=GMRX1,GVAR(GMRI)=""
13 F GMRI="PO2","OX1","OX2","OX3","CVP","CVP1","CG","CG1","CG2" K GVAR(GMRI)
14 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>12 F GMRI="T","P","R","H","W" D STLNP
15 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>12 D BP^GMRVVS2
16 F GMRI="T","P","P1","R","B","B1","B2","W","BMI","H" I $D(GVAR(GMRI)) D
17 .I IOSL<($Y+6) S GMRI(1)=GMRI D FOOTER^GMRVVS2,HEADER^GMRVVS2,DATES^GMRVVS2 S GMRI=GMRI(1) W !,?10,"|",?11,GMRX
18 . S G=$S(GMRI="T":"TEMP.",GMRI="P":"PULSE",GMRI="R":"RESP.",GMRI="W":"WEIGHT(LB)",GMRI="H":"HEIGHT(IN)",GMRI="B":"BLOOD",GMRI="B1":" PRESSURE",GMRI="BMI":"BMI",1:"")
19 . I G="" S G=$S(GMRI="PO2":"PULSE OX.",GMRI="OX1":" L/MIN",GMRI="OX2":" %",GMRI="OX3":" METHOD",GMRI="CG":"C/G (IN)",GMRI="CVP":"CVP cm H2O",GMRI="CVP1":" mmHg",GMRI="CG1":" ",GMRI="CG2":" (CM)",1:"")
20 . W !,G,?10,"|",GMRLINE(GMRI)
21 D IO^GMRVVS2 I 'GMROUT W !,?10,"|",GMRX,!
22 I IOSL<($Y+6) D FOOTER^GMRVVS2,HEADER^GMRVVS2
23 I $D(GMRQUAL),'GMROUT W ! S GLINE="Qualifier: " S G="" F S G=$O(GMRQUAL(G)) Q:G="" D LEGEND^GMRVLGQU
24 I 'GMROUT W GLINE F X=0:0 W ! Q:IOSL<($Y+6)
25 D FOOTER^GMRVVS2 S GMRDT="" F GMRNM=1:1:12 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
26 Q
27STLNP ;
28 S GMR(GMRI)=$O(^TMP($J,"GMR",GMRI,GMRDT,"")) Q:GMR(GMRI)=""
29 S (GMRSITE,GMRSITE(1),GMRINF,GMRVJ)=""
30 S GMRSITE(1)=$P($G(^TMP($J,"GMR",GMRI,GMRDT,GMR(GMRI))),"^"),GMRSITE(2)=$P($G(^(GMR(GMRI))),"^",3),GMRINF=$P($G(^(GMR(GMRI))),"^",4) I GMRSITE(1)'="" S GI=GMRI D SYNOARY^GMRVLGQU
31 I GMRI'="CVP" S GI=$S(GMR(GMRI)>0:$J(GMR(GMRI),0,$S(GMRI="W"!(GMRI="H")!(GMRI="CG"):2,GMRI'="T":0,1:1)),1:GMR(GMRI))
32 E S GI=$S(GMR(GMRI)>0!(GMR(GMRI)<0)!($E(GMR(GMRI))="0"):$J(GMR(GMRI),0,1),1:GMR(GMRI))
33 I "UNAVAILABLEPASSREFUSED"'[$$UP^XLFSTR(GI) S GI=GI_$S($P(^TMP($J,"GMR",GMRI,GMRDT,GMR(GMRI)),"^",2)'=1:" ",1:"*")
34 I GMRI="P",($P(^TMP($J,"GMR",GMRI,GMRDT,GMR(GMRI)),"^",1)["DORSALIS PEDIS"),(+GI=1) S:$E(GI,$L(GI))="*" GI=$E(GI,1,$L(GI)-1)
35 S $P(GMRLINE(GMRI),"|",GMRNM)=GI_$S(GMRI="P"&($L(GMRSITE," ")>3):""_$P(GMRSITE," "),GMRI="R"!(GMRI="T")!(GMRI="H")!(GMRI="W")!(GMRI="CG"):""_GMRSITE,1:"")
36 S $P(GMRLINE(GMRI),"|",GMRNM)=$E($P(GMRLINE(GMRI),"|",GMRNM)_" ",1,10)
37 D SETLN
38 I GMRI="CG",$D(GMRLINE("CG2")) S $P(GMRLINE("CG2"),"|",GMRNM)=$E($S(GMR(GMRI)>0:$J(GMR(GMRI)/.3937,0,2),1:"")_" ",1,10)
39 I GMRI="P" S $P(GMRLINE("P1"),"|",GMRNM)=$E($S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
40 I GMRI="H",$D(GMRLINE("H1")) S:GMR(GMRI)>0 $P(GMRLINE("H1"),"|",GMRNM)=$E($S(GMR(GMRI)>0:$J(GMR(GMRI)*2.54,0,2),1:GMR(GMRI))_" ",1,10)
41 I GMRI="W",$D(GMRLINE("W1")) S:GMR(GMRI)>0 $P(GMRLINE("W1"),"|",GMRNM)=$E($S(GMR(GMRI)>0:$J(GMR(GMRI)/2.2,0,2),1:GMR(GMRI))_" ",1,10)
42 I GMRI="W",$D(GMRLINE("BMI")),GMR(GMRI)>0 D
43 . S GMRBMI="",GMRBMI(1)=GMRDT,GMRBMI(2)=GMR(GMRI) D CALBMI^GMRVBMI(.GMRBMI)
44 . S $P(GMRLINE("BMI"),"|",GMRNM)=$E(GMRBMI_" ",1,10) K GMRBMI
45 I GMRI="PO2",$D(GMRLINE("OX1")) D
46 . S $P(GMRLINE("OX3"),"|",GMRNM)=$E(GMRSITE_" ",1,10)
47 . S GMRINF=$P(^TMP($J,"GMR",GMRI,GMRDT,GMR(GMRI)),"^",4),(GMRINF(1),GMRINF(2))="" D
48 . . I GMRINF="" S $P(GMRLINE("OX1"),"|",GMRNM)=" ",$P(GMRLINE("OX2"),"|",GMRNM)=" "
49 . . E D PO2^GMRVLGQU(.GMRINF) S $P(GMRLINE("OX1"),"|",GMRNM)=$E(GMRINF(1)_" ",1,10),$P(GMRLINE("OX2"),"|",GMRNM)=$E(GMRINF(2)_" ",1,10)
50 I GMRI="CVP",$D(GMRLINE("CVP1")) S $P(GMRLINE("CVP1"),"|",GMRNM)=$E($S(GMR(GMRI)>0!(GMR(GMRI)<0)!($E(GMR(GMRI))="0"):$J(GMR(GMRI)/1.36,0,1),1:"")_$S(GI["*":"*",1:"")_" ",1,10)
51 I GMRI="PN",$D(GMRLINE("PN")) S $P(GMRLINE("PN"),"|",GMRNM)=$E($S(GMR(GMRI)?1.2N&(GMR(GMRI)'>10):GMR(GMRI),GMR(GMRI)=99:GMR(GMRI),1:"")_" ",1,10)
52 K GI Q
53SETLN ;
54 S GVAR(GMRI)=""
55 I GMRI="PO2" S (GVAR("PO2"),GVAR("OX1"),GVAR("OX2"),GVAR("OX3"))="" Q
56 I GMRI="CVP" S (GVAR("CVP"),GVAR("CVP1"))="" Q
57 I GMRI="CG" S (GVAR("CG"),GVAR("CG2"))="" Q
58 Q
Note: See TracBrowser for help on using the repository browser.