VistA-WorldVistAEHR/r/OUTPATIENT_PHARMACY-PSO-APS.../PSOSUDP2.m

9 lines
689 B
Mathematica

PSOSUDP2 ;BHAM ISC/RTR-Delete printed batched cont. ; 1/10/96
;;7.0;OUTPATIENT PHARMACY;;DEC 1997
;
BEG G:'$D(^UTILITY($J,"PSODEPT")) END
F PSAA=0:0 S PSAA=$O(^UTILITY($J,"PSODEPT",PSAA)) Q:'PSAA F PSBB=0:0 S PSBB=$O(^UTILITY($J,"PSODEPT",PSAA,PSBB)) Q:'PSBB F PSCC=0:0 S PSCC=$O(^UTILITY($J,"PSODEPT",PSAA,PSBB,PSCC)) Q:'PSCC D
.F PSDD=0:0 S PSDD=$O(^PS(52.5,"AS",PSAA,PSBB,PSCC,PSDD)) Q:'PSDD F PSEE=0:0 S PSEE=$O(^PS(52.5,"AS",PSAA,PSBB,PSCC,PSDD,PSEE)) Q:'PSEE D:$D(^PS(52.5,PSEE,0))&($P($G(^(0)),"^"))
..S PSOIEN=+$P($G(^PS(52.5,PSEE,0)),"^") S DA=PSEE,DIK="^PS(52.5," D ^DIK
END K ^UTILITY($J,"PSODEPT"),PSAA,PSBB,PSCC,PSDD,PSEE,PSOIEN D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@" Q