- DGENRPA1 ;ALB/CJM - Enrolled Veterans Report; JUL 9,1997
- ;;5.3;Registration;**121,232,1015**;Aug 13,1993;Build 21
- ;
- REPORT ;
- N INDATE
- ;
- ;put back if second part of report restored - veterans not enrolled
- ;S INDATE=$$ASKDATE()
- ;I INDATE,$$DEVICE(INDATE) D PRINT^DGENRPA2
- ;
- I $$DEVICE() D PRINT^DGENRPA2
- Q
- ;
- DEVICE(INDATE) ;
- ;Description: allows the user to select a device.
- ;Input:
- ; INDATE - is a report parameter, needed in case the report is queued.
- ;Output:
- ; Function Value - Returns 0 if the user decides not to print or to
- ; queue the report, 1 otherwise.
- ;
- N OK
- S OK=1
- S %ZIS="MQ"
- W !,"*** This report requires a 132 column printer. ******"
- D ^%ZIS
- S:POP OK=0
- D:OK&$D(IO("Q"))
- .S ZTRTN="PRINT^DGENRPA2",ZTDESC="ENROLLED VETERANS REPORT",ZTSAVE("INDATE")=""
- .D ^%ZTLOAD
- .W !,$S($D(ZTSK):"REQUEST QUEUED TASK="_ZTSK,1:"REQUEST CANCELLED")
- .D HOME^%ZIS
- .S OK=0
- Q OK
- ;
- ASKDATE() ;
- ;Description: Asks the user to enter a date.
- ;Output: Returns the date as the function value.
- ;
- N DIR,X,Y
- S DIR(0)="D^::X"
- S DIR("A",1)="Do not report veterans not enrolled that have not had inpatient or outpatient"
- S DIR("A")="care since"
- S DIR("B")=$$FMTE^XLFDT($$FMADD^XLFDT(DT,-730),"D")
- S DIR("?",1)="Please enter a date. Veterans who are not currently enrolled will not be"
- S DIR("?",2)="counted in the report if they have not had an inpatient or outpatient"
- S DIR("?")="episode of care since this date."
- D ^DIR
- Q:$D(DIRUT) 0
- Q Y
- DGENRPA1 ;ALB/CJM - Enrolled Veterans Report; JUL 9,1997
- +1 ;;5.3;Registration;**121,232,1015**;Aug 13,1993;Build 21
- +2 ;
- REPORT ;
- +1 NEW INDATE
- +2 ;
- +3 ;put back if second part of report restored - veterans not enrolled
- +4 ;S INDATE=$$ASKDATE()
- +5 ;I INDATE,$$DEVICE(INDATE) D PRINT^DGENRPA2
- +6 ;
- +7 IF $$DEVICE()
- DO PRINT^DGENRPA2
- +8 QUIT
- +9 ;
- DEVICE(INDATE) ;
- +1 ;Description: allows the user to select a device.
- +2 ;Input:
- +3 ; INDATE - is a report parameter, needed in case the report is queued.
- +4 ;Output:
- +5 ; Function Value - Returns 0 if the user decides not to print or to
- +6 ; queue the report, 1 otherwise.
- +7 ;
- +8 NEW OK
- +9 SET OK=1
- +10 SET %ZIS="MQ"
- +11 WRITE !,"*** This report requires a 132 column printer. ******"
- +12 DO ^%ZIS
- +13 IF POP
- SET OK=0
- +14 IF OK&$DATA(IO("Q"))
- Begin DoDot:1
- +15 SET ZTRTN="PRINT^DGENRPA2"
- SET ZTDESC="ENROLLED VETERANS REPORT"
- SET ZTSAVE("INDATE")=""
- +16 DO ^%ZTLOAD
- +17 WRITE !,$SELECT($DATA(ZTSK):"REQUEST QUEUED TASK="_ZTSK,1:"REQUEST CANCELLED")
- +18 DO HOME^%ZIS
- +19 SET OK=0
- End DoDot:1
- +20 QUIT OK
- +21 ;
- ASKDATE() ;
- +1 ;Description: Asks the user to enter a date.
- +2 ;Output: Returns the date as the function value.
- +3 ;
- +4 NEW DIR,X,Y
- +5 SET DIR(0)="D^::X"
- +6 SET DIR("A",1)="Do not report veterans not enrolled that have not had inpatient or outpatient"
- +7 SET DIR("A")="care since"
- +8 SET DIR("B")=$$FMTE^XLFDT($$FMADD^XLFDT(DT,-730),"D")
- +9 SET DIR("?",1)="Please enter a date. Veterans who are not currently enrolled will not be"
- +10 SET DIR("?",2)="counted in the report if they have not had an inpatient or outpatient"
- +11 SET DIR("?")="episode of care since this date."
- +12 DO ^DIR
- +13 IF $DATA(DIRUT)
- QUIT 0
- +14 QUIT Y