Produced by Araxis Merge on 4/17/2018 8:06:28 PM 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 | MCCF EDI TAS ePharmacy 031218.zip\MCCF EDI TAS ePharmacy 031218 | TAS+ePhm+SDD+US124+v1.01.docx | Sun Mar 11 20:02:29 2018 UTC |
| 2 | MCCF EDI TAS ePharmacy 031218.zip\MCCF EDI TAS ePharmacy 031218 | TAS+ePhm+SDD+US124+v1.01.docx | Tue Apr 17 20:25:55 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 1 | 2664 |
| 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 US124 | |
| 2 | System Des ign Docume nt | |
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| 8 | Department of Vetera ns Affairs | |
| 9 | December 2 017 | |
| 10 | Version 1. 01 | |
| 11 | User Story Number: U SRX-44 | |
| 12 | User Story Name: Tra nsmit Coor dination o f Benefit Fields on Secondary Claims | |
| 13 | Product Ba cklog ID: 44 | |
| 14 | Priority: | |
| 15 | Initial Si zing Estim ate: 13 | |
| 16 | Rational I D: | |
| 17 | Rally ID: US124 | |
| 18 | Epic Taxon omy: eBusi ness Compl iance | |
| 19 | ||
| 20 | Design – S ummary | |
| 21 | When a sec ondary cla im is sent , the syst em is not currently sending so me COB fie lds which are requir ed for TRI CARE secon dary claim s. Logic w ill be add ed to incl ude these fields on all second ary claims if the fi elds are o n the paye r sheet. | |
| 22 | 353-NR OTH ER PAYER-P AT RESP AM T CNT | |
| 23 | 351-NP OTH ER PAYER-P AT RESP AM T QLFR | |
| 24 | 352-NQ OTH ER PAYER-P AT RESP AM OUNT | |
| 25 | In this do cument, th ese three fields wil l be refer red to as the Other Payer Pati ent Respon sibility f ields. All three fie lds appear , if at al l, on segm ent 160, C oordinatio n of Benef its/Other Payments. | |
| 26 | ||
| 27 | Two of tho se fields (AMOUNT an d AMT QLFR ) will be added to t he CRI (Cl aim Respon se Inquiry ) screen. To facilit ate testin g, the inc oming fiel d PATIENT PAY AMOUNT will be a dded to th e ECME Tes ting Tool. This is t he value t hat is sen t on the s econdary c laim as fi eld OTHER PAYER-PAT RESP AMOUN T. | |
| 28 | ||
| 29 | List of Co mponents: | |
| 30 | File: BPS PAYER RESP ONSE OVERR IDES | |
| 31 | File: BPS REQUESTS | |
| 32 | File: BPS TRANSACTIO N | |
| 33 | Routine: B PSFLD01 | |
| 34 | Routine: B PSOSCD | |
| 35 | Routine: B PSOSHF | |
| 36 | Routine: B PSOSRB | |
| 37 | Routine: B PSOSRX3 | |
| 38 | Routine: B PSPRRX3 | |
| 39 | Routine: B PSPRRX6 | |
| 40 | Routine: B PSTEST | |
| 41 | ||
| 42 | Design – D etail | |
| 43 | This story calls for taking a field from the respo nse to a p rimary cla im and sen ding it on the secon dary claim request. The system already d oes this w ith other fields. Fo r example, the amoun t paid on the primar y claim co mes in on the respon se as fiel d 509-F9, Total Amou nt Paid, a nd is sent on the se condary cl aim reques t as field 431-DV, O ther Payer Amount Pa id. To acc omplish th is, the fo llowing ha ppens. | |
| 44 | The system saves the field in the BPS RE SPONSES fi le when th e response is receiv ed and pro cessed. | |
| 45 | When the s econdary c laim is in itiated, t he system puts the f ield on th e BPS REQU EST. | |
| 46 | From there , it is co pied to th e BPS TRAN SACTION. | |
| 47 | It is pull ed from th e BPS TRAN SACTION an d put onto the claim in BPS CL AIMS when the claim is created . | |
| 48 | The value stored in BPS CLAIMS is put on to the cla im request that is s ent to the payer. | |
| 49 | ||
| 50 | IncomingBP SBPSBPSBPS Outgoing | |
| 51 | ClaimRESPO NSESREQUES TSTRAN-CLA IMSClaim | |
| 52 | ResponseAC TIONReques t | |
| 53 | ||
| 54 | The new fu nctionalit y called f or in this story wil l work in the same w ay. Some o f the exis ting logic will hand le the new fields wi thout any modificati ons. | |
| 55 | ||
| 56 | The organi zation of this SDD w ill genera lly follow the above flow, fro m capturin g Patient Pay Amount on the in coming cla im respons e to sendi ng the Oth er Payer P atient Res ponsibilit y fields o n the outg oing claim request. At the end of the SD D are sect ions cover ing the te sting tool , the CRI/ VER screen s, and the PRO Optio n and RED Action. | |
| 57 | ||
| 58 | ||
| 59 | Fields in Each File | |
| 60 | ||
| 61 | Most of th e files in question already ha ve the fie lds necess ary for th is story. Two new fi elds will need to be added. | |
| 62 | ||
| 63 | File | |
| 64 | Field | |
| 65 | New/Existi ng | |
| 66 | Length | |
| 67 | Format | |
| 68 | Incoming C laim Respo nse | |
| 69 | 505-F5, Pa tient Pay Amount | |
| 70 | Existing | |
| 71 | 8 | |
| 72 | signed num eric | |
| 73 | BPS RESPON SES | |
| 74 | PATIENT PA Y AMOUNT | |
| 75 | Existing | |
| 76 | 8 | |
| 77 | free text | |
| 78 | BPS REQUES TS | |
| 79 | OTHER PAYE R-PATIENT RESP AMT | |
| 80 | New | |
| 81 | 8 | |
| 82 | free text | |
| 83 | BPS TRANSA CTION | |
| 84 | OTHER PAYE R-PATIENT RESP AMT | |
| 85 | New | |
| 86 | 8 | |
| 87 | free text | |
| 88 | BPS CLAIMS | |
| 89 | OTHER PAYE R-PATIENT RESP AMT | |
| 90 | Existing | |
| 91 | 12 | |
| 92 | free text | |
| 93 | BPS CLAIMS | |
| 94 | OTHER PAYE R-PT RESP AMT QUALFR | |
| 95 | Existing | |
| 96 | 4 | |
| 97 | free text | |
| 98 | BPS CLAIMS | |
| 99 | OTHER PAYE R-PAT RESP AMT COUNT | |
| 100 | Existing | |
| 101 | 4 | |
| 102 | free text | |
| 103 | Outgoing C laim Reque st | |
| 104 | 352-NQ, Ot her Payer- Patient Re sponsibili ty Amount | |
| 105 | Existing | |
| 106 | 8 | |
| 107 | signed num eric | |
| 108 | Outgoing C laim Reque st | |
| 109 | 351-NP, Ot her Payer- Patient Re sponsibili ty Amount Qualifier | |
| 110 | Existing | |
| 111 | 2 | |
| 112 | alpha-nume ric | |
| 113 | Outgoing C laim Reque st | |
| 114 | 353-NR, Ot her Payer- Patient Re sponsibili ty Amount Count | |
| 115 | Existing | |
| 116 | 2 | |
| 117 | numeric | |
| 118 | ||
| 119 | ||
| 120 | A new fiel d will be added to f ile# 90023 13.77, BPS REQUESTS, sub-file# 9002313.7 781, OTHER PAYER AMT PAID MULT IPLE, and a new fiel d will be added to f ile# 90023 13.59, BPS TRANSACTI ON, sub-fi le# 900231 3.59141, O THER PAYER AMT PAID MULTIPLE. | |
| 121 | ||
| 122 | Field Attr ibutes | |
| 123 | Values | |
| 124 | FILE | |
| 125 | 9002313.77 , BPS REQU ESTS | |
| 126 | SUB-FILE | |
| 127 | 9002313.77 81, OTHER PAYER AMT PAID MULTI PLE | |
| 128 | FIELD NAME | |
| 129 | OTHER PAYE R-PATIENT RESP AMT | |
| 130 | FIELD NUMB ER | |
| 131 | .03 | |
| 132 | NODE;PIECE | |
| 133 | ^BPS(90023 13.77,D0,8 ,D1,1,D2,0 );3 | |
| 134 | FIELD TYPE | |
| 135 | Free text | |
| 136 | FIELD LENG TH | |
| 137 | 8 | |
| 138 | INPUT TRAN SFORM | |
| 139 | K:$L(X)>8! ($L(X)<6) X | |
| 140 | HELP PROMP T | |
| 141 | Answer mus t be 6-8 c haracters in length. | |
| 142 | DESCRIPTIO N | |
| 143 | Amount tha t is calcu lated by t he process or and ret urned to t he pharmac y as the T OTAL amoun t to be pa id by the patient to the pharm acy; the p atient's t otal cost share, inc luding co- payments, amounts ap plied to d eductible, over maxi mum amount s, penalti es, etc. | |
| 144 | ||
| 145 | Field Attr ibutes | |
| 146 | Values | |
| 147 | FILE | |
| 148 | 9002313.59 , BPS TRAN SACTION | |
| 149 | SUB-FILE | |
| 150 | 9002313.59 141, OTHER PAYER AMT PAID MULT IPLE | |
| 151 | FIELD NAME | |
| 152 | OTHER PAYE R-PATIENT RESP AMT | |
| 153 | FIELD NUMB ER | |
| 154 | .03 | |
| 155 | NODE;PIECE | |
| 156 | ^BPST(D0,1 4,D1,1,D2, 0);3 | |
| 157 | FIELD TYPE | |
| 158 | Free text | |
| 159 | FIELD LENG TH | |
| 160 | 8 | |
| 161 | INPUT TRAN SFORM | |
| 162 | K:$L(X)>8! ($L(X)<6) X | |
| 163 | HELP PROMP T | |
| 164 | Answer mus t be 6-8 c haracters in length. | |
| 165 | DESCRIPTIO N | |
| 166 | Amount tha t is calcu lated by t he process or and ret urned to t he pharmac y as the T OTAL amoun t to be pa id by the patient to the pharm acy; the p atient's t otal cost share, inc luding co- payments, amounts ap plied to d eductible, over maxi mum amount s, penalti es, etc. | |
| 167 | ||
| 168 | ||
| 169 | The tables below des cribe how the files BPS REQUES TS and BPS TRANSACTI ON will be added to the build. | |
| 170 | ||
| 171 | File Name | |
| 172 | BPS REQUES TS | |
| 173 | Send Full or Partial DD | |
| 174 | PARTIAL | |
| 175 | Data Dicti onary Numb er | |
| 176 | 9002313.77 | |
| 177 | Sub-File N umber | |
| 178 | 9002313.77 81 | |
| 179 | Field Numb er | |
| 180 | .03 | |
| 181 | Update the Data Dict ionary | |
| 182 | YES | |
| 183 | Send Secur ity Codes | |
| 184 | NO | |
| 185 | Screen to Determine DD Update | |
| 186 | N/A | |
| 187 | Data Comes with File | |
| 188 | NO | |
| 189 | Site’s Dat a | |
| 190 | N/A | |
| 191 | ||
| 192 | ||
| 193 | File Name | |
| 194 | BPS TRANSA CTION | |
| 195 | Send Full or Partial DD | |
| 196 | PARTIAL | |
| 197 | Data Dicti onary Numb er | |
| 198 | 9002313.59 | |
| 199 | Sub-File N umber | |
| 200 | 9002313.59 141 | |
| 201 | Field Numb er | |
| 202 | .03 | |
| 203 | Update the Data Dict ionary | |
| 204 | YES | |
| 205 | Send Secur ity Codes | |
| 206 | NO | |
| 207 | Screen to Determine DD Update | |
| 208 | N/A | |
| 209 | Data Comes with File | |
| 210 | NO | |
| 211 | Site’s Dat a | |
| 212 | N/A | |
| 213 | ||
| 214 | ||
| 215 | Capturing the Incomi ng Patient Pay Amoun t | |
| 216 | ||
| 217 | The field Patient Pa y Amount, 505-F5, is already b eing captu red in fil e# 9002313 .03, BPS R ESPONSES, field# 505 , PATIENT PAY AMOUNT . No chang e necessar y. | |
| 218 | ||
| 219 | ||
| 220 | BPS REQUES TS | |
| 221 | ||
| 222 | The claim submission process c an be init iated from many plac es within the system , but they all event ually call EN^BPSNCP DP. When t hat functi on is call ed, someti mes COB da ta has alr eady been pulled and set into a local ar ray (passe d into EN^ BPSNCPDP a s the 16th parameter , BPSPRDAT ). If that array has already b een create d, it will automatic ally inclu de the Pat ient Pay A mount from the prima ry claim r esponse. | |
| 223 | ||
| 224 | (The two p rocedures which pass the COB a rray into EN^BPSNCPD P are | |
| 225 | SUBMCLM^BP SPRRX2 | |
| 226 | Called fro m | |
| 227 | SECONDRY^B PSPRRX | |
| 228 | COB array built in $ $PRIMDATA^ BPSPRRX6 a nd $$SECDA TA^BPSPRRX 6; see SEC ONDRY^BPSP RRX for ca lls | |
| 229 | PRIMARY^BP SPRRX4 | |
| 230 | News the a rray BPSDA T in PRIMA RY^BPSPRRX 4 | |
| 231 | Never sets up the ar ray | |
| 232 | SECNOPRM^B PSPRRX5 | |
| 233 | COB array built in $ $PRIMDATA^ BPSPRRX6 a nd $$SECDA TA^BPSPRRX 6; see SEC NOPRM^BPSP RRX for ca lls | |
| 234 | DOSELCTD^B PSRES | |
| 235 | Calls PROM PTS^BPSRES | |
| 236 | COB array built in $ $PRIMDATA^ BPSPRRX6 a nd $$SECDA TA^BPSPRRX 6; see PRO MPTS^BPSRE S for call s | |
| 237 | (So in all instances , the COB array is s et up in $ $PRIMDATA^ BPSPRRX6 a nd $$SECDA TA^BPSPRRX 6. | |
| 238 | ||
| 239 | ($$PRIMDAT A builds C OBARRAY(“O THER PAYER ”,BPSPIEN, “P”) from fields on BPS RESPON SES. $$SEC DATA build s BPSPRDAT (“OTHER PA YER”,BPSPI EN,“P”) fr om fields on BPS TRA NSACTION.) | |
| 240 | ||
| 241 | When resub mitting a secondary claim, SEC DATA^BPSPR RX6 pulls COB data f rom the BP S TRANSACT ION entry. SECDATA^B PSPRRX6 wi ll not nee d to be up dated; it will pull the new fi eld, OTHER PAYER-PAT RESP AMOU NT as writ ten. | |
| 242 | SECDATA+48 .. S BPS PRDAT("OTH ER PAYER", COBPIEN,"P ",APDIEN,0 )= | |
| 243 | $G(^BPST(I EN59SEC,14 ,COBPIEN,1 ,APDIEN,0) ) | |
| 244 | ||
| 245 | MKRQST^BPS OSRX3 (cal led only b y REQST^BP SOSRX) cre ates an en try in the BPS REQUE STS file. That funct ion will b e modified to pull P ATIENT PAY AMOUNT fr om the pri mary claim ’s respons e when cre ating the new entry in BPS REQ UESTS for the second ary claim. | |
| 246 | ||
| 247 | Subroutine Name | |
| 248 | MKRQST^BPS OSRX3 | |
| 249 | Enhancemen t Category | |
| 250 | New | |
| 251 | Modify | |
| 252 | ||
| 253 | ||
| 254 | Routines W hich Call This Subro utine | |
| 255 | REQST^BPSO SRX | |
| 256 | Current Lo gic | |
| 257 | ||
| 258 | MKRQST(BPR EQTYP,KEY1 ,KEY2,MORE DATA,BPIEN S78,BPCOBI ND,BILLNDC ,BPSKIP) ; | |
| 259 | N BPIEN77,B PCOB,BPQ,B PIEN772,BP ERRMSG,BPI EN59,BPIEN 78,BPZ | |
| 260 | N RETVAL,ST AT,TYPE,RE SULT,SUBMI TDT,BPNOW, BPACTTYP,B P77LCK | |
| 261 | N DUR,BPIEN 771,BPCNT, BPSDUPL | |
| 262 | ... | |
| 263 | ; store sec ondary bil ling relat ed data en tered by t he user - esg 6/8/10 | |
| 264 | S BPQ=0,BPE RRMSG="" | |
| 265 | I BPCOBIND= 2 D | |
| 266 | . N AMTIEN, BPIEN1,BPI EN2,BPIEN7 78,BPZ,BPZ 1,BPZ2,OPA MT,OPAPQ,O PAYD,OPREJ ,PIEN,REJI EN | |
| 267 | . S PIEN=0 F S PIEN= $O(MOREDAT A("OTHER P AYER",PIEN )) Q:'PIEN !BPQ D | |
| 268 | . . S OPAYD= $G(MOREDAT A("OTHER P AYER",PIEN ,0)) Q:OPA YD="" | |
| 269 | . . ; | |
| 270 | . . ; count up the num ber of mul tiples we have in ea ch set | |
| 271 | . . S BPZ=0 F BPZ1=0:1 S BPZ=$O( MOREDATA(" OTHER PAYE R",PIEN,"P ",BPZ)) Q: 'BPZ | |
| 272 | . . S BPZ=0 F BPZ2=0:1 S BPZ=$O( MOREDATA(" OTHER PAYE R",PIEN,"R ",BPZ)) Q: 'BPZ | |
| 273 | . . I BPZ1,B PZ2 S BPQ= 1,BPERRMSG ="Can't ha ve both pa yments and rejects f or the sam e OTHER PA YER" Q | |
| 274 | . . ; | |
| 275 | . . ; add a new entry to subfile 9002313.7 78 | |
| 276 | . . S BPIEN7 78=$$INSIT EM^BPSUTIL 2(9002313. 778,BPIEN7 7,PIEN,PIE N,"",,0) | |
| 277 | . . I BPIEN7 78<1 S BPE RRMSG="Can 't create entry in C OB OTHER P AYERS mult iple of th e BPS REQU ESTS file" ,BPQ=1 Q | |
| 278 | . . S BPERRM SG="Can't populate f ield in CO B OTHER PA YERS multi ple" ; j ust in cas e BPQ is s et below | |
| 279 | . . ; | |
| 280 | . . ; set th e rest of the pieces at this l evel | |
| 281 | . . I $P(OPA YD,U,2)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.02, PIEN_","_B PIEN77,$P( OPAYD,U,2) )<1 S BPQ= 1 Q | |
| 282 | . . I $P(OPA YD,U,3)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.03, PIEN_","_B PIEN77,$P( OPAYD,U,3) )<1 S BPQ= 1 Q | |
| 283 | . . I $P(OPA YD,U,4)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.04, PIEN_","_B PIEN77,$P( OPAYD,U,4) )<1 S BPQ= 1 Q | |
| 284 | . . I $P(OPA YD,U,5)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.05, PIEN_","_B PIEN77,$P( OPAYD,U,5) )<1 S BPQ= 1 Q | |
| 285 | . . I $$FILL FLDS^BPSUT IL2(900231 3.778,.06, PIEN_","_B PIEN77,BPZ 1)<1 S BPQ =1 Q | |
| 286 | . . I $$FILL FLDS^BPSUT IL2(900231 3.778,.07, PIEN_","_B PIEN77,BPZ 2)<1 S BPQ =1 Q | |
| 287 | . . S BPERRM SG="" | |
| 288 | . . ; | |
| 289 | . . ; now lo op thru th e other pa yer paymen t array | |
| 290 | . . S AMTIEN =0 F S AM TIEN=$O(MO REDATA("OT HER PAYER" ,PIEN,"P", AMTIEN)) Q :'AMTIEN!B PQ D | |
| 291 | . .. S OPAMT =$G(MOREDA TA("OTHER PAYER",PIE N,"P",AMTI EN,0)) | |
| 292 | . .. S OPAPQ =$P(OPAMT, U,2) ; 3 42-HC othe r payer am t paid qua lifier (nc pdp 5.1 bl ank is OK) | |
| 293 | . .. S OPAMT =+OPAMT ; 4 31-DV othe r payer am t paid | |
| 294 | . .. ; | |
| 295 | . .. ; add a new entry to subfil e 9002313. 7781 | |
| 296 | . .. S BPIEN 1=$$INSITE M^BPSUTIL2 (9002313.7 781,PIEN_" ,"_BPIEN77 ,OPAMT,AMT IEN,"",,0) | |
| 297 | . .. I BPIEN 1<1 S BPER RMSG="Can' t create e ntry in 90 02313.7781 subfile", BPQ=1 Q | |
| 298 | . .. ; | |
| 299 | . .. ; set p iece 2 | |
| 300 | . .. I OPAPQ '="" I $$F ILLFLDS^BP SUTIL2(900 2313.7781, .02,AMTIEN _","_PIEN_ ","_BPIEN7 7,OPAPQ)<1 D | |
| 301 | . ... S BPQ= 1,BPERRMSG ="Can't po pulate .02 field in 9002313.77 81 subfile " | |
| 302 | . ... Q | |
| 303 | . .. Q | |
| 304 | . . ; | |
| 305 | . . ; now lo op thru th e other pa yer reject array | |
| 306 | . . S REJIEN =0 F S RE JIEN=$O(MO REDATA("OT HER PAYER" ,PIEN,"R", REJIEN)) Q :'REJIEN!B PQ D | |
| 307 | . .. S OPREJ =$G(MOREDA TA("OTHER PAYER",PIE N,"R",REJI EN,0)) Q:O PREJ="" Q :$P(OPREJ, U,1)="" | |
| 308 | . .. ; | |
| 309 | . .. ; add a new entry to subfil e 9002313. 7782 | |
| 310 | . .. S BPIEN 2=$$INSITE M^BPSUTIL2 (9002313.7 782,PIEN_" ,"_BPIEN77 ,$P(OPREJ, U,1),REJIE N,"",,0) | |
| 311 | . .. I BPIEN 2<1 S BPER RMSG="Can' t create e ntry in 90 02313.7782 subfile", BPQ=1 Q | |
| 312 | . .. Q | |
| 313 | . . Q | |
| 314 | . Q | |
| 315 | ... | |
| 316 | ||
| 317 | Modified L ogic (Chan ges are hi ghlighted) | |
| 318 | ||
| 319 | MKRQST(BPR EQTYP,KEY1 ,KEY2,MORE DATA,BPIEN S78,BPCOBI ND,BILLNDC ,BPSKIP) ; | |
| 320 | N BPIEN77,B PCOB,BPQ,B PIEN772,BP ERRMSG,BPI EN59,BPIEN 78,BPZ | |
| 321 | N RETVAL,ST AT,TYPE,RE SULT,SUBMI TDT,BPNOW, BPACTTYP,B P77LCK | |
| 322 | N DUR,BPIEN 771,BPCNT, BPSDUPL | |
| 323 | ... | |
| 324 | ; store sec ondary bil ling relat ed data en tered by t he user - esg 6/8/10 | |
| 325 | S BPQ=0,BPE RRMSG="" | |
| 326 | I BPCOBIND= 2 D | |
| 327 | . N AMTIEN, BPIEN1,BPI EN2,BPIEN7 78,BPZ,BPZ 1,BPZ2,OPA MT,OPAPQ,O PAYD,OPPRA ,OPREJ,PIE N,REJIEN | |
| 328 | . S PIEN=0 F S PIEN= $O(MOREDAT A("OTHER P AYER",PIEN )) Q:'PIEN !BPQ D | |
| 329 | . . S OPAYD= $G(MOREDAT A("OTHER P AYER",PIEN ,0)) Q:OPA YD="" | |
| 330 | . . ; | |
| 331 | . . ; count up the num ber of mul tiples we have in ea ch set | |
| 332 | . . S BPZ=0 F BPZ1=0:1 S BPZ=$O( MOREDATA(" OTHER PAYE R",PIEN,"P ",BPZ)) Q: 'BPZ | |
| 333 | . . S BPZ=0 F BPZ2=0:1 S BPZ=$O( MOREDATA(" OTHER PAYE R",PIEN,"R ",BPZ)) Q: 'BPZ | |
| 334 | . . I BPZ1,B PZ2 S BPQ= 1,BPERRMSG ="Can't ha ve both pa yments and rejects f or the sam e OTHER PA YER" Q | |
| 335 | . . ; | |
| 336 | . . ; add a new entry to subfile 9002313.7 78 | |
| 337 | . . S BPIEN7 78=$$INSIT EM^BPSUTIL 2(9002313. 778,BPIEN7 7,PIEN,PIE N,"",,0) | |
| 338 | . . I BPIEN7 78<1 S BPE RRMSG="Can 't create entry in C OB OTHER P AYERS mult iple of th e BPS REQU ESTS file" ,BPQ=1 Q | |
| 339 | . . S BPERRM SG="Can't populate f ield in CO B OTHER PA YERS multi ple" ; j ust in cas e BPQ is s et below | |
| 340 | . . ; | |
| 341 | . . ; set th e rest of the pieces at this l evel | |
| 342 | . . I $P(OPA YD,U,2)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.02, PIEN_","_B PIEN77,$P( OPAYD,U,2) )<1 S BPQ= 1 Q | |
| 343 | . . I $P(OPA YD,U,3)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.03, PIEN_","_B PIEN77,$P( OPAYD,U,3) )<1 S BPQ= 1 Q | |
| 344 | . . I $P(OPA YD,U,4)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.04, PIEN_","_B PIEN77,$P( OPAYD,U,4) )<1 S BPQ= 1 Q | |
| 345 | . . I $P(OPA YD,U,5)'=" " I $$FILL FLDS^BPSUT IL2(900231 3.778,.05, PIEN_","_B PIEN77,$P( OPAYD,U,5) )<1 S BPQ= 1 Q | |
| 346 | . . I $$FILL FLDS^BPSUT IL2(900231 3.778,.06, PIEN_","_B PIEN77,BPZ 1)<1 S BPQ =1 Q | |
| 347 | . . I $$FILL FLDS^BPSUT IL2(900231 3.778,.07, PIEN_","_B PIEN77,BPZ 2)<1 S BPQ =1 Q | |
| 348 | . . S BPERRM SG="" | |
| 349 | . . ; | |
| 350 | . . ; now lo op thru th e other pa yer paymen t array | |
| 351 | . . S AMTIEN =0 F S AM TIEN=$O(MO REDATA("OT HER PAYER" ,PIEN,"P", AMTIEN)) Q :'AMTIEN!B PQ D | |
| 352 | . .. S OPAMT =$G(MOREDA TA("OTHER PAYER",PIE N,"P",AMTI EN,0)) | |
| 353 | . .. S OPAPQ =$P(OPAMT, U,2) ; 3 42-HC othe r payer am t paid qua lifier (nc pdp 5.1 bl ank is OK) | |
| 354 | . .. S OPPRA =$P(OPAMT, U,3) ; 3 52-NQ, Oth er Payer-P atient Res ponsibilit y Amount | |
| 355 | . .. S OPAMT =+OPAMT ; 4 31-DV othe r payer am t paid | |
| 356 | . .. ; | |
| 357 | . .. ; add a new entry to subfil e 9002313. 7781 | |
| 358 | . .. S BPIEN 1=$$INSITE M^BPSUTIL2 (9002313.7 781,PIEN_" ,"_BPIEN77 ,OPAMT,AMT IEN,"",,0) | |
| 359 | . .. I BPIEN 1<1 S BPER RMSG="Can' t create e ntry in 90 02313.7781 subfile", BPQ=1 Q | |
| 360 | . .. ; | |
| 361 | . .. ; set p iece 2 | |
| 362 | . .. I OPAPQ '="" I $$F ILLFLDS^BP SUTIL2(900 2313.7781, .02,AMTIEN _","_PIEN_ ","_BPIEN7 7,OPAPQ)<1 D | |
| 363 | . ... S BPQ= 1,BPERRMSG ="Can't po pulate .02 field in 9002313.77 81 subfile " | |
| 364 | . ... Q | |
| 365 | . .. ; | |
| 366 | . .. ; set p iece 3 | |
| 367 | . .. I OPPRA '="" I $$F ILLFLDS^BP SUTIL2(900 2313.7781, .03,AMTIEN _","_PIEN_ ","_BPIEN7 7,OPPRA)<1 D | |
| 368 | . ... S BPQ= 1,BPERRMSG ="Can't po pulate .03 field in 9002313.77 81 subfile " | |
| 369 | . ... Q | |
| 370 | . .. ; | |
| 371 | . .. Q | |
| 372 | . . ; | |
| 373 | . . ; now lo op thru th e other pa yer reject array | |
| 374 | . . S REJIEN =0 F S RE JIEN=$O(MO REDATA("OT HER PAYER" ,PIEN,"R", REJIEN)) Q :'REJIEN!B PQ D | |
| 375 | . .. S OPREJ =$G(MOREDA TA("OTHER PAYER",PIE N,"R",REJI EN,0)) Q:O PREJ="" Q :$P(OPREJ, U,1)="" | |
| 376 | . .. ; | |
| 377 | . .. ; add a new entry to subfil e 9002313. 7782 | |
| 378 | . .. S BPIEN 2=$$INSITE M^BPSUTIL2 (9002313.7 782,PIEN_" ,"_BPIEN77 ,$P(OPREJ, U,1),REJIE N,"",,0) | |
| 379 | . .. I BPIEN 2<1 S BPER RMSG="Can' t create e ntry in 90 02313.7782 subfile", BPQ=1 Q | |
| 380 | . .. Q | |
| 381 | . . Q | |
| 382 | . Q | |
| 383 | ... | |
| 384 | ||
| 385 | ||
| 386 | ||
| 387 | BPS TRANSA CTION | |
| 388 | ||
| 389 | Data is pu lled from the BPS RE QUESTS ent ry and put into the MOREDATA a rray in RE ADMORE^BPS OSRX4. No change is necessary to the exi sting code , since th e new fiel d is on th e same nod e already referenced in this l ine: | |
| 390 | READMORE+5 4 | |
| 391 | ... S MORE DATA("OTHE R PAYER",C OBPIEN,"P" ,APDIEN,0) = | |
| 392 | $G(^BPS(90 02313.77,B PIEN77,8,C OBPIEN,1,A PDIEN,0)) | |
| 393 | ||
| 394 | In SECBIL5 9^BPSPRRX6 , data in the MOREDA TA array i s used to populate f ields on t he BPS TRA NSACTION. The new fi eld will n eed to be added to t his code. | |
| 395 | ||
| 396 | Subroutine Name | |
| 397 | SECBIL59^B PSPRRX6 | |
| 398 | Enhancemen t Category | |
| 399 | New | |
| 400 | Modify | |
| 401 | ||
| 402 | ||
| 403 | Routines W hich Call This Subro utine | |
| 404 | INIT^BPSOS IY | |
| 405 | Current Lo gic | |
| 406 | ||
| 407 | SECBIL59(M OREDATA,IE N59) ; | |
| 408 | ; Populate secondary billing fi elds in BP S TRANSACT ION | |
| 409 | ; MOREDATA array file d into 900 2313.59 | |
| 410 | N BPTYPE,BP STIME,BPCO B | |
| 411 | N AMTIEN,BP IEN1,BPIEN 2,BPZ5914, BPZ,BPZ1,B PZ2,OPAMT, OPAPQ,OPAY D,OPREJ,PI EN,REJIEN, BPQ | |
| 412 | I +$G(IEN59 )=0 Q | |
| 413 | ; | |
| 414 | I $L($G(MOR EDATA("337 -4C"))) I $$FILLFLDS ^BPSUTIL2( 9002313.59 ,1204,IEN5 9,MOREDATA ("337-4C") )<1 D LOG^ BPSOSL(IEN 59,$T(+0)_ "- | |
| 415 | Cannot pop ulate (#12 04) of (#9 002313.59) ") ; cob other pay ments coun t | |
| 416 | I $L($G(MOR EDATA("308 -C8"))) I $$FILLFLDS ^BPSUTIL2( 9002313.59 ,1205,IEN5 9,MOREDATA ("308-C8") )<1 D LOG^ BPSOSL(IEN 59,$T(+0)_ "- | |
| 417 | Cannot pop ulate (#12 05) of (#9 002313.59) ") ; oth er coverag e code | |
| 418 | ; | |
| 419 | ; store sec ondary bil ling relat ed data en tered by t he user - esg 6/14/1 0 | |
| 420 | S BPQ=0 | |
| 421 | S PIEN=0 F S PIEN=$O (MOREDATA( "OTHER PAY ER",PIEN)) Q:'PIEN!B PQ D | |
| 422 | . S OPAYD=$ G(MOREDATA ("OTHER PA YER",PIEN, 0)) Q:OPAY D="" | |
| 423 | . ; | |
| 424 | . ; count u p the numb er of mult iples we h ave in eac h set | |
| 425 | . S BPZ=0 F BPZ1=0:1 S BPZ=$O(M OREDATA("O THER PAYER ",PIEN,"P" ,BPZ)) Q:' BPZ | |
| 426 | . S BPZ=0 F BPZ2=0:1 S BPZ=$O(M OREDATA("O THER PAYER ",PIEN,"R" ,BPZ)) Q:' BPZ | |
| 427 | . I BPZ1,BP Z2 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot have both paym ents and r ejects for the same OTHER PAYE R.") Q | |
| 428 | . ; | |
| 429 | . ; add a n ew entry t o subfile 9002313.59 14 | |
| 430 | . S BPZ5914 =$$INSITEM ^BPSUTIL2( 9002313.59 14,IEN59,P IEN,PIEN," ",,0) | |
| 431 | . I BPZ5914 <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C an't creat e entry in COB OTHER PAYERS mu ltiple of the BPS TR ANSACTION fi | |
| 432 | le") Q | |
| 433 | . ; | |
| 434 | . ; set the rest of t he pieces at this le vel | |
| 435 | . I $P(OPAY D,U,2)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.02, PIEN_","_I EN59,$P(OP AYD,U,2))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T( | |
| 436 | +0)_"-Cann ot populat e (#.02) o f (#900231 3.5914)") Q | |
| 437 | . I $P(OPAY D,U,3)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.03, PIEN_","_I EN59,$P(OP AYD,U,3))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T( | |
| 438 | +0)_"-Cann ot populat e (#.03) o f (#900231 3.5914)") Q | |
| 439 | . I $P(OPAY D,U,4)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.04, PIEN_","_I EN59,$P(OP AYD,U,4))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T( | |
| 440 | +0)_"-Cann ot populat e (#.04) o f (#900231 3.5914)") Q | |
| 441 | . I $P(OPAY D,U,5)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.05, PIEN_","_I EN59,$P(OP AYD,U,5))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T( | |
| 442 | +0)_"-Cann ot populat e (#.05) o f (#900231 3.5914)") Q | |
| 443 | . I $$FILLF LDS^BPSUTI L2(9002313 .5914,.06, PIEN_","_I EN59,BPZ1) <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.06 ) | |
| 444 | of (#90023 13.5914)") Q | |
| 445 | . I $$FILLF LDS^BPSUTI L2(9002313 .5914,.07, PIEN_","_I EN59,BPZ2) <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.07 ) | |
| 446 | of (#90023 13.5914)") Q | |
| 447 | . ; | |
| 448 | . ; now loo p thru the other pay er payment array | |
| 449 | . S AMTIEN= 0 F S AMT IEN=$O(MOR EDATA("OTH ER PAYER", PIEN,"P",A MTIEN)) Q: 'AMTIEN!BP Q D | |
| 450 | . . S OPAMT= $G(MOREDAT A("OTHER P AYER",PIEN ,"P",AMTIE N,0)) | |
| 451 | . . S OPAPQ= $P(OPAMT,U ,2) ; 34 2-HC other payer amt paid qual ifier (ncp dp 5.1 bla nk is OK) | |
| 452 | . . S OPAMT= +OPAMT ; 43 1-DV other payer amt paid | |
| 453 | . . ; | |
| 454 | . . ; add a new entry to subfile 9002313.5 9141 | |
| 455 | . . S BPIEN1 =$$INSITEM ^BPSUTIL2( 9002313.59 141,PIEN_" ,"_IEN59,O PAMT,AMTIE N,"",,0) | |
| 456 | . . I BPIEN1 <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C an't creat e entry in 9002313.5 9141 subfi le") Q | |
| 457 | . . ; | |
| 458 | . . ; set pi ece 2 | |
| 459 | . . I OPAPQ' ="" I $$FI LLFLDS^BPS UTIL2(9002 313.59141, .02,AMTIEN _","_PIEN_ ","_IEN59, OPAPQ)<1 D | |
| 460 | . .. S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.02 ) of (#900 2313.59141 )") | |
| 461 | . .. Q | |
| 462 | . . Q | |
| 463 | . ; | |
| 464 | . ; now loo p thru the other pay er reject array | |
| 465 | . S REJIEN= 0 F S REJ IEN=$O(MOR EDATA("OTH ER PAYER", PIEN,"R",R EJIEN)) Q: 'REJIEN!BP Q D | |
| 466 | . . S OPREJ= $G(MOREDAT A("OTHER P AYER",PIEN ,"R",REJIE N,0)) Q:OP REJ="" Q: $P(OPREJ,U ,1)="" | |
| 467 | . . ; | |
| 468 | . . ; add a new entry to subfile 9002313.5 9142 | |
| 469 | . . S BPIEN2 =$$INSITEM ^BPSUTIL2( 9002313.59 142,PIEN_" ,"_IEN59,$ P(OPREJ,U, 1),REJIEN, "",,0) | |
| 470 | . . I BPIEN2 <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C an't creat e entry in 9002313.5 9142 subfi le") Q | |
| 471 | . . Q | |
| 472 | . Q | |
| 473 | Q | |
| 474 | ||
| 475 | Modified L ogic (Chan ges are hi ghlighted) | |
| 476 | ||
| 477 | SECBIL59(M OREDATA,IE N59) ; | |
| 478 | ; Populate secondary billing fi elds in BP S TRANSACT ION | |
| 479 | ; MOREDATA array file d into 900 2313.59 | |
| 480 | N BPTYPE,BP STIME,BPCO B | |
| 481 | N AMTIEN,BP IEN1,BPIEN 2,BPZ5914, BPZ,BPZ1,B PZ2,OPAMT, OPAPQ,OPAY D,OPPRA,OP REJ,PIEN,R EJIEN,BPQ | |
| 482 | I +$G(IEN59 )=0 Q | |
| 483 | ; | |
| 484 | I $L($G(MOR EDATA("337 -4C"))) I $$FILLFLDS ^BPSUTIL2( 9002313.59 ,1204,IEN5 9,MOREDATA ("337-4C") )<1 D LOG^ BPSOSL(IEN 59,$T(+0)_ "-Cannot p opulate (# 1204) of ( #9002313.5 9)") ; c ob other p ayments co unt | |
| 485 | I $L($G(MOR EDATA("308 -C8"))) I $$FILLFLDS ^BPSUTIL2( 9002313.59 ,1205,IEN5 9,MOREDATA ("308-C8") )<1 D LOG^ BPSOSL(IEN 59,$T(+0)_ "-Cannot p opulate (# 1205) of ( #9002313.5 9)") ; o ther cover age code | |
| 486 | ; | |
| 487 | ; store sec ondary bil ling relat ed data en tered by t he user - esg 6/14/1 0 | |
| 488 | S BPQ=0 | |
| 489 | S PIEN=0 F S PIEN=$O (MOREDATA( "OTHER PAY ER",PIEN)) Q:'PIEN!B PQ D | |
| 490 | . S OPAYD=$ G(MOREDATA ("OTHER PA YER",PIEN, 0)) Q:OPAY D="" | |
| 491 | . ; | |
| 492 | . ; count u p the numb er of mult iples we h ave in eac h set | |
| 493 | . S BPZ=0 F BPZ1=0:1 S BPZ=$O(M OREDATA("O THER PAYER ",PIEN,"P" ,BPZ)) Q:' BPZ | |
| 494 | . S BPZ=0 F BPZ2=0:1 S BPZ=$O(M OREDATA("O THER PAYER ",PIEN,"R" ,BPZ)) Q:' BPZ | |
| 495 | . I BPZ1,BP Z2 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot have both paym ents and r ejects for the same OTHER PAYE R.") Q | |
| 496 | . ; | |
| 497 | . ; add a n ew entry t o subfile 9002313.59 14 | |
| 498 | . S BPZ5914 =$$INSITEM ^BPSUTIL2( 9002313.59 14,IEN59,P IEN,PIEN," ",,0) | |
| 499 | . I BPZ5914 <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C an't creat e entry in COB OTHER PAYERS mu ltiple of the BPS TR ANSACTION file") Q | |
| 500 | . ; | |
| 501 | . ; set the rest of t he pieces at this le vel | |
| 502 | . I $P(OPAY D,U,2)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.02, PIEN_","_I EN59,$P(OP AYD,U,2))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T(+0)_"-Ca nnot popul ate (#.02) of (#9002 313.5914)" ) Q | |
| 503 | . I $P(OPAY D,U,3)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.03, PIEN_","_I EN59,$P(OP AYD,U,3))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T(+0)_"-Ca nnot popul ate (#.03) of (#9002 313.5914)" ) Q | |
| 504 | . I $P(OPAY D,U,4)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.04, PIEN_","_I EN59,$P(OP AYD,U,4))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T(+0)_"-Ca nnot popul ate (#.04) of (#9002 313.5914)" ) Q | |
| 505 | . I $P(OPAY D,U,5)'="" I $$FILLF LDS^BPSUTI L2(9002313 .5914,.05, PIEN_","_I EN59,$P(OP AYD,U,5))< 1 S BPQ=1 D LOG^BPSO SL(IEN59,$ T(+0)_"-Ca nnot popul ate (#.05) of (#9002 313.5914)" ) Q | |
| 506 | . I $$FILLF LDS^BPSUTI L2(9002313 .5914,.06, PIEN_","_I EN59,BPZ1) <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.06 ) of (#900 2313.5914) ") Q | |
| 507 | . I $$FILLF LDS^BPSUTI L2(9002313 .5914,.07, PIEN_","_I EN59,BPZ2) <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.07 ) of (#900 2313.5914) ") Q | |
| 508 | . ; | |
| 509 | . ; now loo p thru the other pay er payment array | |
| 510 | . S AMTIEN= 0 F S AMT IEN=$O(MOR EDATA("OTH ER PAYER", PIEN,"P",A MTIEN)) Q: 'AMTIEN!BP Q D | |
| 511 | . . S OPAMT= $G(MOREDAT A("OTHER P AYER",PIEN ,"P",AMTIE N,0)) | |
| 512 | . . S OPAPQ= $P(OPAMT,U ,2) ; 34 2-HC other payer amt paid qual ifier (ncp dp 5.1 bla nk is OK) | |
| 513 | . . S OPPRA= $P(OPAMT,U ,3) ; 35 2-NQ, Othe r Payer-Pa tient Resp onsibility Amount | |
| 514 | . . S OPAMT= +OPAMT ; 43 1-DV other payer amt paid | |
| 515 | . . ; | |
| 516 | . . ; add a new entry to subfile 9002313.5 9141 | |
| 517 | . . S BPIEN1 =$$INSITEM ^BPSUTIL2( 9002313.59 141,PIEN_" ,"_IEN59,O PAMT,AMTIE N,"",,0) | |
| 518 | . . I BPIEN1 <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C an't creat e entry in 9002313.5 9141 subfi le") Q | |
| 519 | . . ; | |
| 520 | . . ; set pi ece 2 | |
| 521 | . . I OPAPQ' ="" I $$FI LLFLDS^BPS UTIL2(9002 313.59141, .02,AMTIEN _","_PIEN_ ","_IEN59, OPAPQ)<1 D | |
| 522 | . .. S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.02 ) of (#900 2313.59141 )") | |
| 523 | . .. Q | |
| 524 | . . ; | |
| 525 | . . ; set pi ece 3 | |
| 526 | . . I OPPRA' ="" I $$FI LLFLDS^BPS UTIL2(9002 313.59141, .03,AMTIEN _","_PIEN_ ","_IEN59, OPPRA)<1 D | |
| 527 | . .. S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C annot popu late (#.03 ) of (#900 2313.59141 )") | |
| 528 | . .. Q | |
| 529 | . . ; | |
| 530 | . . Q | |
| 531 | . ; | |
| 532 | . ; now loo p thru the other pay er reject array | |
| 533 | . S REJIEN= 0 F S REJ IEN=$O(MOR EDATA("OTH ER PAYER", PIEN,"R",R EJIEN)) Q: 'REJIEN!BP Q D | |
| 534 | . . S OPREJ= $G(MOREDAT A("OTHER P AYER",PIEN ,"R",REJIE N,0)) Q:OP REJ="" Q: $P(OPREJ,U ,1)="" | |
| 535 | . . ; | |
| 536 | . . ; add a new entry to subfile 9002313.5 9142 | |
| 537 | . . S BPIEN2 =$$INSITEM ^BPSUTIL2( 9002313.59 142,PIEN_" ,"_IEN59,$ P(OPREJ,U, 1),REJIEN, "",,0) | |
| 538 | . . I BPIEN2 <1 S BPQ=1 D LOG^BPS OSL(IEN59, $T(+0)_"-C an't creat e entry in 9002313.5 9142 subfi le") Q | |
| 539 | . . Q | |
| 540 | . Q | |
| 541 | Q | |
| 542 | ||
| 543 | ||
| 544 | ||
| 545 | BPS CLAIMS | |
| 546 | ||
| 547 | COB^BPSOSC D populate s portions of the BP S array wi th data fr om the BPS TRANSACTI ON. This w ill be mod ified to i nclude the new field . After th e BPS arra y is built , it is us ed to crea te an entr y in BPS C LAIMS. | |
| 548 | ||
| 549 | Subroutine Name | |
| 550 | COB^BPSOSC D | |
| 551 | Enhancemen t Category | |
| 552 | New | |
| 553 | Modify | |
| 554 | ||
| 555 | ||
| 556 | Routines W hich Call This Subro utine | |
| 557 | MEDINFO^BP SOSCD | |
| 558 | Current Lo gic | |
| 559 | ||
| 560 | COB(IEN59, MEDN) ; pr ocess the COB fields and build the COB a rray | |
| 561 | ; Code for Payer-Pati ent Respon sibility a nd Benefit Stages mu ltiples | |
| 562 | ; not impl emented ye t (except by certifi cation) | |
| 563 | ; | |
| 564 | ; build arr ay of COB secondary claim data from the BPS Transa ction file - esg - 6 /16/10 | |
| 565 | N COBPIEN,A PDIEN,REJI EN,DATA | |
| 566 | K BPS("RX", MEDN,"OTHE R PAYER") | |
| 567 | ; | |
| 568 | ; Field 337 -4C COB OT HER PAYMEN TS COUNT ( 9002313.59 ,1204) mo ved into [ 1] below | |
| 569 | S BPS("RX", MEDN,"OTHE R PAYER",0 )=$P($G(^B PST(IEN59, 12)),U,4) | |
| 570 | ; | |
| 571 | S COBPIEN=0 F S COBP IEN=$O(^BP ST(IEN59,1 4,COBPIEN) ) Q:'COBPI EN D | |
| 572 | . ; Note th at this wi ll set pie ces 1-7. Piece 8 is reserved for | |
| 573 | . ; Payer- Patient Re sponsibili ty Count a nd is set by the cer tification code | |
| 574 | . S BPS("RX ",MEDN,"OT HER PAYER" ,COBPIEN,0 )=$G(^BPST (IEN59,14, COBPIEN,0) ) | |
| 575 | . ; | |
| 576 | . ; retriev e data fro m other pa yer amount paid mult iple | |
| 577 | . S APDIEN= 0 F S APD IEN=$O(^BP ST(IEN59,1 4,COBPIEN, 1,APDIEN)) Q:'APDIEN D | |
| 578 | . . S DATA=$ G(^BPST(IE N59,14,COB PIEN,1,APD IEN,0)) | |
| 579 | . . S BPS("R X",MEDN,"O THER PAYER ",COBPIEN, "P",APDIEN ,0)=$P(DAT A,"^",1)_" ^"_$$GET1^ DIQ(900231 3.2,$P(DAT A,"^",2),. 01) | |
| 580 | . . Q | |
| 581 | . ; | |
| 582 | . ; retriev e data fro m other pa yer reject multiple | |
| 583 | . S REJIEN= 0 F S REJ IEN=$O(^BP ST(IEN59,1 4,COBPIEN, 2,REJIEN)) Q:'REJIEN D | |
| 584 | . . S BPS("R X",MEDN,"O THER PAYER ",COBPIEN, "R",REJIEN ,0)=$G(^BP ST(IEN59,1 4,COBPIEN, 2,REJIEN,0 )) | |
| 585 | Q | |
| 586 | ||
| 587 | Modified L ogic (Chan ges are hi ghlighted) | |
| 588 | ||
| 589 | COB(IEN59, MEDN) ; pr ocess the COB fields and build the COB a rray | |
| 590 | ; Code for Benefit St ages multi ple not im plemented yet (excep t by | |
| 591 | ; certifica tion) | |
| 592 | ; | |
| 593 | ; build arr ay of COB secondary claim data from the BPS Transa ction file - esg - 6 /16/10 | |
| 594 | N COBPIEN,A PDIEN,REJI EN,DATA | |
| 595 | K BPS("RX", MEDN,"OTHE R PAYER") | |
| 596 | ; | |
| 597 | ; Field 337 -4C COB OT HER PAYMEN TS COUNT ( 9002313.59 ,1204) mo ved into [ 1] below | |
| 598 | S BPS("RX", MEDN,"OTHE R PAYER",0 )=$P($G(^B PST(IEN59, 12)),U,4) | |
| 599 | ; | |
| 600 | S COBPIEN=0 F S COBP IEN=$O(^BP ST(IEN59,1 4,COBPIEN) ) Q:'COBPI EN D | |
| 601 | . ; Note th at this wi ll set pie ces 1-7. Piece 8 is reserved for | |
| 602 | . ; Payer- Patient Re sponsibili ty Count a nd is set by the cer tification code | |
| 603 | . S BPS("RX ",MEDN,"OT HER PAYER" ,COBPIEN,0 )=$G(^BPST (IEN59,14, COBPIEN,0) ) | |
| 604 | . ; | |
| 605 | . ; retriev e data fro m other pa yer amount paid mult iple | |
| 606 | . S APDIEN= 0 F S APD IEN=$O(^BP ST(IEN59,1 4,COBPIEN, 1,APDIEN)) Q:'APDIEN D | |
| 607 | . . S DATA=$ G(^BPST(IE N59,14,COB PIEN,1,APD IEN,0)) | |
| 608 | . . S BPS("R X",MEDN,"O THER PAYER ",COBPIEN, "P",APDIEN ,0)= | |
| 609 | $P(DATA,"^ ",1)_"^"_$ $GET1^DIQ( 9002313.2, $P(DATA,"^ ",2),.01) | |
| 610 | . . S BPS("R X",MEDN,"O THER PAYER ",COBPIEN, "PP",APDIE N,0)=$P(DA TA,"^",3) | |
| 611 | . . I +$P(DA TA,"^",3) S $P(BPS(" RX",MEDN," OTHER PAYE R",COBPIEN ,"PP",APDI EN,0) ,"^" ,2)="06" | |
| 612 | . . Q | |
| 613 | . ; | |
| 614 | . ; retriev e data fro m other pa yer reject multiple | |
| 615 | . S REJIEN= 0 F S REJ IEN=$O(^BP ST(IEN59,1 4,COBPIEN, 2,REJIEN)) Q:'REJIEN D | |
| 616 | . . S BPS("R X",MEDN,"O THER PAYER ",COBPIEN, "R",REJIEN ,0)=$G(^BP ST(IEN59,1 4,COBPIEN, 2,REJIEN,0 )) | |
| 617 | Q | |
| 618 | ||
| 619 | ||
| 620 | ||
| 621 | The “set” code for e ach field in the fil e BPS NCPD P FIELD DE FS sets th e value of that fiel d into the correspon ding field in the BP S CLAIMS f ile. For t he set cod e for fiel ds 351, 35 2, 353, se e SET351^B PSFLD01, S ET352^BPSF LD01, SET3 53^BPSFLD0 1. SET353 is already correct a nd does no t need to be modifie d. SET351 and SET352 will be m odified, a s describe d below. | |
| 622 | ||
| 623 | Subroutine Name | |
| 624 | SET351^BPS FLD01, SET 352^BPSFLD 01 | |
| 625 | Enhancemen t Category | |
| 626 | New | |
| 627 | Modify | |
| 628 | ||
| 629 | ||
| 630 | Current Lo gic | |
| 631 | ||
| 632 | SET351 ; 351-NP Ot her Payer- Patient Re sponsibili ty Amount Qualifier | |
| 633 | I '$G(BPSOP IEN)!'$G(B PSOAIEN) Q | |
| 634 | S $P(^BPSC( BPS(900231 3.02),400, BPS(900231 3.0201),33 7,BPSOPIEN ,3,BPSOAIE N,0),U,1,2 )=BPSOAIEN _U_BPS("X" ) | |
| 635 | S ^BPSC(BPS (9002313.0 2),400,BPS (9002313.0 201),337,B PSOPIEN,3, "B",BPSOAI EN,BPSOAIE N)="" | |
| 636 | S ^BPSC(BPS (9002313.0 2),400,BPS (9002313.0 201),337,B PSOPIEN,3, 0)="^90023 13.401353A ^"_BPSOAIE N_U_BPSOAI EN | |
| 637 | Q | |
| 638 | ; | |
| 639 | SET352 ; 352-NQ Ot her Payer- Patient Re sponsibili ty Amount Paid | |
| 640 | I '$G(BPSOP IEN)!'$G(B PSOAIEN) Q | |
| 641 | S $P(^BPSC( BPS(900231 3.02),400, BPS(900231 3.0201),33 7,BPSOPIEN ,3,BPSOAIE N,0),U,3)= BPS("X") | |
| 642 | Q | |
| 643 | ||
| 644 | Modified L ogic (Chan ges are hi ghlighted) | |
| 645 | ||
| 646 | SET351 ; 3 51-NP Othe r Payer-Pa tient Resp onsibility Amount Qu alifier | |
| 647 | I '$G(BPS OPIEN)!'$G (BPSCOUNT) Q | |
| 648 | S $P(^BPS C(BPS(9002 313.02),40 0,BPS(9002 313.0201), 337,BPSOPI EN,3,BPSCO UNT,0),U,1 ,2)=BPSCOU NT_U_BPS(" X") | |
| 649 | S ^BPSC(B PS(9002313 .02),400,B PS(9002313 .0201),337 ,BPSOPIEN, 3,"B",BPSC OUNT,BPSCO UNT)="" | |
| 650 | S ^BPSC(B PS(9002313 .02),400,B PS(9002313 .0201),337 ,BPSOPIEN, 3,0)="^900 2313.40135 3A^"_BPSCO UNT_U_BPSC OUNT | |
| 651 | Q | |
| 652 | ; | |
| 653 | SET352 ; 3 52-NQ Othe r Payer-Pa tient Resp onsibility Amount Pa id | |
| 654 | I '$G(BPS OPIEN)!'$G (BPSCOUNT) Q | |
| 655 | S $P(^BPS C(BPS(9002 313.02),40 0,BPS(9002 313.0201), 337,BPSOPI EN,3,BPSCO UNT,0),U,3 )=BPS("X") | |
| 656 | Q | |
| 657 | ||
| 658 | ||
| 659 | ||
| 660 | The many C OB fields in BPS NCP DP FIELD D EFS do not each have their own “get” cod e. Rather, COB^BPSOS HF pulls a ll the fie lds and ex ecutes the format an d set code for each. This proc edure will be modifi ed to make sure that all three Other Pay er Patient Responsib ility fiel ds are pop ulated if there is a value in Patient Re sponsibili ty from th e primary claim. | |
| 661 | ||
| 662 | Subroutine Name | |
| 663 | COB^BPSOSH F | |
| 664 | Enhancemen t Category | |
| 665 | New | |
| 666 | Modify | |
| 667 | ||
| 668 | ||
| 669 | Routines W hich Call This Subro utine | |
| 670 | XLOOP^BPSO SCF | |
| 671 | Current Lo gic | |
| 672 | ||
| 673 | COB(FORMAT ,NODE,MEDN ) ; COB fi elds proce ssing, NOD E=160 | |
| 674 | ; ---------- ---------- ---------- ---------- ---------- ---------- --- | |
| 675 | ; The COB d ata is sto red in the following local arr ay: | |
| 676 | ; | |
| 677 | ; BPS( "RX",MEDN, "OTHER PAY ER",..... | |
| 678 | ; | |
| 679 | ; Array bui lt in rout ine BPSOSC D. | |
| 680 | ; Special n ote - Over rides are not allowe d on this multiple. | |
| 681 | ; "Speci al" code i s not acco unted for either. | |
| 682 | ; ---------- ---------- ---------- ---------- ---------- ---------- --- | |
| 683 | ; | |
| 684 | N FIELD,FLD ,OVERRIDE, FLAG,ORD,N CPFLD,BPD, BPD1,BPD2, PCE,BPSOPI EN,BPSOAIE N,BPSORIEN | |
| 685 | S FLAG="FS" | |
| 686 | ; | |
| 687 | ; Quit if t here is no data in t he array | |
| 688 | Q :'$D(BPS(" RX",MEDN," OTHER PAYE R")) | |
| 689 | ; | |
| 690 | ; next we n eed to fig ure out wh ich fields on this f ormat are really | |
| 691 | ; needed, t hen we wil l loop thr ough and p opulate th em | |
| 692 | ; | |
| 693 | D GETFLDS(F ORMAT,NODE ,.FIELD) | |
| 694 | ; | |
| 695 | ; re-sort t his list b y the NCPD P field# | |
| 696 | ; NCPFLD(NC PDP FIELD# ) = intern al field# | |
| 697 | K NCPFLD S ORD=0 F S ORD=$O(FI ELD(ORD)) Q:'ORD S FLD=$P(FIE LD(ORD),U, 2) I FLD'= "" S NCPFL D(FLD)=+FI ELD(ORD) | |
| 698 | ; | |
| 699 | ; see if 33 7-4C is ne eded | |
| 700 | S FLD=337 | |
| 701 | I $D(NCPFLD (FLD)) D | |
| 702 | . S BPS("X" )=$P($G(BP S("RX",MED N,"OTHER P AYER",0)), U,1) ; get | |
| 703 | . I BPS("X" )="" Q | |
| 704 | . D XFLDCOD E^BPSOSCF( NODE,NCPFL D(FLD),FLA G) ; format/se t | |
| 705 | . Q | |
| 706 | ; | |
| 707 | ; now lets get, forma t and set the rest o f the COB fields | |
| 708 | S BPSOPIEN= 0 F S BPS OPIEN=$O(B PS("RX",ME DN,"OTHER PAYER",BPS OPIEN)) Q: 'BPSOPIEN D | |
| 709 | . S BPD=$G( BPS("RX",M EDN,"OTHER PAYER",BP SOPIEN,0)) | |
| 710 | . ; Note th at pieces 8 (Payer-P atient Res ponsibilit y Count) a nd 9 (Bene fit Stage Count) are only set | |
| 711 | . ; by Ce rtificatio n Code | |
| 712 | . F PCE=1:1 :9 D | |
| 713 | . . S FLD=$S (PCE=1:337 ,PCE=2:338 ,PCE=3:339 ,PCE=4:340 ,PCE=5:443 ,PCE=6:341 ,PCE=7:471 , PCE=8:35 3,PCE=9:39 2,1:0) Q:' FLD | |
| 714 | . . I '$D(NC PFLD(FLD)) Q ; field not needed | |
| 715 | . . I $P(BPD ,U,PCE)="" Q ; data is ni l | |
| 716 | . . S BPS("X ")=$P(BPD, U,PCE) ; get | |
| 717 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(FLD),FL AG) ; format/set | |
| 718 | . . Q | |
| 719 | . ; | |
| 720 | . ; Now loo k at the o ther payer amount pa id fields | |
| 721 | . S BPSOAIE N=0 F S B PSOAIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"P ",BPSOAIEN )) Q:'BPSO AIEN D | |
| 722 | . . S BPD1=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," P",BPSOAIE N,0)) | |
| 723 | . . F PCE=1, 2 D | |
| 724 | . .. S FLD=$ S(PCE=1:43 1,PCE=2:34 2,1:0) Q:' FLD | |
| 725 | . .. I '$D(N CPFLD(FLD) ) Q ; field not needed | |
| 726 | . .. I $P(BP D1,U,PCE)= "" Q ; data is n il | |
| 727 | . .. S BPS(" X")=$P(BPD 1,U,PCE) ; get | |
| 728 | . .. D XFLDC ODE^BPSOSC F(NODE,NCP FLD(FLD),F LAG) ; format/se t | |
| 729 | . . Q | |
| 730 | . ; | |
| 731 | . ; Now loo k at the o ther payer reject co de fields | |
| 732 | . S BPSORIE N=0 F S B PSORIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"R ",BPSORIEN )) Q:'BPSO RIEN D | |
| 733 | . . S BPD2=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," R",BPSORIE N,0)) | |
| 734 | . . S FLD=47 2 | |
| 735 | . . I '$D(NC PFLD(FLD)) Q ; field not needed | |
| 736 | . . I BPD2=" " Q ; data is ni l | |
| 737 | . . S BPS("X ")=BPD2 ; get | |
| 738 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(FLD),FL AG) ; format/set | |
| 739 | . . Q | |
| 740 | . ; | |
| 741 | . ; Now loo k at the o ther payer -patient a mount paid fields | |
| 742 | . ; Current ly, this m ultiple is only set by certifi cation cod e | |
| 743 | . S BPSOAIE N=0 F S B PSOAIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"P P",BPSOAIE N)) Q:'BPS OAIEN D | |
| 744 | . . S BPD1=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," PP",BPSOAI EN,0)) | |
| 745 | . . F PCE=1, 2 D | |
| 746 | . .. S FLD=$ S(PCE=1:35 2,PCE=2:35 1,1:0) Q:' FLD | |
| 747 | . .. I '$D(N CPFLD(FLD) ) Q ; field not needed | |
| 748 | . .. I $P(BP D1,U,PCE)= "" Q ; data is n il | |
| 749 | . .. S BPS(" X")=$P(BPD 1,U,PCE) ; get | |
| 750 | . .. D XFLDC ODE^BPSOSC F(NODE,NCP FLD(FLD),F LAG) ; format/se t | |
| 751 | . . Q | |
| 752 | . ; | |
| 753 | . ; Now loo k at the B enefit Sta ges fields | |
| 754 | . ; Current ly, this m ultiple is only set by certifi cation cod e | |
| 755 | . S BPSOAIE N=0 F S B PSOAIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"B S",BPSOAIE N)) Q:'BPS OAIEN D | |
| 756 | . . S BPD1=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," BS",BPSOAI EN,0)) | |
| 757 | . . F PCE=1, 2 D | |
| 758 | . .. S FLD=$ S(PCE=1:39 4,PCE=2:39 3,1:0) Q:' FLD | |
| 759 | . .. I '$D(N CPFLD(FLD) ) Q ; field not needed | |
| 760 | . .. I $P(BP D1,U,PCE)= "" Q ; data is n il | |
| 761 | . .. S BPS(" X")=$P(BPD 1,U,PCE) ; get | |
| 762 | . .. D XFLDC ODE^BPSOSC F(NODE,NCP FLD(FLD),F LAG) ; format/se t | |
| 763 | . . Q | |
| 764 | . Q | |
| 765 | ; | |
| 766 | COBX ; | |
| 767 | Q | |
| 768 | ||
| 769 | Modified L ogic (Chan ges are hi ghlighted) | |
| 770 | ||
| 771 | COB(FORMAT ,NODE,MEDN ) ; COB fi elds proce ssing, NOD E=160 | |
| 772 | ; ---------- ---------- ---------- ---------- ---------- ---------- --- | |
| 773 | ; The COB d ata is sto red in the following local arr ay: | |
| 774 | ; | |
| 775 | ; BPS( "RX",MEDN, "OTHER PAY ER",..... | |
| 776 | ; | |
| 777 | ; Array bui lt in rout ine BPSOSC D. | |
| 778 | ; Special n ote - Over rides are not allowe d on this multiple. | |
| 779 | ; "Speci al" code i s not acco unted for either. | |
| 780 | ; ---------- ---------- ---------- ---------- ---------- ---------- --- | |
| 781 | ; | |
| 782 | N FIELD,FLD ,OVERRIDE, FLAG,ORD,N CPFLD,BPD, BPD1,BPD2, PCE,BPSOPI EN,BPSOAIE N,BPSORIEN ,BPSCOUNT | |
| 783 | S FLAG="FS" | |
| 784 | ; | |
| 785 | ; Quit if t here is no data in t he array | |
| 786 | Q :'$D(BPS(" RX",MEDN," OTHER PAYE R")) | |
| 787 | ; | |
| 788 | ; next we n eed to fig ure out wh ich fields on this f ormat are really | |
| 789 | ; needed, t hen we wil l loop thr ough and p opulate th em | |
| 790 | ; | |
| 791 | D GETFLDS(F ORMAT,NODE ,.FIELD) | |
| 792 | ; | |
| 793 | ; re-sort t his list b y the NCPD P field# | |
| 794 | ; NCPFLD(NC PDP FIELD# ) = intern al field# | |
| 795 | K NCPFLD S ORD=0 F S ORD=$O(FI ELD(ORD)) Q:'ORD S FLD=$P(FIE LD(ORD),U, 2) I FLD'= "" S NCPFL D(FLD)=+FI ELD(ORD) | |
| 796 | ; | |
| 797 | ; see if 33 7-4C is ne eded | |
| 798 | S FLD=337 | |
| 799 | I $D(NCPFLD (FLD)) D | |
| 800 | . S BPS("X" )=$P($G(BP S("RX",MED N,"OTHER P AYER",0)), U,1) ; get | |
| 801 | . I BPS("X" )="" Q | |
| 802 | . D XFLDCOD E^BPSOSCF( NODE,NCPFL D(FLD),FLA G) ; format/se t | |
| 803 | . Q | |
| 804 | ; | |
| 805 | ; now lets get, forma t and set the rest o f the COB fields | |
| 806 | S BPSOPIEN= 0 F S BPS OPIEN=$O(B PS("RX",ME DN,"OTHER PAYER",BPS OPIEN)) Q: 'BPSOPIEN D | |
| 807 | . S BPD=$G( BPS("RX",M EDN,"OTHER PAYER",BP SOPIEN,0)) | |
| 808 | . ; Note th at pieces 8 (Payer-P atient Res ponsibilit y Count) a nd 9 (Bene fit Stage Count) are is only se t by Certi fication C ode | |
| 809 | . F PCE=1:1 :7,9 D | |
| 810 | . . S FLD=$S (PCE=1:337 ,PCE=2:338 ,PCE=3:339 ,PCE=4:340 ,PCE=5:443 ,PCE=6:341 , PCE=7:47 1,PCE=8:35 3,PCE=9:39 2,1:0) Q:' FLD | |
| 811 | . . I '$D(NC PFLD(FLD)) Q ; field not needed | |
| 812 | . . I $P(BPD ,U,PCE)="" Q ; data is ni l | |
| 813 | . . S BPS("X ")=$P(BPD, U,PCE) ; get | |
| 814 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(FLD),FL AG) ; format/set | |
| 815 | . . Q | |
| 816 | . ; | |
| 817 | . ; Now loo k at the o ther payer amount pa id fields | |
| 818 | . S BPSOAIE N=0 F S B PSOAIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"P ",BPSOAIEN )) Q:'BPSO AIEN D | |
| 819 | . . S BPD1=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," P",BPSOAIE N,0)) | |
| 820 | . . F PCE=1, 2 D | |
| 821 | . .. S FLD=$ S(PCE=1:43 1,PCE=2:34 2,1:0) Q:' FLD | |
| 822 | . .. I '$D(N CPFLD(FLD) ) Q ; field not needed | |
| 823 | . .. I $P(BP D1,U,PCE)= "" Q ; data is n il | |
| 824 | . .. S BPS(" X")=$P(BPD 1,U,PCE) ; get | |
| 825 | . .. D XFLDC ODE^BPSOSC F(NODE,NCP FLD(FLD),F LAG) ; format/se t | |
| 826 | . . Q | |
| 827 | . ; | |
| 828 | . ; Now loo k at the o ther payer reject co de fields | |
| 829 | . S BPSORIE N=0 F S B PSORIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"R ",BPSORIEN )) Q:'BPSO RIEN D | |
| 830 | . . S BPD2=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," R",BPSORIE N,0)) | |
| 831 | . . S FLD=47 2 | |
| 832 | . . I '$D(NC PFLD(FLD)) Q ; field not needed | |
| 833 | . . I BPD2=" " Q ; data is ni l | |
| 834 | . . S BPS("X ")=BPD2 ; get | |
| 835 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(FLD),FL AG) ; format/set | |
| 836 | . . Q | |
| 837 | . ; | |
| 838 | . ; Now loo k at the o ther payer -patient a mount paid fields | |
| 839 | . ; Current ly, this m ultiple is only set by certifi cation cod e | |
| 840 | . S BPSCOUN T=0 ; initialize counter | |
| 841 | . S BPSOAIE N=0 F S B PSOAIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"P P",BPSOAIE N)) Q:'BPS OAIEN D | |
| 842 | . . S BPD1=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," PP",BPSOAI EN,0)) | |
| 843 | . . ; | |
| 844 | . . ; Field 352-NQ = O THER PAYER -PAT RESP AMOUNT | |
| 845 | . . I '$D(NC PFLD(352)) Q ; fields not needed | |
| 846 | . . I '+$P(B PD1,U,1) Q ; data is ni l or zero | |
| 847 | . . S BPSCOU NT=BPSCOUN T+1 ; increment counter | |
| 848 | . . S BPS("X ")=$P(BPD1 ,U,1) ; get | |
| 849 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(352),FL AG) ; format/set | |
| 850 | . . ; | |
| 851 | . . ; If Fie ld 352 is populated, then popu late 351 a nd 353. | |
| 852 | . . ; | |
| 853 | . . ; Field 351-NP = O THER PAYER -PAT RESP AMT QLFR | |
| 854 | . . S BPS("X ")=$P(BPD1 ,U,2) ; get | |
| 855 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(351),FL AG) ; format/set | |
| 856 | . . ; | |
| 857 | . . ; Field 353-NR = O THER PAYER -PAT RESP AMT CNT | |
| 858 | . . S BPS("X ")=BPSCOUN T ; get | |
| 859 | . . D XFLDCO DE^BPSOSCF (NODE,NCPF LD(353),FL AG) ; format/set | |
| 860 | . . Q | |
| 861 | . ; | |
| 862 | . ; Now loo k at the B enefit Sta ges fields | |
| 863 | . ; Current ly, this m ultiple is only set by certifi cation cod e | |
| 864 | . S BPSOAIE N=0 F S B PSOAIEN=$O (BPS("RX", MEDN,"OTHE R PAYER",B PSOPIEN,"B S",BPSOAIE N)) Q:'BPS OAIEN D | |
| 865 | . . S BPD1=$ G(BPS("RX" ,MEDN,"OTH ER PAYER", BPSOPIEN," BS",BPSOAI EN,0)) | |
| 866 | . . F PCE=1, 2 D | |
| 867 | . .. S FLD=$ S(PCE=1:39 4,PCE=2:39 3,1:0) Q:' FLD | |
| 868 | . .. I '$D(N CPFLD(FLD) ) Q ; field not needed | |
| 869 | . .. I $P(BP D1,U,PCE)= "" Q ; data is n il | |
| 870 | . .. S BPS(" X")=$P(BPD 1,U,PCE) ; get | |
| 871 | . .. D XFLDC ODE^BPSOSC F(NODE,NCP FLD(FLD),F LAG) ; format/se t | |
| 872 | . . Q | |
| 873 | . Q | |
| 874 | ; | |
| 875 | COBX ; | |
| 876 | Q | |
| 877 | ||
| 878 | ||
| 879 | ||
| 880 | The Outgoi ng Claim R equest | |
| 881 | ||
| 882 | After the entry in B PS CLAIMS is created , the syst em uses th e data in that entry to build the claim to be sent to the pa yer. Befor e looping through th e segments and field s on the p ayer sheet , the syst em copies most of th e fields f rom the BP S CLAIMS r ecord into the BPS a rray. That is done i n GETBPS5^ BPSECX0 an d GETBPS7^ BPSECX0. I t is alrea dy pulling the three Other Pay er Patient Responsib ility fiel ds, so no change is necessary. | |
| 883 | ||
| 884 | After the values in BPS CLAIMS are copie d into the BPS array , the syst em uses th e data in that array to build the claim to be sent to the pa yer. This is largely done in X LOOP^BPSOS H2. This s ubroutine loops thro ugh each f ield on ea ch segment on the pa yer sheet, and for e ach field it pulls t he data fr om BPS CLA IMS and ad ds it to t he segment . XLOOP^BP SOSH2 call s PROCCOB^ BPSOSH2 to pull the COB fields , and both of those procedures are alrea dy pulling the Patie nt Respons ibility fi elds. | |
| 885 | ||
| 886 | ||
| 887 | ECME Testi ng Tool | |
| 888 | ||
| 889 | To facilit ate testin g this new functiona lity, we w ill add th e field PA TIENT PAY AMOUNT to the ECME T esting Too l. (The Te sting Tool allows th e user to modify the claim res ponse. It is only op erational in non-pro duction en vironments .) That fi eld needs to be adde d to file# 9002313.3 2, BPS PAY ER RESPONS E OVERRIDE S. | |
| 890 | ||
| 891 | The table below desc ribes how the new fi eld is goi ng to be a dded to fi le 9002313 .32, BPS P AYER RESPO NSE OVERRI DES. | |
| 892 | ||
| 893 | Field Attr ibutes | |
| 894 | Values | |
| 895 | FILE | |
| 896 | 9002313.32 , BPS PAYE R RESPONSE OVERRIDES | |
| 897 | FIELD NAME | |
| 898 | PATIENT PA Y AMOUNT | |
| 899 | FIELD NUMB ER | |
| 900 | 2.1 | |
| 901 | NODE;PIECE | |
| 902 | 2;10 | |
| 903 | FIELD TYPE | |
| 904 | FREE TEXT | |
| 905 | FIELD LENG TH | |
| 906 | 8 | |
| 907 | INPUT TRAN SFORM | |
| 908 | K:$L(X)>8! ($L(X)<1) X | |
| 909 | HELP PROMP T | |
| 910 | Answer mus t be 1-8 c haracters in length | |
| 911 | DESCRIPTIO N | |
| 912 | This is th e override value tha t will be used for t he payer r esponse fo r billing requests. The value will be us ed to popu late the P ATIENT PAY AMOUNT (# 505) field of RESPON SES (#9002 313.0301) subfile of the BPS R ESPONSES ( #9002313.0 3) file. T his corres ponds to N CPDP code 505-F5. | |
| 913 | ||
| 914 | The table below desc ribes how the file B PS PAYER R ESPONSE OV ERRIDES wi ll be adde d to the b uild. | |
| 915 | ||
| 916 | File Name | |
| 917 | BPS PAYER RESPONSE O VERRIDES | |
| 918 | Send Full or Partial DD | |
| 919 | PARTIAL | |
| 920 | Data Dicti onary Numb er | |
| 921 | 9002313.32 | |
| 922 | Field Numb er | |
| 923 | 2.10 | |
| 924 | Update the Data Dict ionary | |
| 925 | YES | |
| 926 | Send Secur ity Codes | |
| 927 | NO | |
| 928 | Screen to Determine DD Update | |
| 929 | N/A | |
| 930 | Data Comes with File | |
| 931 | NO | |
| 932 | Site’s Dat a | |
| 933 | N/A | |
| 934 | ||
| 935 | ||
| 936 | The proced ure GETOVE R^BPSTEST will be mo dified to prompt the user for the value of the Pat ient Pay A mount when the testi ng tool is run. | |
| 937 | ||
| 938 | Subroutine Name | |
| 939 | GETOVER^BP STEST | |
| 940 | Enhancemen t Category | |
| 941 | New | |
| 942 | Modify | |
| 943 | ||
| 944 | ||
| 945 | Current Lo gic | |
| 946 | ||
| 947 | GETOVER(KE Y1,KEY2,BP SORESP,BPS WHERE,BPST YPE,BPPAYS EQ) ; | |
| 948 | ||
| 949 | ... | |
| 950 | . . ; Overri des to tes t function ality - BP S*1*22 | |
| 951 | . . D PROMPT (BPSTIEN,2 .09,"") ; re conciliati on id | |
| 952 | ; | |
| 953 | W ! D PROMP T(BPSTIEN, .07,0) | |
| 954 | Q | |
| 955 | ||
| 956 | Modified L ogic (Chan ges are hi ghlighted) | |
| 957 | ||
| 958 | GETOVER(KE Y1,KEY2,BP SORESP,BPS WHERE,BPST YPE,BPPAYS EQ) ; | |
| 959 | ||
| 960 | ... | |
| 961 | . . ; Overri des to tes t function ality - BP S*1*22 | |
| 962 | . . D PROMPT (BPSTIEN,2 .09,"") ; re conciliati on id | |
| 963 | . . ; | |
| 964 | . . D PROMPT (BPSTIEN,2 .1,"") ; Pa tient Pay Amount | |
| 965 | ; | |
| 966 | W ! D PROMP T(BPSTIEN, .07,0) | |
| 967 | Q | |
| 968 | ||
| 969 | ||
| 970 | ||
| 971 | The proced ure SETOVE R^BPSTEST will be mo dified to override t he value o f the Pati ent Pay Am ount on th e incoming claim res ponse when the testi ng tool is run. | |
| 972 | ||
| 973 | Subroutine Name | |
| 974 | SETOVER^BP STEST | |
| 975 | Enhancemen t Category | |
| 976 | New | |
| 977 | Modify | |
| 978 | ||
| 979 | ||
| 980 | Current Lo gic | |
| 981 | ||
| 982 | SETOVER(BP STRANS,BPS TYPE,BPSDA TA) ; | |
| 983 | ||
| 984 | ... | |
| 985 | . . ; If pay able or du plicate, g et the BPS PAID amoun t and file it if it | |
| 986 | . . ; exists . Also de lete any r eject code s | |
| 987 | . . I BPSSRE SP="P"!(BP SSRESP="D" ) D | |
| 988 | . .. S BPSPA ID=$$GET1^ DIQ(900231 3.32,BPSTI EN_",",.04 ,"I") | |
| 989 | . .. I BPSPA ID]"" S BP SDATA(1,50 9)=$$DFF^B PSECFM(BPS PAID,8) ; 50 9 Total am ount paid | |
| 990 | . .. ; | |
| 991 | . .. K BPSDA TA(1,510), BPSDATA(1, 511) ; kill Rej ect Count (510) and Reject Cod e (511) | |
| 992 | ||
| 993 | ... | |
| 994 | Q | |
| 995 | ||
| 996 | Modified L ogic (Chan ges are hi ghlighted) | |
| 997 | ||
| 998 | SETOVER(BP STRANS,BPS TYPE,BPSDA TA) ; | |
| 999 | ... | |
| 1000 | . . ; If pay able or du plicate, g et the BPS PAID amoun t and file it if it | |
| 1001 | . . ; exists . Also de lete any r eject code s | |
| 1002 | . . I BPSSRE SP="P"!(BP SSRESP="D" ) D | |
| 1003 | . .. ; | |
| 1004 | . .. S BPSX= $$GET1^DIQ (9002313.3 2,BPSTIEN_ ",",2.1,"I ") ; 505- F5 Patient Pay Amoun t | |
| 1005 | . .. I BPSX] "" S BPSDA TA(1,"505" )=$$DFF^BP SECFM(BPSX ,10) | |
| 1006 | . .. ; | |
| 1007 | . .. S BPSPA ID=$$GET1^ DIQ(900231 3.32,BPSTI EN_",",.04 ,"I") | |
| 1008 | . .. I BPSPA ID]"" S BP SDATA(1,50 9)=$$DFF^B PSECFM(BPS PAID,8) ; 50 9 Total am ount paid | |
| 1009 | . .. ; | |
| 1010 | . .. K BPSDA TA(1,510), BPSDATA(1, 511) ; kill Rej ect Count (510) and Reject Cod e (511) | |
| 1011 | ||
| 1012 | ... | |
| 1013 | Q | |
| 1014 | ||
| 1015 | ||
| 1016 | ||
| 1017 | CRI/Claim Response I nquiry Scr een | |
| 1018 | ||
| 1019 | The CRI/Cl aim Respon se Inquiry will auto matically display th e Other Pa yer Patien t Responsi bility fie lds from t he claim r equest whe never they are popul ated and t he Patient Pay Amoun t on the c laim respo nse whenev er it is p opulated. No change to existin g logic is necessary . This is also true of the VER , which co ntains the CRI. | |
| 1020 | ||
| 1021 | ||
| 1022 | PRO Option and RED A ction | |
| 1023 | ||
| 1024 | Both the P RO option and the RE D action d isplay to the user a list of C OB fields if the cla im is seco ndary. The se fields will be ad ded to thi s display: | |
| 1025 | Other Paye r Patient Responsibi lity Amoun t Qualifie r | |
| 1026 | Other Paye r Patient Responsibi lity Amoun t | |
| 1027 | Both PRO a nd RED rel y on PRIMD ATA^BPSPRR X6 and GET OPAP^BPSPR RX6 to pul l the COB fields fro m the BPS RESPONSE o f the prim ary claim. No change to PRIMDA TA^BPSPRRX 6 is neces sary, but GETOPAP^BP SPRRX6 wil l be updat ed to incl ude the ne w field OT HER PAYER- PATIENT RE SP. | |
| 1028 | ||
| 1029 | If the sys tem is not able to p ull COB fi elds from the primar y claim, t hen both P RO and RED rely on S ECDATA^BPS PRRX6 to p ull the CO B fields f rom the BP S TRANSACT ION of the secondary claim if the system is attemp ting to re submit a s econdary c laim. No c hange to S ECDATA^BPS PRRX6 is n ecessary. As it is c urrently w ritten, SE CDATA^BPSP RRX6 will automatica lly pull t he new fie ld OTHER P AYER-PATIE NT RESP AM T from the BPS TRANS ACTION fil e after th at field h as been ad ded to the file. | |
| 1030 | SECDATA+48 ^BPSPRRX6 | |
| 1031 | .. S BPSPR DAT("OTHER PAYER",CO BPIEN,"P", APDIEN,0)= | |
| 1032 | $G(^BPST(I EN59SEC,14 ,COBPIEN,1 ,APDIEN,0) ) | |
| 1033 | ||
| 1034 | ||
| 1035 | Subroutine Name | |
| 1036 | GETOPAP^BP SPRRX6 | |
| 1037 | Enhancemen t Category | |
| 1038 | New | |
| 1039 | Modify | |
| 1040 | ||
| 1041 | ||
| 1042 | Related Me nu Options or ListMa n Actions | |
| 1043 | PRO Option | |
| 1044 | RED Action | |
| 1045 | Routines W hich Call This Subro utine | |
| 1046 | PRIMDATA^B PSPRRX6 | |
| 1047 | Current Lo gic | |
| 1048 | ||
| 1049 | GETOPAP(BP SRESP,BPSD AT) ; | |
| 1050 | ; Get the O ther Payer Amount Pa id values and qualif iers | |
| 1051 | ; Input: | |
| 1052 | ; BPSRESP = IEN of BPS RESPON SE file | |
| 1053 | ; BPSDAT( N)=Array o f Paid Amo unt^Qualif ier (passe d by refer ence) | |
| 1054 | ; | |
| 1055 | I '$G(BPSRE SP) Q | |
| 1056 | I '$D(^BPSR (BPSRESP,1 000)) Q | |
| 1057 | N CNT,BPS50 9,BPS559,B PS558,BPS5 23,BPS563, BPS562,BPS 521,BPSQUA L,BPSAMNT, BPSTAX,BPS OAP,BPSX | |
| 1058 | S CNT=0 | |
| 1059 | ; Set up D. 0 fields f or COB seg ment | |
| 1060 | S BPS509=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,9)) | |
| 1061 | ; If Total Amount Pai d is a neg ative numb er, set it to zero. | |
| 1062 | ; Zero Pay amount is allowed | |
| 1063 | I BPS509<0 S BPS509=0 | |
| 1064 | ; | |
| 1065 | ; Cognitive Services Qualifier/ Profession al Service Fee Paid | |
| 1066 | S BPS562=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,560)),U ,2)) | |
| 1067 | I BPS562<0 S BPS562=0 | |
| 1068 | I +BPS562 S CNT=CNT+1 ,BPSDAT(CN T)=BPS562_ U_"06" | |
| 1069 | ; | |
| 1070 | ; Incentive Qualifier /Incentive Amt Paid | |
| 1071 | S BPS521=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,21)) | |
| 1072 | I BPS521<0 S BPS521=0 | |
| 1073 | I +BPS521 S CNT=CNT+1 ,BPSDAT(CN T)=BPS521_ U_"05" | |
| 1074 | ; Subtract Incentive Qualifier from Paid Amount for Drug Bene fit | |
| 1075 | S BPS509=BP S509-BPS52 1 | |
| 1076 | ; | |
| 1077 | ; Default a ll Tax val ues to zer o for nega tive value s | |
| 1078 | S BPS559=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,550)),U ,9)) ; Per centage Sa les Tax Pa id | |
| 1079 | I BPS559<0 S BPS559=0 | |
| 1080 | S BPS558=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,550)),U ,8)) ; Fla t Sales Ta x Paid | |
| 1081 | I BPS558<0 S BPS558=0 | |
| 1082 | S BPS523=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,23)) ; Am ount Attri buted to S ales Tax | |
| 1083 | I BPS523<0 S BPS523=0 | |
| 1084 | ; | |
| 1085 | ; Sales Tax Qualifier | |
| 1086 | S BPSTAX=BP S559+BPS55 8-BPS523 | |
| 1087 | I BPSTAX<0 S BPSTAX=0 | |
| 1088 | I +BPSTAX S CNT=CNT+1 ,BPSDAT(CN T)=BPSTAX_ U_"10" | |
| 1089 | ; Subtract Sales Tax Qualifier from Paid Amount for Drug Bene fit | |
| 1090 | S BPS509=BP S509-BPSTA X | |
| 1091 | ; | |
| 1092 | ; Set OTHER AMOUNT PA ID multipl es | |
| 1093 | S BPS563=0 F S BPS56 3=$O(^BPSR (BPSRESP,1 000,1,563. 01,BPS563) ) Q:BPS563 ="" D | |
| 1094 | . S BPSQUAL =$P($G(^BP SR(BPSRESP ,1000,1,56 3.01,BPS56 3,1)),U,1) | |
| 1095 | . ; Quit if qualifier = 99 sinc e there is no NCPDP mapping fo r this qua lifier | |
| 1096 | . Q:BPSQUAL ']""!(BPSQ UAL=99) | |
| 1097 | . S BPSAMNT =$$DFF2EXT ^BPSECFM($ P($G(^BPSR (BPSRESP,1 000,1,563. 01,BPS563, 1)),U,2)) | |
| 1098 | . ; Default negative amounts to zero | |
| 1099 | . I BPSAMNT <0 S BPSAM NT=0 | |
| 1100 | . I $D(BPSO AP(BPSQUAL )) S BPSOA P(BPSQUAL) =BPSOAP(BP SQUAL)+BPS AMNT | |
| 1101 | . I '$D(BPS OAP(BPSQUA L)) S BPSO AP(BPSQUAL )=BPSAMNT | |
| 1102 | . ; Subtrac t Amount i f Qualifie r is 01, 0 2, 03, 04, 09 or 11 | |
| 1103 | . I "010203 040911"[BP SQUAL S BP S509=BPS50 9-BPSAMNT | |
| 1104 | I $D(BPSOAP ) D | |
| 1105 | . S BPSX="" F S BPSX =$O(BPSOAP (BPSX)) Q: BPSX="" D | |
| 1106 | . . S CNT=C NT+1,BPSDA T(CNT)=BPS OAP(BPSX)_ U_$$GETPDI EN(BPSX) | |
| 1107 | ; Set Drug Benefit Qu alifier | |
| 1108 | I BPS509<0 S BPS509=0 | |
| 1109 | S CNT=CNT+1 ,BPSDAT(CN T)=BPS509_ U_$$GETPDI EN("07") | |
| 1110 | Q | |
| 1111 | ||
| 1112 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1113 | ||
| 1114 | GETOPAP(BP SRESP,BPSD AT) ; | |
| 1115 | ; Get the O ther Payer Amount Pa id values and qualif iers | |
| 1116 | ; Input: | |
| 1117 | ; BPSRESP = IEN of BPS RESPON SE file | |
| 1118 | ; BPSDAT( N)= Array of Other P ayer field s (passed by referen ce) | |
| 1119 | ; [1] Paid Amou nt | |
| 1120 | ; [2] Qualifier | |
| 1121 | ; [3] Other Pay er Patient Responsib ility Amou nt | |
| 1122 | ; | |
| 1123 | I '$G(BPSRE SP) Q | |
| 1124 | I '$D(^BPSR (BPSRESP,1 000)) Q | |
| 1125 | N CNT,BPS50 5,BPS509,B PS559,BPS5 58,BPS523, BPS563,BPS 562,BPS521 ,BPSQUAL,B PSAMNT,BPS TAX,BPSOAP ,BPSX | |
| 1126 | S CNT=0 | |
| 1127 | ; Set up D. 0 fields f or COB seg ment | |
| 1128 | S BPS509=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,9)) | |
| 1129 | ; If Total Amount Pai d is a neg ative numb er, set it to zero. | |
| 1130 | ; Zero Pay amount is allowed | |
| 1131 | I BPS509<0 S BPS509=0 | |
| 1132 | ; | |
| 1133 | ; Cognitive Services Qualifier/ Profession al Service Fee Paid | |
| 1134 | S BPS562=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,560)),U ,2)) | |
| 1135 | I BPS562<0 S BPS562=0 | |
| 1136 | I +BPS562 S CNT=CNT+1 ,BPSDAT(CN T)=BPS562_ U_"06" | |
| 1137 | ; | |
| 1138 | ; Incentive Qualifier /Incentive Amt Paid | |
| 1139 | S BPS521=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,21)) | |
| 1140 | I BPS521<0 S BPS521=0 | |
| 1141 | I +BPS521 S CNT=CNT+1 ,BPSDAT(CN T)=BPS521_ U_"05" | |
| 1142 | ; Subtract Incentive Qualifier from Paid Amount for Drug Bene fit | |
| 1143 | S BPS509=BP S509-BPS52 1 | |
| 1144 | ; | |
| 1145 | ; Default a ll Tax val ues to zer o for nega tive value s | |
| 1146 | S BPS559=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,550)),U ,9)) ; Per centage Sa les Tax Pa id | |
| 1147 | I BPS559<0 S BPS559=0 | |
| 1148 | S BPS558=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,550)),U ,8)) ; Fla t Sales Ta x Paid | |
| 1149 | I BPS558<0 S BPS558=0 | |
| 1150 | S BPS523=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,23)) ; Am ount Attri buted to S ales Tax | |
| 1151 | I BPS523<0 S BPS523=0 | |
| 1152 | ; | |
| 1153 | ; Sales Tax Qualifier | |
| 1154 | S BPSTAX=BP S559+BPS55 8-BPS523 | |
| 1155 | I BPSTAX<0 S BPSTAX=0 | |
| 1156 | I +BPSTAX S CNT=CNT+1 ,BPSDAT(CN T)=BPSTAX_ U_"10" | |
| 1157 | ; Subtract Sales Tax Qualifier from Paid Amount for Drug Bene fit | |
| 1158 | S BPS509=BP S509-BPSTA X | |
| 1159 | ; | |
| 1160 | ; Set OTHER AMOUNT PA ID multipl es | |
| 1161 | S BPS563=0 F S BPS56 3=$O(^BPSR (BPSRESP,1 000,1,563. 01,BPS563) ) Q:BPS563 ="" D | |
| 1162 | . S BPSQUAL =$P($G(^BP SR(BPSRESP ,1000,1,56 3.01,BPS56 3,1)),U,1) | |
| 1163 | . ; Quit if qualifier = 99 sinc e there is no NCPDP mapping fo r this qua lifier | |
| 1164 | . Q:BPSQUAL ']""!(BPSQ UAL=99) | |
| 1165 | . S BPSAMNT =$$DFF2EXT ^BPSECFM($ P($G(^BPSR (BPSRESP,1 000,1,563. 01,BPS563, 1)),U,2)) | |
| 1166 | . ; Default negative amounts to zero | |
| 1167 | . I BPSAMNT <0 S BPSAM NT=0 | |
| 1168 | . I $D(BPSO AP(BPSQUAL )) S BPSOA P(BPSQUAL) =BPSOAP(BP SQUAL)+BPS AMNT | |
| 1169 | . I '$D(BPS OAP(BPSQUA L)) S BPSO AP(BPSQUAL )=BPSAMNT | |
| 1170 | . ; Subtrac t Amount i f Qualifie r is 01, 0 2, 03, 04, 09 or 11 | |
| 1171 | . I "010203 040911"[BP SQUAL S BP S509=BPS50 9-BPSAMNT | |
| 1172 | I $D(BPSOAP ) D | |
| 1173 | . S BPSX="" F S BPSX =$O(BPSOAP (BPSX)) Q: BPSX="" D | |
| 1174 | . . S CNT=C NT+1,BPSDA T(CNT)=BPS OAP(BPSX)_ U_$$GETPDI EN(BPSX) | |
| 1175 | ; Set Drug Benefit Qu alifier | |
| 1176 | I BPS509<0 S BPS509=0 | |
| 1177 | ; Set Patie nt Pay Amo unt | |
| 1178 | S BPS505=$$ DFF2EXT^BP SECFM($P($ G(^BPSR(BP SRESP,1000 ,1,500)),U ,5)) | |
| 1179 | ; | |
| 1180 | S CNT=CNT+1 ,BPSDAT(CN T)=BPS509_ U_$$GETPDI EN("07")_U _BPS505 | |
| 1181 | Q | |
| 1182 | ||
| 1183 | ||
| 1184 | ||
| 1185 | Both the P RO option and the RE D action r ely on DIS PSEC^BPSPR RX3 to dis play the C OB fields. DISPSEC^B PSPRRX3 wi ll be upda ted to inc lude the n ew fields. | |
| 1186 | ||
| 1187 | Subroutine Name | |
| 1188 | DISPSEC^BP SPRRX3 | |
| 1189 | Enhancemen t Category | |
| 1190 | New | |
| 1191 | Modify | |
| 1192 | ||
| 1193 | ||
| 1194 | Related Me nu Options or ListMa n Actions | |
| 1195 | PRO Option | |
| 1196 | RED Action | |
| 1197 | Routines W hich Call This Subro utine | |
| 1198 | PROMPTS^BP SPRRX3 | |
| 1199 | Current Lo gic | |
| 1200 | ||
| 1201 | DISPSEC(BP SPRARR) ; | |
| 1202 | ; Validate and Displa y the curr ent second ary insura nce inform ation and prompt to edit. | |
| 1203 | ; Input: | |
| 1204 | ; BPSPARR - Array o f COB data , passed b y referenc e | |
| 1205 | ; | |
| 1206 | N BPSPIEN,B PSCOB,BPSC OV,BPX,BPS COV,DATA | |
| 1207 | ; | |
| 1208 | ; Other Pay er IEN def aults to 1 since we don't do t ertiary | |
| 1209 | S BPSPIEN=1 ,BPSCOB="S ECONDARY" | |
| 1210 | ; | |
| 1211 | ; Get Cover age Code | |
| 1212 | S BPSCOV=$G (BPSPRARR( "308-C8")) | |
| 1213 | I BPSCOV="0 2" S BPSCO V="02 (OTH ER COVERAG E EXISTS - PAYMENT C OLLECTED)" | |
| 1214 | E I BPSCOV ="03" S BP SCOV="03 ( OTHER COVE RAGE EXIST S - THIS C LAIM NOT C OVERED)" | |
| 1215 | E S BPSCOV ="04 (OTHE R COVERAGE EXISTS - PAYMENT NO T COLLECTE D)" | |
| 1216 | ; | |
| 1217 | ; Write Dat a | |
| 1218 | W !!,"Data for Second ary Claim" | |
| 1219 | W !,"------ ---------- --------" | |
| 1220 | W !,"Insura nce: "_$G (BPSPRARR( "INS NAME" ))_" CO B: "_BPSCO B | |
| 1221 | W !,"Rate T ype: "_$$ GET1^DIQ(3 99.3,$G(BP SPRARR("RT YPE"))_"," ,.01,,,,) | |
| 1222 | W !,"Other Coverage C ode: "_BP SCOV | |
| 1223 | W !,"Other Payer Cove rage Type: 01 (PRIM ARY)" | |
| 1224 | W !,"Other Payer ID Q ualifier: 03 (BANK INFORMATIO N NUMBER ( BIN))" | |
| 1225 | W !,"Other Payer ID: "_$P($G(B PSPRARR("O THER PAYER ",BPSPIEN, 0)),U,4) | |
| 1226 | W !,"Other Payer Date : "_$$FMT E^XLFDT($P ($G(BPSPRA RR("OTHER PAYER",BPS PIEN,0)),U ,5)) | |
| 1227 | ; | |
| 1228 | ; Write Pai d Amounts if previou s claim if they are there | |
| 1229 | I $D(BPSPRA RR("OTHER PAYER",BPS PIEN,"P")) D | |
| 1230 | . S BPX=0 F S BPX=$O (BPSPRARR( "OTHER PAY ER",BPSPIE N,"P",BPX) ) Q:BPX="" D | |
| 1231 | . . S DATA= BPSPRARR(" OTHER PAYE R",BPSPIEN ,"P",BPX,0 ) | |
| 1232 | . . W !,"Ot her Payer Paid Quali fier: "_$ $GET1^DIQ( 9002313.2, $P(DATA,U, 2),.01)_" ("_$$GET1^ DIQ(900231 3.2,$P(DAT A,U,2),.02 )_")" | |
| 1233 | . . W !,"Ot her Payer Amount Pai d: $"_$FN ($P(DATA,U ,1),",",2) | |
| 1234 | ; | |
| 1235 | ; Write Rej ect Codes if previou s claims i f they are there | |
| 1236 | I $D(BPSPRA RR("OTHER PAYER",BPS PIEN,"R")) D | |
| 1237 | . S BPX=0 F S BPX=$O (BPSPRARR( "OTHER PAY ER",BPSPIE N,"R",BPX) ) Q:BPX="" D | |
| 1238 | . . W !,"Ot her Payer Reject Cod e: "_$$TR ANREJ^BPSE CFM($G(BPS PRARR("OTH ER PAYER", BPSPIEN,"R ",BPX,0))) | |
| 1239 | Q | |
| 1240 | ||
| 1241 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1242 | ||
| 1243 | DISPSEC(BP SPRARR) ; | |
| 1244 | ; Validate and Displa y the curr ent second ary insura nce inform ation and prompt to edit. | |
| 1245 | ; Input: | |
| 1246 | ; BPSPRAR R - Array of COB dat a, passed by referen ce | |
| 1247 | ; | |
| 1248 | N BPSPIEN,B PSCOB,BPSC OV,BPX,BPS COV,DATA | |
| 1249 | ; | |
| 1250 | ; Other Pay er IEN def aults to 1 since we don't do t ertiary | |
| 1251 | S BPSPIEN=1 ,BPSCOB="S ECONDARY" | |
| 1252 | ; | |
| 1253 | ; Get Cover age Code | |
| 1254 | S BPSCOV=$G (BPSPRARR( "308-C8")) | |
| 1255 | I BPSCOV="0 2" S BPSCO V="02 (OTH ER COVERAG E EXISTS - PAYMENT C OLLECTED)" | |
| 1256 | E I BPSCOV ="03" S BP SCOV="03 ( OTHER COVE RAGE EXIST S - THIS C LAIM NOT C OVERED)" | |
| 1257 | E S BPSCOV ="04 (OTHE R COVERAGE EXISTS - PAYMENT NO T COLLECTE D)" | |
| 1258 | ; | |
| 1259 | ; Write Dat a | |
| 1260 | W !!,"Data for Second ary Claim" | |
| 1261 | W !,"------ ---------- --------" | |
| 1262 | W !,"Insura nce: "_$G (BPSPRARR( "INS NAME" ))_" CO B: "_BPSCO B | |
| 1263 | W !,"Rate T ype: "_$$ GET1^DIQ(3 99.3,$G(BP SPRARR("RT YPE"))_"," ,.01,,,,) | |
| 1264 | W !,"Other Coverage C ode: "_BP SCOV | |
| 1265 | W !,"Other Payer Cove rage Type: 01 (PRIM ARY)" | |
| 1266 | W !,"Other Payer ID Q ualifier: 03 (BANK INFORMATIO N NUMBER ( BIN))" | |
| 1267 | W !,"Other Payer ID: "_$P($G(B PSPRARR("O THER PAYER ",BPSPIEN, 0)),U,4) | |
| 1268 | W !,"Other Payer Date : "_$$FMT E^XLFDT($P ($G(BPSPRA RR("OTHER PAYER",BPS PIEN,0)),U ,5)) | |
| 1269 | ; | |
| 1270 | ; Write Pai d Amounts if previou s claim if they are there | |
| 1271 | I $D(BPSPRA RR("OTHER PAYER",BPS PIEN,"P")) D | |
| 1272 | . S BPX=0 F S BPX=$O (BPSPRARR( "OTHER PAY ER",BPSPIE N,"P",BPX) ) Q:BPX="" D | |
| 1273 | . . S DATA= BPSPRARR(" OTHER PAYE R",BPSPIEN ,"P",BPX,0 ) | |
| 1274 | . . W !,"Ot her Payer Paid Quali fier: "_$ $GET1^DIQ( 9002313.2, $P(DATA,U, 2),.01)_" ("_$$GET1^ DIQ(900231 3.2,$P(DAT A,U,2),.02 )_")" | |
| 1275 | . . W !,"Ot her Payer Amount Pai d: $"_$FN ($P(DATA,U ,1),",",2) | |
| 1276 | . . I $P(DA TA,U,3)'=" " D | |
| 1277 | . . . W !," Other Paye r Patient Responsibi lity Amoun t Qualifie r:" | |
| 1278 | . . . W !?4 0,"06 (AMT REPORTED BY PRIOR P AYER)" | |
| 1279 | . . . W !," Other Paye r Patient Responsibi lity Amoun t: $"_$FN ($P(DATA,U ,3),",",2) | |
| 1280 | ; | |
| 1281 | ; Write Rej ect Codes if previou s claims i f they are there | |
| 1282 | I $D(BPSPRA RR("OTHER PAYER",BPS PIEN,"R")) D | |
| 1283 | . S BPX=0 F S BPX=$O (BPSPRARR( "OTHER PAY ER",BPSPIE N,"R",BPX) ) Q:BPX="" D | |
| 1284 | . . W !,"Ot her Payer Reject Cod e: "_$$TR ANREJ^BPSE CFM($G(BPS PRARR("OTH ER PAYER", BPSPIEN,"R ",BPX,0))) | |
| 1285 | Q | |
| 1286 | ||
| 1287 | ||
| 1288 | ||
| 1289 | Improvemen t to Devel oper Log | |
| 1290 | ||
| 1291 | During the claim sub mission pr ocess, ent ries are a dded to th e Develope r Log to c reate an a udit trail of the pr ocess. Sin ce the ent ry in the BPS REQUES TS file ex ists for a short tim e – being created at the start of claim submission and delet ed before the end – the entire contents of that fi le entry w ill be add ed to the Developer Log. | |
| 1292 | ||
| 1293 | Subroutine Name | |
| 1294 | BACKGR^BPS OSRB | |
| 1295 | Enhancemen t Category | |
| 1296 | New | |
| 1297 | Modify | |
| 1298 | ||
| 1299 | ||
| 1300 | Current Lo gic | |
| 1301 | ||
| 1302 | . . . D LOG ^BPSOSL(IE N59,$T(+0) _"-Process ing the Ac tivated re quest "_BP IEN77) | |
| 1303 | . . . D LOG ^BPSOSL(IE N59,$T(+0) _"-Dequeui ng. Type is "_TYPE) | |
| 1304 | ||
| 1305 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1306 | ||
| 1307 | . . . D LOG ^BPSOSL(IE N59,$T(+0) _"-Process ing the Ac tivated re quest "_BP IEN77) | |
| 1308 | . . . D LOG 77(IEN59,B PIEN77) ; Log entir e contents of the re quest. | |
| 1309 | . . . D LOG ^BPSOSL(IE N59,$T(+0) _"-Dequeui ng. Type is "_TYPE) | |
| 1310 | ||
| 1311 | ||
| 1312 | ||
| 1313 | Subroutine Name | |
| 1314 | LOG77^BPSO SRB | |
| 1315 | Enhancemen t Category | |
| 1316 | New | |
| 1317 | Modify | |
| 1318 | ||
| 1319 | ||
| 1320 | Current Lo gic | |
| 1321 | ||
| 1322 | n/a | |
| 1323 | ||
| 1324 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1325 | ||
| 1326 | LOG77(IEN5 9,BPIEN77) ; Log ent ire conten ts of the request. | |
| 1327 | N A | |
| 1328 | M A=^BPS(90 02313.77,B PIEN77) | |
| 1329 | D LOG^BPSOS L(IEN59,$T (+0)_"-Con tents of ^ BPS(900231 3.77,"_BPI EN77_"), B PS REQUEST :") | |
| 1330 | D LOGARRAY^ BPSOSL(IEN 59,"A") | |
| 1331 | Q | |
| 1332 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.