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

ADEPLV.m

Go to the documentation of this file.
ADEPLV ; IHS/HQT/MJL - DENTAL LVL OF SVC ;  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 S ADEGBL=$$ADEU("ADEPDIR")
 S ADEGBL="^TMP(""ADEPDIR"","_ADEGBL_")"
 S ADETITL=" -- Direct Indian" ;IHS/HMW ADEK Added "Indian"
 S ADEDIR=1,ADECON=0,ADEPRO=4,ADEPDET=1,ADENON=0
 ;
START W !!,"Dental Level of Service Report",ADETITL,!!
 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 node
 ;of ^TMP, a transient report 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^ADEPLV1
 ;
QUIT K ADEOTYP,ADEBDT,ADEND,ADEOLD,ADEGBL,ADETITL,ADEDIR,ADECON,ADEJ,ADEPRO,ADEPDET,ADENON,ADEIOP,ADEIOPAR
 Q
 ;
QUE N ADEJ
 S ZTDESC="DENTAL LEVEL OF CARE RPT"
 F ADEJ="ADEGBL","ADEND","ADEBDT","ADETITL","ADEDIR","ADECON","ADEPRO","ADEPDET","ADENON","ADEIOP","ADEIOPAR" S ZTSAVE(ADEJ)=""
 S ZTRTN="START^ADEPLV1"
 S ZTIO=""
 I $D(IO("HFSIO")) D
 . S ZTIO=ADEIOP
 D ^%ZTLOAD
 K ADEJ
 Q
 ;
CONTRACT ;EP ENTER HERE FOR CONTRACT SERVICES REPORT
 S ADEGBL=$$ADEU("ADEPCHS")
 S ADEGBL="^TMP(""ADEPCHS"","_ADEGBL_")"
 S ADETITL=" -- Contract"
 S ADEDIR=0,ADECON=1,ADEPRO=4,ADEPDET=1,ADENON=0
 G START
AUXIL ;EP ENTER HERE FOR AUXILIARY REPORT
 S ADETITL=" --  Auxiliary"
 S ADEGBL=$$ADEU("ADEPAUX")
 S ADEGBL="^TMP(""ADEPAUX"","_ADEGBL_")"
 S ADEDIR=0,ADECON=0,ADEPRO=5,ADEPDET=1,ADENON=0
 G START
NON ;EP ENTER HERE FOR NON-INDIAN REPORT
 S ADEGBL=$$ADEU("ADEPNON")
 S ADEGBL="^TMP(""ADEPNON"","_ADEGBL_")"
 S ADETITL=" -- Non-Indian"
 S ADEDIR=0,ADECON=0,ADEPRO=4,ADEPDET=0,ADENON=1
 G START
 ;
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
 K ADEU ;*NE