Produced by Araxis Merge on 10/23/2018 6:40:32 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | docs | TAS ePay US766 SDD - Copy.doc | Mon Oct 22 16:27:48 2018 UTC |
| 2 | docs | TAS ePay US766 SDD - Copy.doc | Mon Oct 22 16:32:30 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 1 | 692 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | MCCF EDI T AS US766 | |
| 2 | System Des ign Docume nt | |
| 3 | PRCA*4.5*x xx | |
| 4 | ||
| 5 | Department of Vetera ns Affairs | |
| 6 | September 2017 | |
| 7 | Version 1 | |
| 8 | User Story Number: U S766 | |
| 9 | Epic Taxon omyComplia nce Por t Update Increase No TouchS tory | |
| 10 | Rewrite Au to-posting logic to determine if the ERA is actual ly matched to an EFT | |
| 11 | As an ePay ments user , I need t o rewrite Auto-posti ng logic t o determin e if the E RA is actu ally match ed to an E FT, instea d of looki ng at the ERA for AC H. Scenari o: When an ERA comes in and th e Payer sa ys they wi ll send a check, but then Paye r sends an EFT ---- the curren t auto pos ting does not look t o see if t he payer a ctually se nt a check or an EFT . Auto-pos ting shoul d see what the ERA i s matched to not wha t the Paye r says the y are send ing (via t he ERA). A s a Clerk, I want to verify th e ERA EFT auto-posts payment t ype codes: ACH, CHK, NON and B OP, so tha t I can en sure accou nts are co rrect. Au to-post sh ould match on Trace number, do llar amoun t, payer I D. | |
| 12 | Conversati on: | |
| 13 | Summary: | |
| 14 | Modify $$S CRPAD^RCDP EAP to all ow ACH, CH K, NON and BOP type ERA if mat ched to an EFT. | |
| 15 | Modify $$A UTOCHK^RCD PEAP1 to a llow ACH, CHK, NON a nd BOP typ e ERA if m atched to an EFT. | |
| 16 | Modify $$A UTOCHK2^RC DPEAP1 to allow ACH, CHK, NON and BOP ty pe ERA if matched to an EFT. | |
| 17 | Resolution – Added C hanged Obj ects | |
| 18 | RoutinesAc tivitiesRo utine Name RCDPEAPEnh ancement C ategory Ne w Modify D elete No C hangeRTMRe lated Opti onsPRCA NI GHTLY PROC ESSRelated RoutinesR outines “C alled By”R outines “C alled” R CDPEAA2 | |
| 19 | RCDPEAP1 | |
| 20 | RCDPEM0 | |
| 21 | RCDPEM2 | |
| 22 | RCDPEWL7 | |
| 23 | RCDPEWL8 | |
| 24 | RCDPEX32$$ LOCKDEP^RC DPDPLU | |
| 25 | $$UNBAL^RC DPEAP1 | |
| 26 | ERADET^RCD PEAP1 | |
| 27 | VALID^RCDP EAP1 | |
| 28 | RCPTDET^RC DPEM $$BLDRCPT^ RCDPEMA | |
| 29 | RCPTDET^RC DPEMA | |
| 30 | $$ADDREC^R CDPEWL | |
| 31 | ADDLINES^R CDPEWLA | |
| 32 | $$LOCKREC^ RCDPRPLU | |
| 33 | PROCESS^RC DPURE1 | |
| 34 | $$BLDRCPT^ RCDPUREC | |
| 35 | $$FMSSTAT^ RCDPUREC | |
| 36 | $$PENDPAY^ RCDPURET C urrent Log ic ; | |
| 37 | SCRPAD(RCE RA) ;Build Scratchpa d entry in #344.49 f or the ERA | |
| 38 | N RC0,RC5 ,RCSCR,RCD AT,X | |
| 39 | S RC0=$G( ^RCY(344.4 ,RCERA,0)) ,RC5=$G(^R CY(344.4,R CERA,5)) | |
| 40 | ;Ignore i s this ERA already h as a recei pt | |
| 41 | I +$P(RC0 ,U,8) Q 0 | |
| 42 | ;Ignore i f this is zero ERA | |
| 43 | I +$P(RC0 ,U,5)=0 Q 0 | |
| 44 | ;Ignore i f this is not an ERA for an EF T | |
| 45 | I "^ACH^" '[(U_$P(RC 0,U,15)_U) Q 0 | |
| 46 | ; Scratch pad alread y exists | |
| 47 | S RCSCR=+ $O(^RCY(34 4.49,"B",R CERA,0)) I RCSCR G S CRPADX | |
| 48 | ;Create n ew Scratch pad | |
| 49 | S RCSCR=+ $$ADDREC^R CDPEWL(RCE RA,.RCDAT) I 'RCSCR Q 0 | |
| 50 | ;Add all the ERA li nes to the Scratchpa d entry | |
| 51 | D ADDLINE S^RCDPEWLA (RCSCR) | |
| 52 | SCRPADX ;R eturn Scra tchpad IEN | |
| 53 | Q RCSCRMo dified Log ic (Change s are in b old) ; | |
| 54 | SCRPAD(RCE RA) ;Build Scratchpa d entry in #344.49 f or the ERA | |
| 55 | ; | |
| 56 | ; Input – RCERA – I EN for #34 4.4 | |
| 57 | ; | |
| 58 | ; Output – RCSCR = Scratchpad IEN (Succ ess) or 0 (Fail) | |
| 59 | ; | |
| 60 | N RC0,RC5 ,RCSCR,RCD AT,X | |
| 61 | S RC0=$G( ^RCY(344.4 ,RCERA,0)) ,RC5=$G(^R CY(344.4,R CERA,5)) | |
| 62 | ;Ignore i s this ERA already h as a recei pt | |
| 63 | I +$P(RC0 ,U,8) Q 0 | |
| 64 | ;Ignore i f this is zero ERA | |
| 65 | I +$P(RC0 ,U,5)=0 Q 0 | |
| 66 | ;Ignore i f this is not a vali d auto-pos t ERA type | |
| 67 | I "^ACH^C HK^NON^BOP ^"'[(U_$P( RC0,U,15)_ U) Q 0 | |
| 68 | ; ERA mu st be matc hed to an EFT to be eligible f or mark fo r autopost | |
| 69 | I ‘$O(^RC Y(344.31," AERA",RCER A,"")) Q 0 | |
| 70 | ; Scratch pad alread y exists | |
| 71 | S RCSCR=+ $O(^RCY(34 4.49,"B",R CERA,0)) I RCSCR G S CRPADX | |
| 72 | ;Create n ew Scratch pad | |
| 73 | S RCSCR=+ $$ADDREC^R CDPEWL(RCE RA,.RCDAT) I 'RCSCR Q 0 | |
| 74 | ;Add all the ERA li nes to the Scratchpa d entry | |
| 75 | D ADDLINE S^RCDPEWLA (RCSCR) | |
| 76 | SCRPADX ;R eturn Scra tchpad IEN | |
| 77 | Q RCSCRRo utinesActi vitiesRout ine NameRC DPEAP1Enha ncement Ca tegory New Modify De lete No Ch angeRTMRel ated Optio nsPRCA NIG HTLY PROCE SSRelated RoutinesRo utines “Ca lled By”Ro utines “Ca lled” RC DPEAD | |
| 78 | RCDPEAP | |
| 79 | RCDPEAPP | |
| 80 | RCDPEM0 | |
| 81 | RCDPEM2 | |
| 82 | RCDPEWL7 | |
| 83 | RCDPEWL8 | |
| 84 | RCDPEX32$$ CHECKPAY^R CDPEAP | |
| 85 | $$SCRPAD^R CDPEAP | |
| 86 | CLEAR^RCDP EAP C urrent Log icRCDPEAP1 ;ALB/KML - AUTO POS T MATCHING EFT ERA P AIR - CONT . ;Jun 06, 2014@19:1 1:19 | |
| 87 | ;;4.5;Acc ounts Rece ivable;**2 98,304,318 ,321**;Mar 20, 1995; Build 104 | |
| 88 | ;Per VA D irective 6 402, this routine sh ould not b e modified . | |
| 89 | ;Read ^IB M(361.1) v ia Private IA 4051 | |
| 90 | ; | |
| 91 | ;-------- ---------- ---------- --- | |
| 92 | ;RCDPEM0 and RCDPEA P SUBROUTI NES | |
| 93 | ;-------- ---------- ---------- --- | |
| 94 | AUTOCHK(RC ERA) ;Veri fy if ERA can be aut o-posted - PRE-CHECK USED IN R CDPEM0 | |
| 95 | ; Many ch ecks done by this ar e also don e AUTOCHK2 below so if these a re changed , may also need to b e changed | |
| 96 | N NOTOK,R CDSUB,RCD0 ,RCSCR | |
| 97 | K ^TMP($J ,"RCDPEWLA ") | |
| 98 | ;Check fo r exceptio ns | |
| 99 | S RCDSUB= 0,NOTOK=0 | |
| 100 | F S RCDS UB=$O(^RCY (344.4,RCE RA,1,RCDSU B)) Q:'RCD SUB D Q: NOTOK | |
| 101 | . ;Except ion exists if INVALI D BILL NUM BER field is populat ed in #344 .41 | |
| 102 | . S RCD0= $G(^RCY(34 4.4,RCERA, 1,RCDSUB,0 )) S:($P(R CD0,U,5)]" ") NOTOK=1 | |
| 103 | ;Cannot a uto-post i f exceptio ns exist | |
| 104 | Q:NOTOK 0 | |
| 105 | ; Ignore ERA if ERA level Adj ustments e xist | |
| 106 | I $O(^RCY (344.4,RCE RA,2,0)) Q 0 | |
| 107 | ; Ignore non-ACH ty pe ERA to prevent CH K type ERA from auto matically auto-posti ng in nigh tly job - PRCA*4.5*3 21 | |
| 108 | I $$GET1^ DIQ(344.4, RCERA_",", .15)'="ACH " Q 0 | |
| 109 | ;Create s cratchpad | |
| 110 | S RCSCR=$ $SCRPAD^RC DPEAP(RCER A) Q:'RCSC R 0 | |
| 111 | ;Ignore E RA if clai m level ad justments without pa yment exis t | |
| 112 | ;This wil l only get set if th e scratchp ad is crea ted, not i f it alrea dy exists. Looking a t the code , it | |
| 113 | ;will mai nly set if there are ERA level adjustmen ts and may get set f or unbalan ced pairs, which is found | |
| 114 | ;by the Z EROBAL fun ction. So, I think t his does n ot have a real purpo se but was not 100% sure. | |
| 115 | I $D(^TMP ($J,"RCDPE WLA","ERA LEVEL ADJU STMENT EXI STS")) D C LEAR^RCDPE AP(RCSCR) Q 0 | |
| 116 | ; ERA nee ds to drop to standa rd worklis t if adjus tment betw een matchi ng | |
| 117 | ;positive /negative does not c reate a ze ro balance | |
| 118 | I '$$ZERO BAL(RCSCR) D CLEAR^R CDPEAP(RCS CR) Q 0 | |
| 119 | ;Clear sc ratchpad | |
| 120 | D CLEAR^R CDPEAP(RCS CR) | |
| 121 | ;This is valid auto -post - re turn to MA TCH^RCPDEM 0 | |
| 122 | Q 1 | |
| 123 | AUTOCHK2(R CERA,RCTYP ) ; | |
| 124 | ;Check if this entr y is an au to-post ca ndidate | |
| 125 | ;This has the same/ similar ch ecks as MA TCH^RCDPEM 0 and AUTO CHK above. If those procedures are | |
| 126 | ; changed , this may need to u pdated as well. | |
| 127 | ; | |
| 128 | ;Input | |
| 129 | ; RCERA: IEN from E lectronic Remittance Advice fi le (#344.4 ) | |
| 130 | ; RCTYP: Call type 0 = Workli st/Mark fo r autopost 1 = Manua l match ; PRCA*4.5*3 21 | |
| 131 | ; | |
| 132 | ;Output | |
| 133 | ; 1: Auto -Post cand idate | |
| 134 | ; 0^Reaso n: Not a a uto-post c andidate a nd reason | |
| 135 | ; | |
| 136 | ; Validat e Paramete r | |
| 137 | I '$G(RCE RA) Q "0^I nvalid Par ameter" | |
| 138 | I $G(RCTY P)=”” Q "0 ^Invalid P arameter" | |
| 139 | I (RCTYP> 1)!(RCTYP< 0) Q "0^In valid Para meter" | |
| 140 | ; | |
| 141 | N STATUS, RC0,RCERAT YP,RCXCLDE ,RCDSUB,NO TOK,RCCREA TE,RCSCR | |
| 142 | K ^TMP($J ,"RCDPEWLA ") | |
| 143 | ; | |
| 144 | ; Check i f record e xists | |
| 145 | I '$D(^RC Y(344.4,RC ERA,0)) Q "0^Invalid ERA recor d" | |
| 146 | ; | |
| 147 | ; Check c urrent sta tus | |
| 148 | S STATUS= $$GET1^DIQ (344.4,RCE RA_",",4.0 2,"I") | |
| 149 | I STATUS= 0 Q "0^Alr eady marke d for Auto -Posting" | |
| 150 | I STATUS= 1 Q "0^Alr eady parti ally Auto- Posted" | |
| 151 | I STATUS= 2 Q "0^Alr eady compl etely Auto -Posted" | |
| 152 | ; | |
| 153 | ; Check f or matchin g | |
| 154 | I '$$GET1 ^DIQ(344.4 ,RCERA_"," ,.09,"I") Q "0^ERA n ot matched " | |
| 155 | ; | |
| 156 | ; Check f or zero va lue ERA | |
| 157 | S RC0=$G( ^RCY(344.4 ,RCERA,0)) | |
| 158 | I +$P(RC0 ,U,5)=0 Q "0^Zero va lue ERA" | |
| 159 | ; | |
| 160 | ; Determi ne if ERA should be excluded u sing the s ite parame ters | |
| 161 | S RCERATY P=$$PHARM( RCERA) | |
| 162 | ; | |
| 163 | ; Check i f medical claim and auto-posti ng is turn ed off | |
| 164 | I 'RCERAT YP,'$P($G( ^RCY(344.6 1,1,0)),U, 2) Q "0^Me dical auto -posting o ff" | |
| 165 | ; | |
| 166 | ; Check i f pharmacy claim and auto-post ing is tur ned off | |
| 167 | I RCERATY P,'$P($G(^ RCY(344.61 ,1,1)),U,1 ) Q "0^Pha rmacy auto -posting o ff" | |
| 168 | ; | |
| 169 | ; Check i f ERA paye r is exclu ded from a utopost | |
| 170 | S RCXCLDE =0 | |
| 171 | S:'RCERAT YP RCXCLDE =$$EXCLUDE (RCERA) | |
| 172 | S:RCERATY P RCXCLDE= $$EXCLDRX( RCERA) | |
| 173 | I RCXCLDE Q "0^"_$S (RCERATYP: "Pharmacy" ,1:"Medica l")_" paye r excluded " | |
| 174 | ; | |
| 175 | ; Check f or invalid bill numb er excepti on | |
| 176 | S RCDSUB= 0,NOTOK=0 | |
| 177 | F S RCDS UB=$O(^RCY (344.4,RCE RA,1,RCDSU B)) Q:'RCD SUB D Q: NOTOK | |
| 178 | . S RCD0= $G(^RCY(34 4.4,RCERA, 1,RCDSUB,0 )) | |
| 179 | . I $P(RC D0,U,5)]"" S NOTOK=1 | |
| 180 | I NOTOK Q "0^Invali d Bill Num ber Except ion(s)" | |
| 181 | ; | |
| 182 | ; Check f or ERA lev el Adjustm ents | |
| 183 | I $O(^RCY (344.4,RCE RA,2,0)) Q "0^ERA le vel Adjust ment(s)" | |
| 184 | ; | |
| 185 | ; Check i f receipt already cr eated | |
| 186 | I +$P(RC0 ,U,8) Q "0 ^ERA has a receipt" | |
| 187 | ; | |
| 188 | ; Check p ayment typ e of ERA - now also includes C HK type fr om manual match | |
| 189 | I "^ACH^C HK^"'[(U_$ P(RC0,U,15 )_U) Q "0^ Payment Ty pe is not ACH or CHK " ; PRCA*4 .5*321 | |
| 190 | ; | |
| 191 | ; ACH and CHK type ERA must b e matched to an EFT to be elig ible for m ark for au topost | |
| 192 | I $P(RC0, U,15)="CHK ",'$O(^RCY (344.31,"A ERA",RCERA ,"")) Q "0 ^ERA is no t matched to an EFT" ; PRCA*4. 5*321 | |
| 193 | ; | |
| 194 | ; | |
| 195 | ; Create scratchpad if needed | |
| 196 | S RCCREAT E=0 | |
| 197 | S RCSCR=+ $O(^RCY(34 4.49,"B",R CERA,0)) | |
| 198 | I 'RCSCR S RCSCR=$$ SCRPAD^RCD PEAP(RCERA ) S RCCREA TE=1 | |
| 199 | I 'RCSCR Q "0^Unabl e to creat e scratchp ad" | |
| 200 | ; | |
| 201 | ; Check i f claim le vel adjust ments with out paymen t exist | |
| 202 | ; Note th at PRCA*29 8 sets thi s temp glo bal only i f the scra tchpad is created by the call above ($$S CRPAD^RCDP EAP). If t he | |
| 203 | ; scratch pad alread y exists, the TMP gl obal will never get set. Looki ng at the code, it w ill mainly set if th ere | |
| 204 | ; are ERA level adj ustments a nd may get set for u nbalanced pairs, whi ch is foun d by the Z EROBAL fun ction. So, I think | |
| 205 | ; this do es not hav e a real p urpose but was not 1 00% sure a nd wanted to mimic w hat AUTOCH K does. | |
| 206 | I $D(^TMP ($J,"RCDPE WLA","ERA LEVEL ADJU STMENT EXI STS")) D:R CCREATE CL EAR^RCDPEA P(RCSCR) Q "0^Claim Level Adju stments w/ o payment" | |
| 207 | ; | |
| 208 | ; Check i f adjustme nt between matching positive/n egative do es not cre ate a zero balance | |
| 209 | I '$$ZERO BAL(RCSCR) D:RCCREAT E CLEAR^RC DPEAP(RCSC R) Q "0^+/ - pairs do not balan ce" | |
| 210 | ; | |
| 211 | ; Clear s cratchpad if it was created by this func tion | |
| 212 | D:RCCREAT E CLEAR^RC DPEAP(RCSC R) | |
| 213 | ; | |
| 214 | ;If we go t this far , this is an autopos t candidat e so quit with 1 | |
| 215 | Q 1Modifi ed Logic ( Changes ar e in bold) RCDPEAP1 ; ALB/KML - AUTO POST MATCHING E FT ERA PAI R - CONT. ;Jun 06, 2 014@19:11: 19 | |
| 216 | ;;4.5;Acc ounts Rece ivable;**2 98,304,318 ,321**;Mar 20, 1995; Build 104 | |
| 217 | ;Per VA D irective 6 402, this routine sh ould not b e modified . | |
| 218 | ;Read ^IB M(361.1) v ia Private IA 4051 | |
| 219 | ; | |
| 220 | ;-------- ---------- ---------- --- | |
| 221 | ;RCDPEM0 and RCDPEA P SUBROUTI NES | |
| 222 | ;-------- ---------- ---------- --- | |
| 223 | AUTOCHK(RC ERA) ;Veri fy if ERA can be aut o-posted - PRE-CHECK USED IN R CDPEM0 | |
| 224 | ; Many ch ecks done by this ar e also don e AUTOCHK2 below so if these a re changed , may also need to b e changed | |
| 225 | N NOTOK,R CDSUB,RCD0 ,RCSCR | |
| 226 | K ^TMP($J ,"RCDPEWLA ") | |
| 227 | ;Check fo r exceptio ns | |
| 228 | S RCDSUB= 0,NOTOK=0 | |
| 229 | F S RCDS UB=$O(^RCY (344.4,RCE RA,1,RCDSU B)) Q:'RCD SUB D Q: NOTOK | |
| 230 | . ;Except ion exists if INVALI D BILL NUM BER field is populat ed in #344 .41 | |
| 231 | . S RCD0= $G(^RCY(34 4.4,RCERA, 1,RCDSUB,0 )) S:($P(R CD0,U,5)]" ") NOTOK=1 | |
| 232 | ;Cannot a uto-post i f exceptio ns exist | |
| 233 | Q:NOTOK 0 | |
| 234 | ; Ignore ERA if ERA level Adj ustments e xist | |
| 235 | I $O(^RCY (344.4,RCE RA,2,0)) Q 0 | |
| 236 | ; Ignore non-valid auto-post ERA types | |
| 237 | I "^ACH^C HK^BOP^NON ^"'[(U_$$G ET1^DIQ(34 4.4,RCERA_ ",",.15)_U ) Q 0 | |
| 238 | ; ERA mus t be match ed to an E FT to be e ligible fo r mark for autopost | |
| 239 | I ‘$O(^RC Y(344.31," AERA",RCER A,"")) Q 0 | |
| 240 | ;Create s cratchpad | |
| 241 | S RCSCR=$ $SCRPAD^RC DPEAP(RCER A) Q:'RCSC R 0 | |
| 242 | ;Ignore E RA if clai m level ad justments without pa yment exis t | |
| 243 | ;This wil l only get set if th e scratchp ad is crea ted, not i f it alrea dy exists. Looking a t the code , it | |
| 244 | ;will mai nly set if there are ERA level adjustmen ts and may get set f or unbalan ced pairs, which is found | |
| 245 | ;by the Z EROBAL fun ction. So, I think t his does n ot have a real purpo se but was not 100% sure. | |
| 246 | I $D(^TMP ($J,"RCDPE WLA","ERA LEVEL ADJU STMENT EXI STS")) D C LEAR^RCDPE AP(RCSCR) Q 0 | |
| 247 | ; ERA nee ds to drop to standa rd worklis t if adjus tment betw een matchi ng | |
| 248 | ;positive /negative does not c reate a ze ro balance | |
| 249 | I '$$ZERO BAL(RCSCR) D CLEAR^R CDPEAP(RCS CR) Q 0 | |
| 250 | ;Clear sc ratchpad | |
| 251 | D CLEAR^R CDPEAP(RCS CR) | |
| 252 | ;This is valid auto -post - re turn to MA TCH^RCPDEM 0 | |
| 253 | Q 1 | |
| 254 | AUTOCHK2(R CERA,RCTYP ) ; | |
| 255 | ;Check if this entr y is an au to-post ca ndidate | |
| 256 | ;This has the same/ similar ch ecks as MA TCH^RCDPEM 0 and AUTO CHK above. If those procedures are | |
| 257 | ; changed , this may need to u pdated as well. | |
| 258 | ; | |
| 259 | ;Input | |
| 260 | ; RCERA: IEN from E lectronic Remittance Advice fi le (#344.4 ) | |
| 261 | ; RCTYP: Call type 0 = Workli st/Mark fo r autopost 1 = Manu al match ; PRCA*4.5* 321 | |
| 262 | ; | |
| 263 | ;Output | |
| 264 | ; 1: Auto -Post cand idate | |
| 265 | ; 0^Reaso n: Not a a uto-post c andidate a nd reason | |
| 266 | ; | |
| 267 | ; Validat e Paramete r | |
| 268 | I '$G(RCE RA) Q "0^I nvalid Par ameter" | |
| 269 | I $G(RCTY P)=”” Q "0 ^Invalid P arameter" | |
| 270 | I (RCTYP> 1)!(RCTYP< 0) Q "0^In valid Para meter" | |
| 271 | ; | |
| 272 | N STATUS, RC0,RCERAT YP,RCXCLDE ,RCDSUB,NO TOK,RCCREA TE,RCSCR | |
| 273 | K ^TMP($J ,"RCDPEWLA ") | |
| 274 | ; | |
| 275 | ; Check i f record e xists | |
| 276 | I '$D(^RC Y(344.4,RC ERA,0)) Q "0^Invalid ERA recor d" | |
| 277 | ; | |
| 278 | ; Check c urrent sta tus | |
| 279 | S STATUS= $$GET1^DIQ (344.4,RCE RA_",",4.0 2,"I") | |
| 280 | I STATUS= 0 Q "0^Alr eady marke d for Auto -Posting" | |
| 281 | I STATUS= 1 Q "0^Alr eady parti ally Auto- Posted" | |
| 282 | I STATUS= 2 Q "0^Alr eady compl etely Auto -Posted" | |
| 283 | ; | |
| 284 | ; Check f or matchin g | |
| 285 | I '$$GET1 ^DIQ(344.4 ,RCERA_"," ,.09,"I") Q "0^ERA n ot matched " | |
| 286 | ; | |
| 287 | ; Check f or zero va lue ERA | |
| 288 | S RC0=$G( ^RCY(344.4 ,RCERA,0)) | |
| 289 | I +$P(RC0 ,U,5)=0 Q "0^Zero va lue ERA" | |
| 290 | ; | |
| 291 | ; Determi ne if ERA should be excluded u sing the s ite parame ters | |
| 292 | S RCERATY P=$$PHARM( RCERA) | |
| 293 | ; | |
| 294 | ; Check i f medical claim and auto-posti ng is turn ed off | |
| 295 | I 'RCERAT YP,'$P($G( ^RCY(344.6 1,1,0)),U, 2) Q "0^Me dical auto -posting o ff" | |
| 296 | ; | |
| 297 | ; Check i f pharmacy claim and auto-post ing is tur ned off | |
| 298 | I RCERATY P,'$P($G(^ RCY(344.61 ,1,1)),U,1 ) Q "0^Pha rmacy auto -posting o ff" | |
| 299 | ; | |
| 300 | ; Check i f ERA paye r is exclu ded from a utopost | |
| 301 | S RCXCLDE =0 | |
| 302 | S:'RCERAT YP RCXCLDE =$$EXCLUDE (RCERA) | |
| 303 | S:RCERATY P RCXCLDE= $$EXCLDRX( RCERA) | |
| 304 | I RCXCLDE Q "0^"_$S (RCERATYP: "Pharmacy" ,1:"Medica l")_" paye r excluded " | |
| 305 | ; | |
| 306 | ; Check f or invalid bill numb er excepti on | |
| 307 | S RCDSUB= 0,NOTOK=0 | |
| 308 | F S RCDS UB=$O(^RCY (344.4,RCE RA,1,RCDSU B)) Q:'RCD SUB D Q: NOTOK | |
| 309 | . S RCD0= $G(^RCY(34 4.4,RCERA, 1,RCDSUB,0 )) | |
| 310 | . I $P(RC D0,U,5)]"" S NOTOK=1 | |
| 311 | I NOTOK Q "0^Invali d Bill Num ber Except ion(s)" | |
| 312 | ; | |
| 313 | ; Check f or ERA lev el Adjustm ents | |
| 314 | I $O(^RCY (344.4,RCE RA,2,0)) Q "0^ERA le vel Adjust ment(s)" | |
| 315 | ; | |
| 316 | ; Check i f receipt already cr eated | |
| 317 | I +$P(RC0 ,U,8) Q "0 ^ERA has a receipt" | |
| 318 | ; | |
| 319 | ; Check p ayment typ e of ERA - now also includes C HK, NON an d BOP type from manu al match | |
| 320 | I "^ACH^C HK^BOP^NON ^"'[(U_$P( RC0,U,15)_ U) Q "0^Pa yment Type is not AC H, CHK, BO P or NON" | |
| 321 | ; | |
| 322 | ; CHK, N ON and BOP type ERA must be ma tched to a n EFT to b e eligible for mark for autopo st | |
| 323 | I "^CHK^B OP^NON^"'[ (U_$P(RC0, U,15)_U),' $O(^RCY(34 4.31,"AERA ",RCERA,"" )) Q "0^ER A is not m atched to an EFT" ; PRCA*4.5*3 21 | |
| 324 | ; | |
| 325 | ; | |
| 326 | ; Create scratchpad if needed | |
| 327 | S RCCREAT E=0 | |
| 328 | S RCSCR=+ $O(^RCY(34 4.49,"B",R CERA,0)) | |
| 329 | I 'RCSCR S RCSCR=$$ SCRPAD^RCD PEAP(RCERA ) S RCCREA TE=1 | |
| 330 | I 'RCSCR Q "0^Unabl e to creat e scratchp ad" | |
| 331 | ; | |
| 332 | ; Check i f claim le vel adjust ments with out paymen t exist | |
| 333 | ; Note th at PRCA*29 8 sets thi s temp glo bal only i f the scra tchpad is created by the call above ($$S CRPAD^RCDP EAP). If t he | |
| 334 | ; scratch pad alread y exists, the TMP gl obal will never get set. Looki ng at the code, it w ill mainly set if th ere | |
| 335 | ; are ERA level adj ustments a nd may get set for u nbalanced pairs, whi ch is foun d by the Z EROBAL fun ction. So, I think | |
| 336 | ; this do es not hav e a real p urpose but was not 1 00% sure a nd wanted to mimic w hat AUTOCH K does. | |
| 337 | I $D(^TMP ($J,"RCDPE WLA","ERA LEVEL ADJU STMENT EXI STS")) D:R CCREATE CL EAR^RCDPEA P(RCSCR) Q "0^Claim Level Adju stments w/ o payment" | |
| 338 | ; | |
| 339 | ; Check i f adjustme nt between matching positive/n egative do es not cre ate a zero balance | |
| 340 | I '$$ZERO BAL(RCSCR) D:RCCREAT E CLEAR^RC DPEAP(RCSC R) Q "0^+/ - pairs do not balan ce" | |
| 341 | ; | |
| 342 | ; Clear s cratchpad if it was created by this func tion | |
| 343 | D:RCCREAT E CLEAR^RC DPEAP(RCSC R) | |
| 344 | ; | |
| 345 | ;If we go t this far , this is an autopos t candidat e so quit with 1 | |
| 346 | Q 1 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.