PSOLLL3 ;BHAM/JLC - LASER LABELS ;11/20/02
;;7.0;OUTPATIENT PHARMACY;**120,161,148,200**;DEC 1997;Build 7
;
S PRCOPAY=$S('$D(PSOCPN):0,1:1)
PF ;PATIENT FILL DOCUMENT
I $G(PSOIO("PFI"))]"" X PSOIO("PFI")
D S PSOFONT=OFONT
. S OFONT=PSOFONT,PSOFONT=PSOHFONT
. I $P(RXY,"^",9)=0 S T="NO REFILL for this prescription" D PRINT(T,1,1) S PSOY=PSOY+PSOYI Q
. I RXF+1=(1+$P(RXY,"^",9)) S T="NO REFILLS LEFT for this prescription" D PRINT(T,1,1) S PSOY=PSOY+PSOYI Q
. S T="PHONE IN OR MAIL THIS REFILL REQUEST" D PRINT(T,1,1)
. S PSOFONT=OFONT,T="Follow the refill instructions provided with your prescription." D PRINT(T,0,1)
. S PSOFONT=OFONT,OPSOX=PSOX,PSOX=PSOX+300,T="For Refill Call "_$P(PS,"^",3)_"-"_$P(PS,"^",4) D PRINT(T,0) S PSOX=OPSOX
S T=PNM_" "_$G(SSNPN) D PRINT(T,1)
S T="Rx# "_RXN_" " D PRINT(T,1)
D STRT^PSOLLU1("SEC2",T,.L) S OPSOX=PSOX,PSOX=L($E(PSOFONT,2,99))*300+PSOX
S T=DATE_" Fill "_(RXF+1)_" of "_(1+$P(RXY,"^",9)),PSOY=PSOY-PSOYI D PRINT(T) S PSOX=OPSOX
S T=$S($$STATUS^PSOBPSUT(RX,+RXF)'="":"3rd Party Rx",1:"") D PRINT(T,1)
S T="Qty: "_$G(QTY)_" "_$G(PSDU)_" Days supply: "_$G(DAYS) D PRINT(T,0)
S T=DRUG D PRINT(T,0)
S T=$$GETNDC^PSONDCUT(RX,RXF) D PRINT(T,1)
D D PRINT(T,1)
. S NOR=$P(RXY,"^",9)-RXF
. I $P(RXY,"^",9)=0 S T="NO REFILL" Q
. I NOR=0 S T="NO REFILLS LEFT" Q
. S T="May refill "_NOR_"X by "_EXPDT
S PS=$S($D(^PS(59,PSOSITE,0)):^(0),1:"")
D PRINT(COPAYVAR)
S T=$P(PS,"^")_"-"_$P(PS,"^",6) D STRT^PSOLLU1("SEC2",T,.L)
S OPSOX=PSOX,PSOX=2340-(L($E(PSOFONT,2,99))*300),PSOY=PSOY-PSOYI
D PRINT(T)
S PSOX=OPSOX,PSOYI=PSOBYI
I $G(PSOIO("SBT"))]"" X PSOIO("SBT")
S X2=PSOINST_"-"_RX
W X2
I $G(PSOIO("EBT"))]"" X PSOIO("EBT")
I $G(PSOIO(PSOFONT))]"" X PSOIO(PSOFONT)
Q
PRINT(T,BOLD,HDR) ;
S BOLD=+$G(BOLD),HDR=+$G(HDR)
I 'BOLD,$G(PSOIO(PSOFONT))]"" X PSOIO(PSOFONT)
I BOLD,$G(PSOIO(PSOFONT_"B"))]"" X PSOIO(PSOFONT_"B")
I HDR D
. S OPSOX=PSOX D STRT^PSOLLU1("SEC2",T,.L)
. S PSOX=4.2-L($E(PSOFONT,2,99))*300/2+OPSOX
I $G(PSOIO("ST"))]"" X PSOIO("ST")
W T,!
I HDR S PSOX=OPSOX
I $G(PSOIO("ET"))]"" X PSOIO("ET")
I BOLD,$G(PSOIO(PSOFONT))]"" X PSOIO(PSOFONT) ;TURN OFF BOLDING
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSOLLL3 2210 printed Oct 16, 2024@18:31:12 Page 2
PSOLLL3 ;BHAM/JLC - LASER LABELS ;11/20/02
+1 ;;7.0;OUTPATIENT PHARMACY;**120,161,148,200**;DEC 1997;Build 7
+2 ;
+3 SET PRCOPAY=$SELECT('$DATA(PSOCPN):0,1:1)
PF ;PATIENT FILL DOCUMENT
+1 IF $GET(PSOIO("PFI"))]""
XECUTE PSOIO("PFI")
+2 Begin DoDot:1
+3 SET OFONT=PSOFONT
SET PSOFONT=PSOHFONT
+4 IF $PIECE(RXY,"^",9)=0
SET T="NO REFILL for this prescription"
DO PRINT(T,1,1)
SET PSOY=PSOY+PSOYI
QUIT
+5 IF RXF+1=(1+$PIECE(RXY,"^",9))
SET T="NO REFILLS LEFT for this prescription"
DO PRINT(T,1,1)
SET PSOY=PSOY+PSOYI
QUIT
+6 SET T="PHONE IN OR MAIL THIS REFILL REQUEST"
DO PRINT(T,1,1)
+7 SET PSOFONT=OFONT
SET T="Follow the refill instructions provided with your prescription."
DO PRINT(T,0,1)
+8 SET PSOFONT=OFONT
SET OPSOX=PSOX
SET PSOX=PSOX+300
SET T="For Refill Call "_$PIECE(PS,"^",3)_"-"_$PIECE(PS,"^",4)
DO PRINT(T,0)
SET PSOX=OPSOX
End DoDot:1
SET PSOFONT=OFONT
+9 SET T=PNM_" "_$GET(SSNPN)
DO PRINT(T,1)
+10 SET T="Rx# "_RXN_" "
DO PRINT(T,1)
+11 DO STRT^PSOLLU1("SEC2",T,.L)
SET OPSOX=PSOX
SET PSOX=L($EXTRACT(PSOFONT,2,99))*300+PSOX
+12 SET T=DATE_" Fill "_(RXF+1)_" of "_(1+$PIECE(RXY,"^",9))
SET PSOY=PSOY-PSOYI
DO PRINT(T)
SET PSOX=OPSOX
+13 SET T=$SELECT($$STATUS^PSOBPSUT(RX,+RXF)'="":"3rd Party Rx",1:"")
DO PRINT(T,1)
+14 SET T="Qty: "_$GET(QTY)_" "_$GET(PSDU)_" Days supply: "_$GET(DAYS)
DO PRINT(T,0)
+15 SET T=DRUG
DO PRINT(T,0)
+16 SET T=$$GETNDC^PSONDCUT(RX,RXF)
DO PRINT(T,1)
+17 Begin DoDot:1
+18 SET NOR=$PIECE(RXY,"^",9)-RXF
+19 IF $PIECE(RXY,"^",9)=0
SET T="NO REFILL"
QUIT
+20 IF NOR=0
SET T="NO REFILLS LEFT"
QUIT
+21 SET T="May refill "_NOR_"X by "_EXPDT
End DoDot:1
DO PRINT(T,1)
+22 SET PS=$SELECT($DATA(^PS(59,PSOSITE,0)):^(0),1:"")
+23 DO PRINT(COPAYVAR)
+24 SET T=$PIECE(PS,"^")_"-"_$PIECE(PS,"^",6)
DO STRT^PSOLLU1("SEC2",T,.L)
+25 SET OPSOX=PSOX
SET PSOX=2340-(L($EXTRACT(PSOFONT,2,99))*300)
SET PSOY=PSOY-PSOYI
+26 DO PRINT(T)
+27 SET PSOX=OPSOX
SET PSOYI=PSOBYI
+28 IF $GET(PSOIO("SBT"))]""
XECUTE PSOIO("SBT")
+29 SET X2=PSOINST_"-"_RX
+30 WRITE X2
+31 IF $GET(PSOIO("EBT"))]""
XECUTE PSOIO("EBT")
+32 IF $GET(PSOIO(PSOFONT))]""
XECUTE PSOIO(PSOFONT)
+33 QUIT
PRINT(T,BOLD,HDR) ;
+1 SET BOLD=+$GET(BOLD)
SET HDR=+$GET(HDR)
+2 IF 'BOLD
IF $GET(PSOIO(PSOFONT))]""
XECUTE PSOIO(PSOFONT)
+3 IF BOLD
IF $GET(PSOIO(PSOFONT_"B"))]""
XECUTE PSOIO(PSOFONT_"B")
+4 IF HDR
Begin DoDot:1
+5 SET OPSOX=PSOX
DO STRT^PSOLLU1("SEC2",T,.L)
+6 SET PSOX=4.2-L($EXTRACT(PSOFONT,2,99))*300/2+OPSOX
End DoDot:1
+7 IF $GET(PSOIO("ST"))]""
XECUTE PSOIO("ST")
+8 WRITE T,!
+9 IF HDR
SET PSOX=OPSOX
+10 IF $GET(PSOIO("ET"))]""
XECUTE PSOIO("ET")
+11 ;TURN OFF BOLDING
IF BOLD
IF $GET(PSOIO(PSOFONT))]""
XECUTE PSOIO(PSOFONT)
+12 QUIT