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

PSGLW.m

Go to the documentation of this file.
PSGLW ;BIR/CML3-LABEL QUEUE AND WRITE ;12 JUN 96 / 2:30 PM
 ;;5.0; INPATIENT MEDICATIONS ;**115**;16 DEC 97
 ;
ENQL ;
 Q:$G(PSGOP)'>0
 I '$G(PSJSYSW0) S PSJSYSW0=+$O(^PS(59.6,"B",$S($G(PSJPWD):$G(PSJPWD),1:+$G(PSGLWD)),0))
 I $S($D(IO)[0:1,1:$P(PSJSYSL,"^",3)'=IO) S IOP=$P(PSJSYSL,"^",2)_";132",%ZIS="NQ" D ^%ZIS K IOP,POP,ZTSAVE S PSGTID=$H,PSGTIR="ENLP^PSGLW",ZTDESC="MAR LABEL PRINT",ZTSAVE("PSGOP")="" D ENTSK^PSGTI K ZTSK Q
 F  S IOP=$P(PSJSYSL,"^",2)_";132",%ZIS="" D ^%ZIS Q:'POP
 ;
ENLP ;
 K PSGLSTOP D ^PSGLPI,NOW^%DTC N PSJFIRST S PSJFIRST=1 S PSGDT=% U IO
 F PSGLWP1=1,2,3 F PSGLWP2=0:0 S PSGLWP2=$O(^PS(53.41,2,1,DUZ,1,PSGOP,1,PSGLWP1,1,PSGLWP2)) Q:'PSGLWP2  D
 . I PSJFIRST,$P(PSJSYSW0,U,18) D ENHEDER^PSGLPI S PSJFIRST=0
 . S PSGORD=PSGLWP2_$E("ANV",PSGLWP1) NEW PSJFLUID
 . I PSGLWP1=2,($P($G(^PS(53.1,+PSGORD,0)),U,9)="P") S PSGORD=+PSGORD_"P" S:$P(^(0),U,4)="F" PSJFLUID=1
 . D @$S((PSGLWP1=3!$G(PSJFLUID)):"EN^PSIVUDL(PSGOP,PSGORD,PSGLWD_U_PSGLWDN,PSGLRB)",1:"^PSGLOI")
 . K ^PS(53.41,2,1,DUZ,1,PSGOP,1,PSGLWP1,1,PSGLWP2)
 K ^PS(53.41,2,1,DUZ,1,PSGOP) D ^%ZISC
 Q