BPS31PRE ;AITC/MRD - Pre-install routine for BPS*1*31 ;09/30/2021
;;1.0;E CLAIMS MGMT ENGINE;**31**;JUN 2004;Build 16
;;Per VA Directive 6402, this routine should not be modified.
;
; MCCF EDI TAS ePharmacy - BPS*1*31 patch pre-install
;
Q
;
PRE ; Entry Point for pre-install
;
D MES^XPDUTL(" Starting pre-install for BPS*1*31")
;
; Update Reject Code explanations in file #9002313.93.
;
D REJECT
;
; Update codes in BPS NCPDP BENEFIT STAGE INDICATOR file #9002313.35
;
D BSI
;
D MES^XPDUTL(" Finished pre-install of BPS*1*31")
;
Q
;
REJECT ; Update Reject Codes with new explanations.
N CNT,DA,DIE,DR,LINE,DATA,NUM,NAME,X
D MES^XPDUTL(" - Updating BPS NCPDP REJECT CODES")
S CNT=0
F LINE=1:1 S DATA=$P($T(URJCT+LINE),";;",2,99) Q:DATA="" D
. S NUM=$P(DATA,";",1)
. S NAME=$P(DATA,";",2)
. S DIE=9002313.93
. S DA=$O(^BPSF(DIE,"B",NUM,""))
. I 'DA D MES^XPDUTL(" - No IEN found for entry "_NUM) Q
. S DR=".02////^S X=NAME"
. D ^DIE
. S CNT=CNT+1
. Q
D MES^XPDUTL(" - "_CNT_" entries updated")
D MES^XPDUTL(" - Done with BPS NCPDP REJECT CODES")
D MES^XPDUTL(" ")
Q
;
BSI ; Update Benefit Stage Indicator codes.
N CNT,CODENEW,CODEOLD,DA,DATE,DIE,DR,LINE
D MES^XPDUTL(" - Updating file BPS NCPDP BENEFIT STAGE INDICATOR")
S CNT=0
F LINE=1:1 S DATA=$P($T(BSICODES+LINE),";;",2,99) Q:DATA="" D
. S CODEOLD=$P(DATA,";",1)
. S CODENEW=$P(DATA,";",2)
. S DIE=9002313.35
. S DA=$O(^BPS(DIE,"B",CODEOLD,""))
. I 'DA D MES^XPDUTL(" - No IEN found for code "_CODEOLD) Q
. S DR=".01////^S X=CODENEW"
. D ^DIE
. S CNT=CNT+1
. Q
D MES^XPDUTL(" - "_CNT_" entries updated")
D MES^XPDUTL(" - Done with file BPS NCPDP BENEFIT STAGE INDICATOR")
D MES^XPDUTL(" ")
Q
;
BSICODES ; Fields to be updated
;;1;01
;;2;02
;;3;03
;;4;04
;;
;
URJCT ; Updated reject explanation
;;500;Patient ID Count Does Not Precede Patient ID Data Fields
;;837;Facility ID Qualifier Value Not Supported
;;840;Original Manufacturer Product ID Qualifier Value Not Supported
;;881;M/I Submission Type Code Count
;;981;DOS for Remaining Fill Portion Exceeds Regulatory Time for Dispensing
;;RR;M/I Patient ID Count
;;TH;Patient ID Count Does Not Match Number Of Repetitions
;;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HBPS31PRE 2311 printed Nov 22, 2024@17:00:48 Page 2
BPS31PRE ;AITC/MRD - Pre-install routine for BPS*1*31 ;09/30/2021
+1 ;;1.0;E CLAIMS MGMT ENGINE;**31**;JUN 2004;Build 16
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; MCCF EDI TAS ePharmacy - BPS*1*31 patch pre-install
+5 ;
+6 QUIT
+7 ;
PRE ; Entry Point for pre-install
+1 ;
+2 DO MES^XPDUTL(" Starting pre-install for BPS*1*31")
+3 ;
+4 ; Update Reject Code explanations in file #9002313.93.
+5 ;
+6 DO REJECT
+7 ;
+8 ; Update codes in BPS NCPDP BENEFIT STAGE INDICATOR file #9002313.35
+9 ;
+10 DO BSI
+11 ;
+12 DO MES^XPDUTL(" Finished pre-install of BPS*1*31")
+13 ;
+14 QUIT
+15 ;
REJECT ; Update Reject Codes with new explanations.
+1 NEW CNT,DA,DIE,DR,LINE,DATA,NUM,NAME,X
+2 DO MES^XPDUTL(" - Updating BPS NCPDP REJECT CODES")
+3 SET CNT=0
+4 FOR LINE=1:1
SET DATA=$PIECE($TEXT(URJCT+LINE),";;",2,99)
if DATA=""
QUIT
Begin DoDot:1
+5 SET NUM=$PIECE(DATA,";",1)
+6 SET NAME=$PIECE(DATA,";",2)
+7 SET DIE=9002313.93
+8 SET DA=$ORDER(^BPSF(DIE,"B",NUM,""))
+9 IF 'DA
DO MES^XPDUTL(" - No IEN found for entry "_NUM)
QUIT
+10 SET DR=".02////^S X=NAME"
+11 DO ^DIE
+12 SET CNT=CNT+1
+13 QUIT
End DoDot:1
+14 DO MES^XPDUTL(" - "_CNT_" entries updated")
+15 DO MES^XPDUTL(" - Done with BPS NCPDP REJECT CODES")
+16 DO MES^XPDUTL(" ")
+17 QUIT
+18 ;
BSI ; Update Benefit Stage Indicator codes.
+1 NEW CNT,CODENEW,CODEOLD,DA,DATE,DIE,DR,LINE
+2 DO MES^XPDUTL(" - Updating file BPS NCPDP BENEFIT STAGE INDICATOR")
+3 SET CNT=0
+4 FOR LINE=1:1
SET DATA=$PIECE($TEXT(BSICODES+LINE),";;",2,99)
if DATA=""
QUIT
Begin DoDot:1
+5 SET CODEOLD=$PIECE(DATA,";",1)
+6 SET CODENEW=$PIECE(DATA,";",2)
+7 SET DIE=9002313.35
+8 SET DA=$ORDER(^BPS(DIE,"B",CODEOLD,""))
+9 IF 'DA
DO MES^XPDUTL(" - No IEN found for code "_CODEOLD)
QUIT
+10 SET DR=".01////^S X=CODENEW"
+11 DO ^DIE
+12 SET CNT=CNT+1
+13 QUIT
End DoDot:1
+14 DO MES^XPDUTL(" - "_CNT_" entries updated")
+15 DO MES^XPDUTL(" - Done with file BPS NCPDP BENEFIT STAGE INDICATOR")
+16 DO MES^XPDUTL(" ")
+17 QUIT
+18 ;
BSICODES ; Fields to be updated
+1 ;;1;01
+2 ;;2;02
+3 ;;3;03
+4 ;;4;04
+5 ;;
+6 ;
URJCT ; Updated reject explanation
+1 ;;500;Patient ID Count Does Not Precede Patient ID Data Fields
+2 ;;837;Facility ID Qualifier Value Not Supported
+3 ;;840;Original Manufacturer Product ID Qualifier Value Not Supported
+4 ;;881;M/I Submission Type Code Count
+5 ;;981;DOS for Remaining Fill Portion Exceeds Regulatory Time for Dispensing
+6 ;;RR;M/I Patient ID Count
+7 ;;TH;Patient ID Count Does Not Match Number Of Repetitions
+8 ;;
+9 ;