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

BPCRXSET.m

Go to the documentation of this file.
BPCRXSET ; IHS/OIT/MJL - FILES RX FOR BPC GUI ;
 ;;1.5;BPC;;MAY 26, 2005
SETDATA(BPCARRAY,BPCDATA) ;EP CALL FROM REMOTE PROC: BPC RX FILE DATA
TEST S BPCGUI=1 K ^TMP($J)
 S XWBWRAP=1,BPCARRAY="^TMP("_$J_")"
 ;S DUZ=1
 ;S BPCDATA="1078269~25241~3010115~1~ADAM,ADAM~N~212~788~ACETAMINOPHEN 325MG UD~30~3~4~TIT PO TID~1~W~THIS IS A TEST~1~1"
 S (CRIT,DRG,LSI,DGI,DGS,SER,SERS)=""
 S PSONEW("IRXN")=$P(BPCDATA,"~",1)
 S PSONEW("RX #")=$P(BPCDATA,"~",1)
 S PSODFN=$P(BPCDATA,"~",2)
 S PSONEW("ISSUE DATE")=$P(BPCDATA,"~",3)
 S PSONEW("FILL DATE")=$P(BPCDATA,"~",3)
 S PSONEW("PROVIDER")=$P(BPCDATA,"~",4)
 S PSONEW("PROVIDER NAME")=$P(BPCDATA,"~",5)
 S PSONEW("CM")=$P(BPCDATA,"~",6)
 S PSONEW("CLINIC")=$P(BPCDATA,"~",7)
 S PSODRUG("IEN")=$P(BPCDATA,"~",8)
 S PSODRUG("NAME")=$P(BPCDATA,"~",9)
 S PSONEW("QTY")=$P(BPCDATA,"~",10)
 S PSONEW("DAYS SUPPLY")=$P(BPCDATA,"~",11)
 S PSONEW("# OF REFILLS")=$P(BPCDATA,"~",12)
 S PSONEW("SIG")=$P(BPCDATA,"~",13)
 S PSONEW("COPIES")=$P(BPCDATA,"~",14)
 S PSONEW("MAIL/WINDOW")=$P(BPCDATA,"~",15)
 S PSONEW("REMARKS")=$P(BPCDATA,"~",16)
 S PSONEW("CLERK CODE")=$P(BPCDATA,"~",17)
 S PSONEW("STATUS")=$P(BPCDATA,"~",18)
 S PSONEW("PATIENT STATUS")=+$P($G(^PS(55,PSODFN,"PS")),U,1)
 I 'PSONEW("PATIENT STATUS") D
 . S PSONEW("PATIENT STATUS")=1
 . S X=$G(^DPT(PSODFN,.1))
 . S:$L(X) PSONEW("PATIENT STATUS")=2 K X
 S DGI=$P(BPCDATA,"~",19)
 S SER=$P(BPCDATA,"~",20)
 S PSORX("VERIFY")=1
 D EN^PSON52(.PSONEW)
 I $G(DGI) D
 . K DIC,DLAYGO,DINUM
 . S $P(^PS(52.4,PSOX("IRXN"),0),U,8)=1,$P(^(0),U,9)=DGI,$P(^(0),U,10)=SER
 . K DIK,DA
 . S DIK="^PS(52.4,",DA=PSOX("IRXN")
 . D IX^DIK K DIK,DA
 ;
 K BPCRX S:$D(^PSRX("B",PSONEW("RX #"))) BPCRX=PSONEW("RX #")
 I 'BPCRX S ^TMP($J,1)=-1,^TMP($J,2)="ERROR: RX "_PSONEW("RX #")_" NOT FILED" Q
 S ^TMP($J,1)=1,^TMP($J,2)="RX "_BPCRX_" FILED"
 K BPCRX,PSONEW,PSODRUG,PSOX,PSORX,PSOEXSIG,PSODFN,BPCDATA
 Q
DDTEMP S PSONEW("RX #")=$P(BPCDATA,"~",1)
 S PSONEW("DFN")=$P(BPCDATA,"~",2)
 S PSONEW("ISSUE DATE")=$P(BPCDATA,"~",3)
 S PSODFN=$P(BPCDATA,"~",4)
 S PSONEW("PATIENT STATUS")=$P(BPCDATA,"~",5)
 S PSONEW("PROVIDER")=$P(BPCDATA,"~",6)
 S PSONEW("CM")=$P(BPCDATA,"~",7)
 S PSONEW("CLINIC")=$P(BPCDATA,"~",8)
 S PSODRUG("IEN")=$P(BPCDATA,"~",9)
 S PSODRUG("TRADE NAME")=$P(BPCDATA,"~",10)
 S PSONEW("QTY")=$P(BPCDATA,"~",11)
 S PSONEW("DAYS SUPPLY")=$P(BPCDATA,"~",12)
 S PSONEW("# OF REFILLS")=$P(BPCDATA,"~",13)
 S PSONEW("SIG")=$P(BPCDATA,"~",14)
 S PSONEW("COPIES")=$P(BPCDATA,"~",15)
 S PSONEW("MAIL/WINDOW")=$P(BPCDATA,"~",16)
 S PSONEW("REMARKS")=$P(BPCDATA,"~",17)
 S PSONEW("CLERK CODE")=$P(BPCDATA,"~",18)
 S PSODRUG("COST")=$P(BPCDATA,"~",19)
 S PSOSITE=$P(BPCDATA,"~",20)
 S PSONEW("LOGIN DATE")=$P(BPCDATA,"~",21)
 S PSONEW("FILL DATE")=$P(BPCDATA,"~",22)
 S PSONEW("PHARMACIST")=$P(BPCDATA,"~",23)
 S PSONEW("LOT #")=$P(BPCDATA,"~",24)
 S PSONEW("DISPENSED DATE")=$P(BPCDATA,"~",25)
 S PSONEW("STOP DATE")=$P(BPCDATA,"~",26)
 S PSODRUG("NDC")=$P(BPCDATA,"~",27)
 S PSONEW("NDC")=$P(BPCDATA,"~",28)
 S PSONEW("MANUFACTURER")=$P(BPCDATA,"~",29)
 S PSONEW("EXPIRATION DATE")=$P(BPCDATA,"~",30)
 S PSONEW("GENERIC PROVIDER")=$P(BPCDATA,"~",31)
 S PSONEW("RELEASED DATE/TIME")=$P(BPCDATA,"~",32)
 S PSONEW("METHOD OF PICK-UP")=$P(BPCDATA,"~",33)
 S PSONEW("STATUS")=$P(BPCDATA,"~",34)
 S PSONEW("LAST DISPENSED DATE")=$P(BPCDATA,"~",35)
 S PSONEW("NEXT POSSIBLE REFILL")=$P(BPCDATA,"~",36)
 S PSONEW("COSIGNING PROVIDER")=$P(BPCDATA,"~",37)
 S PSONEW("TYPE OF RX")=$P(BPCDATA,"~",38)
 S PSONEW("SAND")=$P(BPCDATA,"~",39)
 S PSODRUG("AWP")=$P(BPCDATA,"~",40)
 S PSONEW("AWP")=$P(BPCDATA,"~",41)
 S PSONEW("BST")=$P(BPCDATA,"~",42)
 S PSONEW("INSURER")=$P(BPCDATA,"~",43)