source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGLW.m@ 731

Last change on this file since 731 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1PSGLW ;BIR/CML3-LABEL QUEUE AND WRITE ;12 JUN 96 / 2:30 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**115**;16 DEC 97
3 ;
4ENQL ;
5 Q:$G(PSGOP)'>0
6 I '$G(PSJSYSW0) S PSJSYSW0=+$O(^PS(59.6,"B",$S($G(PSJPWD):$G(PSJPWD),1:+$G(PSGLWD)),0))
7 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
8 F S IOP=$P(PSJSYSL,"^",2)_";132",%ZIS="" D ^%ZIS Q:'POP
9 ;
10ENLP ;
11 K PSGLSTOP D ^PSGLPI,NOW^%DTC N PSJFIRST S PSJFIRST=1 S PSGDT=% U IO
12 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
13 . I PSJFIRST,$P(PSJSYSW0,U,18) D ENHEDER^PSGLPI S PSJFIRST=0
14 . S PSGORD=PSGLWP2_$E("ANV",PSGLWP1) NEW PSJFLUID
15 . 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
16 . D @$S((PSGLWP1=3!$G(PSJFLUID)):"EN^PSIVUDL(PSGOP,PSGORD,PSGLWD_U_PSGLWDN,PSGLRB)",1:"^PSGLOI")
17 . K ^PS(53.41,2,1,DUZ,1,PSGOP,1,PSGLWP1,1,PSGLWP2)
18 K ^PS(53.41,2,1,DUZ,1,PSGOP) D ^%ZISC
19 Q
Note: See TracBrowser for help on using the repository browser.