IBY665PO ;EDE/JWS - POST-INSTALL FOR IB*2.0*665 ;01-APR-2021
 ;;2.0;INTEGRATED BILLING;**665**;21-MAR-94;Build 28
 ;;Per VA Directive 6402, this routine should not be modified.
 ;
 ; IA# 10141 - MES^XPDUTL
 ;
EN ;Entry Point
 N IBA
 S IBA(2)="IB*2*665 Post-Install...",(IBA(1),IBA(3))=" " D MES^XPDUTL(.IBA) K IBA
 D UPDERR
 S IBA(2)="IB*2*665 Post-Install Complete.",(IBA(1),IBA(3))=" " D MES^XPDUTL(.IBA) K IBA
 Q
 ;
UPDERR ; Update existing error code message for 350.8
 N IBCODE,IBMESN,IBIEN,DIE,DIC,DA,DR,X,Y
 S IBCODE="IB383",IBMESN="Claim cannot contain more than 24 Occurrence Codes for EDI submission."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB384",IBMESN="If claim needs more than 24 Occurrence Codes, then select 'Force to Print'."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB385",IBMESN="Claim cannot contain more than 24 Occurrence Span Codes for EDI submission."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB386",IBMESN="If claim needs more than 24 Occurrence Span Codes, select 'Force to Print'."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB387",IBMESN="Inpt. Inst. claim cannot exceed 25 Procedure Codes for EDI submission."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB388",IBMESN="If claim needs more than 25 Procedure Codes, then select 'Force to Print'."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB389",IBMESN="Cannot enter more than 23 Value Codes for EDI Submission."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB390",IBMESN="If more than 23 Value Codes need to be entered, select 'Force to Print'."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB391",IBMESN="Claim cannot contain more than 24 Condition Codes for EDI Submission."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB392",IBMESN="If more than 24 Condition Codes are needed, select 'Force to Print'."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB393",IBMESN="17 other diagnosis codes are allowed on a printed UB04."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB394",IBMESN="24 other diagnosis codes are allowed on an electronic institutional claim."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB395",IBMESN="3 e-diagnosis codes are allowed on a printed UB04."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB396",IBMESN="12 e-diagnosis codes are allowed on an electronic institutional claim."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB397",IBMESN="12 diagnosis codes are allowed on a professional claim."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB398",IBMESN="4 diagnosis codes are allowed on a dental claim."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 S IBCODE="IB399",IBMESN="Institutional claim cannot contain more than 999 Revenue Codes."
 S IBIEN=$O(^IBE(350.8,"C",IBCODE,0)) I 'IBIEN D CREATE
 Q
 ;
CREATE ;Create entry for IB error file in D350.8 if not there
 S DIC="^IBE(350.8,",DIC(0)="",X=IBCODE D FILE^DICN K DIC,X
 I Y=-1 D MES^XPDUTL(">> IB ERROR - Entry '"_IBCODE_"' was unable to be created <<") Q
 S IBIEN=+Y
 S DIE="^IBE(350.8,",DA=IBIEN,DR=".02////"_IBMESN_";.03////"_IBCODE_";.04////1;.05////1" D ^DIE K DIE,DIC,DA,DR
 Q
 ;
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBY665PO   3465     printed  Sep 23, 2025@20:11:23                                                                                                                                                                                                    Page 2
IBY665PO  ;EDE/JWS - POST-INSTALL FOR IB*2.0*665 ;01-APR-2021
 +1       ;;2.0;INTEGRATED BILLING;**665**;21-MAR-94;Build 28
 +2       ;;Per VA Directive 6402, this routine should not be modified.
 +3       ;
 +4       ; IA# 10141 - MES^XPDUTL
 +5       ;
EN        ;Entry Point
 +1        NEW IBA
 +2        SET IBA(2)="IB*2*665 Post-Install..."
           SET (IBA(1),IBA(3))=" "
           DO MES^XPDUTL(.IBA)
           KILL IBA
 +3        DO UPDERR
 +4        SET IBA(2)="IB*2*665 Post-Install Complete."
           SET (IBA(1),IBA(3))=" "
           DO MES^XPDUTL(.IBA)
           KILL IBA
 +5        QUIT 
 +6       ;
UPDERR    ; Update existing error code message for 350.8
 +1        NEW IBCODE,IBMESN,IBIEN,DIE,DIC,DA,DR,X,Y
 +2        SET IBCODE="IB383"
           SET IBMESN="Claim cannot contain more than 24 Occurrence Codes for EDI submission."
 +3        SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +4        SET IBCODE="IB384"
           SET IBMESN="If claim needs more than 24 Occurrence Codes, then select 'Force to Print'."
 +5        SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +6        SET IBCODE="IB385"
           SET IBMESN="Claim cannot contain more than 24 Occurrence Span Codes for EDI submission."
 +7        SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +8        SET IBCODE="IB386"
           SET IBMESN="If claim needs more than 24 Occurrence Span Codes, select 'Force to Print'."
 +9        SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +10       SET IBCODE="IB387"
           SET IBMESN="Inpt. Inst. claim cannot exceed 25 Procedure Codes for EDI submission."
 +11       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +12       SET IBCODE="IB388"
           SET IBMESN="If claim needs more than 25 Procedure Codes, then select 'Force to Print'."
 +13       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +14       SET IBCODE="IB389"
           SET IBMESN="Cannot enter more than 23 Value Codes for EDI Submission."
 +15       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +16       SET IBCODE="IB390"
           SET IBMESN="If more than 23 Value Codes need to be entered, select 'Force to Print'."
 +17       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +18       SET IBCODE="IB391"
           SET IBMESN="Claim cannot contain more than 24 Condition Codes for EDI Submission."
 +19       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +20       SET IBCODE="IB392"
           SET IBMESN="If more than 24 Condition Codes are needed, select 'Force to Print'."
 +21       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +22       SET IBCODE="IB393"
           SET IBMESN="17 other diagnosis codes are allowed on a printed UB04."
 +23       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +24       SET IBCODE="IB394"
           SET IBMESN="24 other diagnosis codes are allowed on an electronic institutional claim."
 +25       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +26       SET IBCODE="IB395"
           SET IBMESN="3 e-diagnosis codes are allowed on a printed UB04."
 +27       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +28       SET IBCODE="IB396"
           SET IBMESN="12 e-diagnosis codes are allowed on an electronic institutional claim."
 +29       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +30       SET IBCODE="IB397"
           SET IBMESN="12 diagnosis codes are allowed on a professional claim."
 +31       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +32       SET IBCODE="IB398"
           SET IBMESN="4 diagnosis codes are allowed on a dental claim."
 +33       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +34       SET IBCODE="IB399"
           SET IBMESN="Institutional claim cannot contain more than 999 Revenue Codes."
 +35       SET IBIEN=$ORDER(^IBE(350.8,"C",IBCODE,0))
           IF 'IBIEN
               DO CREATE
 +36       QUIT 
 +37      ;
CREATE    ;Create entry for IB error file in D350.8 if not there
 +1        SET DIC="^IBE(350.8,"
           SET DIC(0)=""
           SET X=IBCODE
           DO FILE^DICN
           KILL DIC,X
 +2        IF Y=-1
               DO MES^XPDUTL(">> IB ERROR - Entry '"_IBCODE_"' was unable to be created <<")
               QUIT 
 +3        SET IBIEN=+Y
 +4        SET DIE="^IBE(350.8,"
           SET DA=IBIEN
           SET DR=".02////"_IBMESN_";.03////"_IBCODE_";.04////1;.05////1"
           DO ^DIE
           KILL DIE,DIC,DA,DR
 +5        QUIT 
 +6       ;