source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTOHD.m@ 949

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1DGMTOHD ;ALB/CAW - Hardship reivew date ;4/26/93
2 ;;5.3;Registration;;Aug 13, 1993
3 ;
4 ;
5EN ;
6 I '$$RANGE^DGMTUTL G ENQ
7 W !! S %ZIS="PMQ" D ^%ZIS I POP G ENQ
8 I '$D(IO("Q")) D MAIN G ENQ
9 S Y=$$QUE
10ENQ ;
11 D:'$D(ZTQUEUED) ^%ZISC
12 K DGBEG,DGC,DGEND,DG,DGLINE,DGPAGE,DGMT0,VA,VAERR Q
13 ;
14MAIN ;
15 S DG=0 U IO
16 S DGPAGE=0,$P(DGLINE,"-",IOM+1)=""
17 D HDR
18 F S DG=$O(^DGMT(408.31,"AE",1,DG)) Q:'DG S DGMT0=^DGMT(408.31,DG,0) D
19 .Q:$P(DGMT0,U,21)>DGEND!($P(DGMT0,U,21)<DGBEG)
20 .D CHK
21 .W !,?5,$P($G(^DPT($P(DGMT0,U,2),0)),U),?50,$$PID($P(DGMT0,U,2)),?65,$$FDATE^DGMTUTL($P(DGMT0,U,21))
22 I '$D(DGMT0) W !,"No review dates found between selected date range."
23 D CLOSE^DGMTUTL
24MAINQ Q
25 ;
26PID(DFN) ;function to return pid
27 ;INPUT - DFN
28 ;OUTPUT - PID or UNKNOWN
29 D PID^VADPT6
30 Q $S(VA("PID")]"":VA("PID"),1:"UNKNOWN")
31 ;
32HDR ; Header
33 S DGC(1)="Hardship Review Date(s)"
34 S DGC(2)="Date Range: "_$$FDATE^DGMTUTL(DGBEG)_" to "_$$FDATE^DGMTUTL(DGEND) D NOW^%DTC S DGC(3)="Run Date: "_$E($$FTIME^DGMTUTL(%),1,18)
35 W:$E(IOST,1,2)["C-" @IOF F I=1:1:3 W !?(IOM-$L(DGC(I))/2),DGC(I)
36 S DGPAGE=DGPAGE+1 W !?68,"Page ",DGPAGE,!,DGLINE,!
37 W !?5,"Patient Name",?50," Patient ID ",?65,"Review Date"
38 W !?5,"------------",?50,"------------",?65,"-----------",!
39 Q
40CHK ;Check to pause on screen
41 I ($Y+5)>IOSL,$E(IOST,1,2)="C-" D PAUSE S DGP=Y D:DGP HDR I 'DGP S DGSTOP=1 Q
42 I $E(IOST,1,2)="P-",($Y+5)>IOSL D HDR Q
43 Q
44PAUSE ;
45 W ! S DIR(0)="E" D ^DIR K DIR W !
46 Q
47QUE() ; -- que job
48 ; return: did job que [ 1|yes 0|no ]
49 ;
50 K ZTSK,IO("Q")
51 S ZTDESC="Hardship Review Output",ZTRTN="MAIN^DGMTOHD"
52 F X="DGBEG","DGEND" S ZTSAVE(X)=""
53 D ^%ZTLOAD W:$D(ZTSK) " (Task: ",ZTSK,")"
54 Q $D(ZTSK)
Note: See TracBrowser for help on using the repository browser.