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

17 lines
1.6 KiB
Mathematica

PSOMGR31 ;BHAM ISC/JMB - DAILY MANAGEMENT COST REPORT CONTD ; 3/19/93
;;7.0;OUTPATIENT PHARMACY;;DEC 1997
TOT S PRT=1 D RPT^PSOMGRP3 F DIV=0:0 S DIV=$O(^PS(59,DIV)) Q:'DIV D SUB^PSOMGRP3
W !!?13 F K=1:1:9 W $J("=======",13)
W !,"GR TOTAL",?13 I ANS="A" W $J($FN($S($P(T2,"^",4)=0!($P(T3,"^",2)=0):0,1:$P(T3,"^",2)/$P(T2,"^",4)),"",2),13) D
.W $J($FN($S($P(T2,"^",3)=0!($P(T3,"^",3)=0):0,1:$P(T3,"^",3)/$P(T2,"^",3)),"",2),13),$J($FN($S($P(T3,"^",7)=0!($P(T1,"^",12)=0):0,1:$P(T3,"^",7)/$P(T1,"^",12)),"",2),13)
.W $J($FN($S($P(T3,"^",7)=0!($P(T1,"^",10)=0):0,1:$P(T3,"^",7)/$P(T1,"^",10)),"",2),13),$J($FN($S($P(T3,"^",8)=0!($P(T1,"^",11)=0):0,1:$P(T3,"^",8)/$P(T1,"^",11)),"",2),13)
I ANS="S" W $J($FN($S($P(S2(DIV),"^",4)=0!($P(T3,"^",2)=0):0,1:($P(S2(DIV),"^",4)*$P(T3,"^",2))/$P(S2(DIV),"^",4)),"",2),13) D
.W $J($FN($S($P(S2(DIV),"^",3)=0!($P(T3,"^",3)=0):0,1:($P(S2(DIV),"^",3)*$P(T3,"^",3))/$P(S2(DIV),"^",3)),"",2),13),$J($FN($S($P(T3,"^",7)=0!($P(S1(DIV),"^",12)=0):0,1:$P(T3,"^",7)/$P(S1(DIV),"^",12)),"",2),13)
.W $J($FN($S($P(T3,"^",7)=0!($P(S1(DIV),"^",10)=0):0,1:$P(T3,"^",7)/$P(S1(DIV),"^",10)),"",2),13),$J($FN($S($P(T3,"^",8)=0!($P(S1(DIV),"^",11)=0):0,1:$P(T3,"^",8)/$P(S1(DIV),"^",11)),"",2),13)
W $J($FN($P(T3,"^",7),"",2),13),$J($FN($P(T3,"^",8),"",2),13),$J($FN($P(T3,"^",9),"",2),13)
I ANS="A" W $J($FN($S($P(T3,"^",9)=0!($P(T2,"^",13)=0):0,1:$P(T3,"^",9)/$P(T2,"^",13)),"",2),13)
E W $J($FN($S($P(T3,"^",9)=0!($P(S2(DIV),"^",13)=0):0,1:$P(T3,"^",9)/$P(S2(DIV),"^",13)),"",2),13)
W !!!?17,"FINISHED PRINTING ON: " D NOW^%DTC S Y=% X ^DD("DD") W Y
W @IOF
Q