source: WorldVistAEHR/trunk/r/CMOP-PSX/PSXCSHI1.m@ 1661

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1PSXCSHI1 ;BIR/JMB-High Cost Rx Report-CONTINUED ;[ 04/08/97 2:06 PM ]
2 ;;2.0;CMOP;**38**;11 Apr 97
3PRINT ;Loops thru ^TMP global
4 F PSXFAC=0:0 S PSXFAC=+$O(^TMP($J,PSXFAC)) Q:'PSXFAC!($G(PSXEXIT)) D Q:$G(PSXEXIT) D HD:($Y+4)>IOSL Q:$G(PSXEXIT) W !!,"No. of Fills="_PSXCNT,?20,"'*' indicates a refill"
5 .D HD S PSXCNT=0,PSXDG="" F S PSXDG=$O(^TMP($J,PSXFAC,PSXDG)) Q:PSXDG=""!($G(PSXEXIT)) S PSXRXN="" F S PSXRXN=$O(^TMP($J,PSXFAC,PSXDG,PSXRXN)) Q:PSXRXN=""!($G(PSXEXIT)) D
6 ..F PSXIEN=0:0 S PSXIEN=+$O(^TMP($J,PSXFAC,PSXDG,PSXRXN,PSXIEN)) Q:'PSXIEN!($G(PSXEXIT)) D
7 ...S PSXCNT=PSXCNT+1 D HD:($Y+4)>IOSL Q:$G(PSXEXIT)
8 ...W !,$S($P(^TMP($J,PSXFAC,PSXDG,PSXRXN,PSXIEN),"^"):"* ",1:" ")_PSXRXN,?15,PSXDG,?50,$J($P(^(PSXIEN),"^",2),4),?55,"x",?57,$J($P(^(PSXIEN),"^",3),6,3),?65,"=",?66,$J($P(^(PSXIEN),"^",4),7,2)
9 Q
10HD I PSXPG>1,$E(IOST)="C" S DIR(0)="FO",DIR("A")=" Press Return to Continue or ^ to Exit " D ^DIR K DIR I $G(DTOUT)!($G(DUOUT)) S PSXEXIT=1 Q
11 S PSXFACR="ALL FACILITIES"
12 ;I $G(PSXFAC)'="" N X,Y S X=PSXFAC,DIC=4,DIC(0)="MNZ" S:$D(^PSX(552,"D",X)) X=$E(X,2,99) D ^DIC K DIC S PSXFACR=Y(0,0) K X,Y ;****DOD L1
13 I $G(PSXFAC)'="" N X,Y S X=PSXFAC,AGNCY="VASTANUM" S:$D(^PSX(552,"D",X)) X=$E(X,2,99),AGNCY="DMIS" S Y=$$IEN^XUMF(4,AGNCY,X),PSXFACR=$$GET1^DIQ(4,Y,.01)
14 W:PSXPG>1!($E(IOST)="C") @IOF W !,"PRINTED: ",PSXPDT,?(72-$L(PSXPG)),"PAGE ",PSXPG S PSXPG=PSXPG+1
15 W !!?(60-$L(PSXFACR)/2),"HIGH COST REPORT FOR ",PSXFACR
16 W !?8,"FILLS THAT COST AT LEAST $",PSXMAX," -- FROM ",PSXBDTR," TO ",PSXEDTR
17 W !!," RX #",?15,"DRUG",?51,"QTY",?59,"COST",?67,"TOTAL COST"
18 W ! F PSXI=1:1:79 W "-"
19 Q
Note: See TracBrowser for help on using the repository browser.