| 1 | IBY283PO ;ALB/ESG - Post Install for IB patch 283 ;24-AUG-2004
 | 
|---|
| 2 |  ;;2.0;INTEGRATED BILLING;**283**;21-MAR-94
 | 
|---|
| 3 |  ; IA#2916 for call to CREIXN^DDMOD
 | 
|---|
| 4 |  ;
 | 
|---|
| 5 | EN ;
 | 
|---|
| 6 |  N XPDIDTOT S XPDIDTOT=4
 | 
|---|
| 7 |  D TEXT         ; new text entries in file 361.3
 | 
|---|
| 8 |  D ACSA         ; new index file for 361
 | 
|---|
| 9 |  D AUTOFILE     ; examine informational messages for auto-file
 | 
|---|
| 10 |  D PARAM        ; site parameter purge value
 | 
|---|
| 11 | EX ;
 | 
|---|
| 12 |  Q
 | 
|---|
| 13 |  ;
 | 
|---|
| 14 | TEXT ; Add new text entries in file 361.3 - IB MESSAGE SCREEN TEXT
 | 
|---|
| 15 |  NEW DATA,TXT,DO,DA,DIC,X,Y
 | 
|---|
| 16 |  D BMES^XPDUTL(" STEP 1 of 4")
 | 
|---|
| 17 |  D MES^XPDUTL("-------------")
 | 
|---|
| 18 |  D MES^XPDUTL("Adding new entries into file 361.3 ....")
 | 
|---|
| 19 |  S DATA("CLAIM RECEIVED")=""
 | 
|---|
| 20 |  S DATA("ACK/ACCEPTANCE HAS BEEN ACCEPT")=""
 | 
|---|
| 21 |  S DATA("COMPLETED: PAYMENT MADE")=""
 | 
|---|
| 22 |  S DATA("FINALIZED-PAYMENT: PAYMENT REF")=""
 | 
|---|
| 23 |  S TXT=""
 | 
|---|
| 24 |  F  S TXT=$O(DATA(TXT)) Q:TXT=""  D
 | 
|---|
| 25 |  . I $D(^IBE(361.3,"B",TXT)) Q      ; already on file
 | 
|---|
| 26 |  . S DIC="^IBE(361.3,",DIC(0)="F",X=TXT
 | 
|---|
| 27 |  . S DIC("DR")=".02////0"
 | 
|---|
| 28 |  . D FILE^DICN
 | 
|---|
| 29 |  . Q
 | 
|---|
| 30 | TX ;
 | 
|---|
| 31 |  D MES^XPDUTL(" Done.")
 | 
|---|
| 32 |  D UPDATE^XPDID(1)
 | 
|---|
| 33 |  Q
 | 
|---|
| 34 |  ;
 | 
|---|
| 35 | ACSA ; Build the new "ACSA" index for file 361
 | 
|---|
| 36 |  NEW IBMXR,IBMRES,IBMOUT
 | 
|---|
| 37 |  S IBMXR("FILE")=361
 | 
|---|
| 38 |  S IBMXR("NAME")="ACSA"
 | 
|---|
| 39 |  S IBMXR("TYPE")="R"
 | 
|---|
| 40 |  S IBMXR("USE")="S"
 | 
|---|
| 41 |  S IBMXR("EXECUTION")="R"
 | 
|---|
| 42 |  S IBMXR("ACTIVITY")="IR"
 | 
|---|
| 43 |  S IBMXR("SHORT DESCR")="Index by Message Severity and Review Status"
 | 
|---|
| 44 |  S IBMXR("DESCR",1)="This index is used in the CSA screen (Claims Status Awaiting"
 | 
|---|
| 45 |  S IBMXR("DESCR",2)="Resolution).  Most often the CSA screen is built with unreviewed"
 | 
|---|
| 46 |  S IBMXR("DESCR",3)="rejection messages.  This index file can immediately locate them."
 | 
|---|
| 47 |  S IBMXR("VAL",1)=.03
 | 
|---|
| 48 |  S IBMXR("VAL",1,"SUBSCRIPT")=1
 | 
|---|
| 49 |  S IBMXR("VAL",1,"COLLATION")="F"
 | 
|---|
| 50 |  S IBMXR("VAL",2)=.09
 | 
|---|
| 51 |  S IBMXR("VAL",2,"SUBSCRIPT")=2
 | 
|---|
| 52 |  S IBMXR("VAL",2,"COLLATION")="F"
 | 
|---|
| 53 |  ;
 | 
