source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVVS1.m@ 1147

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

initial load of WorldVistAEHR

File size: 4.9 KB
Line 
1GMVVS1 ;HIOFO/YH,FT-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 1 ;11/6/01 14:43
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10104 - ^XLFSTR calls (supported)
6 ;
7GRAPH ;
8 S GMRPGC=0,GMRX1="" F X=1:1:111 S GMRX1=GMRX1_$S(X#11:" ",1:"|")
9 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
10 S GMRPG=GMRTNM\10+$S(GMRTNM#10>0:1,1:0) I GMRPG=0 D HEADER^GMVVS2 W !,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMVVS2 Q
11 F GMRPGS=1:1:GMRPG S GMRTLO=105.8335,GMRPLO=198.335 D PAGE Q:GMROUT
12 Q
13PAGE ;
14 K GMRQUAL,GLINE,GVAR D HEADER^GMVVS2 W "T: Temperature P: Pulse BMI: Body Mass Index C/G: Circumference/Girth * - Abnormal value ** - Abnormal value off of graph",! D DATES^GMVVS2 W !,?10,"|",?11,GMRX
15 F GMRI=0:0 Q:$Y>51 W ! D SETHD^GMVVS4 W GMRHDR1,?9,$S(GMR3!($Y=28):"-",1:""),?10,"|" D DATAPRT^GMVVS4 W $S(GMR3!($Y=28):"-",1:""),?106,GMRHDR2
16 W !,?10,"|",GMRX2 F GMRI="T","P","R","B","B1","B2","W","H","P1","BMI" S GMRLINE(GMRI)=GMRX1,GVAR(GMRI)=""
17 F GMRI="PO2","OX1","OX2","OX3","CVP","CVP1","CG","CG1","CG2" K GVAR(GMRI)
18 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
19 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^GMVVS2
20 F GMRI="T","P","P1","R","B","B1","B2","W","BMI","H" I $D(GVAR(GMRI)) D
21 .I IOSL<($Y+6) S GMRI(1)=GMRI D FOOTER^GMVVS2,HEADER^GMVVS2,DATES^GMVVS2 S GMRI=GMRI(1) W !,?10,"|",?11,GMRX
22 . 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:"")
23 . 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:"")
24 . W !,G,?10,"|",GMRLINE(GMRI)
25 D IO^GMVVS2 I 'GMROUT W !,?10,"|",GMRX,!
26 I IOSL<($Y+6) D FOOTER^GMVVS2,HEADER^GMVVS2
27 I $D(GMRQUAL),'GMROUT W ! S GLINE="Qualifier: " S G="" F S G=$O(GMRQUAL(G)) Q:G="" D LEGEND^GMVLGQU
28 I 'GMROUT W GLINE F X=0:0 W ! Q:IOSL<($Y+6)
29 D FOOTER^GMVVS2 S GMRDT="" F GMRNM=1:1:12 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
30 Q
31STLNP ;
32 S GMR(GMRI)=$O(^TMP($J,"GMR",GMRI,GMRDT,"")) Q:GMR(GMRI)=""
33 S (GMRSITE,GMRSITE(1),GMRINF,GMRVJ)=""
34 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^GMVLGQU
35 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))
36 E S GI=$S(GMR(GMRI)>0!(GMR(GMRI)<0)!($E(GMR(GMRI))="0"):$J(GMR(GMRI),0,1),1:GMR(GMRI))
37 I "UNAVAILABLEPASSREFUSED"'[$$UP^XLFSTR(GI) S GI=GI_$S($P(^TMP($J,"GMR",GMRI,GMRDT,GMR(GMRI)),"^",2)'=1:" ",1:"*")
38 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)
39 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:"")
40 S $P(GMRLINE(GMRI),"|",GMRNM)=$E($P(GMRLINE(GMRI),"|",GMRNM)_" ",1,10)
41 D SETLN
42 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)
43 I GMRI="P" S $P(GMRLINE("P1"),"|",GMRNM)=$E($S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
44 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)
45 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)
46 I GMRI="W",$D(GMRLINE("BMI")),GMR(GMRI)>0 D
47 . S GMRBMI="",GMRBMI(1)=GMRDT,GMRBMI(2)=GMR(GMRI) D CALBMI^GMVBMI(.GMRBMI)
48 . S $P(GMRLINE("BMI"),"|",GMRNM)=$E(GMRBMI_" ",1,10) K GMRBMI
49 I GMRI="PO2",$D(GMRLINE("OX1")) D
50 . S $P(GMRLINE("OX3"),"|",GMRNM)=$E(GMRSITE_" ",1,10)
51 . S GMRINF=$P(^TMP($J,"GMR",GMRI,GMRDT,GMR(GMRI)),"^",4),(GMRINF(1),GMRINF(2))="" D
52 . . I GMRINF="" S $P(GMRLINE("OX1"),"|",GMRNM)=" ",$P(GMRLINE("OX2"),"|",GMRNM)=" "
53 . . E D PO2^GMVLGQU(.GMRINF) S $P(GMRLINE("OX1"),"|",GMRNM)=$E(GMRINF(1)_" ",1,10),$P(GMRLINE("OX2"),"|",GMRNM)=$E(GMRINF(2)_" ",1,10)
54 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)
55 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)
56 K GI Q
57SETLN ;
58 S GVAR(GMRI)=""
59 I GMRI="PO2" S (GVAR("PO2"),GVAR("OX1"),GVAR("OX2"),GVAR("OX3"))="" Q
60 I GMRI="CVP" S (GVAR("CVP"),GVAR("CVP1"))="" Q
61 I GMRI="CG" S (GVAR("CG"),GVAR("CG2"))="" Q
62 Q
Note: See TracBrowser for help on using the repository browser.