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

IBCIUT4.m

Go to the documentation of this file.
  1. IBCIUT4 ;DSI/SLM - MISC UTILITIES ;29-JAN-2001
  1. ;;2.0;INTEGRATED BILLING;**161,226,348**;21-MAR-94;Build 5
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. Q
  1. COMERR ;create msg for comm error
  1. NEW L,L1,MGROUP,TEXT,IBCISMG,IBCIERR
  1. I '$D(IBCICLNP) S IBCICLNP=$P(^DGCR(399,IBIFN,0),U)
  1. S MGROUP=$P(^IBE(350.9,1,50),U,4),MGROUP=$P(^XMB(3.8,MGROUP,0),U),L1=1
  1. S IBCIERR=$$P1(PROBLEM)
  1. D SNTMSG
  1. S TEXT(L1)=" ** CLAIMSMANAGER COMMUNICATIONS ERROR **",L1=L1+1
  1. S TEXT(L1)=" ",L1=L1+1
  1. S TEXT(L1)="While attempting to send claim # "_IBCICLNP_", Error Code # "_$P(IBCIERR,U,1),L1=L1+1
  1. S TEXT(L1)="was generated.",L1=L1+1
  1. S TEXT(L1)=" ",L1=L1+1
  1. S TEXT(L1)="User attempted "_IBCISMG,L1=L1+1
  1. S TEXT(L1)=" ",L1=L1+1
  1. S TEXT(L1)="Error Description:",L1=L1+1
  1. S TEXT(L1)=" ",L1=L1+1
  1. S TEXT(L1)=$P(IBCIERR,U,2),L1=L1+1
  1. S TEXT(L1)=" ",L1=L1+1
  1. I $P(IBCIERR,U,3)'="" D
  1. . S TEXT(L1)="ClaimsManager Error Message:",L1=L1+1
  1. . S TEXT(L1)=" ",L1=L1+1
  1. . S TEXT(L1)=$P($P(IBCIERR,U,3)," - ",1),L1=L1+1
  1. . S TEXT(L1)=$P($P(IBCIERR,U,3,99)," - ",2,99),L1=L1+1
  1. . S TEXT(L1)=" ",L1=L1+1
  1. . Q
  1. ;
  1. ; esg - 10/29/01 - Direct the reader to the Clear CM Results Queue
  1. ; option if the problem does not go away.
  1. ;
  1. I PROBLEM=99 S TEXT(L1)="Please correct the problem and send again.",L1=L1+1
  1. E D
  1. . S TEXT(L1)="If this problem persists, then please try running the",L1=L1+1
  1. . S TEXT(L1)="option to clear out the ClaimsManager results queue.",L1=L1+1
  1. . S TEXT(L1)="This option name is IBCI CLEAR CLAIMSMANAGER QUEUE.",L1=L1+1
  1. . Q
  1. S TEXT(L1)=" ",L1=L1+1
  1. S TEXT(L1)="Bill Sent By: "_$P(^VA(200,DUZ,0),U)
  1. S XMSUB="ClaimsManager Communications Error sending "_IBCICLNP
  1. S XMDUZ="ClaimsManager Interface",XMTEXT="TEXT(",XMY("G."_MGROUP)=""
  1. D ^XMD
  1. K XMSUB,XMDUZ,XMTEXT,TEXT
  1. Q
  1. GENERR(IBIFN,IBCIETP) ;create msg for general error
  1. Q:IBCISNT'=2
  1. NEW L,L1,L2,L3,MGROUP,TEXT,XMTEXT,XMY,XMSUB,XMDUZ,USER,IBCISMG,IBCIE1
  1. I '$D(IBCICLNP) S IBCICLNP=$P(^DGCR(399,IBIFN,0),U)
  1. S MGROUP=$P(^IBE(350.9,1,50),U,3),MGROUP=$P(^XMB(3.8,MGROUP,0),U),L1=1
  1. D SNTMSG
  1. S TEXT(L1)="User attempted "_IBCISMG,L1=L1+1
  1. S TEXT(L1)=" ",L1=L1+1
  1. ;pull error msg from 351.9 based on mnemonic (IBCIETP) error type
  1. S IBCIE1=0 F S IBCIE1=$O(^IBA(351.9,IBIFN,1,"B",IBCIETP,IBCIE1)) Q:'IBCIE1 D
  1. .S TEXT(L1)="Line Item: "_+$P(^IBA(351.9,IBIFN,1,IBCIE1,0),U,2),L1=L1+1
  1. .S TEXT(L1)="Error Mnemonic: "_$P(^IBA(351.9,IBIFN,1,IBCIE1,0),U),L1=L1+1
  1. .S TEXT(L1)="Error Level: "_$P(^IBA(351.9,IBIFN,1,IBCIE1,0),"~",2),L1=L1+1
  1. .S TEXT(L1)=" ",L1=L1+1
  1. .S TEXT(L1)="Error Message:",L1=L1+1
  1. .S L2=0 F S L2=$O(^IBA(351.9,IBIFN,1,IBCIE1,L2)) Q:'L2 D
  1. ..S L3=0 F S L3=$O(^IBA(351.9,IBIFN,1,IBCIE1,L2,L3)) Q:'L3 D
  1. ...S TEXT(L1)=^IBA(351.9,IBIFN,1,IBCIE1,L2,L3,0),L1=L1+1
  1. .S TEXT(L1)=" ",L1=L1+1
  1. S TEXT(L1)=" ",XMTEXT="TEXT("
  1. S XMY(DUZ)="",XMY("G."_MGROUP)=""
  1. ;
  1. ; Additionally, send this MailMan message to the biller, the
  1. ; assigned to person, the person who last edited this bill, and
  1. ; the person who last sent it to ClaimsManager.
  1. ; esg - 9/5/01 & 9/27/01
  1. ;
  1. S USER=+$$BILLER^IBCIUT5(IBIFN) I USER S XMY(USER)=""
  1. S USER=+$P($G(^IBA(351.9,IBIFN,0)),U,12) I USER S XMY(USER)=""
  1. S USER=+$P($G(^IBA(351.9,IBIFN,0)),U,9) I USER S XMY(USER)=""
  1. S USER=+$P($G(^IBA(351.9,IBIFN,0)),U,5) I USER S XMY(USER)=""
  1. ;
  1. S XMSUB="ClaimsManager Claim "_IBCICLNP_" Returned with Errors"
  1. S XMDUZ="ClaimsManager Interface"
  1. D ^XMD
  1. Q
  1. SNTMSG ;determine what user was doing for message
  1. ;
  1. I IBCISNT=1 S IBCISMG="a Normal Send after Editing."
  1. I IBCISNT=2 S IBCISMG="a Normal Send from the Multiple Send Option."
  1. I IBCISNT=3 S IBCISMG="a Test Send from the Edit Screens."
  1. I IBCISNT=4 S IBCISMG="to Cancel the Claim."
  1. I IBCISNT=5 S IBCISMG="to Override the Errors."
  1. I IBCISNT=6 S IBCISMG="to Send an Authorized Claim from the Multiple Send Option."
  1. I IBCISNT=7 S IBCISMG="to delete the lines on this bill which is no longer a CMS-1500."
  1. Q
  1. ;
  1. ;TCK CALL check text for ClaimsManager delimiters and strip if found
  1. ;Input variable
  1. ; x
  1. TCK() ;check text for characters used as delimiters and strip them out
  1. Q:$G(X)="" S X=$TR(X,$C(28,29,30)_"'%")
  1. Q
  1. CCK() ;check codes for decimal points and strip them out
  1. Q:$G(X)="" S X=$TR(X,".")
  1. Q
  1. Z1AR ;converts ibciz array to ibciz1 array and import into error field
  1. Q:'$D(IBCIZ) K IBCIZ1
  1. S ERNUM=0 F S ERNUM=$O(IBCIZ("RL",ERNUM)) Q:'ERNUM D
  1. .I $P(IBCIZ("RL",ERNUM,0),U,2)="" Q
  1. .S IBCIZ1(ERNUM,0)=$P(IBCIZ("RL",ERNUM,0),U,2)_U_$P(IBCIZ("RL",ERNUM,0),U)_U_$P(IBCIZ("RL",ERNUM,0),U,3,999)
  1. .S LINE=0 F S LINE=$O(IBCIZ("RL",ERNUM,"E",LINE)) Q:'LINE D
  1. ..S IBCIZ1(ERNUM,LINE)=IBCIZ("RL",ERNUM,"E",LINE)
  1. I IBCISNT>2 G Z1Q
  1. I $P($G(^IBA(351.9,IBIFN,1,0)),U,4) D DELER
  1. S IBCIN1=0 F S IBCIN1=$O(IBCIZ1(IBCIN1)) Q:'IBCIN1 D ADDSUB1
  1. Z1Q K DIC,DIE,DA,L1,LINE,ERDT,IBCIN1,ERNUM
  1. Q
  1. PROC() ;convert procedure code
  1. Q:$G(X)="" N DA,GNODE
  1. S DA=$P(X,";"),GNODE="^"_$P(X,";",2)_DA_",0)",X=$P(@GNODE,U)
  1. Q
  1. ADDSUB1 ;create the subfile for errors and add data
  1. S DIC="^IBA(351.9,"_IBIFN_",1,",DA(1)=IBIFN,DIC(0)="LMN"
  1. S X=$P(IBCIZ1(IBCIN1,0),U) D FILE^DICN Q:Y<1 S DA=+Y
  1. S ERDT=$P(IBCIZ1(IBCIN1,0),U,2,999),ERDT=$TR(ERDT,"^","~")
  1. S DIE=DIC,DR=".02////"_ERDT D ^DIE
  1. S L1=0 F S L1=$O(IBCIZ1(IBCIN1,L1)) Q:'L1 D
  1. .S IBCIZ1(IBCIN1,L1)=$TR(IBCIZ1(IBCIN1,L1),";",",")
  1. .S DR=".03///+"_IBCIZ1(IBCIN1,L1) D ^DIE
  1. Q
  1. DELER ;delete the error information in 351.9
  1. Q:'IBIFN
  1. Q:'$P($G(^IBA(351.9,IBIFN,1,0)),U,4)
  1. S DIK="^IBA(351.9,"_IBIFN_",1,",DA(1)=IBIFN
  1. S DA=0 F S DA=$O(^IBA(351.9,IBIFN,1,DA)) Q:'DA D ^DIK
  1. K DIK,DA
  1. Q
  1. DELTI ;delete temporary information in 351.9
  1. N IBCIX4,TMPDATA,NODE
  1. S DIE="^IBA(351.9,"_IBIFN_",5,"
  1. F IBCIX4=$P($G(^IBA(351.9,IBIFN,5,0)),U,4):-1:1 S DA=IBCIX4 D
  1. .S DA(1)=IBIFN,DR=".01////@" D ^DIE
  1. K DIE,DR,DA
  1. I $D(^IBA(351.9,IBIFN,4)) D
  1. .S DIE="^IBA(351.9,",DA=IBIFN
  1. .S DR="4.01////@;4.02////@;4.03////@;4.04////@" D ^DIE
  1. K DIE,DR,DA
  1. I $D(^IBA(351.9,IBIFN,3)) D
  1. .S DIE="^IBA(351.9,",DA=IBIFN
  1. .S DR="3.01////@;3.02////@;3.03////@;3.04////@;3.05////@;3.06////@;"
  1. .S DR=DR_"3.07////@;3.08////@;3.09////@;3.1////@;3.11////@;3.12////@"
  1. .D ^DIE K DIE,DR,DA
  1. F NODE=3,4,5 S TMPDATA="^IBA(351.9,IBIFN,NODE)" K @TMPDATA
  1. Q
  1. ;
  1. DCOM(IBIFN) ;delete whatever's in the comment field in 351.9
  1. S DIE="^IBA(351.9,",DA=IBIFN,DR="2.01///@;.13///@;.14///@"
  1. D ^DIE K DIE,DA,DR
  1. Q
  1. ;
  1. P1(PROBLEM) ;comm error handling with problem variable
  1. ;Input variable
  1. ; PROBLEM
  1. ;Returns
  1. ; error code^error desc^msg returned from ClaimsManager
  1. N IBCIY,IBCICODE,IBCIDESC,IBCIMSG S IBCICODE=PROBLEM
  1. I IBCICODE=1 S IBCIDESC="TCP/IP time-out during 1st read." D
  1. .S IBCIMSG=$G(IBCIZ)_" - "_$G(IBCIZ(1,1))
  1. I IBCICODE=2 S IBCIDESC="Local Symbol Size Storage Problems during 1st read."
  1. I IBCICODE=3 S IBCIDESC="1st read was NOT a ClaimsManager ACK message." D
  1. .S IBCIMSG=$G(IBCIZ)_" - "_$G(IBCIZ(1,1))
  1. I IBCICODE=4 S IBCIDESC="TCP/IP Time-out during 2nd read." D
  1. .S IBCIMSG=$G(IBCIZ)_" - "_$G(IBCIZ(1,1))
  1. I IBCICODE=5 S IBCIDESC="Local Symbol Size Storage Problems during 2nd read."
  1. I IBCICODE=6 S IBCIDESC="2nd read was NOT a RESULTREC message type." D
  1. .S IBCIMSG=$G(IBCIZ)_" - "_$G(IBCIZ(1,1))
  1. I IBCICODE=7 S IBCIDESC="Fatal System Error",IBCIMSG=$G(IBCIZ)_" - "_$G(IBCIZ(1,1)) ; ib*226
  1. I IBCICODE=99 S IBCIDESC="Unable to Open Port." D
  1. .S IBCIMSG="Please restart the Ingenix Event Manager services."
  1. I "^1^2^3^4^5^6^7^99^"'[IBCICODE S IBCIDESC="Unknown Error Type."
  1. S IBCIY=IBCICODE_"^"_IBCIDESC_"^"_$G(IBCIMSG)
  1. Q IBCIY
  1. ;