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

AZP3RX.m

Go to the documentation of this file.
AZP3RX ;Print RX information for private insurance [ 01/24/91  4:01 PM ]
 ;FCJ PAO 09/04/90
VAR S RX="Y" D ^AZP3UTL G:RX="" EXIT 
B ;SET PRINT VARIABLES
 S DOCNO=($E(BDOC,5,8)-1)+10000,DOCNO=$E(DOCNO,2,5),BDOC=$E(BDOC,1,4)_DOCNO
 F  S BDOC=$O(^AZPPI(1,"B",BDOC)) S BTSTDOC=$E(BDOC,1,2)_$E(BDOC,5,8) G:(BTSTDOC>ETSTDOC)!(BDOC="") EXIT S ND=0 D
 .F  S ND=$O(^AZPPI(1,"B",BDOC,ND)) Q:ND=""  S DATA=^AZPPI(1,ND,0),DATA1=^(1),DUZ(2)=$P(DATA,U,9),DFN=$P(DATA,U,2) D B1
EXIT D KLL2^AZP3UTL Q
B1 ;PATIENT DEMOGRAPHIC DATA
 Q:'$D(^AZPPI(1,ND,3))  S RXTOT1=0,TOT=0,RXTOT=0
 S DATA2=^DPT(DFN,0),NM=$P(DATA2,U,1),HRN=$P(^AUPNPAT(DFN,41,DUZ(2),0),U,2)
 S DATA2=^DPT(DFN,.11),STR=$P(DATA2,U,1),CTY=$P(DATA2,U,4),ZIP=$P(DATA2,U,6),ST=$P(DATA2,U,5),ST=$P(^DIC(5,ST,0),U)
C U IO W @IOF,!!,"Claim Number:  ",BDOC,!!,?5,"Patient's Name:  ",?30,NM,!?5,"Health Record No.:",?30,HRN,!?5,"Address:  ",?30,STR,!?30,CTY,"  ",ST,"  ",ZIP,!!
RX S RXDSP=$P(^AZPPI(0,DUZ(2),1),U,2),ND2=ND Q:'$D(^AZPPI(1,ND2,3))  W ! F L=1:1:80 W "-"
 D RX1^AZP3ENT
 S RXTOT1=$P(^AZPPI(1,ND2,1),U,9) I RXTOT1'=RXTOT S TOT=RXTOT-RXTOT1,$P(^(1),U,9)=RXTOT,$P(^(5),U)=$P(^(5),U)+TOT Q