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

IB20P229.m

Go to the documentation of this file.
  1. IB20P229 ;ISP/TJH - Post-Init routine for IB*2.0*229 ;07/22/2003
  1. ;;2.0;INTEGRATED BILLING;**229**;21-MAR-94
  1. POST ; This routine converts BILL STATUS MESSAGEs prior to 3/24/2003
  1. ; that have a REVIEW STATUS of 0, to a REVIEW STATUS of 2.
  1. ; Code introduced by IB*2.0*197 on 3/24/2003 should now be doing
  1. ; this automatically but records prior to that time were not converted
  1. ; and have become a nuisance. Responding to NOIS FGH-0203-31133.
  1. ;
  1. REV ; Convert REVIEW STATUS if appropriate
  1. I '$D(^IBM(361,"AREV",0)) D Q
  1. . D BMES^XPDUTL("No records to convert. Processing complete.")
  1. D BMES^XPDUTL("Conversion of ^IBM(361,""AREV"",0 started.")
  1. K ^TMP("IB20P229",$J)
  1. N DA,DIE,DR,IBA,IBM
  1. S DA=0
  1. ; loop through AREV x-ref 0 entries
  1. F S DA=$O(^IBM(361,"AREV",0,DA)) Q:DA="" D
  1. . D GETS^DIQ(361,DA_",",".02;.03","I","IBA","IBM")
  1. . ; check for problems with the record
  1. . I '$D(IBA) S ^TMP("IB20P229",$J,DA)=$G(IBM("DIERR",1,"TEXT",1)) Q
  1. . ; select records older than 3/24/03 with a message severity of Information/Warning
  1. . I (IBA(361,DA_",",.02,"I")<3030324)&(IBA(361,DA_",",.03,"I")="I") D
  1. .. ; and convert those records to Review Complete, Final Review Action=F and Auto Filed=Yes
  1. .. S DR=".09////2;.1////F;.14////1",DIE="^IBM(361," D ^DIE
  1. . K IBA,IBM
  1. I $D(^TMP("IB20P229",$J)) D TMMSG
  1. K ^TMP("IB20P229",$J)
  1. D END
  1. Q
  1. ;
  1. END ; display message that pre-init has completed successfully
  1. D BMES^XPDUTL("Conversion complete.")
  1. Q
  1. ;
  1. TMMSG ; Send message reporting any database issues found by FM during conversion
  1. N DA,IBC,IBGROUP,IBPARAM,IBTXT,XMDUZ,XMSUB,XMTEXT,XMY
  1. S XMSUB="IB*2.0*229 ERROR REPORT"
  1. S XMDUZ=DUZ,XMTEXT="IBTXT"
  1. S IBPARAM("FROM")="PATCH IB*2.0*229 CONVERSION"
  1. S IBGROUP="IB EDI SUPERVISOR"
  1. I '$D(^XMB(3.8,"B",IBGROUP)) S IBGROUP=DUZ ; billing group not defined - send to the user
  1. E S IBGROUP="G."_IBGROUP
  1. S XMY(IBGROUP)="",XMY("HOLLOWAY.THOMAS_J@DOMAIN.EXT")=""
  1. ;
  1. S IBC=0
  1. S IBC=IBC+1,IBTXT(IBC)="This message has been sent by patch IB*2.0*229 at the completion of"
  1. S IBC=IBC+1,IBTXT(IBC)="the conversion of the 'Information/Warning' records in file #361."
  1. S IBC=IBC+1,IBTXT(IBC)="The purpose of this message is to report any errors encountered during"
  1. S IBC=IBC+1,IBTXT(IBC)="the conversion."
  1. S IBC=IBC+1,IBTXT(IBC)=" "
  1. S IBC=IBC+1,IBTXT(IBC)="The following IENs in the AREV cross reference were not found in the main file."
  1. S DA=0
  1. F S DA=$O(^TMP("IB20P229",$J,DA)) Q:DA="" D Q:IBC>110
  1. . S IBC=IBC+1
  1. . I IBC>110 S IBTXT(IBC)="Additional errors exist. Your system manager should be consulted." Q
  1. . S IBTXT(IBC)=DA_": "_^TMP("IB20P229",$J,DA)
  1. D SENDMSG^XMXAPI(XMDUZ,XMSUB,XMTEXT,.XMY,.IBPARAM,"","")
  1. S IBTXT="Conversion timing message "_$S($D(XMERR):"not sent due to error in message set up.",1:"sent to IB EDI SUPERVISOR mail group and to the patch developer.")
  1. D BMES^XPDUTL(IBTXT)
  1. Q