source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVSC1.m@ 642

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1GMVSC1 ;HOIFO/YH,FT-CUMULATIVE V/M - CONTINUED ;12/18/01 10:53
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10061 - ^VADPT calls (supported)
6 ;
7EN1 ; ENTRY TO PRINT REPORT FROM TASKMAN {called from GMVSC0}
8 K ^TMP($J,"GMRV"),GMRVDT
9 S (GMRVHT,GMROUT,GMRDATE(0))=0
10 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
11 I $O(^TMP($J,"GMRV",0))'>0 W !,"THERE IS NO DATA FOR THIS REPORT" G QT
12 F GMRDATE=0:0 S GMRDATE=$O(GMRVDT(GMRDATE)) Q:GMRDATE'>0!GMROUT I $D(^TMP($J,"GMRV",GMRDATE)) D PRT Q:GMROUT
13QT ;
14 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
15 I 'GMROUT W ! D FOOTER^GMVSC0
16 K ^TMP($J,"GMRV"),^TMP($J,"OTHR"),GOTHR,GMRV,GMRVDT
17 Q
18Q ; KILL VARIABLES
19 K ^TMP($J)
20 K GMRZZ,GMRVARY
21 K GMRVER,GDATA,GMRST,GERROR,GERST,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
22 D KVAR^VADPT K VA
23 D ^%ZISC ;???
24 Q
25SETAR ;
26 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
27 Q
28SETND ;
29 F GMRVDA=0:0 S GMRVDA=$O(^GMR(120.5,"AA",DFN,GMRVITY,GMRDT,GMRVDA)) Q:GMRVDA'>0 D SETUT
30 Q
31SETUT ;
32 S ^TMP($J,"GMRV",+$E(GMRDATE,1,12),GMRVTY,GMRVDA)=$S('$D(^GMR(120.5,GMRVDA,2)):0,1:+$P(^(2),"^"))
33 S GMRVDT(+$E(GMRDATE,1,12))=""
34 Q
35PRT ;PRINT V/M BY DATE/TIME
36 D:IOSL<($Y+9) HDR^GMVSC2 Q:GMROUT
37 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,".")
38 D:IOSL<($Y+9) HDR^GMVSC2 Q:GMROUT W !,$P($P(Y,"@",2),":",1,2)
39 I $D(^TMP($J,"GMRV",GMRDATE)) D
40 .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^GMVSC2
41 Q
Note: See TracBrowser for help on using the repository browser.