DVBANT21 ;ALB/JLU;pending 21 day certificate;9/15/94
;;2.7;AMIE;;Apr 10, 1995
;
EN ;the main entry point
D HDR
S DVBTYPE=$$TYPE()
I DVBTYPE'=1 DO
.I DVBTYPE="B" D BOTH
.I DVBTYPE="N" D NOTICE
.I DVBTYPE="C" D CERTIF
.S L=0,DIC="^DVB(396,",(FR,TO)=""
.D EN1^DIP
.K L,DIC,FR,TO,BY,FLDS
.Q
D KILL
Q
;
KILL K DVBTYPE,DUOUT,DTOUT
Q
;
HDR ;issues an initial form feed
S VAR(1,0)="0,0,0,0,1^"
D WR^DVBAUTL4("VAR")
K VAR
Q
;
TYPE() ;gets from the user what type of report they are interested in.
N DVBOUT
S DIR(0)="SM^N:Notice of Discharge;C:21 Day Certificate;B:Both"
S DIR("A")="Select the desired report"
D ^DIR
K DIR
I $D(DUOUT)!($D(DTOUT)) S DVBOUT=1
I Y="" S DVBOUT=1
I "NCB"[Y S DVBOUT=Y
E S DVBOUT=1
Q DVBOUT
;
NOTICE ;sets up the templates for the notice of discharge reports.
S (FLDS,BY)="[DVBA NOTICE OF DISCHARGE]"
Q
;
BOTH ;sets up the templates for both the notice of discharge and 21 day cert
S (FLDS,BY)="[DVBA NOT/DIS-21 DAY CERT CHECK]"
Q
;
CERTIF ;sets up the templates for the 21 day certificate
S (FLDS,BY)="[DVBA 21 DAY CERT]"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBANT21 1134 printed Nov 22, 2024@16:51:34 Page 2
DVBANT21 ;ALB/JLU;pending 21 day certificate;9/15/94
+1 ;;2.7;AMIE;;Apr 10, 1995
+2 ;
EN ;the main entry point
+1 DO HDR
+2 SET DVBTYPE=$$TYPE()
+3 IF DVBTYPE'=1
Begin DoDot:1
+4 IF DVBTYPE="B"
DO BOTH
+5 IF DVBTYPE="N"
DO NOTICE
+6 IF DVBTYPE="C"
DO CERTIF
+7 SET L=0
SET DIC="^DVB(396,"
SET (FR,TO)=""
+8 DO EN1^DIP
+9 KILL L,DIC,FR,TO,BY,FLDS
+10 QUIT
End DoDot:1
+11 DO KILL
+12 QUIT
+13 ;
KILL KILL DVBTYPE,DUOUT,DTOUT
+1 QUIT
+2 ;
HDR ;issues an initial form feed
+1 SET VAR(1,0)="0,0,0,0,1^"
+2 DO WR^DVBAUTL4("VAR")
+3 KILL VAR
+4 QUIT
+5 ;
TYPE() ;gets from the user what type of report they are interested in.
+1 NEW DVBOUT
+2 SET DIR(0)="SM^N:Notice of Discharge;C:21 Day Certificate;B:Both"
+3 SET DIR("A")="Select the desired report"
+4 DO ^DIR
+5 KILL DIR
+6 IF $DATA(DUOUT)!($DATA(DTOUT))
SET DVBOUT=1
+7 IF Y=""
SET DVBOUT=1
+8 IF "NCB"[Y
SET DVBOUT=Y
+9 IF '$TEST
SET DVBOUT=1
+10 QUIT DVBOUT
+11 ;
NOTICE ;sets up the templates for the notice of discharge reports.
+1 SET (FLDS,BY)="[DVBA NOTICE OF DISCHARGE]"
+2 QUIT
+3 ;
BOTH ;sets up the templates for both the notice of discharge and 21 day cert
+1 SET (FLDS,BY)="[DVBA NOT/DIS-21 DAY CERT CHECK]"
+2 QUIT
+3 ;
CERTIF ;sets up the templates for the 21 day certificate
+1 SET (FLDS,BY)="[DVBA 21 DAY CERT]"
+2 QUIT