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

ACDWQ.m

Go to the documentation of this file.
  1. ACDWQ ;IHS/ADC/EDE/KML - Q-LOG FOR 5 DRIVER SET REPORTS;
  1. ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
  1. ;******************************************************
  1. ;//^ACDWDRV*
  1. ;Needs ASA* all variables
  1. ;**************************************************************
  1. DEBUG D DBQUE Q
  1. W !!,"You should queue all reports to a printer.",!
  1. S ACDNOQUE=1
  1. K IO("Q"),%ZIS,IOP,ZTDTH,ZTSAVE,ZTSK S ACDJBN=$J
  1. S %ZIS="PQ",%ZIS("B")=""
  1. D ^%ZIS
  1. Q:POP
  1. XXX I $E(IOST,1,2)'="P-" W !,"YOU MUST ROUTE THE OUTPUT OF THIS REPORT TO A PRINTER",! D ^%ZISC S POP=1 D PAUSE^ACDDEU Q
  1. ;I IO=IO(0) D HUH I 'Y S POP=1 Q
  1. Q:'$D(IO("Q"))
  1. S ZTIO=ION,ACDZTIO=ION S:$G(IOCPU) ZTCPU=IOCPU S ZTSAVE("ACD*")="",ZTSAVE("DUZ(")=""
  1. S ZTRTN=$S($D(ACDWSTAF(1)):"L^ACDWSTAF",$D(ACDWDRV(1)):"L^ACDWDRV1",$D(ACDWDRV(2)):"L^ACDWDRV2",$D(ACDWDRV(3)):"L^ACDWDRV3",$D(ACDWDRV(4)):"L^ACDWDRV4",1:"L^ACDWDRV5")
  1. D ^%ZTLOAD
  1. W !,"Report Queued.."
  1. D ^ACDWK
  1. Q
  1. ;
  1. HUH ; SEE IF USER REALLY WANT TO GO TO HOME DEVICE
  1. K DIR
  1. W !,"You have selected your terminal for the ouput of this report."
  1. W !,"If you hat out at the end of a page you will be logged off the system."
  1. W !,"Do you want to continue?",!
  1. S DIR(0)="YO",DIR("B")="N" K DA D ^DIR K DIR
  1. Q
  1. NOTE ;************************************************************
  1. ;To convert to double queue
  1. ;ACDJBN=JOB#
  1. ;ACDZTIO=ION
  1. ;ZTIO="" (wake up from first queue in background -no device)
  1. ;ZTCPU is passed to %ZTLOAD incase device selected is on a
  1. ; different CPU (No need to ZTSAVE("^TMP(""ASA"",$J,") anymore.
  1. ;Wake up from first queue and compile.
  1. ;Queue again setting ZTIO=ACDZTIO this time.
  1. ;Use ACDJBN when oedering through print utility because $J changed
  1. DBQUE ;
  1. D INIT
  1. D XBQUE
  1. Q
  1. ;
  1. INIT ;
  1. S ACDJOB=$J
  1. F D Q:ACDBT]""
  1. . S ACDBT=$H
  1. . LOCK +^TMP("ACD",ACDJOB,ACDBT):1
  1. . E S ACDBT=""
  1. . Q
  1. K ^TMP("ACD",ACDJOB,ACDBT)
  1. Q
  1. ;
  1. XBQUE ;call to XBDBQUE
  1. K ACDOPT
  1. W ! S DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen",DIR("A")="Do you wish to",DIR("B")="P" K DA D ^DIR K DIR
  1. I $D(DIRUT) S ACDQUIT=1 Q
  1. S ACDOPT=Y
  1. S XBRC=$S($D(ACDWSTAF(1)):"L^ACDWSTAF",$D(ACDWDRV(1)):"L^ACDWDRV1",$D(ACDWDRV(2)):"L^ACDWDRV2",$D(ACDWDRV(3)):"L^ACDWDRV3",$D(ACDWDRV(4)):"L^ACDWDRV4",1:"L^ACDWDRV5")
  1. S XBRX=$S($D(ACDWSTAF(1)):"EOJ^ACDWSTAF",$D(ACDWDRV(1)):"EOJ^ACDWDRV1",$D(ACDWDRV(2)):"EOJ^ACDWDRV2",$D(ACDWDRV(3)):"EOJ^ACDWDRV3",$D(ACDWDRV(4)):"EOJ^ACDWDRV4",1:"EOJ^ACDWDRV5")
  1. S XBRP=$S($D(ACDWSTAF(1)):"P^ACDWSTAF",$D(ACDWDRV(1)):"P^ACDWDRV1",$D(ACDWDRV(2)):"P^ACDWDRV2",$D(ACDWDRV(3)):"P^ACDWDRV3",$D(ACDWDRV(4)):"P^ACDWDRV4",1:"P^ACDWDRV5")
  1. S XBNS="ACD"
  1. I $G(ACDOPT)="B" S XBIOP=0,XBRP="VIEWR^XBLM("""_XBRP_""")"
  1. D ^XBDBQUE
  1. Q