[613] | 1 | PRCHQUE ;WISC/CLH,ID/RSD/TKW/REW/BGJ-QUE PRINTOUTS ; [7/2/98 3:20pm]
|
---|
| 2 | ;;5.1;IFCAP;**14**;Oct 20, 2000
|
---|
| 3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | ;
|
---|
| 5 | ; INPUT TO PRCHQUE:
|
---|
| 6 | ;
|
---|
| 7 | ; D0,D1
|
---|
| 8 | ; PRCHQ=ROUTINE
|
---|
| 9 | ; PRCHQ("DEST")=DESTINATION
|
---|
| 10 | ; PRC("SITE")=STATION #
|
---|
| 11 | ; PRC("SST")=SUBSTATION #
|
---|
| 12 | ; DUZ
|
---|
| 13 | ; PRCHQ("DEST2")=INDICATOR THAT ROUTES PRINT OF RECEIVING
|
---|
| 14 | ; REPORT TO FISCAL
|
---|
| 15 | ;
|
---|
| 16 | D CLNUP
|
---|
| 17 | S (ZTRTN,ZTDESC)=PRCHQ
|
---|
| 18 | S:$D(D0) PRCHXXD0=D0
|
---|
| 19 | S:$D(D1) PRCHXXD1=D1
|
---|
| 20 | I PRCHQ["PRCPRIB" D
|
---|
| 21 | . N PRCPRIB
|
---|
| 22 | . S (PRCPRIB,ZTSAVE("PRCPRIB"))=D0
|
---|
| 23 | . Q
|
---|
| 24 | S:$D(PPMFLG) ZTSAVE("NOPRINT")=""
|
---|
| 25 | K IOP,ZTSK
|
---|
| 26 | S IOP=""
|
---|
| 27 | S X=""
|
---|
| 28 | I $D(PRCHQ("DEST2")) S X=PRCHQ("DEST2")
|
---|
| 29 | I X=""&($D(PRCHQ("DEST"))) S X=PRCHQ("DEST")
|
---|
| 30 | ;Check for substation
|
---|
| 31 | I $G(PRC("SST"))]"" D SUBST Q
|
---|
| 32 | I $D(^PRC(411,PRC("SITE"),2)) D GETIOP(PRC("SITE"))
|
---|
| 33 | ;Check for Fiscal Stack
|
---|
| 34 | I IOP'=""&(X'="IFP")&(X'="IFR")&(X="F"!(X="FR")) S DA=$O(^PRC(411,PRC("SITE"),2,"AC",X,IOP,0)) I $P($G(^PRC(411,PRC("SITE"),2,DA,0)),U,3) D ^PRCFPR Q
|
---|
| 35 | QDEV G Q:$G(PRCHIO)=IO(0)
|
---|
| 36 | I IOP'="" D G:'POP Q
|
---|
| 37 | . S %ZIS=$S(IOP=" ":"",1:"NQ")
|
---|
| 38 | . D ^%ZIS
|
---|
| 39 | . Q:'POP
|
---|
| 40 | . W $C(7),!!,">>>> ",X," IS NOT A VALID PRINTER, POSSIBLY FROM ",PRC("SITE"),"'S SITE PARAMETER FILE ",!!
|
---|
| 41 | . Q
|
---|
| 42 | ;
|
---|
| 43 | SDEV S %ZIS("B")=""
|
---|
| 44 | ;
|
---|
| 45 | SDEV1 S %ZIS("A")="QUEUE ON DEVICE: "
|
---|
| 46 | S %ZIS="NQ"
|
---|
| 47 | S NOZTDTH=""
|
---|
| 48 | K IOP
|
---|
| 49 | D ^%ZIS
|
---|
| 50 | G:POP EXIT
|
---|
| 51 | S IOP=ION_";"_IOST_";"_IOM_";"_IOSL
|
---|
| 52 | I IO=IO(0) D G EXIT
|
---|
| 53 | . D ^%ZIS
|
---|
| 54 | . U IO
|
---|
| 55 | . D @ZTRTN
|
---|
| 56 | . D ^%ZISC
|
---|
| 57 | . Q
|
---|
| 58 | ;
|
---|
| 59 | Q S U="^"
|
---|
| 60 | S:$D(PRCHXXD0) D0=PRCHXXD0,ZTSAVE("D0")=""
|
---|
| 61 | S:$D(PRCHXXD1) D1=PRCHXXD1,ZTSAVE("D1")=""
|
---|
| 62 | S ZTSAVE("U")=""
|
---|
| 63 | S:$D(PRCHQ("DEST")) ZTSAVE("PRCHQ(""DEST"")")=""
|
---|
| 64 | S:$D(PRCHFPT) ZTSAVE("PRCHFPT")=""
|
---|
| 65 | S:$D(DEST) ZTSAVE("DEST")=""
|
---|
| 66 | S:$D(PRC("SITE")) ZTSAVE("PRC(""SITE"")")=""
|
---|
| 67 | S:$D(PRCHREPR) ZTSAVE("PRCHREPR")=""
|
---|
| 68 | I ZTRTN="EN2^PRCHRPT9"!(ZTRTN="EN2^PRCHRPL") D
|
---|
| 69 | . D PP3
|
---|
| 70 | . S ZTDTH=""
|
---|
| 71 | . Q
|
---|
| 72 | E D
|
---|
| 73 | . D:ZTRTN="STQUE^PRCHPNT1" PP2
|
---|
| 74 | . S:'$D(NOZTDTH) ZTDTH=$H
|
---|
| 75 | . ; Per SAAN for P69 -- allow scheduling for user selected devices.
|
---|
| 76 | . Q
|
---|
| 77 | ;
|
---|
| 78 | I $G(PRCHIO)=IO(0)!($G(PRCHIO)=" ") D
|
---|
| 79 | . D @ZTRTN,^%ZISC:$G(PRCHIO)=" "
|
---|
| 80 | . ;Specify device 0;##;### TO RUN PRINT PROGRAMS THAT
|
---|
| 81 | . ;NORMALLY RUN IN THE BACKGROUND IN THE FOREGROUND.
|
---|
| 82 | . Q
|
---|
| 83 | E D ^%ZTLOAD,^%ZISC
|
---|
| 84 | ;
|
---|
| 85 | EXIT K IOP,PRCHQ,XMAPHOST,NOZTDTH
|
---|
| 86 | ;
|
---|
| 87 | CLNUP K ZTRTN,ZTUCI,ZTDTH,ZTSAVE,ZTDESC,ZTSK,ZTSKT,ZTCPU,ZTI,ZTJOB,ZTM1
|
---|
| 88 | K ZTM2,ZTMAST,ZTMGR,ZTNLG,ZTOS,ZTPD,ZTPO,ZTPROD,ZTPT,ZTRET,ZTSIZ
|
---|
| 89 | K ZTU1,ZTVOL,ZTXMB,PRCHXXD0,PRCHXXD1
|
---|
| 90 | Q
|
---|
| 91 | ;
|
---|
| 92 | SUBST ;Substation is being used
|
---|
| 93 | N DONE
|
---|
| 94 | S DONE=0
|
---|
| 95 | I $D(^PRC(411,PRC("SST"),2)) D Q:DONE
|
---|
| 96 | . D GETIOP(PRC("SST"))
|
---|
| 97 | . ;Check for Fiscal Stack
|
---|
| 98 | . I IOP'=""&(X'="IFP")&(X'="IFR")&(X="F"!(X="FR")) S DA=$O(^PRC(411,PRC("SST"),2,"AC",X,IOP,0)) I $P($G(^PRC(411,PRC("SST"),2,DA,0)),U,3) D ^PRCFPR S DONE=1
|
---|
| 99 | I IOP="",$D(^PRC(411,PRC("SITE"),2)) D Q:DONE
|
---|
| 100 | . D GETIOP(PRC("SITE"))
|
---|
| 101 | . ;Check for Fiscal Stack
|
---|
| 102 | . I IOP'=""&(X'="IFP")&(X'="IFR")&(X="F"!(X="FR")) S DA=$O(^PRC(411,PRC("SITE"),2,"AC",X,IOP,0)) I $P($G(^PRC(411,PRC("SITE"),2,DA,0)),U,3) D ^PRCFPR S DONE=1
|
---|
| 103 | ;Check field 61 in file 411 to see if user should be prompted for device
|
---|
| 104 | I +$P($G(^PRC(411,PRC("SITE"),0)),U,26) D Q
|
---|
| 105 | . S %ZIS("B")=IOP
|
---|
| 106 | . D SDEV1
|
---|
| 107 | . Q
|
---|
| 108 | D QDEV
|
---|
| 109 | Q
|
---|
| 110 | ;
|
---|
| 111 | GETIOP(DA) ;
|
---|
| 112 | I X]"" D
|
---|
| 113 | . S IOP=$O(^PRC(411,DA,2,"AC",X,0))
|
---|
| 114 | . I IOP=""&(X["SPOOL"!(X["LTA")!$D(^%ZIS(1,"B",X))!(X?1N.N)!(X=" ")) S IOP=X
|
---|
| 115 | . Q
|
---|
| 116 | Q
|
---|
| 117 | ;
|
---|
| 118 | PP2 S ZTSAVE("PRCH0")=""
|
---|
| 119 | S ZTSAVE("PRCH1")=""
|
---|
| 120 | S ZTSAVE("PRCH")=""
|
---|
| 121 | S ZTSAVE("PRCHV")=""
|
---|
| 122 | S ZTSAVE("PRCHP")=""
|
---|
| 123 | S ZTSAVE("PRCHJ")=""
|
---|
| 124 | S ZTSAVE("N")=""
|
---|
| 125 | S ZTSAVE("^TMP($J,")=""
|
---|
| 126 | Q
|
---|
| 127 | ;
|
---|
| 128 | PP3 ;SETUP FOR PRINTING PL100-322 REPORT
|
---|
| 129 | S ZTSAVE("FR")=""
|
---|
| 130 | S ZTSAVE("TO")=""
|
---|
| 131 | S ZTSAVE("PRCHNULL")=""
|
---|
| 132 | S ZTSAVE("PRCHDET")=""
|
---|
| 133 | Q
|
---|