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

DVBCAMIS.m

Go to the documentation of this file.
  1. DVBCAMIS ;ALB/GTS-557/THM-2507 AMIS REPORT ;21 MAY 89@0822 ; 5/23/91 1:30 PM
  1. ;;2.7;AMIE;**17,149,184,192**;Apr 10, 1995;Build 15
  1. ;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. SETUP ;
  1. ;
  1. ; Check for AMIS 290 replacement URL
  1. ;
  1. ; Input:
  1. ; RTN - Return value, current URL
  1. ; WHICH - index of URL to retrieve
  1. ;
  1. ; Output:
  1. ; RTN - URL of location to replace this report
  1. ;
  1. N RTN,WHICH
  1. S RTN="",WHICH=7
  1. D URL^DVBABURL(.RTN,WHICH)
  1. I RTN'="" W !,"The AMIS 290 Report is no longer available here.",!," Please go to: ",RTN Q
  1. N DVBAPRTY,DVBAEXMP,DVBAP
  1. S UPDATE="N",HD="AMIS 290 REPORT" I '$D(DT) S X="T" D ^%DT S DT=Y
  1. S DVBCDT(0)=$$FMTE^XLFDT(DT,"5DZ")
  1. D HOME^%ZIS S FF=IOF
  1. ;prompt for priority of exam
  1. S DVBAPRTY=$$EXMPRTY^DVBCIUTL("Select the Priority of Exam for the AMIS 290 Report")
  1. G:('(DVBAPRTY?.A)!(DVBAPRTY']"")) EXIT ;quit if no priority of exam selected
  1. ;
  1. INIT ;initialize counter arrays
  1. S DVBAEXMP=$S($G(DVBAPRTY)["BDD":"BDD,QS",($G(DVBAPRTY)["IDES"):"IDES",($G(DVBAPRTY)["AO"):"AO",1:"ALL")
  1. F JI="3DAYSCH","30DAYEX","PENDADJ","TRANSIN","TRNRETTO","TRNPNDTO","TRANSOUT","TRNRETFR","TRNPNDFR","INSUFF" D
  1. .F DVBAP=1:1:$L(DVBAEXMP,",") S TOT($P(DVBAEXMP,",",DVBAP),JI)=0
  1. F JI="RECEIVED","INCOMPLETE","DAYS","COMPLETED" D
  1. .F DVBAP=1:1:$L(DVBAEXMP,",") S TOT($P(DVBAEXMP,",",DVBAP),JI)=0
  1. F JI="P90","P121","P151","P181","P365","P366" D
  1. .F DVBAP=1:1:$L(DVBAEXMP,",") S TOT($P(DVBAEXMP,",",DVBAP),JI)=0
  1. ;
  1. EN W @IOF,!?(IOM-$L(HD)\2),HD,!!!
  1. S %DT(0)=-DT,%DT="AE",%DT("A")="Enter STARTING DATE: " D ^%DT G:Y<0 EXIT S BDATE1=Y,BDATE=Y-.1
  1. S %DT="AE",%DT("A")=" and ENDING DATE: " D ^%DT G:Y<0 EN S EDATE1=Y,EDATE=Y+.5
  1. I EDATE1<BDATE1 W *7,!!,"Invalid date sequence - ending date is before starting date.",!! H 3 G EN
  1. ASK0 ;prompt for previous month pending count
  1. N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT,DVBATXT
  1. S DIR(0)="N^0:9999:0"
  1. S DIR("?",1)="Enter the totals for the month previous to the one you are processing."
  1. S DIR("?")="Must be a number from 0 to 9999."
  1. S DIR("T")=DTIME ;time-out value specified by system
  1. W !!
  1. ;get previous month pending count for each priority of exam to run
  1. F DVBAP=1:1:$L(DVBAEXMP,",") Q:($G(DIRUT)!($G(DIROUT))) D
  1. .S DVBATXT=$$GPTYPE($P(DVBAEXMP,",",DVBAP))
  1. .S DIR("A",1)="Please enter the total pending, "_DVBATXT
  1. .S DIR("A")=" exam priorities, from the previous month"
  1. .D ^DIR
  1. .S:$L(DVBAEXMP,",")=1 PREVMO=$G(Y)
  1. .S:$L(DVBAEXMP,",")>1 PREVMO($P(DVBAEXMP,",",DVBAP))=$G(Y)
  1. G:($G(DIRUT)!($G(DIROUT))) EXIT ;user timed/exited out
  1. ;
  1. ASK K %DT S SBULL="Y"
  1. W !!!,"Do you want to send a bulletin when processing is done"
  1. S %=1 D YN^DICN G:$D(DTOUT)!(%<0) EXIT
  1. I %=0 W !!,"Enter Y to send a bulletin to selected recipients or N not to send it at all.",!! G ASK
  1. I %'=1 S SBULL="N"
  1. I SBULL="Y" D BULL^DVBCAMI3
  1. W ! S %ZIS="AEQ",%ZIS("A")="Output device: " D ^%ZIS G:POP EXIT
  1. I $D(IO("Q")) S ZTRTN="GO^DVBCAMI2",ZTDESC="2507 Amis Report",ZTIO=ION F I="PREVMO*","RO*","BDATE*","TOT*","EDATE*","SBULL","DUZ","DVBCDT(0)","XM*","DVBAPRTY" S ZTSAVE(I)=""
  1. I $D(IO("Q")) D ^%ZTLOAD W:$D(ZTSK) !!,"Request queued",!! H 1 K ZTSK G EXIT
  1. G GO^DVBCAMI2
  1. ;
  1. EXIT K PREVMO,UPDATE G KILL^DVBCUTIL
  1. ;
  1. ;
  1. ;Input : DVBACDE - Code to get description for
  1. ; [BDD,QS,IDES,AO]
  1. ;Ouput : Corresponding description for code
  1. GPTYPE(DVBACDE) ;get exam priority desc
  1. N DVBATXT
  1. Q:($G(DVBACDE)']"") ""
  1. S DVBATXT=$S(DVBACDE="BDD":"'Benefits Delivery at Discharge ("_DVBACDE_")'",1:"")
  1. S:(DVBATXT']"") DVBATXT=$S(DVBACDE="QS":"'Quick Start ("_DVBACDE_")'",1:"")
  1. S:(DVBATXT']"") DVBATXT=$S(DVBACDE="IDES":"'Integrated Disability Evaluation System ("_DVBACDE_")'",1:"")
  1. S:(DVBATXT']"") DVBATXT=$S(DVBACDE="AO":"'Agent Orange ("_DVBACDE_")'",1:"")
  1. S:(DVBATXT']"") DVBATXT=$S(DVBACDE="ALL":"excluding BDD,QS,IDES and AO",1:"")
  1. Q DVBATXT