source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOCST11.m@ 1211

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

initial load of WorldVistAEHR

File size: 1.2 KB
RevLine 
[613]1PSOCST11 ;BHAM ISC/SAB - DRUG COSTS BY CLINIC ; 12/22/92 15:58
2 ;;7.0;OUTPATIENT PHARMACY;**10,31**;DEC 1997
3BEG S RP=11 D HDC^PSOCSTX F D CDT^PSOCSTX Q:$G(CTR) D CLN Q:$G(CTR) S RP=0 D CTP^PSOCSTX Q:$G(CTR) I RP=0 D DEV Q
4 D EX Q
5CLN D CMC^PSOCSTX Q:$G(CTR)
6 I IFN S DIC(0)="AEQM",DIC="^SC(",DIC("A")="Select Clinic: " D ^DIC K DIC S:Y<0 CTR=1 Q:$G(CTR) S IFN=1,CLA=+Y
7 Q
8DEV D DVC^PSOCSTX Q:$G(CTR)
9 K PSOION I $D(IO("Q")) S ZTDESC="DRUG COST BY CLINIC",ZTRTN="START^PSOCST11" D PAS^PSOCSTX
10 I K IO("Q") D ^%ZTLOAD W:$D(ZTSK) !,"REPORT QUEUED TO PRINT !!",! D EX Q
11START U IO K ^TMP($J) F PSDT=(BEGDATE-1):0:ENDDATE S PSDT=$O(^PSCST(PSDT)) Q:'PSDT!(PSDT>ENDDATE) D @$S('IFN:"ACL",1:"SCL")
12 D ZER^PSOCSTX S CLAX="" D HD I $O(^TMP($J,CLAX))']"" D HDN^PSOCSTX Q
13 F S CLAX=$O(^TMP($J,CLAX)) Q:CLAX="" D HD:($Y+4)>IOSL Q:$G(CTR) S Y=^TMP($J,CLAX),TTX=CLAX D PRT^PSOCSTX
14 D HD:($Y+2)>IOSL D FTX^PSOCSTX
15EX D EX^PSOCSTX Q
16ACL F CLA=0:0 S CLA=$O(^PSCST(PSDT,"S",CLA)) Q:'CLA D SCL
17 Q
18SCL I $D(^PSCST(PSDT,"S",CLA,0)) S X=^(0) D STORE
19 Q
20STORE Q:'$D(^SC(CLA,0)) S CLAX=$P(^(0),"^") S:'$D(^TMP($J,CLAX)) ^TMP($J,CLAX)="^0^0^0" S UTL=^(CLAX),^TMP($J,CLAX)="^"_($P(UTL,"^",2)+$P(X,"^",2))_"^"_($P(UTL,"^",3)+$P(X,"^",3))_"^"_($P(UTL,"^",4)+$P(X,"^",4))
21 Q
22HD D HD^PSOCSTX Q
Note: See TracBrowser for help on using the repository browser.