source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVDS1.m@ 1005

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

initial load of WorldVistAEHR

File size: 3.2 KB
RevLine 
[613]1GMRVDS1 ;HIRMFO/YH-CURRENT VITAL SIGNS BY LOCATION ;2/3/99
2 ;;4.0;Vitals/Measurements;**7**;Apr 25, 1997
3EN1 ; ENTRY FROM OPTION GMRV V/M BY LOCATION
4 S GMROUT=0,GMREDB="A" D WARDSEL^GMRVED0 G:GMROUT Q1
5PAT ;ENTRY POINT FOR REPORT BY PATIENT
6DEV S %ZIS="Q" D ^%ZIS G:POP Q1 I $E(IOST)="P",'$D(IO("Q")),'$D(IO("S")) D ^%ZISC W !,?3,$C(7),"PRINTED REPORTS MUST QUEUED" G DEV
7 I $D(IO("Q")) S ZTIO=ION,ZTRTN="EN2^GMRVDS1",(ZTSAVE("DFN"),ZTSAVE("GMRWARD("),ZTSAVE("GMROUT"),ZTSAVE("GMREDB"),ZTSAVE("GMRVHLOC"))="",ZTDESC="Latest Vital/Measurements Report" D ^%ZTLOAD K ZTSK,IO("Q"),ZTIO Q
8EN2 ;ENTRY TO REPORT FROM TASKMAN
9 K ^TMP($J) S GMROUT=0
10 I $G(GMREDB)="P" D
11 . D DEM^VADPT,INP^VADPT S GMRRMBD=$S(VAIN(5)'="":VAIN(5),1:" BLANK"),GMRNAM=$S(VADM(1)'="":VADM(1),1:" BLANK"),GMRWARD=$P(VAIN(4),"^"),GMRWARD(1)=$P(VAIN(4),"^",2) D KVAR^VADPT K VA
12 . S ^TMP($J,GMRRMBD,GMRNAM,DFN)=""
13 E D EN1^GMRVED2
14AE D NOW^%DTC S Y=% X ^DD("DD") S $P(GMRDSH,"-",81)="",GMRPDT=$P(Y,"@")_" ("_$P($P(Y,"@",2),":",1,2)_")",GMRPG=0,GMR1ST=1,GMRSTR="T;P;R;BP;WT;HT;CVP;CG;PO2;PN",GLOC=1
15 U IO I $O(^TMP($J,""))="" D HDR W !,"THERE IS NO DATA FOR THIS REPORT" G Q1
16 S GMRRMBD="" F S GMRRMBD=$O(^TMP($J,GMRRMBD)) Q:GMRRMBD=""!GMROUT S GMRNAM="" F S GMRNAM=$O(^TMP($J,GMRRMBD,GMRNAM)) Q:GMRNAM=""!GMROUT F DFN=0:0 S DFN=$O(^TMP($J,GMRRMBD,GMRNAM,DFN)) Q:DFN'>0 D PRT Q:GMROUT
17Q1 I $D(GMROUT),$E(IOST)'="P",'GMROUT R !,"Press return to continue ",X:DTIME W @IOF
18 S:$D(ZTQUEUED) ZTREQ="@" K ^TMP($J),DFN,GMR1ST,GMRADM,GMRDA,GMRDSH,GMREDB,GMRNAM,GMRNAME,GMRNM,GMROUT,GMRPDT,GMRPG,GMRRMBD,GMRPR,GMRVDT,GMRVTDA,GMRWARD,GMRX,GMRSITE,GMRSP,GMRVX,GMRVHLOC,POP,GMRDT,%T,GDT D KVAR^VADPT K VA W:$E(IOST)'="C" @IOF
19 K GSTRIN,GMRSTR,GMROUT,GMRVOERR,GMRVSTOP,GMRVSTRT,GLOC,GDATA D ^%ZISC,Q^GMRVDS0 Q
20HDR ;
21 I $E(IOST)'="P",'GMR1ST W !!,"Press return to continue or ""^"" to quit " R X:DTIME I X=U!'$T S GMROUT=1 Q
22 W:'($E(IOST)'="C"&'GMRPG) @IOF S GMR1ST=0,GMRPG=GMRPG+1
23 I GMREDB="A" W !,GMRPDT,?20,"VITALS REPORT FOR UNIT: "_GMRWARD(1) W:GMRVHLOC>0 " - "_$$GET1^DIQ(4,+$$GET1^DIQ(44,+GMRVHLOC,3,"I"),.01,"I")
24 I GMREDB="P" W !,GMRPDT,?28,"LATEST VITALS REPORT"
25 W ?72,"PAGE ",GMRPG,!,GMRDSH,!
26 Q
27PRT ;
28 D:IOSL<($Y+6)!($E(IOST)'="P")!(GMRPG=0) HDR Q:GMROUT
29 D DEM^VADPT K GMRDT
30 W !,$S(GMRRMBD'=" BLANK":$E(GMRRMBD,1,10),1:""),?12,$E(GMRNAM,1,20),?34,$P(VADM(2),U,2),!
31 D EN1^GMRVDS0 D Q2 Q
32EN3 ; ENTRY TO PRINT VITALS FOR LOCATION GROUP
33 ; INPUT : ^TMP($J,ROOM-BED,PATIENT NAME,DFN)=""
34 ; ARRAY OF PATIENTS TO BE PRINTED WHERE
35 ; ROOM-BED: PATIENT ROOM-BED
36 ; PATIENT NAME: PATIENT NAME
37 ; DFN: POINTER ^DPT
38 ; GMRVWLO=NAME OF LOCATION GROUP
39 Q:'$D(GMRVWLO) S GMREDB="A"
40 S GMROUT=0,GMRWARD(1)=GMRVWLO D AE
41 K GMRVWLO
42 Q
43WRT I $D(GLOC)&(IOSL<($Y+6)) D WRT2
44 W !,?GMRSP,$P(GMRL,"^",2) D:GSITE'=0!(GQUAL'=0) PRTSITE Q
45WRT2 D HDR^GMRVDS1 W !,$S(GMRRMBD'=" BLANK":$E(GMRRMBD,1,10),1:""),?12,$E(GMRNAM,1,20),?34,$P(VADM(2),U,2)_" (cont.)" Q
46PRTSITE W " ("_$S($D(^GMRD(120.52,GSITE,0)):$P(^(0),"^"),1:"")_$S(GSITE>0&(GQUAL>0):"/",1:"")_$S($D(^GMRD(120.53,GQUAL,0)):$P(^(0),"^"),1:"")_")" Q
47Q2 ;
48 K GMRLIN,GMRJ,GBP,GMR,GMRL,GMRDT,GMRDAT,GMRDATS,GMRI,GMRX,GMRY,GMRVX,GSITE,GQUAL Q
Note: See TracBrowser for help on using the repository browser.