source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJLOI.m@ 1474

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1PSJLOI ;BIR/MV-PRINT ACKNOWLEGED PENDING LABELS ;16 DEC 97 / 9:32 AM
2 ;;5.0; INPATIENT MEDICATIONS ;**28,54**;16 DEC 97
3 ;
4 ; Reference to ^PS(55 supported by DBIA #2191.
5 ; Reference to ^DPT supported by DBIA #10035.
6 ; Reference to ^%DTC supported by DBIA #10000.
7 ;
8 ;Queue MAR labels for Acknowleged pending orders.
9EN(DFN,ON) ;
10 N P,X,Y,PSGTOL,PSGUOW,PSGP,PSGTOO,DA
11 S PSGP=DFN
12 Q:'$D(^DPT(PSGP,.1)) N PSJACPF,PSJACNWP S PSJACPF=11 D ENCV^PSGSETU S Y=DFN D CHK^PSGP Q:'PSJSYSL
13 S DA=+ON
14 S ND0=^PS(53.1,DA,0)
15 S PSGTOL=2,PSGUOW=DUZ,PSGTOO=2
16 S X=$P(PSJSYSW0,U,2) I X="" S X=1
17 S Y=$P($G(^PS(53.1,DA,8)),U),Y=$S(Y="A":4,Y="H":5,Y="C":6,1:1)
18 I X=1!($P(ND0,U,4)'="U"&(X[Y!(Y=1)))!($P(ND0,U,4)="U"&(X=2)) D
19 . D NOW^%DTC S PSGDT=% D ENL^PSGVDS
20 S ^PS(53.1,DA,7)=PSGDT_U_"N"
21 I $P(PSJSYSL,U,2)]"" S PSGOP=DFN D ^PSGLW
22 Q
23 ;
24EN2(DFN,ON) ;
25 N PSGTOL,PSGUOW,PSGP,PSGTOO,DA
26 S PSGP=DFN
27 Q:'$D(^DPT(PSGP,.1)) N PSJACPF,PSJACNWP S PSJACPF=11 D ENCV^PSGSETU S Y=DFN D CHK^PSGP Q:'PSJSYSL
28 S DA=+ON
29 S PSGTOL=2,PSGUOW=DUZ,PSGTOO=1
30 I +PSJSYSL>1 S $P(^PS(55,PSGP,5,DA,7),U)=PSGDT S:$P(^(7),U,2)="" $P(^(7),U,2)="N"_$S($P(^PS(55,PSGP,5,DA,0),U,24)="E":"E",1:"") S PSGOP=DFN D ^PSGLW
31 Q
32
Note: See TracBrowser for help on using the repository browser.