Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APSPMED3

APSPMED3.m

Go to the documentation of this file.
APSPMED3 ; IHS/DSD/ENM - PRINTS SHORT MEDICATION PROFILE ;  [ 09/03/97   1:30 PM ]
 ;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
 K RX,DTOUT,DIRUT,DIROUT,DUOUT
 D HD S DRUG="" F I=0:0 S DRUG=$O(^TMP($J,DRUG)) Q:DRUG=""  F J=0:0 S J=$O(^TMP($J,DRUG,J)) Q:'J!($D(DTOUT))!($D(DUOUT))!($D(DIROUT))  S RX0=^(J),RX2=$G(^PSRX(J,2)),ST=+$P(RX0,"^",15) S:$P(RX2,"^",15) RST($P(RX2,"^",2))=1 D W
 Q
Q ;D ^%ZISC K ^TMP($J),PSODTCT,ST,D0,DIC,DIR,DIRUT,DUOUT,G,II,K,RXD,RXF,ZX,DRUG,X,DFN,PHYS,PSRT,CT,AL,I1,PLS,REF,LMI,PI,FN,Y,I,J,RX,DRX,ST,RX0,RX2,DA S:$D(ZTQUEUED) ZTREQ="@" Q
 Q
W ;I $Y+4>IOSL,IOST["C-" S DIR("A")="ENTER '^' TO HALT",DIR(0)="FO" D ^DIR Q:$D(DTOUT)!($D(DUOUT))!($D(DIROUT))  W @IOF
 I $Y+4>IOSL,IOST["C-" S DIR("A")="ENTER '^' TO HALT",DIR(0)="E" D ^DIR Q:$D(DTOUT)!($D(DUOUT))!($D(DIROUT))  W @IOF D HD ;IHS/DSD/ENM 02/20/97
 ;U IO I IO'=IO(0),$Y+4>IOSL W @IOF
 D STAT^PSOFUNC W !,$P(RX0,"^"),?8,$S(PSRT="DRUG":DRUG,$D(^PSDRUG(+$P(RX0,"^",6),0)):$P(^(0),"^"),1:"NOT ON FILE"),?44,$E(ST,1),?47,$J($P(RX0,"^",7),6)
 S RXD=$P(^PSRX(J,3),"^"),RXF=$P(RX0,"^",9) F II=0:0 S II=$O(^PSRX(J,1,II)) Q:'II  S RXF=RXF-1 S:$P(^PSRX(J,1,II,0),"^",16) RST($P(^(0),"^"))=1
 W ?55,$E($P(RX0,"^",13),4,5)_"-"_$E($P(RX0,"^",13),6,7)_"-"_$E($P(RX0,"^",13),2,3) W:RXD ?65,$E(RXD,4,5)_"-"_$E(RXD,6,7)_"-"_$E(RXD,2,3)_$S($G(RST(RXD)):"R",1:"") W ?75,"("_RXF_")"
 W !?10,$P(RX0,"^",10) K RST Q
HD U IO W !!,"RX#     DRUG",?42,"STAT    QTY",?55,"ISSUED ",?65,"LAST FILL REM"
 Q