Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGENRPA1

DGENRPA1.m

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