49 lines
3.2 KiB
Mathematica
49 lines
3.2 KiB
Mathematica
GMRVDS1 ;HIRMFO/YH-CURRENT VITAL SIGNS BY LOCATION ;2/3/99
|
|
;;4.0;Vitals/Measurements;**7**;Apr 25, 1997
|
|
EN1 ; ENTRY FROM OPTION GMRV V/M BY LOCATION
|
|
S GMROUT=0,GMREDB="A" D WARDSEL^GMRVED0 G:GMROUT Q1
|
|
PAT ;ENTRY POINT FOR REPORT BY PATIENT
|
|
DEV 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
|
|
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
|
|
EN2 ;ENTRY TO REPORT FROM TASKMAN
|
|
K ^TMP($J) S GMROUT=0
|
|
I $G(GMREDB)="P" D
|
|
. 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
|
|
. S ^TMP($J,GMRRMBD,GMRNAM,DFN)=""
|
|
E D EN1^GMRVED2
|
|
AE 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
|
|
U IO I $O(^TMP($J,""))="" D HDR W !,"THERE IS NO DATA FOR THIS REPORT" G Q1
|
|
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
|
|
Q1 I $D(GMROUT),$E(IOST)'="P",'GMROUT R !,"Press return to continue ",X:DTIME W @IOF
|
|
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
|
|
K GSTRIN,GMRSTR,GMROUT,GMRVOERR,GMRVSTOP,GMRVSTRT,GLOC,GDATA D ^%ZISC,Q^GMRVDS0 Q
|
|
HDR ;
|
|
I $E(IOST)'="P",'GMR1ST W !!,"Press return to continue or ""^"" to quit " R X:DTIME I X=U!'$T S GMROUT=1 Q
|
|
W:'($E(IOST)'="C"&'GMRPG) @IOF S GMR1ST=0,GMRPG=GMRPG+1
|
|
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")
|
|
I GMREDB="P" W !,GMRPDT,?28,"LATEST VITALS REPORT"
|
|
W ?72,"PAGE ",GMRPG,!,GMRDSH,!
|
|
Q
|
|
PRT ;
|
|
D:IOSL<($Y+6)!($E(IOST)'="P")!(GMRPG=0) HDR Q:GMROUT
|
|
D DEM^VADPT K GMRDT
|
|
W !,$S(GMRRMBD'=" BLANK":$E(GMRRMBD,1,10),1:""),?12,$E(GMRNAM,1,20),?34,$P(VADM(2),U,2),!
|
|
D EN1^GMRVDS0 D Q2 Q
|
|
EN3 ; ENTRY TO PRINT VITALS FOR LOCATION GROUP
|
|
; INPUT : ^TMP($J,ROOM-BED,PATIENT NAME,DFN)=""
|
|
; ARRAY OF PATIENTS TO BE PRINTED WHERE
|
|
; ROOM-BED: PATIENT ROOM-BED
|
|
; PATIENT NAME: PATIENT NAME
|
|
; DFN: POINTER ^DPT
|
|
; GMRVWLO=NAME OF LOCATION GROUP
|
|
Q:'$D(GMRVWLO) S GMREDB="A"
|
|
S GMROUT=0,GMRWARD(1)=GMRVWLO D AE
|
|
K GMRVWLO
|
|
Q
|
|
WRT I $D(GLOC)&(IOSL<($Y+6)) D WRT2
|
|
W !,?GMRSP,$P(GMRL,"^",2) D:GSITE'=0!(GQUAL'=0) PRTSITE Q
|
|
WRT2 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
|
|
PRTSITE 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
|
|
Q2 ;
|
|
K GMRLIN,GMRJ,GBP,GMR,GMRL,GMRDT,GMRDAT,GMRDATS,GMRI,GMRX,GMRY,GMRVX,GSITE,GQUAL Q
|