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

ACRFQ.m

Go to the documentation of this file.
ACRFQ ;IHS/OIRM/DSD/THL,AEF - ROUTINE TO PRINT SELECTED DOCUMENTS;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE TO PRINT SELECTED DOCUMENTS
EN S:'$D(ACRCOPY) ACRCOPY=1
 S:ACRCOPY<1 ACRCOPY=1
 S:$E(IOST,1,2)="C-" ACRCOPY=1
 S:ACRCOPY>6 ACRCOPY=6
 F ACRIII=1:1:ACRCOPY D EN1
EXIT K ACRII,ACRCOPY,ACRCOST
 I $D(ZTSK)#2,ZTSK,$D(^%ZTSK(ZTSK)) D STAT^%ZTLOAD I $D(ZTSK(1)),ZTSK(1)=3 D KILL^%ZTLOAD
 Q
EN1 K ACRQUIT,ACROUT
 W " "
 S (ACRDOCDA,D0)=ACRDOCDA
 D SETDOC^ACRFEA1
 N DXS,DIP,DC,DN
 S:'$D(ACRREFX) ACRREFX=ACRREF
 I $P($G(^ACRDOC(ACRDOCDA,0)),U,4)=35 N ACRREF,ACRREFX,ACRREQST S (ACRREF,ACRREFX)=116,ACRREQST=""
 I '$D(ACRRR)#2,$D(^ACRDOC(ACRDOCDA,3)),$P(^(3),U,13) N ACRREFX,ACRPO S ACRREFX=210
 I ACRREFX=116&$D(ACRREQST)&$D(ACRPSUM) D ^ACRPRQS Q
 I ACRREFX=116&$D(ACRREQST) D ^ACRPRQT D EN2 D  Q
 .S:'$D(D0) D0=ACRDOCDA
 .I '$D(ACROUT),$D(ACREQUIP) S D0=ACRDOCDA D ^ACRPEC N ACREQUIP,DXS,DIP,DC,DN W:$Y>1 @IOF Q
 .I '$D(ACROUT),$P(^ACRDOC(ACRDOCDA,0),U,18)>0 S D0=ACRDOCDA N DXS,DIP,DC,DN D ^ACRPBPA W:$Y>1 @IOF Q
 I ACRREFX=103!(ACRREFX=349)!(ACRREFX=326)!$D(ACRPO) D  D EN2 Q
 .I '$P(^ACRDOC(ACRDOCDA,0),U,15) D
 ..I ACRREFX=326,'$D(ACRPSC) S ACRPSC=326
 ..I '$D(ACRPSC) D ^ACRPSS Q
 ..S ACRPX="^ACRF"_$P(ACRPSC,U)
 ..I +ACRPSC=326 S ACRPX="^ACRNP1"
 ..D @ACRPX
 .D ^ACRPPOA:$P(^ACRDOC(ACRDOCDA,0),U,15)
 .W:$Y>1 @IOF
 .I $E(IOST,1,2)="P-",'$P(^ACRDOC(ACRDOCDA,0),U,15),$P(^ACRSYS(1,"DT"),U,23) S D0=1 D ^ACRPTC W @IOF
 .I '$D(ACROUT),$P(^ACRDOC(ACRDOCDA,0),U,18)>0 S D0=ACRDOCDA N DXS,DIP,DC,DN D ^ACRPBPA W:$Y>1 @IOF Q
 I ACRREFX=130!(ACRREFX=600),ACRREF=130!(ACRREF=600) D ^ACRFTOT
 I ACRREFX=130&$D(ACRREQST)&$D(ACRPSUM) D ^ACRPTOS Q
 I ACRREFX=130&$D(ACRTVI)&$D(ACRREQST) D ^ACRPSTI D EN2 Q
 I ACRREFX=130&$D(ACRREQST) D ^ACRPTO D EN2 Q
 I ACRREFX=499 D ^ACRRR D EN2 Q
 I ACRREFX=210 D  Q
 .I '$P($G(^ACRDOC(ACRDOCDA,3)),U,17) D ^ACRFFS I 1
 .E  D ^ACRF3542
 .D EN2
 I ACRREFX=148 D ^ACRPTRG D EN2 Q
 I ACRREFX=600&$D(ACRPSUM) D ^ACRPTVS Q
 I ACRREFX=600 D ^ACRPTV D EN2 Q
 I ACRREFX=999 D ^ACRFPRS D EN2 Q
 I '$D(ACRREV) D ^ACRFPCRT D EN2 Q
 Q
EN2 N DXS,DIP,DC,DN
 I '$D(ACROUT),ACRREFX=116,$D(^ACROBL(ACRDOCDA,1,1,0)) S D0=ACRDOCDA N DXS,DIP,DC,DN D ^ACRPAR D PAUSE^ACRFWARN W:$Y>1 @IOF
 I '$D(ACROUT),ACRREFX=148,$D(ACRTVAL) W @IOF S D0=ACRDOCDA N DXS,DIP,DC,DN W @IOF D ^ACRPTE D PAUSE^ACRFWARN W:$Y>1 @IOF K ACRTVAL
 I $D(ACRCOST),'$D(ACROUT),"^103^349^326^116^204^210^"[(U_ACRREFX_U) D EN^ACRFPCC
 I $D(ACRDHR) W:$Y>1 @IOF D PRINT^ACRFDHR
 I $D(ACRSHIP),$D(^ACRSI("B",ACRDOCDA)) D DISPLAY^ACRFSHIP K ACRSHIP
 W:$Y>1 @IOF
 K DC,ACRPOTC,ACRDHR
 Q
REQ ;EP;TO SETUP TO PRINT REQUEST
 S ACRRTN="^ACRFQ",ZTDESC="PRINT ARMS REQUEST"_$S($D(ACRDOC):", DOCUMENT # "_ACRDOC,1:"")
 D ^ACRFZIS
 Q