| 1 | PSOCST4 ;BHAM ISC/SAB - DRUG COSTS BY PROVIDER ; 08/19/92 11:22
|
---|
| 2 | ;;7.0;OUTPATIENT PHARMACY;**10,31**;DEC 1997
|
---|
| 3 | BEG S RP=4 D HDC^PSOCSTX F D CDT^PSOCSTX Q:$G(CTR) D PRV^PSOCSTX Q:$G(CTR) S RP=0 D CTP^PSOCSTX Q:$G(CTR) I RP=0 D DEV Q
|
---|
| 4 | D EX Q
|
---|
| 5 | DEV D DVC^PSOCSTX Q:$G(CTR)
|
---|
| 6 | K PSOION I $D(IO("Q")) S ZTDESC="DRUG COSTS BY PROVIDER",ZTRTN="START^PSOCST4" D PAS^PSOCSTX
|
---|
| 7 | I K IO("Q") D ^%ZTLOAD W:$D(ZTSK) !,"REPORT QUEUED TO PRINT !!",! D EX Q
|
---|
| 8 | START U IO K ^TMP($J) F PSDT=(BEGDATE-1):0:ENDDATE S PSDT=$O(^PSCST(PSDT)) Q:'PSDT!(PSDT>ENDDATE) D @$S('IFN:"PHY",1:"SPHY")
|
---|
| 9 | D ZER^PSOCSTX S PHYX="" D HD I $O(^TMP($J,PHYX))']"" D HDN^PSOCSTX Q
|
---|
| 10 | F I=0:0 S PHYX=$O(^TMP($J,PHYX)) Q:PHYX="" D
|
---|
| 11 | .D HD:($Y+4)>IOSL Q:$G(CTR) S Y=^TMP($J,PHYX),TTX=PHYX D PRT^PSOCSTX
|
---|
| 12 | I 'CTR,'IFN D HD:($Y+2)>IOSL D FTX^PSOCSTX
|
---|
| 13 | EX D EX^PSOCSTX Q
|
---|
| 14 | PHY F PHY=0:0 S PHY=$O(^PSCST(PSDT,"P",PHY)) Q:'PHY D SPHY
|
---|
| 15 | Q
|
---|
| 16 | SPHY I $D(^PSCST(PSDT,"P",PHY,0)) S X=^PSCST(PSDT,"P",PHY,0) D STORE
|
---|
| 17 | Q
|
---|
| 18 | STORE S PHYX=$S($D(^VA(200,+PHY,0)):$P(^(0),"^"),1:"UNKNOWN")
|
---|
| 19 | S:'$D(^TMP($J,PHYX)) ^TMP($J,PHYX)="^0^0^0"
|
---|
| 20 | S UTL=^TMP($J,PHYX),^TMP($J,PHYX)="^"_($P(UTL,"^",2)+$P(X,"^",2))_"^"_($P(UTL,"^",3)+$P(X,"^",3))_"^"_($P(UTL,"^",4)+$P(X,"^",4))
|
---|
| 21 | Q
|
---|
| 22 | HD D HD^PSOCSTX Q
|
---|