|---|
| 54 |  D BMES^XPDUTL(" STEP 2 of 4")
 | 
|---|
| 55 |  D MES^XPDUTL("-------------")
 | 
|---|
| 56 |  D MES^XPDUTL("A new index will now be created for file 361.")
 | 
|---|
| 57 |  D MES^XPDUTL("This may take some time depending on how many entries are in file 361.")
 | 
|---|
| 58 |  D CREIXN^DDMOD(.IBMXR,"SW",.IBMRES,"IBMOUT")
 | 
|---|
| 59 |  I +$G(IBMRES) D MES^XPDUTL("Index successfully created!") G ACSAX
 | 
|---|
| 60 |  ;
 | 
|---|
| 61 |  ; Index not created
 | 
|---|
| 62 |  D MES^XPDUTL("A PROBLEM WAS ENCOUNTERED.  INDEX FILE NOT CREATED!!!")
 | 
|---|
| 63 |  D MES^XPDUTL("SENDING MAILMAN MESSAGE...")
 | 
|---|
| 64 |  D MES^XPDUTL("PLACING THE CSA SCREEN OUT-OF-ORDER.")
 | 
|---|
| 65 |  NEW XMDUZ,XMSUBJ,XMBODY,MSG,XMTO,DA,DIE,DR
 | 
|---|
| 66 |  S XMDUZ=DUZ,XMSUBJ="IB*2*283 Error:  ACSA index not built",XMBODY="MSG"
 | 
|---|
| 67 |  S MSG(1)="The new ""ACSA"" index for file 361 was not created at"
 | 
|---|
| 68 |  S MSG(2)=" "
 | 
|---|
| 69 |  S MSG(3)="     "_$$SITE^VASITE
 | 
|---|
| 70 |  S MSG(4)=" "
 | 
|---|
| 71 |  S MSG(5)="The CSA screen has been placed out of order."
 | 
|---|
| 72 |  ;
 | 
|---|
| 73 |  ; recipients of message
 | 
|---|
| 74 |  S XMTO(DUZ)=""
 | 
|---|
| 75 |  S XMTO("eric.gustafson@daou.com")=""
 | 
|---|
| 76 |  S XMTO("G.PATCHES")=""
 | 
|---|
| 77 |  S XMTO("G.IB EDI")=""
 | 
|---|
| 78 |  S XMTO("G.IB EDI SUPERVISOR")=""
 | 
|---|
| 79 |  ;
 | 
|---|
| 80 |  D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO)
 | 
|---|
| 81 |  ;
 | 
|---|
| 82 |  ; place CSA screen out of order
 | 
|---|
| 83 |  S DA=$O(^DIC(19,"B","IBCE CLAIMS STATUS AWAITING",""))
 | 
|---|
| 84 |  I DA S DIE=19,DR="2///IB Patch 283 Installation Failure" D ^DIE
 | 
|---|
| 85 | ACSAX ;
 | 
|---|
| 86 |  D UPDATE^XPDID(2)
 | 
|---|
| 87 |  Q
 | 
|---|
| 88 |  ;
 | 
|---|
| 89 | AUTOFILE ; Loop through the informational status messages with
 | 
|---|
| 90 |  ; no Final Review Action and check to see if they qualify for
 | 
|---|
| 91 |  ; auto-file with no review.
 | 
|---|
| 92 |  ;
 | 
|---|
| 93 |  NEW IBDA,IBCNT,IB,Z,STOP,IBAUTO,TXT,NOREVU,IBREV
 | 
|---|
| 94 |  D BMES^XPDUTL(" STEP 3 of 4")
 | 
|---|
| 95 |  D MES^XPDUTL("-------------")
 | 
|---|
| 96 |  D MES^XPDUTL("Now looking at all informational status messages on file to see if any of them")
 | 
|---|
| 97 |  D MES^XPDUTL("can be auto-filed with no review needed.  Each ""."" represents 1000 messages.")
 | 
|---|
| 98 |  D MES^XPDUTL("")
 | 
|---|
| 99 |  S IBDA=0,IBCNT=0
 | 
|---|
| 100 |  F  S IBDA=$O(^IBM(361,"ASV","I",IBDA)) Q:'IBDA  D
 | 
