1 | IB20P229 ;ISP/TJH - Post-Init routine for IB*2.0*229 ;07/22/2003
|
---|
2 | ;;2.0;INTEGRATED BILLING;**229**;21-MAR-94
|
---|
3 | POST ; This routine converts BILL STATUS MESSAGEs prior to 3/24/2003
|
---|
4 | ; that have a REVIEW STATUS of 0, to a REVIEW STATUS of 2.
|
---|
5 | ; Code introduced by IB*2.0*197 on 3/24/2003 should now be doing
|
---|
6 | ; this automatically but records prior to that time were not converted
|
---|
7 | ; and have become a nuisance. Responding to NOIS FGH-0203-31133.
|
---|
8 | ;
|
---|
9 | REV ; Convert REVIEW STATUS if appropriate
|
---|
10 | I '$D(^IBM(361,"AREV",0)) D Q
|
---|
11 | . D BMES^XPDUTL("No records to convert. Processing complete.")
|
---|
12 | D BMES^XPDUTL("Conversion of ^IBM(361,""AREV"",0 started.")
|
---|
13 | K ^TMP("IB20P229",$J)
|
---|
14 | N DA,DIE,DR,IBA,IBM
|
---|
15 | S DA=0
|
---|
16 | ; loop through AREV x-ref 0 entries
|
---|
17 | F S DA=$O(^IBM(361,"AREV",0,DA)) Q:DA="" D
|
---|
18 | . D GETS^DIQ(361,DA_",",".02;.03","I","IBA","IBM")
|
---|
19 | . ; check for problems with the record
|
---|
20 | . I '$D(IBA) S ^TMP("IB20P229",$J,DA)=$G(IBM("DIERR",1,"TEXT",1)) Q
|
---|
21 | . ; select records older than 3/24/03 with a message severity of Information/Warning
|
---|
22 | . I (IBA(361,DA_",",.02,"I")<3030324)&(IBA(361,DA_",",.03,"I")="I") D
|
---|
23 | .. ; and convert those records to Review Complete, Final Review Action=F and Auto Filed=Yes
|
---|
24 | .. S DR=".09////2;.1////F;.14////1",DIE="^IBM(361," D ^DIE
|
---|
25 | . K IBA,IBM
|
---|
26 | I $D(^TMP("IB20P229",$J)) D TMMSG
|
---|
27 | K ^TMP("IB20P229",$J)
|
---|
28 | D END
|
---|
29 | Q
|
---|
30 | ;
|
---|
31 | END ; display message that pre-init has completed successfully
|
---|
32 | D BMES^XPDUTL("Conversion complete.")
|
---|
33 | Q
|
---|
34 | ;
|
---|
35 | TMMSG ; Send message reporting any database issues found by FM during conversion
|
---|
36 | N DA,IBC,IBGROUP,IBPARAM,IBTXT,XMDUZ,XMSUB,XMTEXT,XMY
|
---|
37 | S XMSUB="IB*2.0*229 ERROR REPORT"
|
---|
38 | S XMDUZ=DUZ,XMTEXT="IBTXT"
|
---|
39 | S IBPARAM("FROM")="PATCH IB*2.0*229 CONVERSION"
|
---|
40 | S IBGROUP="IB EDI SUPERVISOR"
|
---|
41 | I '$D(^XMB(3.8,"B",IBGROUP)) S IBGROUP=DUZ ; billing group not defined - send to the user
|
---|
42 | E S IBGROUP="G."_IBGROUP
|
---|
43 | S XMY(IBGROUP)="",XMY("HOLLOWAY.THOMAS_J@FORUM.VA.GOV")=""
|
---|
44 | ;
|
---|
45 | S IBC=0
|
---|
46 | S IBC=IBC+1,IBTXT(IBC)="This message has been sent by patch IB*2.0*229 at the completion of"
|
---|
47 | S IBC=IBC+1,IBTXT(IBC)="the conversion of the 'Information/Warning' records in file #361."
|
---|
48 | S IBC=IBC+1,IBTXT(IBC)="The purpose of this message is to report any errors encountered during"
|
---|
49 | S IBC=IBC+1,IBTXT(IBC)="the conversion."
|
---|
50 | S IBC=IBC+1,IBTXT(IBC)=" "
|
---|
51 | S IBC=IBC+1,IBTXT(IBC)="The following IENs in the AREV cross reference were not found in the main file."
|
---|
52 | S DA=0
|
---|
53 | F S DA=$O(^TMP("IB20P229",$J,DA)) Q:DA="" D Q:IBC>110
|
---|
54 | . S IBC=IBC+1
|
---|
55 | . I IBC>110 S IBTXT(IBC)="Additional errors exist. Your system manager should be consulted." Q
|
---|
56 | . S IBTXT(IBC)=DA_": "_^TMP("IB20P229",$J,DA)
|
---|
57 | D SENDMSG^XMXAPI(XMDUZ,XMSUB,XMTEXT,.XMY,.IBPARAM,"","")
|
---|
58 | 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.")
|
---|
59 | D BMES^XPDUTL(IBTXT)
|
---|
60 | Q
|
---|