source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVSC1.m@ 1520

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1GMRVSC1 ;HIRMFO/YH-CUMULATIVE V/M - CONTINUED ;2/3/99
2 ;;4.0;Vitals/Measurements;**7**;Apr 25, 1997
3EN1 ; ENTRY TO PRINT REPORT FROM TASKMAN
4 K ^TMP($J,"GMRV"),GMRVDT S GMRVHT=0 S (GMROUT,GMRDATE(0))=0
5 F GMRVTY="T","P","R","BP","HT","WT","CVP","CG","PO2","PN" S GMRVITY=$O(^GMRD(120.51,"C",GMRVTY,0)) I GMRVITY>0 D SETAR
6 I $O(^TMP($J,"GMRV",0))'>0 W !,"THERE IS NO DATA FOR THIS REPORT" G QT
7 F GMRDATE=0:0 S GMRDATE=$O(GMRVDT(GMRDATE)) Q:GMRDATE'>0!GMROUT I $D(^TMP($J,"GMRV",GMRDATE)) D PRT Q:GMROUT
8QT I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
9 I 'GMROUT W ! D FOOTER^GMRVSC0
10 I $E(IOST)'="P",'GMROUT W "Press return to continue or ""^"" to escape " R X:DTIME S:'$T!(X["^") GMROUT=1
11 K ^TMP($J,"GMRV"),^TMP($J,"OTHR"),GOTHR,GMRV,GMRVDT Q
12Q ; KILL VARIBLES
13 S:$D(ZTQUEUED) ZTREQ="@" K GMRZZ,GMRVARY
14 K GMRVER,GDATA,GMRST,GERROR,GERST,^TMP($J),GBED,GWARD,DFN,GX,GMR1ST,GMRDAT,GMRDATE,GMRDSH,GMRDT,GMRLN,GMRPDT,GMRSP,GMRVDA,GMRVITY,GMRX,GMRY,GMRVTY,GMRSITE,GMRVX,POP,DIPGM,%T,GMRQUAL,GMROUT,GMRPG,GFLAG D KVAR^VADPT K VA D ^%ZISC
15 Q
16SETAR ;
17 F GMRDT=0:0 S GMRDT=$O(^GMR(120.5,"AA",DFN,GMRVITY,GMRDT)) Q:GMRDT'>0 S GMRDATE=9999999-GMRDT I '(GMRDATE>GMRVFDT!(GMRDATE<GMRVSDT)) D SETND
18 Q
19SETND ;
20 F GMRVDA=0:0 S GMRVDA=$O(^GMR(120.5,"AA",DFN,GMRVITY,GMRDT,GMRVDA)) Q:GMRVDA'>0 D SETUT
21 Q
22SETUT S ^TMP($J,"GMRV",+$E(GMRDATE,1,12),GMRVTY,GMRVDA)=$S('$D(^GMR(120.5,GMRVDA,2)):0,1:+$P(^(2),"^"))
23 S GMRVDT(+$E(GMRDATE,1,12))="" Q
24PRT ;PRINT V/M BY DATE/TIME
25 D:IOSL<($Y+9) HDR^GMRVSC2 Q:GMROUT
26 S Y=GMRDATE X ^DD("DD") I $P(GMRDATE,".")'=GMRDATE(0) W !,$E(GMRDATE,4,5)_"/"_$E(GMRDATE,6,7)_"/"_$E(GMRDATE,2,3) S GMRDATE(0)=$P(GMRDATE,".")
27 D:IOSL<($Y+9) HDR^GMRVSC2 Q:GMROUT W !,$P($P(Y,"@",2),":",1,2)
28 I $D(^TMP($J,"GMRV",GMRDATE)) D
29 .K GMRLN,GERROR F GMRVTY="T","P","R","BP","HT","WT","CVP","CG","PO2","PN" S GPRT(GMRVTY)=0 I $D(^TMP($J,"GMRV",GMRDATE,GMRVTY)) F GMRVDA=0:0 S GMRVDA=$O(^TMP($J,"GMRV",GMRDATE,GMRVTY,GMRVDA)) Q:GMRVDA'>0!GMROUT D SETLN^GMRVSC2
30 Q
Note: See TracBrowser for help on using the repository browser.