|---|
| 101 |  . S IBCNT=IBCNT+1 W:(IBCNT#1000=0)&'$D(ZTQUEUED) "."
 | 
|---|
| 102 |  . S IB=$G(^IBM(361,IBDA,0))
 | 
|---|
| 103 |  . ;
 | 
|---|
| 104 |  . I $P(IB,U,10)'="" Q     ; final review action exists so quit out
 | 
|---|
| 105 |  . ;
 | 
|---|
| 106 |  . ; if this message was previously auto-filed with no review, then
 | 
|---|
| 107 |  . ; update the final review information and quit out
 | 
|---|
| 108 |  . I $P(IB,U,9)=2,$P(IB,U,14)=1 D  Q
 | 
|---|
| 109 |  .. N DIE,DR,DA
 | 
|---|
| 110 |  .. S DIE=361,DR=".1////F",DA=IBDA D ^DIE
 | 
|---|
| 111 |  .. Q
 | 
|---|
| 112 |  . ;
 | 
|---|
| 113 |  . ; IBAUTO - flag indicating that the whole message can be auto-filed
 | 
|---|
| 114 |  . ;          with no review needed
 | 
|---|
| 115 |  . ; NOREVU - flag indicating that one of the message lines had 'No
 | 
|---|
| 116 |  . ;          Review Needed' text
 | 
|---|
| 117 |  . ; IBREV  - flag indicating that one of the message lines had 'Review
 | 
|---|
| 118 |  . ;          Always Needed' text (so the whole message needs review)
 | 
|---|
| 119 |  . ;
 | 
|---|
| 120 |  . S Z=0,STOP=0,IBAUTO=0
 | 
|---|
| 121 |  . F  S Z=$O(^IBM(361,IBDA,1,Z)) Q:'Z  D  Q:STOP
 | 
|---|
| 122 |  .. S TXT=$G(^IBM(361,IBDA,1,Z,0)) Q:TXT=""   ; text line Z
 | 
|---|
| 123 |  .. S NOREVU=$$CKREVU^IBCEM4(TXT,,,.IBREV)    ; call function
 | 
|---|
| 124 |  .. I IBREV S STOP=1,IBAUTO=0 Q       ; 'review always needed' text found
 | 
|---|
| 125 |  .. I NOREVU S IBAUTO=1    ; 'no review needed' text found
 | 
|---|
| 126 |  .. Q
 | 
|---|
| 127 |  . ;
 | 
|---|
| 128 |  . I IBAUTO D
 | 
|---|
| 129 |  .. N DIE,DR,DA
 | 
|---|
| 130 |  .. S DIE=361,DR=".09////2;.14////1;.1////F",DA=IBDA D ^DIE
 | 
|---|
| 131 |  .. Q
 | 
|---|
| 132 |  . Q
 | 
|---|
| 133 |  ;
 | 
|---|
| 134 |  D MES^XPDUTL(" Done.")
 | 
|---|
| 135 |  D UPDATE^XPDID(3)
 | 
|---|
| 136 |  Q
 | 
|---|
| 137 |  ;
 | 
|---|
| 138 | PARAM ; Ensure there is a value in IB site parameter field 350.9,8.02
 | 
|---|
| 139 |  ; "Days to wait to purge messages"
 | 
|---|
| 140 |  ; If not defined, set it to be 90 days.
 | 
|---|
| 141 |  ;
 | 
|---|
| 142 |  N A
 | 
|---|
| 143 |  S A=$G(^IBE(350.9,1,8))
 | 
|---|
| 144 |  D BMES^XPDUTL(" STEP 4 of 4")
 | 
|---|
| 145 |  D MES^XPDUTL("-------------")
 | 
|---|
| 146 |  ;
 | 
|---|
| 147 |  I $P(A,U,2) D  G PARAMX      ; quit out if field is defined
 | 
|---|
| 148 |  . D MES^XPDUTL("IB site parameter value ""Days to wait to purge status messages"" is set to "_$P(A,U,2)_".")
 | 
|---|
| 149 |  . D MES^XPDUTL(" No changes made.")
 | 
|---|
| 150 |  . Q
 | 
|---|
| 151 |  ;
 | 
|---|
| 152 |  D MES^XPDUTL("IB site parameter value ""Days to wait to purge status messages"" is not defined.")
 | 
|---|
| 153 |  D MES^XPDUTL("Setting this parameter value to 90 ....")
 | 
|---|
| 154 |  S $P(^IBE(350.9,1,8),U,2)=90    ; set to 90 days if undefined
 | 
|---|
| 155 |  D MES^XPDUTL(" Done.")
 | 
|---|
| 156 | PARAMX ;
 | 
|---|
| 157 |  D UPDATE^XPDID(4)
 | 
|---|
| 158 |  Q
 | 
|---|
| 159 |  ;
 | 
|---|