source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSIVPCR1.m@ 623

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1PSIVPCR1 ;BIR/PR,MV-PRINT PROVIDER COST REPORT ;07 OCT 97 / 9:49 AM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3P ;
4 S:'$D(PT) (PT,GT)=0 S (P,DG)=""
5 I $D(BRIEF) D BRIEF Q
6 F V=0:0 D F S V=$O(^UTILITY($J,V)) Q:'V W !,"IV ROOM: "_$P(^PS(59.5,V,0),U),! D P1
7 D F W !!?17,"GRAND TOTAL:",?116,"================",!?114,"$",$J(GT,17,2) D TM^PSIVDCR1 G K
8 Q
9P1 ;
10 S P1="" F J=0:0 D F S P1=$O(^UTILITY($J,V,P1)) Q:P1="" W !?1,"PROVIDER: ",P1,! D P2
11 Q
12P2 ;
13 F J=0:0 S DG=$O(^UTILITY($J,V,P1,DG)) Q:DG="" D P3
14 D F W !,?116,"----------------"
15 D F W !?5,"TOTAL FOR PROVIDER: ",P1,?114,"$",$J(PT,17,2),!! S GT=GT+PT,PT=0
16 Q
17P3 ;
18 S G=^UTILITY($J,V,P1,DG)
19 S C=$P(G,U,2),X=$P(^DD(52.6,2,0),U,3),X=$P(X,";",C),X=$P(X,":",2),C=X
20 I $D(BRIEF) S PT=PT+$P(G,U,4) Q
21 D F W !?2,$E(DG,1,33),?36,$J($P(G,U,3),8,2)_" "_C,?59,$J($P(G,U,6),8,2),?73,$J($P(G,U,5),9,2),?96,$J($P(G,U,7),9,2),?114,"$",$J($P(G,U,4),17,2) S PT=PT+$P(G,U,4)
22 Q
23F ;
24 I $Y+5>IOSL D H^PSIVPCR
25 Q
26BRIEF ;***Print the condensed Provider cost report.
27 S (P1,DG)="" F V=0:0 D F S V=$O(^UTILITY($J,V)) Q:'V W !!!?10,"IV ROOM: "_$P(^PS(59.5,V,0),U),! D
28 . F S P1=$O(^UTILITY($J,V,P1)) Q:P1="" D
29 .. F S DG=$O(^UTILITY($J,V,P1,DG)) Q:DG="" S PT=PT+$P(^UTILITY($J,V,P1,DG),U,4)
30 .. W !,P1,?45,"$",$J(PT,17,2),! S GT=GT+PT,PT=0
31 W !!,?46,"=================",!,?20,"GRAND TOTAL:",?45,"$",$J(GT,17,2)
32 D TM^PSIVDCR1
33 D K
34 Q
35K ;
36 S:$D(ZTQUEUED) ZTREQ="@"
37 K VA,DA,DAT,DES,P,P1,DG,G,G2,GT,H,I,V,J,JJ,NA,PG,UR,SS,S,PT,CO,UD,UM,Y,I7,I8,I6,I2,C,UC,D,I1,ZTSK,Z,Y,^UTILITY($J),I9,I10,I11,I4,I15,%
38 Q
Note: See TracBrowser for help on using the repository browser.