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

ADEPV.m

Go to the documentation of this file.
ADEPV ; IHS/HQT/MJL  - VISIT REPORTS ;03:28 PM  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 W !!,"Do not enter from top!",!! G QUIT
 D ^XBKVAR
DATE K ADEBDT,ADEND
 S U="^",%DT="AXEP",%DT("A")="SELECT BEGINNING DATE: "
 D ^%DT K %DT
 G:Y<0 QUIT
 S ADEBDT=Y,%DT="AXEP",%DT(0)=ADEBDT,%DT("A")="SELECT ENDING DATE: "
 D ^%DT K %DT
 G:X="^" DATE
 G:Y<0 QUIT S ADEND=Y_".9999"
 I ADEBDT>ADEND W !,*7,"Beginning date must be before ending date." G DATE
 ;
ASKDEV K ADEIOP,IOP,ZTSK,ADEIOPAR
 W !!,"Enter 'Q' at the DEVICE prompt to queue this report to run in the background."
 S %ZIS="NQ"
 D ^%ZIS
 I POP L -@ADEGBL K @ADEGBL G QUIT ;ADEGBL is a subscripted scratch global
 S ADEIOP=ION_";"_IOM_";"_IOSL
 S ADEIOPAR=IOPAR
 I $D(IO("Q")) D  G QUIT
 . D QUE
 . L -@ADEGBL
 . W !,"REQUEST QUEUED."
 . D HOME^%ZIS
 ;
 G START^ADEPV1
 ;
QUIT K ADEOTYP,ADEOPT,ADEBDT,ADEND,ADEOLD,ADEGBL,ADETITL,ZTSK,ADEJ Q
 ;
QUE N ADEJ
 S ZTRTN="START^ADEPV1"
 S ZTDESC="DENTAL SERVICE VISIT RPT"
 F ADEJ="ADEND","ADEBDT","ADEGBL","ADETITL","ADEIOP","ADEIOPAR" S ZTSAVE(ADEJ)=""
 S ZTIO=""
 I $D(IO("HFSIO")) D
 . S ZTIO=ADEIOP
 D ^%ZTLOAD
 K ADEJ
 Q
 ;
FACILITY ;EP
 ;Enter Here to print Dental Visits by Facility
 S ADEGBL=$$ADEU("ADEPFAC")
 S ADEGBL="^TMP(""ADEPFAC"","_ADEGBL_")"
 S ADETITL="FACILITY VISIT REPORT"
 G DATE
COMMUN ;EP
 ;Enter here to print Dental Visits by Community
 S ADEGBL=$$ADEU("ADEPCOM")
 S ADEGBL="^TMP(""ADEPCOM"","_ADEGBL_")"
 S ADETITL="COMMUNITY VISIT REPORT"
 G DATE
TRIBE ;EP
 ;Enter here to print Dental Visits by Tribe
 S ADEGBL=$$ADEU("ADEPTRIB")
 S ADEGBL="^TMP(""ADEPTRIB"","_ADEGBL_")"
 S ADETITL="TRIBAL VISIT REPORT"
 G DATE
 ;
ADEU(ADEGBL) ;GET UNIQUE SUBSCRIPT NUMBER AND LOCK REPORT NODE
 ;RETURNS SUBSCRIPT NUMBER
 N ADEU
 S ADEU=$J
ADEU1 F  L +^TMP(ADEGBL,ADEU):.1 Q:$T  S ADEU=ADEU+1
 I $G(^TMP(ADEGBL,ADEU))]"" L -^TMP(ADEGBL,ADEU) S ADEU=ADEU+1 G ADEU1
 K ^TMP(ADEGBL,ADEU) ;^TMP is a transient report global
 S ^TMP(ADEGBL,ADEU)="RUNNING"
 Q ADEU
ZZ K ADEU ;*NE