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