1 | DGMTOHD ;ALB/CAW - Hardship reivew date ;4/26/93
|
---|
2 | ;;5.3;Registration;;Aug 13, 1993
|
---|
3 | ;
|
---|
4 | ;
|
---|
5 | EN ;
|
---|
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
|
---|
10 | ENQ ;
|
---|
11 | D:'$D(ZTQUEUED) ^%ZISC
|
---|
12 | K DGBEG,DGC,DGEND,DG,DGLINE,DGPAGE,DGMT0,VA,VAERR Q
|
---|
13 | ;
|
---|
14 | MAIN ;
|
---|
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
|
---|
24 | MAINQ Q
|
---|
25 | ;
|
---|
26 | PID(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 | ;
|
---|
32 | HDR ; 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
|
---|
40 | CHK ;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
|
---|
44 | PAUSE ;
|
---|
45 | W ! S DIR(0)="E" D ^DIR K DIR W !
|
---|
46 | Q
|
---|
47 | QUE() ; -- 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)
|
---|