1 | GMVVS2 ;HIOFO/YH,FT-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 2 ;9/30/02 15:25
|
---|
2 | ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
|
---|
3 | ;
|
---|
4 | ; This routine uses the following IAs:
|
---|
5 | ; #1392 - FILE 126.56 references (private)
|
---|
6 | ; #1393 - FILE 126.58 references (private)
|
---|
7 | ; #10061 - ^VADPT calls (supported)
|
---|
8 | ; #10104 - ^XLFSTR calls (supported)
|
---|
9 | ;
|
---|
10 | IO ;PRINT INTAKE/OUTPUT SECTION OF VITAL SIGNS-I/O SHEET
|
---|
11 | K ^TMP($J,"XI"),^TMP($J,"XO")
|
---|
12 | F NN=1:1:GN(1)+1 S GMRI="XI"_NN K GMRLINE(GMRI)
|
---|
13 | F NN=1:1:GN(2)+1 S GMRI="XO"_NN K GMRLINE(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>10 S GDT=+$E(GMRDT,1,7) D
|
---|
15 | . F NN=1:1:GN(1)+1 S GMRI="XI"_NN I $D(^TMP($J,"GMR",GMRI,GDT)) D
|
---|
16 | . . S GMRYDT=$O(^TMP($J,"GMR",GMRI,GDT,0)) I GMRYDT>0 S ^TMP($J,"XI",NN,GDT,GMRYDT)="",GMRLINE(GMRI)=GMRX1
|
---|
17 | . F NN=1:1:GN(2)+1 S GMRI="XO"_NN I $D(^TMP($J,"GMR",GMRI,GDT)) D
|
---|
18 | . . S GMRYDT=$O(^TMP($J,"GMR",GMRI,GDT,0)) I GMRYDT>0 S ^TMP($J,"XO",NN,GDT,GMRYDT)="",GMRLINE(GMRI)=GMRX1
|
---|
19 | S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>10 S GDT=+$E(GMRDT,1,7) D SETDATA
|
---|
20 | I IOSL<($Y+6) D FOOTER,HEADER,DATES W !,?15,"|",?16,GMRX
|
---|
21 | W !,"Intake(24 Hr)(cc)",?20,"|",GMRX F NN=1:1:GN(1)+1 S GMRI="XI"_NN I $D(GMRLINE(GMRI)) D
|
---|
22 | .I IOSL<($Y+6) S GMRI(1)=GMRI D FOOTER,HEADER,DATES S GMRI=GMRI(1) W !,?20,"|",?21,GMRX
|
---|
23 | .W !,?3,$S(NN=1:"IV",NN=2:"BLOOD",NN=3:"P NUTRI",NN=(GN(1)+1):"TOTAL",NN>3&(NN<(GN(1)+1)):$E($P(^GMRD(126.56,+$O(^GMRD(126.56,"C",NN-3,0)),0),"^"),1,6),1:" "),?10,"|",GMRLINE(GMRI)
|
---|
24 | I IOSL<($Y+6) S GMRI(1)=GMRI D FOOTER,HEADER,DATES S GMRI=GMRI(1) W !,?10,"|",?11,GMRX
|
---|
25 | W !,"Output(24 Hr)(cc)",?20,"|",GMRX
|
---|
26 | F NN=1:1:GN(2)+1 S GI="XO"_NN I $D(GMRLINE(GI)) D
|
---|
27 | .I IOSL<($Y+6) S GMRI(1)=GMRI D FOOTER,HEADER,DATES W !,?20,"|",?21,GMRX S GMRI=GMRI(1)
|
---|
28 | .W !,?3,$S(NN<(GN(2)+1):$E($P(^GMRD(126.58,+$O(^GMRD(126.58,"C",NN,0)),0),"^"),1,6),NN=(GN(2)+1):"TOTAL",1:" "),?10,"|",GMRLINE(GI)
|
---|
29 | Q
|
---|
30 | SETDATA ; FILL GMRLINE WITH I/O DATA AND WRITE GMRLINE
|
---|
31 | F GMRI="XI","XO" S GMRY=0 F S GMRY=$O(^TMP($J,GMRI,GMRY)) Q:GMRY'>0 D
|
---|
32 | . I $D(^TMP($J,GMRI,GMRY,GDT)) S GDATA=$O(^TMP($J,GMRI,GMRY,GDT,0)) S:GDATA>0 $P(GMRLINE(GMRI_GMRY),"|",GMRNM)=$J(GDATA,8) K ^TMP($J,"GMR",GMRI_GMRY,GDT),^TMP($J,GMRI,GMRY,GDT,GDATA)
|
---|
33 | Q
|
---|
34 | FOOTER ;PRINT VITAL SIGNS-I/O SHEET FOOTER
|
---|
35 | W ! W:GMRNAM'="" ?$X-3,$E(GMRNAM,1,35) W:SSN'="" " "_SSN W:GMRBTH'="" " "_GMRBTH W:GMRAGE'="" " "_GMRAGE_" YRS" W:GMRSEX'="" " "_GMRSEX
|
---|
36 | W ?95,"MEDICAL RECORD" W !,"Unit: "_$S(GMRWARD(1)'="":GMRWARD(1),1:" ")," "_"Room: "_$S($P(VAIN(5),"^")'="":$P($P(VAIN(5),"^"),"-",1,2),1:" "),?95,"VITAL FLOW SHEET"
|
---|
37 | D INP^VADPT S GMRVHLOC=$$HOSPLOC^GMVUTL1(+$G(VAIN(4)))
|
---|
38 | W !,"Division: "_$$DIVISION^GMVUTL1(+GMRVHLOC),?55,"Page "_GMRPGC,?95,"VAF 10-7987 VICE SF 511",!
|
---|
39 | W GSTRFIN Q
|
---|
40 | DATES ;PRINT DATE/TIME COLUMNS FOR VITAL SIGNS-I/O SHEET
|
---|
41 | W ?18,$$REPEAT^XLFSTR("_",109),!,?6,"Date/Time",?17,"|" S GMRLINE=GMRX1,GMRJ=0 F GMRI=1:1:10 S GMRJ=$O(^TMP($J,"GMRDT",GMRJ)) Q:GMRJ'>0 S GMRDT=$E(GMRJ,4,5)_"/"_$E(GMRJ,6,7)_"/"_$E(GMRJ,2,3),$P(GMRLINE,"|",GMRI)=GMRDT_" "
|
---|
42 | W ?18,GMRLINE,! S GMRLINE=GMRX1,GMRJ=0 F GMRI=1:1:10 S GMRJ=$O(^TMP($J,"GMRDT",GMRJ)) Q:GMRJ'>0 S:+$P(GMRJ,".",2)>0 GMRDT=$E($P(GMRJ,".",2)_"0000000",1,4),$P(GMRLINE,"|",GMRI)=$E($E(GMRDT,1,2)_":"_$E(GMRDT,3,4)_" ",1,10)
|
---|
43 | W ?17,"|",?18,GMRLINE
|
---|
44 | Q
|
---|
45 | HEADER ;PRINT HEADER FOR VITAL SIGNS-I/O SHEET
|
---|
46 | W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1
|
---|
47 | W !,?116,"PAGE ",GMRPGC,!
|
---|
48 | Q
|
---|
49 | BP ;
|
---|
50 | S GMR("B")=$O(^TMP($J,"GMR","B",GMRDT,"")) Q:GMR("B")=""
|
---|
51 | I GMR("B")'>0,GMR("B")'="" S $P(GMRLINE("B"),"|",GMRNM)=$E(GMR("B")_" ",1,10),$P(GMRLINE("B1"),"|",GMRNM)=" ",$P(GMRLINE("B2"),"|",GMRNM)=" " Q
|
---|
52 | S (GMRSITE,GMRSITE(1),GMRINF,GMRVJ)="" S:GMR("B")'="" GMRSITE(1)=$P(^TMP($J,"GMR","B",GMRDT,GMR("B")),"^"),GMRVJ=$P(^(GMR("B")),"^",2),GMRINF=$P(^(GMR("B")),"^",4)
|
---|
53 | I GMRSITE(1)'="" S GI="B" D SYNOARY^GMVLGQU
|
---|
54 | S $P(GMRLINE("B"),"|",GMRNM)=$E($P(GMR("B"),"/",1,2)_" ",1,10)
|
---|
55 | S $P(GMRLINE("B1"),"|",GMRNM)=$E($P(GMR("B"),"/",3)_" "_$S($L(GMRSITE," ")>3:$P(GMRSITE," "),1:"")_" ",1,10)
|
---|
56 | S $P(GMRLINE("B2"),"|",GMRNM)=$E($S($L(GMRSITE," ")>3:$P(GMRSITE," ",2,4),1:GMRSITE)_" ",1,10)
|
---|
57 | Q
|
---|