source: FOIAVistA/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGPOR.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 987 bytes
Line 
1PSGPOR ;BIR/CML3-PATIENT ORDER PURGE REPORT ;24 JAN 94 / 11:15 AM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3 S PSGPOD=$E($$ENDTC^PSGMI(PSGPOD),1,8) D NOW^%DTC S PSGOD=$$ENDTC^PSGMI(%) S (LN1,LN2,PG)="",$P(LN1,"-",81)="",$P(LN2,"=",81)="" U IO D HEADER I '$O(^PS(53.43,1,1,PSGJ,1,0)) W !!!?31,"NO ORDERS PURGED." G DONE
4 S (PG,PT,NDT)=0 F PSGP=0:0 S PSGP=$O(^PS(53.43,1,1,PSGJ,1,PSGP)) Q:'PSGP S ND=$P(^(PSGP,0),"^",2) D:$Y+5>IOSL HEADER D WRT
5 D:$Y+9>IOSL HEADER W !!!,LN2,!!?3,"PATIENTS: ",PT,?55,$J(NDT,5,0) W:$Y @IOF
6 ;
7DONE ;
8 W:$Y @IOF K ^PS(53.43,1,1,PSGJ),ND,NDT,PT,PSGP,PSGID,PSGOD,LN1,LN2 Q
9 ;
10HEADER ;
11 S PG=PG+1 W:$Y @IOF W !!?25,"PATIENT ORDER PURGE REPORT",?64,PSGOD,!?16,"(FOR PATIENTS DISCHARGED ON OR BEFORE ",PSGPOD,")",?73-$L(PG),"Page: ",PG,!?5,"Patient",?55,"Number of",!?55,"Orders Purged",!,LN1 Q
12 ;
13WRT ;
14 S PN=$G(^DPT(PSGP,0)) W !!?2,$S($P(PN,"^")]"":$P(PN,"^"),1:PSGP),$S($P(PN,"^",9):" ("_$E($P(PN,"^",9),6,10)_")",1:""),?55,$J(ND,5,0) S PT=PT+1,NDT=NDT+ND Q
Note: See TracBrowser for help on using the repository browser.