Produced by Araxis Merge on 4/17/2018 8:06:40 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+US399+v1.01.docx | Wed Dec 13 12:40:09 2017 UTC |
| 2 | MCCF EDI TAS ePharmacy 031218.zip\MCCF EDI TAS ePharmacy 031218 | TAS+ePhm+SDD+US399+v1.01.docx | Tue Apr 17 22:29:26 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 1 | 3282 |
| 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 US399 | |
| 2 | System Des ign Docume nt | |
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| 8 | Department of Vetera ns Affairs | |
| 9 | July 2017 | |
| 10 | Version 1. 01 | |
| 11 | User Story Number: U SRX-45 | |
| 12 | User Story Name: Mod ify the RE D Resubmit w/Edits o ption to a llow a use r to submi t fields n ot on the payer shee t | |
| 13 | Product Ba cklog ID: | |
| 14 | Backlog Pr iority: | |
| 15 | Initial Si zing Estim ate: | |
| 16 | Rational I D: | |
| 17 | Rally ID: US399 | |
| 18 | ||
| 19 | Design – S ummary | |
| 20 | A claim re quest sent from Vist A to a pay er current ly include s only tho se fields indicated by the pay er sheet p rovided by the payer . This sto ry calls f or giving the user t he ability to add to the claim additiona l fields n ot on the payer shee t. | |
| 21 | ||
| 22 | When the u ser perfor ms the RED / Resubmi t with Edi ts action, the user can enter values for several f ields, the last bein g Delay Re ason Code. Following that prom pt, the sy stem will now allow the user t o select o ne or more fields to be added to the cla im which a re not alr eady on th e payer sh eet and wh ich are no t “stubs” (fields th at have no logic for pulling v alues). Th e system w ill displa y the valu es to be s ent on the claim, an d the user will be a ble to con firm wheth er or not to include that fiel d. The lis t of field s added to the claim will be s tored in a new sub-f ile on the existing file BPS N CPDP OVERR IDE. The v alues to b e sent wil l not be s tored at t hat time. | |
| 23 | ||
| 24 | During the claim sub mission pr ocess, the creation of a claim entry in BPS CLAIMS is done f irst and t hen the cl aim reques t to be se nt to the payer is c reated. | |
| 25 | ||
| 26 | When the c laim entry in BPS CL AIMS is bu ilt, the s ystem loop s through each field on each s egment on the payer sheet. At the conclu sion of lo oping thro ugh all th e fields o n a given segment, t he system will check if there are any ad ditional f ields adde d by the u ser for th at segment (via a cr oss-refere nce of fie lds by seg ment in th e BPS NCPD P OVERRIDE file). If there are additiona l fields t o be added , those fi elds will be added t o that ent ry in BPS CLAIMS. Th e data for those fie lds will b e pulled a t that tim e. | |
| 27 | ||
| 28 | When the c laim reque st is buil t, again t he system loops thro ugh each f ield on ea ch segment on the pa yer sheet. The data for each f ield is pu lled from BPS CLAIMS . At the c onclusion of looping through a ll the fie lds on a g iven segme nt, the sy stem will check if t here are a ny additio nal fields added by the user f or that se gment. If there are additional fields to be added, those fie lds will b e added to the claim request. | |
| 29 | ||
| 30 | List of Co mponents: | |
| 31 | Routine: B PSECX0 | |
| 32 | Routine: B PSOSCF | |
| 33 | Routine: B PSOSH2 | |
| 34 | Routine: B PSRES | |
| 35 | Routine: B PSRES1 | |
| 36 | Routine: P SOBPSU1 | |
| 37 | Routine: P SOBPSU2 | |
| 38 | File: BPS NCPDP FIE LD DEFS | |
| 39 | File: BPS NCPDP OVE RRIDE | |
| 40 | File: BPS NCPDP SEG MENTS | |
| 41 | ||
| 42 | Design – D etail | |
| 43 | ||
| 44 | When the u ser perfor ms the RED action, a message i s added to the Activ ity Log. T hat messag e will be enhanced t o a) indic ate specif ically tha t the user performed the RED a ction, and b) indica te the Dat e of Servi ce used on the resub mitted cla im if the user opted to use a date diffe rent than the Releas e Date. | |
| 45 | ||
| 46 | Subroutine Name | |
| 47 | DOSELCTD^B PSRES | |
| 48 | Enhancemen t Category | |
| 49 | New | |
| 50 | Modify | |
| 51 | Delete | |
| 52 | No Change | |
| 53 | Current Lo gic | |
| 54 | ||
| 55 | DOSELCTD(B PRXI) ; | |
| 56 | N BP02,BP59 ,BPBILL,BP CLTOT,BPDF N,BPDOSDT, BPOVRIEN,B PQ,BPRXIEN ,BPRXR,BPS TATUS,BPUP DFLG | |
| 57 | N BPCOB,BPS URE,BPPTRE S,BPPHSRV, BPDLYRS,CO BDATA,BPPR IOPN,BPSPC LS | |
| 58 | S (BPQ)="" | |
| 59 | S (BPCLTOT, BPUPDFLG)= 0 | |
| 60 | ; | |
| 61 | ... | |
| 62 | ; Display se lected cla im and ask to submit | |
| 63 | S BPDFN=+$P ($G(^BPST( BP59,0)),U ,6) | |
| 64 | W !,"You've chosen to RESUBMIT the follow ing prescr iption for "_$E($$PA TNAME^BPSS CRU2(BPDFN ),1,13) | |
| 65 | W !,@VALMAR @(+$P(BPRX I,U,5),0) | |
| 66 | S BPQ=$$YES NO^BPSSCRR S("Are you sure?(Y/N )") | |
| 67 | I BPQ'=1 S BPQ="^" G XRES | |
| 68 | ; | |
| 69 | ... | |
| 70 | ; Prompt for EDIT Info rmation | |
| 71 | S BPOVRIEN= $$PROMPTS( BP59,BP02, BPRXIEN,BP RXR,BPCOB, .BPDOSDT,. COBDATA) I BPOVRIEN= -1 G XRES | |
| 72 | ; | |
| 73 | ; Submit th e claim | |
| 74 | S BPBILL=$$ EN^BPSNCPD P(BPRXIEN, BPRXR,BPDO SDT,"ERES" ,"","ECME RESUBMIT", "",BPOVRIE N,"","",BP COB,"F","" ,"",$G(COB DATA("PLAN ") | |
| 75 | ),.COBDATA ,$G(COBDAT A("RTYPE") )) | |
| 76 | ; | |
| 77 | ; Print Retu rn Value M essage | |
| 78 | W !! | |
| 79 | W :+BPBILL>0 $S(+BPBIL L=10:"Reve rsal but n o Resubmit :",1:"Not Processed: "),!," " | |
| 80 | ; | |
| 81 | ; Change Ret urn Messag e for SC/E I | |
| 82 | S :$P(BPBILL ,U,2)="NEE DS SC DETE RMINATION" $P(BPBILL ,U,2)="NEE DS SC/EI D ETERMINATI ON" | |
| 83 | W $P(BPBILL ,U,2) | |
| 84 | ; | |
| 85 | ; 0 Prescrip tion/Fill successful ly submitt ed to ECME | |
| 86 | ; 1 ECME did not submi t prescrip tion/fill | |
| 87 | ; 2 IB says prescripti on/fill is not ECME billable o r the data returned from IB is not valid | |
| 88 | ; 3 ECME clo sed the cl aim but di d not subm it it to t he payer | |
| 89 | ; 4 Unable t o queue th e ECME cla im | |
| 90 | ; 5 Invalid input | |
| 91 | ; 10 Reversa l Processe d But Clai m Was Not Resubmitte d | |
| 92 | ; | |
| 93 | I +BPBILL=0 D | |
| 94 | . D ECMEACT ^PSOBPSU1( +BPRXIEN,+ BPRXR,"Cla im resubmi tted to 3r d party pa yer: ECME USER's SCR EEN-"_$S(B PCOB=1:"p" ,BPCOB=2:" s" | |
| 95 | ,1:"")_$$I NSNAME^BPS SCRU6(BP59 )) | |
| 96 | . S BPUPDFL G=1,BPCLTO T=1 | |
| 97 | XRES I BPCLTOT W !,BPCLTOT ," claim", $S(BPCLTOT '=1:"s hav e",1:" has ")," been resubmitte d.",! | |
| 98 | D PAUSE^VAL M1 | |
| 99 | Q BPUPDFLG | |
| 100 | ; | |
| 101 | XRES2 I BPCLTOT W !,BPCLTOT ," claim", $S(BPCLTOT '=1:"s hav e",1:" has ")," been resubmitte d.",! | |
| 102 | Q BPUPDFLG | |
| 103 | ||
| 104 | Modified L ogic (Chan ges are hi ghlighted) | |
| 105 | ||
| 106 | DOSELCTD(B PRXI) ; | |
| 107 | N BP02,BP59 ,BPADDLTXT ,BPBILL,BP CLTOT,BPDF N,BPDOSDT, BPOVRIEN,B PQ,BPRXIEN ,BPRXR,BPS TATUS,BPUP DFLG | |
| 108 | N BPCOB,BPS URE,BPPTRE S,BPPHSRV, BPDLYRS,CO BDATA,BPPR IOPN,BPSPC LS,BPMSG | |
| 109 | S BPQ="" | |
| 110 | S BPADDLTXT ="" | |
| 111 | S (BPCLTOT, BPUPDFLG)= 0 | |
| 112 | ; | |
| 113 | ... | |
| 114 | ; Display se lected cla im and ask to submit | |
| 115 | S BPDFN=+$P ($G(^BPST( BP59,0)),U ,6) | |
| 116 | W !,"You've chosen to RESUBMIT the follow ing prescr iption for "_$E($$PA TNAME^BPSS CRU2(BPDFN ),1,13) | |
| 117 | W !,@VALMAR @(+$P(BPRX I,U,5),0) | |
| 118 | S BPQ=$$YES NO^BPSSCRR S("Are you sure?(Y/N )") | |
| 119 | I BPQ'=1 S BPQ="^" G XRES | |
| 120 | ; | |
| 121 | ... | |
| 122 | ; Prompt for EDIT Info rmation | |
| 123 | S BPOVRIEN= $$PROMPTS( BP59,BP02, BPRXIEN,BP RXR,BPCOB, .BPDOSDT,. COBDATA,.B PADDLTXT) I BPOVRIEN =-1 G XRES | |
| 124 | ; | |
| 125 | ; Submit th e claim | |
| 126 | S BPBILL=$$ EN^BPSNCPD P(BPRXIEN, BPRXR,BPDO SDT,"ERES" ,"","ECME RESUBMIT", "",BPOVRIE N,"","",BP COB,"F","" ,"",$G(COB DATA("PLAN ") | |
| 127 | ),.COBDATA ,$G(COBDAT A("RTYPE") )) | |
| 128 | ; | |
| 129 | ; Print Retu rn Value M essage | |
| 130 | W !! | |
| 131 | W :+BPBILL>0 $S(+BPBIL L=10:"Reve rsal but n o Resubmit :",1:"Not Processed: "),!," " | |
| 132 | ; | |
| 133 | ; Change Ret urn Messag e for SC/E I | |
| 134 | S :$P(BPBILL ,U,2)="NEE DS SC DETE RMINATION" $P(BPBILL ,U,2)="NEE DS SC/EI D ETERMINATI ON" | |
| 135 | W $P(BPBILL ,U,2) | |
| 136 | ; | |
| 137 | ; 0 Prescrip tion/Fill successful ly submitt ed to ECME | |
| 138 | ; 1 ECME did not submi t prescrip tion/fill | |
| 139 | ; 2 IB says prescripti on/fill is not ECME billable o r the data returned from IB is not valid | |
| 140 | ; 3 ECME clo sed the cl aim but di d not subm it it to t he payer | |
| 141 | ; 4 Unable t o queue th e ECME cla im | |
| 142 | ; 5 Invalid input | |
| 143 | ; 10 Reversa l Processe d But Clai m Was Not Resubmitte d | |
| 144 | ; | |
| 145 | I +BPBILL=0 D | |
| 146 | . S BPMSG=" ECME RED R esubmit Cl aim w/Edit s" | |
| 147 | . I BPADDLT XT'="" S B PMSG=BPMSG _": "_BPAD DLTXT | |
| 148 | . S BPMSG=B PMSG_"-"_$ S(BPCOB=1: "p",BPCOB= 2:"s",1:"" )_$$INSNAM E^BPSSCRU6 (BP59) | |
| 149 | . S BPMSG=$ E(BPMSG,1, 100) | |
| 150 | . D ECMEACT ^PSOBPSU1( +BPRXIEN,+ BPRXR,BPMS G) | |
| 151 | . S BPUPDFL G=1,BPCLTO T=1 | |
| 152 | ; | |
| 153 | XRES ; | |
| 154 | I BPCLTOT W !,BPCLTOT ," claim", $S(BPCLTOT '=1:"s hav e",1:" has ")," been resubmitte d.",! | |
| 155 | D PAUSE^VAL M1 | |
| 156 | Q BPUPDFLG | |
| 157 | ; | |
| 158 | XRES2 ; | |
| 159 | I BPCLTOT W !,BPCLTOT ," claim", $S(BPCLTOT '=1:"s hav e",1:" has ")," been resubmitte d.",! | |
| 160 | Q BPUPDFLG | |
| 161 | ||
| 162 | ||
| 163 | ||
| 164 | The subrou tine PROMP TS^BPSRES is part of the RED a ction. It prompts th e user for the curre nt overrid e fields. This subro utine will be modifi ed to call a new sub routine, A DDLFLDS^BP SRES, to a llow the u ser to add fields to the claim . The exis ting logic for savin g the over ride field s will be moved to a new subro utine in B PSRES due to space c onsiderati ons, and t he logic f or saving the additi onal field s will be added to t hat new su broutine. | |
| 165 | ||
| 166 | Subroutine Name | |
| 167 | PROMPTS^BP SRES | |
| 168 | Enhancemen t Category | |
| 169 | New | |
| 170 | Modify | |
| 171 | Delete | |
| 172 | No Change | |
| 173 | Current Lo gic | |
| 174 | ||
| 175 | BPSRES ; BHAM ISC/B EE - ECME SCREEN RES UBMIT W/ED ITS ;3/12/ 08 14:01 | |
| 176 | ; ;1.0;E CLA IMS MGMT E NGINE;**3, 5,7,8,10,1 1,20,21**; JUN 2004;B uild 27 | |
| 177 | ||
| 178 | ... | |
| 179 | ||
| 180 | PROMPTS(BP 59,BP02,BP RXIEN,BPRX R,BPCOB,BP SDOSDT,BPS ECOND) ; | |
| 181 | N %,BP300,B P35401,BPC LCD1,BPCLC D2,BPCLCD3 ,BPFDA,BPF LD,BPOVRIE N,BPMED,BP MSG,BPPSNC D | |
| 182 | N BPPREAUT, BPPRETYP,B PQ,BPRELCD ,DIC,DIR,D IROUT,DTOU T,DUOUT,X, Y,DIRUT,DU P | |
| 183 | N BPCLCDN,B PCLCDX,BPS X | |
| 184 | ... | |
| 185 | ||
| 186 | P1 ; | |
| 187 | ; | |
| 188 | I $$RELDATE ^BPSBCKJ(+ BPRXIEN,+B PRXR)]"" S BPDOSDT=$ $EDITDT(1, BPRXIEN,BP RXR,BP02) I BPDOSDT= "^" S BPQ= -1 G XPROM PTS | |
| 189 | ||
| 190 | ... | |
| 191 | ||
| 192 | ; Delay Reas on Code | |
| 193 | N X,DIC,Y | |
| 194 | S DIC("B")= BPDLYRS | |
| 195 | S DIC(0)="Q EAM",DIC=9 002313.29, DIC("A")=" Delay Reas on Code: " | |
| 196 | D ^DIC | |
| 197 | ; Check for "^" or tim eout | |
| 198 | I ($D(DUOUT ))!($D(DTO UT)) S BPQ =-1 K X,DI C,Y G XPRO MPTS | |
| 199 | S BPDLYRS=$ P(Y,U,2) | |
| 200 | K X,DIC,Y | |
| 201 | ; | |
| 202 | ; If second ary claim, setup sec ondary dat a and allo w user to edit | |
| 203 | ; Get data from the p rimary cla im, if it exists | |
| 204 | I BPCOB=2 D I BPQ=-1 G XPROMPT S | |
| 205 | . N BPSPL59 ,BPRTTP59 | |
| 206 | . S BPRET=$ $PRIMDATA^ BPSPRRX6(B PRXIEN,BPR XR,.BPSECO ND) | |
| 207 | . ; If the primary cl aim data i s missing, get data from the m ost recent secondary claim | |
| 208 | . I 'BPRET, $$SECDATA^ BPSPRRX6(B PRXIEN,BPR XR,.BPSPL5 9,.BPSECON D,.BPRTTP5 9) | |
| 209 | . ; The PRI MARY BILL element is set by $$ SECDATA. If SECDATA is not ca lled, this element w ill be | |
| 210 | . ; missi ng and we will need to create it | |
| 211 | . I '$D(BPS ECOND("PRI MARY BILL" )) D | |
| 212 | . . N BPBILL | |
| 213 | . . S BPBILL =$$PAYBLPR I^BPSUTIL2 (BP59) | |
| 214 | . . I BPBILL >0 S BPSEC OND("PRIMA RY BILL")= BPBILL | |
| 215 | . ; Set fla g telling BPSNCPDP n ot to reco mpile the data from the BPS Tr ansaction and the se condary cl aim | |
| 216 | . S BPSECON D("NEW COB DATA")=1 | |
| 217 | . ; $$PROMP TS display s the data and allow s the user edit the data. | |
| 218 | . S BPQ=$$P ROMPTS^BPS PRRX3(BPRX IEN,BPRXR, BPDOSDT,.B PSECOND) | |
| 219 | ; | |
| 220 | ; Ask to pro ceed | |
| 221 | W ! S BPQ=$ $YESNO^BPS SCRRS("Are you sure? (Y/N)") I BPQ'=1 S B PQ=-1 G XP ROMPTS | |
| 222 | S BPQ=1 | |
| 223 | ; | |
| 224 | ; Save into BPS NCPDP OVERRIDES (#9002313. 511) | |
| 225 | S BPFDA(900 2313.511," +1,",.01)= BP59 | |
| 226 | D NOW^%DTC | |
| 227 | S BPFDA(900 2313.511," +1,",.02)= % | |
| 228 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,303,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+2,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+2,+1,", .02)=BPPSN CD | |
| 229 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,306,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+3,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+3,+1,", .02)=BPREL CD | |
| 230 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,462,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+4,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+4,+1,", .02)=BPPRE AUT | |
| 231 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,461,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+5,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+5,+1,", .02)=BPPRE TYP | |
| 232 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,420,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+6,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+6,+1,", .02)=BPCLC D1_"~"_$G( BPCLCD2)_" ~"_$G(BPCL CD3) | |
| 233 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,384,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+7,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+7,+1,", .02)=BPPTR ES | |
| 234 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,147,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+8,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+8,+1,", .02)=BPPHS RV | |
| 235 | S BPFLD=$O( ^BPSF(9002 313.91,"B" ,357,"")) I BPFLD]"" S BPFDA(9 002313.511 1,"+9,+1," ,.01)=BPFL D,BPFDA(90 02313.5111 ,"+9,+1,", .02)=BPDLY RS | |
| 236 | D UPDATE^DI E("","BPFD A","BPOVRI EN","BPMSG ") | |
| 237 | ; | |
| 238 | I $D(BPMSG( "DIERR")) W !!,"Coul d Not Save Override informatio n into BPS NCPDP OVE RRIDES FIL ES",! S BP Q=-1 G XPR OMPTS | |
| 239 | ; | |
| 240 | XPROMPTS ; | |
| 241 | S BPOVRIEN= $S(BPQ=-1: BPQ,$G(BPO VRIEN(1))] "":BPOVRIE N(1),1:-1) | |
| 242 | Q BPOVRIEN | |
| 243 | ||
| 244 | ||
| 245 | Modified L ogic (Chan ges are hi ghlighted) | |
| 246 | ||
| 247 | BPSRES ; BHAM ISC/B EE - ECME SCREEN RES UBMIT W/ED ITS ;3/12/ 08 14:01 | |
| 248 | ; ;1.0;E CLA IMS MGMT E NGINE;**3, 5,7,8,10,1 1,20,21,23 **;JUN 200 4;Build 27 | |
| 249 | ||
| 250 | ... | |
| 251 | ||
| 252 | PROMPTS(BP 59,BP02,BP RXIEN,BPRX R,BPCOB,BP DOSDT,BPSE COND,BPADD LTXT) ; | |
| 253 | N %,BP300,B P35401,BPC LCD1,BPCLC D2,BPCLCD3 ,BPFDA,BPF LD,BPOVRIE N,BPMED,BP MSG,BPPSNC D | |
| 254 | N BPPREAUT, BPPRETYP,B PQ,BPRELCD ,BPRELEASE DT,DIC,DIR ,DIROUT,DT OUT,DUOUT, X,Y,DIRUT, DUP | |
| 255 | N BPCLCDN,B PCLCDX,BPS X,BPSADDLF LDS | |
| 256 | ... | |
| 257 | ||
| 258 | P1 ; | |
| 259 | ; | |
| 260 | ; If the us er opts to use the D ate of Ser vice inste ad of the | |
| 261 | ; Release D ate, then set BPADDL TXT, which will be u sed when c reating | |
| 262 | ; an entry in the Act ivity Log. | |
| 263 | ; | |
| 264 | S BPADDLTXT ="" | |
| 265 | S BPRELEASE DT=$$RELDA TE^BPSBCKJ (+BPRXIEN, +BPRXR) | |
| 266 | I BPRELEASE DT]"" D I BPQ=-1 G XPROMPTS | |
| 267 | . S BPDOSDT =$$EDITDT( 1,BPRXIEN, BPRXR,BP02 ) | |
| 268 | . I BPDOSDT ="^" S BPQ =-1 Q | |
| 269 | . I BPDOSDT '=(BPRELEA SEDT\1) S BPADDLTXT= "Date of S ervice ("_ $$FMTE^XLF DT(BPDOSDT ,5)_")" | |
| 270 | . Q | |
| 271 | ||
| 272 | ... | |
| 273 | ; Delay Reas on Code | |
| 274 | N X,DIC,Y | |
| 275 | S DIC("B")= BPDLYRS | |
| 276 | S DIC(0)="Q EAM",DIC=9 002313.29, DIC("A")=" Delay Reas on Code: " | |
| 277 | D ^DIC | |
| 278 | ; Check for "^" or tim eout | |
| 279 | I ($D(DUOUT ))!($D(DTO UT)) S BPQ =-1 K X,DI C,Y G XPRO MPTS | |
| 280 | S BPDLYRS=$ P(Y,U,2) | |
| 281 | K X,DIC,Y | |
| 282 | ; | |
| 283 | ; If second ary claim, setup sec ondary dat a and allo w user to edit | |
| 284 | ; Get data from the p rimary cla im, if it exists | |
| 285 | I BPCOB=2 D I BPQ=-1 G XPROMPT S | |
| 286 | . N BPSPL59 ,BPRTTP59 | |
| 287 | . S BPRET=$ $PRIMDATA^ BPSPRRX6(B PRXIEN,BPR XR,.BPSECO ND) | |
| 288 | . ; If the primary cl aim data i s missing, get data from the m ost recent secondary claim | |
| 289 | . I 'BPRET, $$SECDATA^ BPSPRRX6(B PRXIEN,BPR XR,.BPSPL5 9,.BPSECON D,.BPRTTP5 9) | |
| 290 | . ; The PRI MARY BILL element is set by $$ SECDATA. If SECDATA is not ca lled, this element w ill be | |
| 291 | . ; missi ng and we will need to create it | |
| 292 | . I '$D(BPS ECOND("PRI MARY BILL" )) D | |
| 293 | . . N BPBILL | |
| 294 | . . S BPBILL =$$PAYBLPR I^BPSUTIL2 (BP59) | |
| 295 | . . I BPBILL >0 S BPSEC OND("PRIMA RY BILL")= BPBILL | |
| 296 | . ; Set fla g telling BPSNCPDP n ot to reco mpile the data from the BPS Tr ansaction and the se condary cl aim | |
| 297 | . S BPSECON D("NEW COB DATA")=1 | |
| 298 | . ; $$PROMP TS display s the data and allow s the user edit the data. | |
| 299 | . S BPQ=$$P ROMPTS^BPS PRRX3(BPRX IEN,BPRXR, BPDOSDT,.B PSECOND) | |
| 300 | ; | |
| 301 | ; Allow use r to add t o the clai m addition al fields which are | |
| 302 | ; not on th e payer sh eet. $$AD DLFLDS wil l return 0 if no | |
| 303 | ; additiona l fields w ere select ed or -1 i f the user exited ou t. | |
| 304 | ; | |
| 305 | S BPQ=$$ADD LFLDS^BPSR ES1(BP02,B P59,.BPSAD DLFLDS) | |
| 306 | I BPQ=-1 G XPROMPTS | |
| 307 | ; | |
| 308 | ; Ask to pro ceed | |
| 309 | W ! S BPQ=$ $YESNO^BPS SCRRS("Are you sure? (Y/N)") | |
| 310 | I BPQ'=1 S BPQ=-1 G X PROMPTS | |
| 311 | S BPQ=1 | |
| 312 | ; | |
| 313 | ; Save the override v alues and the list o f addition al fields | |
| 314 | ; in file# 9002313.51 1, BPS NCP DP OVERRID ES. | |
| 315 | ; | |
| 316 | I '$$SAVE^B PSRES1("RE D",BP59,.B PSADDLFLDS ) S BPQ=-1 | |
| 317 | ; | |
| 318 | XPROMPTS ; | |
| 319 | S BPOVRIEN= $S(BPQ=-1: BPQ,$G(BPO VRIEN(1))] "":BPOVRIE N(1),1:-1) | |
| 320 | Q BPOVRIEN | |
| 321 | ||
| 322 | ||
| 323 | The new su broutine A DDLFLDS^BP SRES1 will be create d to allow the user to enter o ne or more additiona l fields t o be added to the cl aim reques t. The sub routine AR RAYS will also be ad ded, as de scribed be low. | |
| 324 | ||
| 325 | Subroutine Name | |
| 326 | ADDLFLDS^B PSRES1 and ARRAYS^BP SRES1 | |
| 327 | Enhancemen t Category | |
| 328 | New | |
| 329 | Modify | |
| 330 | Delete | |
| 331 | No Change | |
| 332 | Current Lo gic | |
| 333 | ||
| 334 | n/a | |
| 335 | ||
| 336 | Modified L ogic (Chan ges are hi ghlighted) | |
| 337 | ||
| 338 | BPSRES1 ; AITC MRD - ECME SCRE EN RESUBMI T W/EDITS ;10/23/17 | |
| 339 | ; ;1.0;E CLA IMS MGMT E NGINE;**23 **;JUN 200 4; | |
| 340 | ; ;Per VA Di rective 64 02, this r outine sho uld not be modified. | |
| 341 | ; | |
| 342 | ADDLFLDS(B PS02,BPS59 ,BPSADDLFL DS) ; Add fields to a claim. | |
| 343 | ; This func tion allow s the user to add to claim fie lds not on payer | |
| 344 | ; sheet. I t is used by the RED /Resubmit with Edits Action on the | |
| 345 | ; ECME User Screen an d by the P RO Option (Process S econdary/T RICARE | |
| 346 | ; Rx to ECM E). | |
| 347 | ; Input: BP S02 = Poin ter to BPS CLAIMS | |
| 348 | ; BP S59 = Poin ter to BSP TRANSACTI ON | |
| 349 | ; This func tion will return: | |
| 350 | ; 1 - I f user ent ered addit ional fiel ds. | |
| 351 | ; 0 - I f user add ed no fiel ds. | |
| 352 | ; -1 - I f user exi ted out vi a "^". | |
| 353 | ; This func tion will also set u p the arra y BPSADDFL DS if the user | |
| 354 | ; chooses t o add any fields to the claim. | |
| 355 | ; BPSADD LFLDS(Fiel d IEN) = V alue to Se nd | |
| 356 | ; | |
| 357 | N BPS,BPSFI ELD,BPSGET CODE,BPSPA YER,BPSQ,B PSSEGMENT | |
| 358 | N DIC,MEDN, TRANLIST,X ,Y | |
| 359 | ; | |
| 360 | ; Prompt us er whether to enter additional fields. Quit with -1 if | |
| 361 | ; user ente red "^". Quit with 0 if user entered "N o". | |
| 362 | ; | |
| 363 | S BPSQ=$$YE SNO^BPSSCR RS("Submit NCPDP Fie ld Not on Payer Shee t (Y/N)"," N") | |
| 364 | I BPSQ'=1 Q BPSQ | |
| 365 | ; | |
| 366 | ; Kill arra y that wil l contain list of fi elds to be added. | |
| 367 | ; | |
| 368 | K BPSADDLFL DS | |
| 369 | ; | |
| 370 | ; Build an array list ing the fi elds alrea dy on the payer shee t and an | |
| 371 | ; array lis ting all s egments on the payer sheet. I nclude all segments, | |
| 372 | ; though so me may be excluded l ater. | |
| 373 | ; | |
| 374 | D ARRAYS(BP S02,.BPSPA YER,.BPSSE GMENT) | |
| 375 | I 'BPSPAYER Q 0 | |
| 376 | ; | |
| 377 | ; Build BPS array. W hile each field in t he file BP S NCPDP FI ELD DEFS | |
| 378 | ; has Get C ode (execu table M co de) for pu lling the data value , the way | |
| 379 | ; this has been imple mented is that first the subro utine $$BP S^BPSOSCB | |
| 380 | ; pulls man y fields o f data, bu ilding the BPS array , and then the | |
| 381 | ; Get Code for each f ield puts into BPS(" X") a valu e from the BPS | |
| 382 | ; array. B ecause the system ne eds to dis play to th e user the value | |
| 383 | ; that woul d be sent with a fie ld being a dded to th e claim, w e need to | |
| 384 | ; build the entire BP S array, w hich will be used by the Get C ode for | |
| 385 | ; any field s selected by the us er. TRANL IST is an array list ing all | |
| 386 | ; BPS Trans actions in this batc h of claim s. Howeve r, the VA does not | |
| 387 | ; ever batc h claims, so there i s always o nly one tr ansaction in that | |
| 388 | ; list. BP S(9002313. 0201) must be set to 1. It sh ould never return a | |
| 389 | ; value oth er than 0, but if it does, Qui t. | |
| 390 | ; | |
| 391 | S TRANLIST( BPS59)="" | |
| 392 | S BPS(90023 13.0201)=1 | |
| 393 | S X=$$BPS^B PSOSCB | |
| 394 | I X W !,$P( X,U,2),"." ,!,"Fields may not b e added at this time ." Q 0 | |
| 395 | ; | |
| 396 | ; Display h elp text. | |
| 397 | ; | |
| 398 | W !!,"Enter a valid N CPDP Field name or n umber. En ter '??' f or" | |
| 399 | W !,"a list of possib le choices . Fields already on the payer sheet" | |
| 400 | W !,"are ex cluded fro m the list of possib le choices . Also ex cluded" | |
| 401 | W !,"are an y fields t hat do not have logi c to pull data from VistA" | |
| 402 | W !,"(i.e. fields tha t will alw ays be <bl ank>)." | |
| 403 | ; | |
| 404 | A1 ; Prompt us er for an NCPDP fiel d to add t o the clai m. | |
| 405 | ; | |
| 406 | K DIC | |
| 407 | ; | |
| 408 | S DIC=90023 13.91 | |
| 409 | S DIC(0)="A EMQ" | |
| 410 | S DIC("A")= "NCPDP Fie ld Name or Number: " | |
| 411 | S DIC("S")= "I $$CHECK ^BPSRES1(Y ,.BPSPAYER ,.BPSSEGME NT)" | |
| 412 | S DIC("T")= "" | |
| 413 | ; | |
| 414 | W ! | |
| 415 | D ^DIC | |
| 416 | ; | |
| 417 | ; When the user just hits <retu rn>, skip down to A2 . | |
| 418 | ; | |
| 419 | I X="" G A2 | |
| 420 | ; | |
| 421 | I Y=-1 Q -1 | |
| 422 | S BPSFIELD= +Y | |
| 423 | ; | |
| 424 | ; Disallow a field al ready adde d. | |
| 425 | ; | |
| 426 | I $D(BPSADD LFLDS(BPSF IELD)) W ! ,?4,"This field has already be en added t o the clai m.",*7 G A 1 | |
| 427 | ; | |
| 428 | ; Display t o the user the value to be sen t with thi s field. | |
| 429 | ; | |
| 430 | S BPS("X")= "" | |
| 431 | S MEDN=1 ; Required for some G ET codes. | |
| 432 | S BPSGETCOD E=0 | |
| 433 | F S BPSGET CODE=$O(^B PSF(900231 3.91,BPSFI ELD,10,BPS GETCODE)) Q:'BPSGETC ODE X $G( ^BPSF(9002 313.91,BPS FIELD,10,B PSGETCODE, 0)) | |
| 434 | W !,?4,"Val ue to tran smit: ",BP S("X") | |
| 435 | S BPSQ=$$YE SNO^BPSSCR RS("Transm it with cl aim (Y/N)" ,"Y") | |
| 436 | I BPSQ=0 G A1 | |
| 437 | I BPSQ=-1 K BPSADDLFL DS Q -1 | |
| 438 | ; | |
| 439 | ; Add selec ted field to array ( Y=internal field #). | |
| 440 | ; | |
| 441 | S BPSADDLFL DS(BPSFIEL D)=BPS("X" ) | |
| 442 | ; | |
| 443 | G A1 | |
| 444 | ; | |
| 445 | A2 ; User is d one select ing fields to add. | |
| 446 | ; | |
| 447 | ; If user a dded no fi elds, Quit with 0. | |
| 448 | ; | |
| 449 | I '$D(BPSAD DLFLDS) Q 0 | |
| 450 | ; | |
| 451 | ; Display t o the user the list of fields being adde d to the c laim. | |
| 452 | ; | |
| 453 | W !!,"Field s entered to transmi t:" | |
| 454 | S BPSFIELD= "" | |
| 455 | F S BPSFIE LD=$O(BPSA DDLFLDS(BP SFIELD)) Q :'BPSFIELD D | |
| 456 | . W !,?4,$$ GET1^DIQ(9 002313.91, BPSFIELD,. 01),"-" | |
| 457 | . W $$GET1^ DIQ(900231 3.91,BPSFI ELD,.06)," " | |
| 458 | . W $$GET1^ DIQ(900231 3.91,BPSFI ELD,.03)," : " | |
| 459 | . W BPSADDL FLDS(BPSFI ELD) | |
| 460 | . Q | |
| 461 | ; | |
| 462 | ; Do not as k "Are you sure?" he re -- that will be a sked in | |
| 463 | ; PROMPTS^B PSRES afte r Quitting out of th is subrout ine. | |
| 464 | ; | |
| 465 | Q 1 | |
| 466 | ; | |
| 467 | ARRAYS(BPS 02,BPSPAYE R,BPSSEGME NT) ; Bui ld BPSPAYE R array an d BPSSEGME NT array. | |
| 468 | ; | |
| 469 | ; Build an array list ing the fi elds alrea dy on the payer shee t and | |
| 470 | ; an array listing al l segments on the pa yer sheet. Include all | |
| 471 | ; segments, though so me may be excluded l ater. | |
| 472 | ; | |
| 473 | N BPSFIELD, BPSORDER | |
| 474 | ; | |
| 475 | S BPSPAYER= $$GET1^DIQ (9002313.0 2,BPS02,.0 2,"I") ; Payer Shee t. | |
| 476 | I 'BPSPAYER Q | |
| 477 | F BPSSEGMEN T=100:10:3 00 D | |
| 478 | . I '$D(^BP SF(9002313 .92,BPSPAY ER,BPSSEGM ENT)) Q | |
| 479 | . S BPSSEGM ENT(BPSSEG MENT)="" | |
| 480 | . S BPSORDE R=0 | |
| 481 | . F S BPSO RDER=$O(^B PSF(900231 3.92,BPSPA YER,BPSSEG MENT,BPSOR DER)) Q:'B PSORDER D | |
| 482 | . . S BPSFI ELD=$P($G( ^BPSF(9002 313.92,BPS PAYER,BPSS EGMENT,BPS ORDER,0)), "^",2) ; Field IEN | |
| 483 | . . I BPSFI ELD'="" S BPSPAYER(B PSFIELD)=" " | |
| 484 | . . Q | |
| 485 | . Q | |
| 486 | ; | |
| 487 | Q | |
| 488 | ||
| 489 | ||
| 490 | ||
| 491 | Subroutine Name | |
| 492 | CHECK^BPSR ES1 | |
| 493 | Enhancemen t Category | |
| 494 | New | |
| 495 | Modify | |
| 496 | Delete | |
| 497 | No Change | |
| 498 | Current Lo gic | |
| 499 | ||
| 500 | n/a | |
| 501 | ||
| 502 | Modified L ogic (Chan ges are hi ghlighted) | |
| 503 | ||
| 504 | CHECK(BPSY ,BPSPAYER, BPSSEGMENT ) ; Screen for BPS N CPDP FIELD DEFS look up. See A DDLFLDS ab ove. | |
| 505 | ; This func tion is ca lled for a given ent ry in the file BPS | |
| 506 | ; NCPDP FIE LD DEFS, w here +Y wi ll be the IEN. If t his functi on | |
| 507 | ; returns a 1, then t his entry is a valid choice. If this | |
| 508 | ; function returns a 0, then th is entry w ill not be displayed to | |
| 509 | ; the user when listi ng possibl e choices and this e ntry will not | |
| 510 | ; be a vali d choice f or the use r. | |
| 511 | ; | |
| 512 | ; Disallow if already on the pa yer sheet. | |
| 513 | ; | |
| 514 | I $D(BPSPAY ER(+BPSY)) Q 0 | |
| 515 | ; | |
| 516 | ; Disallow if this fi eld is not on a requ est segmen t or if th is | |
| 517 | ; field is on a segme nt not on the payer sheet. | |
| 518 | ; | |
| 519 | S BPSSEGMEN T=$P($G(^B PSF(900231 3.91,+BPSY ,5)),"^",4 ) ; Reque st Segment . | |
| 520 | S BPSSEGMEN T=$P($G(^B PSF(900231 3.9,+BPSSE GMENT,0)), "^",2) | |
| 521 | I BPSSEGMEN T="" Q 0 | |
| 522 | I '$D(BPSSE GMENT(BPSS EGMENT)) Q 0 | |
| 523 | ; | |
| 524 | ; There are many segm ents the V A does not send, eve n if that | |
| 525 | ; segment i s on a pay er sheet. Disallow any fields that are | |
| 526 | ; on one of those seg ments. | |
| 527 | ; | |
| 528 | I ",140,170 ,200,210,2 20,230,240 ,250,260,2 70,280,290 ,300,"[(", "_BPSSEGME NT_",") Q 0 | |
| 529 | ; | |
| 530 | ; Disallow if Get Cod e is simpl y Setting BPS("X") t o "". | |
| 531 | ; | |
| 532 | I $G(^BPSF( 9002313.91 ,+BPSY,10, 1,0))["S B PS(""X"")= """"" Q 0 | |
| 533 | ; | |
| 534 | Q 1 | |
| 535 | ||
| 536 | ||
| 537 | ||
| 538 | The subrou tine SAVE^ BPSRES1 wi ll be adde d. Formerl y the over ride value s were sav ed at the end of the subroutin e PROMPTS^ BPSRES. Mo re logic w ill be add ed to that section o f code, an d due to s pace consi derations in ^BPSRES and out o f a desire to segreg ate the co de, that l ogic will be moved i nto SAVE^B PSRES1 whe re the new logic wil l be added . | |
| 539 | ||
| 540 | Subroutine Name | |
| 541 | SAVE^BPSRE S1 | |
| 542 | Enhancemen t Category | |
| 543 | New | |
| 544 | Modify | |
| 545 | Delete | |
| 546 | No Change | |
| 547 | Current Lo gic | |
| 548 | ||
| 549 | n/a | |
| 550 | ||
| 551 | Modified L ogic (Chan ges are hi ghlighted) | |
| 552 | ||
| 553 | SAVE(BPSAC TION,BPS59 ,BPSADDLFL DS) ; Save into BPS NCPDP OVER RIDES (#90 02313.511) | |
| 554 | ; | |
| 555 | ; If the us er chooses to add an y fields t o the clai m, each fi eld | |
| 556 | ; will be l isted as B PSADDLFLDS (Field IEN ). | |
| 557 | ; | |
| 558 | ; Input: B PSACTION = Action se lected by user (e.g. RED, PRO) | |
| 559 | ; B PS59 = Poi nter to BP S TRANSACT IONS | |
| 560 | ; B PSADDLFLDS = Passed by referen ce, array listing th e | |
| 561 | ; NCPDP fi elds to be added to the claim. | |
| 562 | ; BPSADDLF LDS(NCPDP Field) = " " | |
| 563 | ; | |
| 564 | ; BPOVRIEN is Newed i n DOSELCTD ^BPSRES an d should n ot be Newe d here. | |
| 565 | ; | |
| 566 | N BPSFDA,BP SFIELD,BPS MSG,BPSCNT ,BPSFIELD | |
| 567 | ; | |
| 568 | S BPSFDA(90 02313.511, "+1,",.01) =BPS59 | |
| 569 | D NOW^%DTC | |
| 570 | S BPSFDA(90 02313.511, "+1,",.02) =% | |
| 571 | ; | |
| 572 | ; Store the fields fo r which th e user was prompted. | |
| 573 | ; | |
| 574 | S BPSCNT=1 | |
| 575 | I BPSACTION ="RED" D | |
| 576 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",303, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+2,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 577 | 1,"+2,+1," ,.02)=BPPS NCD | |
| 578 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",306, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+3,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 579 | 1,"+3,+1," ,.02)=BPRE LCD | |
| 580 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",462, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+4,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 581 | 1,"+4,+1," ,.02)=BPPR EAUT | |
| 582 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",461, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+5,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 583 | 1,"+5,+1," ,.02)=BPPR ETYP | |
| 584 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",420, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+6,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 585 | 1,"+6,+1," ,.02)=BPCL CD1_"~"_$G (BPCLCD2)_ "~"_$G(BPC LCD3) | |
| 586 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",384, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+7,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 587 | 1,"+7,+1," ,.02)=BPPT RES | |
| 588 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",147, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+8,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 589 | 1,"+8,+1," ,.02)=BPPH SRV | |
| 590 | . S BPSFIEL D=$O(^BPSF (9002313.9 1,"B",357, "")) I BPS FIELD]"" S BPSFDA(90 02313.5111 ,"+9,+1,", .01)=BPSFI ELD,BPSFDA (9002313.5 11 | |
| 591 | 1,"+9,+1," ,.02)=BPDL YRS | |
| 592 | . S BPSCNT= 9 | |
| 593 | . Q | |
| 594 | ; | |
| 595 | ; Store add itional NC PDP fields which the user chos e to add t o the | |
| 596 | ; the resub mitted cla im. | |
| 597 | ; | |
| 598 | S BPSFIELD= 0 | |
| 599 | F S BPSFIE LD=$O(BPSA DDLFLDS(BP SFIELD)) Q :'BPSFIELD D | |
| 600 | . S BPSCNT= BPSCNT+1 | |
| 601 | . S BPSFDA( 9002313.51 12,"+"_BPS CNT_",+1," ,.01)=BPSF IELD ; Fi eld# | |
| 602 | . S BPSFDA( 9002313.51 12,"+"_BPS CNT_",+1," ,.02)=$$GE T1^DIQ(900 2313.91,BP SFIELD,2," I") ; Seg ment# | |
| 603 | . Q | |
| 604 | ; | |
| 605 | D UPDATE^DI E("","BPSF DA","BPOVR IEN","BPSM SG") | |
| 606 | ; | |
| 607 | I $D(BPSMSG ("DIERR")) W !!,"Cou ld Not Sav e Override informati on into BP S NCPDP OV ERRIDES FI LES",! Q - 1 | |
| 608 | ; | |
| 609 | Q 1 | |
| 610 | ||
| 611 | ||
| 612 | ||
| 613 | During the claim sub mission pr ocess, the entry in the file B PS CLAIMS is created before th e claim is sent. The BPS CLAIM S entry is created m ainly by t he subrout ine XLOOP^ BPSOSCF. T his subrou tine loops through e ach field on each se gment on t he payer s heet, and for each f ield it pu lls the da ta, format s the data , and stor es the dat a in the a ppropriate field in BPS CLAIMS . | |
| 614 | ||
| 615 | XLOOP^BPSO SCF will b e modified so that, after loop ing throug h each fie ld on a se gment, it will check for the p resence of additiona l fields t o be added to that s egment of the claim. | |
| 616 | ||
| 617 | Subroutine Name | |
| 618 | XLOOP^BPSO SCF | |
| 619 | Enhancemen t Category | |
| 620 | New | |
| 621 | Modify | |
| 622 | Delete | |
| 623 | No Change | |
| 624 | Current Lo gic | |
| 625 | ||
| 626 | BPSOSCF ; BHAM ISC/F CS/DRS/DLF - Low-lev el format of .02 ;06 /01/2004 | |
| 627 | ; ;1.0;E CLA IMS MGMT E NGINE;**1, 5,8,10,15, 19**;JUN 2 004;Build 18 | |
| 628 | ; ;Per VA Di rective 64 02, this r outine sho uld not be modified. | |
| 629 | ; | |
| 630 | ; 100 (Tra nsaction H eader Segm ent) | |
| 631 | ; 110 (Pat ient Segme nt) | |
| 632 | ; 120 (Ins urance Seg ment) | |
| 633 | ; 130 (Cla im Segment ) | |
| 634 | ; 140 (Pha rmacy Prov ider Segme nt) | |
| 635 | ; 150 (Pre scriber Se gment) | |
| 636 | ; 160 (COB /Other Pay ments Segm ent) | |
| 637 | ; 170 (Wor ker's Comp ensation S egment) | |
| 638 | ; 180 (DUR /PPS Segme nt) | |
| 639 | ; 190 (Pri cing Segme nt) | |
| 640 | ; 200 (Cou pon Segmen t) | |
| 641 | ; 210 (Com pound Segm ent) | |
| 642 | ; 220 (Pri or Authori zation Seg ment) | |
| 643 | ; 230 (Cli nical Segm ent) | |
| 644 | ; 240 (Add itional Do cumentatio n Segment) | |
| 645 | ; 250 (Fac ility Segm ent) | |
| 646 | ; 260 (Nar rative Seg ment) | |
| 647 | ; 270 (Pur chaser Seg ment) | |
| 648 | ; 280 (Ser vice Provi der Segmen t) | |
| 649 | ; 290 (Int ermediary Segment) | |
| 650 | ; 300 (Las t Known 4R x Segment) | |
| 651 | ; | |
| 652 | ; FORMAT = IEN in BPS NCPDP FOR MATS (#900 2313.92) | |
| 653 | ; NODE = Se gment Node | |
| 654 | ; MEDN = Tr ansaction multiple i n BPS Clai ms | |
| 655 | XLOOP(FORM AT,NODE,ME DN) ; form at claim r ecord | |
| 656 | ; | |
| 657 | Q :$G(FORMAT )="" Q:$G (NODE)="" ; FORMAT, NODE requ ired | |
| 658 | ; | |
| 659 | N FLAG,FLDI EN,FLDINFO ,MDATA,NCP VERS,ORDER ,OVERRIDE, PMODE,RECM IEN,X | |
| 660 | ; quit If t he payer s heet doesn 't have th e segment | |
| 661 | I '$D(^BPSF (9002313.9 2,FORMAT,N ODE,0)) Q | |
| 662 | ; | |
| 663 | ; VA doesn' t do these segments | |
| 664 | I ",300,290 ,280,270,2 60,250,240 ,230,220,2 10,200,170 ,140,"[(", "_NODE_"," ) Q | |
| 665 | ; | |
| 666 | ; Per NCPDP standard, eligibili ty doesn't support s egments li sted below | |
| 667 | I BPS("Tran saction Co de")= | |
| 668 | "E1",",290 ,280,270,2 60,250,230 ,220,210,2 00,190,180 ,170,160,1 30,"[(","_ NODE_",") Q | |
| 669 | ; | |
| 670 | ; For COB, if the pay er sequenc e is prima ry, then q uit and do n't output the COB f ields | |
| 671 | I NODE=160, $$COB59^BP SUTIL2(+$G (BPS("RX", BPS(900231 3.0201),"I EN59")))=1 Q | |
| 672 | ; | |
| 673 | ; COB proce ssing is h andled dif ferently | |
| 674 | I NODE=160 D COB^BPSO SHF(FORMAT ,NODE,MEDN ) Q | |
| 675 | ; | |
| 676 | ; DUR is ha ndled diff erently si nce it is repeating | |
| 677 | I NODE=180 D DURPPS^B PSOSHF(FOR MAT,NODE,M EDN) Q | |
| 678 | ; | |
| 679 | ; Loop thro ugh the fi elds in th e segment | |
| 680 | S ORDER=0 | |
| 681 | F S ORDER= $O(^BPSF(9 002313.92, FORMAT,NOD E,"B",ORDE R)) Q:'ORD ER D | |
| 682 | . ; Get the pointer t o the BPS NCPDP FIEL D DEFS tab le | |
| 683 | . S RECMIEN =$O(^BPSF( 9002313.92 ,FORMAT,NO DE,"B",ORD ER,0)) | |
| 684 | . I 'RECMIE N D IMPOSS ^BPSOSUE(" DB","TI"," NODE="_NOD E,"ORDER=" _ORDER,2,$ T(+0)) Q | |
| 685 | . S MDATA=^ BPSF(90023 13.92,FORM AT,NODE,RE CMIEN,0),F LDIEN=$P(M DATA,U,2) | |
| 686 | . ; Corrupt or erroneo us format file | |
| 687 | . I 'FLDIEN Q | |
| 688 | . S FLDINFO =$G(^BPSF( 9002313.91 ,FLDIEN,0) ) ; BPS N CPDP FIELD DEFS (#90 02313.91) | |
| 689 | . I FLDINFO ="" D IMPO SS^BPSOSUE ("DB,P","T I","FLDIEN ="_FLDIEN, ,"XLOOP",$ T(+0)) Q | |
| 690 | . ; Quit for 111-AM Se gment Iden tification | |
| 691 | . ; 478-H7 O ther Amoun t Claimed Submitted Count | |
| 692 | . ; 479-H8 O ther Amoun t Claimed Submitted Qualifier | |
| 693 | . ; 478 and 479 are ha ndled by 4 80 and 111 is standa rd field f or each se gment | |
| 694 | . S X=$P(FL DINFO,U) I ",111,478 ,479,"[(", "_X_",") Q | |
| 695 | . ; | |
| 696 | . ; Set over ride value (may not be defined so overri de will be null) | |
| 697 | . I $D(MEDN ) S OVERRI DE=$G(BPS( "OVERRIDE" ,"RX",MEDN ,FLDIEN)) | |
| 698 | . E S OVER RIDE=$G(BP S("OVERRID E",FLDIEN) ) | |
| 699 | . ; | |
| 700 | . ; Get proc essing mod e (S-Stand ard (defau lt), X-Spe cial Code) | |
| 701 | . S PMODE=$ P(MDATA,U, 3) | |
| 702 | . I PMODE=" " S PMODE= "S" ;defau lt it | |
| 703 | . ; | |
| 704 | . ; Default FLAG and v alue being computed | |
| 705 | . S FLAG="G FS" | |
| 706 | . S BPS("X" )="" | |
| 707 | . ; | |
| 708 | . ; If ther e is an ov erride, se t BPS("X") to it and | |
| 709 | . ; only do Format and Set co de | |
| 710 | . I OVERRID E]"" S FLA G="FS",BPS ("X")=OVER RIDE | |
| 711 | . ; | |
| 712 | . ; If Spec ial Code m ode is set , execute special co de instead | |
| 713 | . ; of fi eld's Get code and c hange Flag to FS so Format and | |
| 714 | . ; Set c ode is sti ll done bu t not GET code | |
| 715 | . I PMODE=" X",OVERRID E="" D | |
| 716 | . . S FLAG=" FS" | |
| 717 | . . D XSPCCO DE(FORMAT, NODE,RECMI EN) | |
| 718 | . ; | |
| 719 | . ; Call XF LDCODE to do process ing based on FLAG se tting | |
| 720 | . D XFLDCOD E(NODE,FLD IEN,FLAG) | |
| 721 | ; | |
| 722 | Q | |
| 723 | ||
| 724 | Modified L ogic (Chan ges are hi ghlighted) | |
| 725 | ||
| 726 | BPSOSCF ; BHAM ISC/F CS/DRS/DLF - Low-lev el format of .02 ;06 /01/2004 | |
| 727 | ; ;1.0;E CLA IMS MGMT E NGINE;**1, 5,8,10,15, 19,23**;JU N 2004;Bui ld 18 | |
| 728 | ; ;Per VA Di rective 64 02, this r outine sho uld not be modified. | |
| 729 | ; | |
| 730 | ; 100 (Tra nsaction H eader Segm ent) | |
| 731 | ; 110 (Pat ient Segme nt) | |
| 732 | ; 120 (Ins urance Seg ment) | |
| 733 | ; 130 (Cla im Segment ) | |
| 734 | ; 140 (Pha rmacy Prov ider Segme nt) | |
| 735 | ; 150 (Pre scriber Se gment) | |
| 736 | ; 160 (COB /Other Pay ments Segm ent) | |
| 737 | ; 170 (Wor ker's Comp ensation S egment) | |
| 738 | ; 180 (DUR /PPS Segme nt) | |
| 739 | ; 190 (Pri cing Segme nt) | |
| 740 | ; 200 (Cou pon Segmen t) | |
| 741 | ; 210 (Com pound Segm ent) | |
| 742 | ; 220 (Pri or Authori zation Seg ment) | |
| 743 | ; 230 (Cli nical Segm ent) | |
| 744 | ; 240 (Add itional Do cumentatio n Segment) | |
| 745 | ; 250 (Fac ility Segm ent) | |
| 746 | ; 260 (Nar rative Seg ment) | |
| 747 | ; 270 (Pur chaser Seg ment) | |
| 748 | ; 280 (Ser vice Provi der Segmen t) | |
| 749 | ; 290 (Int ermediary Segment) | |
| 750 | ; 300 (Las t Known 4R x Segment) | |
| 751 | ; | |
| 752 | ; FORMAT = IEN in BPS NCPDP FOR MATS (#900 2313.92) | |
| 753 | ; NODE = Se gment Node | |
| 754 | ; MEDN = Tr ansaction multiple i n BPS Clai ms | |
| 755 | XLOOP(FORM AT,NODE,ME DN) ; form at claim r ecord | |
| 756 | ; | |
| 757 | Q :$G(FORMAT )="" Q:$G (NODE)="" ; FORMAT, NODE requ ired | |
| 758 | ; | |
| 759 | N FLAG,FLDI EN,FLDINFO ,IEN511,IE N59,MDATA, NCPVERS,NO DEIEN,ORDE R,OVERRIDE ,PMODE,REC MIEN,BPSX | |
| 760 | ; quit If t he payer s heet doesn 't have th e segment | |
| 761 | I '$D(^BPSF (9002313.9 2,FORMAT,N ODE,0)) Q | |
| 762 | ; | |
| 763 | ; VA doesn' t do these segments | |
| 764 | I ",300,290 ,280,270,2 60,250,240 ,230,220,2 10,200,170 ,140,"[(", "_NODE_"," ) Q | |
| 765 | ; | |
| 766 | ; Per NCPDP standard, eligibili ty doesn't support s egments li sted below | |
| 767 | I BPS("Tran saction Co de")= | |
| 768 | "E1",",290 ,280,270,2 60,250,230 ,220,210,2 00,190,180 ,170,160,1 30,"[(","_ NODE_",") Q | |
| 769 | ; | |
| 770 | ; For COB, if the pay er sequenc e is prima ry, then q uit and do n't output the COB f ields | |
| 771 | I NODE=160, $$COB59^BP SUTIL2(+$G (BPS("RX", BPS(900231 3.0201),"I EN59")))=1 Q | |
| 772 | ; | |
| 773 | ; COB proce ssing is h andled dif ferently | |
| 774 | I NODE=160 D COB^BPSO SHF(FORMAT ,NODE,MEDN ) Q | |
| 775 | ; | |
| 776 | ; DUR is ha ndled diff erently si nce it is repeating | |
| 777 | I NODE=180 D DURPPS^B PSOSHF(FOR MAT,NODE,M EDN) Q | |
| 778 | ; | |
| 779 | ; Loop thro ugh the fi elds in th e segment | |
| 780 | S ORDER=0 | |
| 781 | F S ORDER= $O(^BPSF(9 002313.92, FORMAT,NOD E,"B",ORDE R)) Q:'ORD ER D | |
| 782 | . ; Get the pointer t o the BPS NCPDP FIEL D DEFS tab le | |
| 783 | . S RECMIEN =$O(^BPSF( 9002313.92 ,FORMAT,NO DE,"B",ORD ER,0)) | |
| 784 | . I 'RECMIE N D IMPOSS ^BPSOSUE(" DB","TI"," NODE="_NOD E,"ORDER=" _ORDER,2,$ T(+0)) Q | |
| 785 | . S MDATA=^ BPSF(90023 13.92,FORM AT,NODE,RE CMIEN,0),F LDIEN=$P(M DATA,U,2) | |
| 786 | . ; Corrupt or erroneo us format file | |
| 787 | . I 'FLDIEN Q | |
| 788 | . S FLDINFO =$G(^BPSF( 9002313.91 ,FLDIEN,0) ) ; BPS N CPDP FIELD DEFS (#90 02313.91) | |
| 789 | . I FLDINFO ="" D IMPO SS^BPSOSUE ("DB,P","T I","FLDIEN ="_FLDIEN, ,"XLOOP",$ T(+0)) Q | |
| 790 | . ; Quit for 111-AM Se gment Iden tification | |
| 791 | . ; 478-H7 O ther Amoun t Claimed Submitted Count | |
| 792 | . ; 479-H8 O ther Amoun t Claimed Submitted Qualifier | |
| 793 | . ; 478 and 479 are ha ndled by 4 80 and 111 is standa rd field f or each se gment | |
| 794 | . S BPSX=$P (FLDINFO,U ) I ",111, 478,479,"[ (","_BPSX_ ",") Q | |
| 795 | . ; | |
| 796 | . ; Set over ride value (may not be defined so overri de will be null) | |
| 797 | . I $D(MEDN ) S OVERRI DE=$G(BPS( "OVERRIDE" ,"RX",MEDN ,FLDIEN)) | |
| 798 | . E S OVER RIDE=$G(BP S("OVERRID E",FLDIEN) ) | |
| 799 | . ; | |
| 800 | . ; Get proc essing mod e (S-Stand ard (defau lt), X-Spe cial Code) | |
| 801 | . S PMODE=$ P(MDATA,U, 3) | |
| 802 | . I PMODE=" " S PMODE= "S" ;defau lt it | |
| 803 | . ; | |
| 804 | . ; Default FLAG and v alue being computed | |
| 805 | . S FLAG="G FS" | |
| 806 | . S BPS("X" )="" | |
| 807 | . ; | |
| 808 | . ; If ther e is an ov erride, se t BPS("X") to it and | |
| 809 | . ; only do Format and Set co de | |
| 810 | . I OVERRID E]"" S FLA G="FS",BPS ("X")=OVER RIDE | |
| 811 | . ; | |
| 812 | . ; If Spec ial Code m ode is set , execute special co de instead | |
| 813 | . ; of fi eld's Get code and c hange Flag to FS so Format and | |
| 814 | . ; Set c ode is sti ll done bu t not GET code | |
| 815 | . I PMODE=" X",OVERRID E="" D | |
| 816 | . . S FLAG=" FS" | |
| 817 | . . D XSPCCO DE(FORMAT, NODE,RECMI EN) | |
| 818 | . ; | |
| 819 | . ; Call XF LDCODE to do process ing based on FLAG se tting | |
| 820 | . D XFLDCOD E(NODE,FLD IEN,FLAG) | |
| 821 | ; | |
| 822 | ; The user has the ab ility, via the actio n RED / Re submit wit h | |
| 823 | ; Edits, to add to th e claim fi elds not o n the paye r sheet. | |
| 824 | ; Any field s to be ad ded to the claim are stored in the file | |
| 825 | ; BPS NCPDP OVERRIDE. | |
| 826 | ; | |
| 827 | ; Determine the trans action fro m the clai m. Determ ine | |
| 828 | ; override, and Quit if none. Field 1.13 is NCPDP OVERRIDES, | |
| 829 | ; ptr to 90 02313.511. | |
| 830 | ; | |
| 831 | S IEN59=$$C LAIM59^BPS UTIL2(BPS( 9002313.02 )) | |
| 832 | S IEN511=$$ GET1^DIQ(9 002313.59, IEN59,1.13 ,"I") | |
| 833 | I 'IEN511 Q | |
| 834 | ; | |
| 835 | ; Loop thro ugh additi onal field s for the current se gment (NOD E) and | |
| 836 | ; call XFLD CODE to ad d to the c laim. | |
| 837 | ; | |
| 838 | S NODEIEN=$ O(^BPSF(90 02313.9,"C ",NODE,"") ) | |
| 839 | I 'NODEIEN Q | |
| 840 | S BPSX="" | |
| 841 | F S BPSX=$ O(^BPS(900 2313.511,I EN511,2,"S EG",NODEIE N,BPSX)) Q :BPSX="" D | |
| 842 | . S FLDIEN= $$GET1^DIQ (9002313.5 112,BPSX_" ,"_IEN511_ ",",.01,"I ") | |
| 843 | . S BPS("X" )="" | |
| 844 | . D XFLDCOD E(NODE,FLD IEN,"GFS") | |
| 845 | ; | |
| 846 | Q | |
| 847 | ||
| 848 | ||
| 849 | ||
| 850 | 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 a local a rray, BPS. The code which does this, ^BP SECX0, doe s not pull all of th e more rec ently adde d NCPDP fi elds. The subroutine GETBPS3^B PSECX0 wil l be modif ied to pul l fields n ot current ly pulled. | |
| 851 | ||
| 852 | Subroutine Name | |
| 853 | GETBPS3^BP SECX0 | |
| 854 | Enhancemen t Category | |
| 855 | New | |
| 856 | Modify | |
| 857 | Delete | |
| 858 | No Change | |
| 859 | Current Lo gic | |
| 860 | ||
| 861 | BPSECX0 ; BHAM ISC/F CS/DRS/VA/ DLF - Retr ieve Claim submissio n record ; 05/17/2004 | |
| 862 | ; ;1.0;E CLA IMS MGMT E NGINE;**1, 5,8,10,15, 19**;JUN 2 004;Build 18 | |
| 863 | ||
| 864 | ... | |
| 865 | ||
| 866 | ; Retrieve d ata in TRA NSACTIONS multiple i n BPS CLAI MS | |
| 867 | ; CLAIMIEN = ien in B PS CLAIMS (#9002313. 02) | |
| 868 | ; TRXIEN = ien in TRA NSACTIONS (#9002313. 0201) | |
| 869 | ; BPS - Pas sed by ref erence | |
| 870 | ; returns: BPS(900231 3.0201,TRX IEN,field #,"I") = i nternal fo rmat value | |
| 871 | GETBPS3(CL AIMIEN,TRX IEN,BPS) ; called fro m BPSECA1 | |
| 872 | ; | |
| 873 | Q :$G(CLAIMI EN)="" Q: $G(TRXIEN) ="" ; mus t have bot h | |
| 874 | ; | |
| 875 | N D0,DA,DIC ,DIQ,DIQ2, DR | |
| 876 | ; | |
| 877 | ; There are other alp hanumeric fields tha t could be added but since the y are for segments t hat are no t | |
| 878 | ; supporte d by E1, B 1, B3 tran sactions a nd/or not segments n ot used by VA. Thes e can be a dded later , if | |
| 879 | ; needed f or those s egments. | |
| 880 | S DIC=90023 13.02,DR=" 400",DR(90 02313.0201 )="113:996 " ; all T RANSACTION fields | |
| 881 | S DR(900231 3.0201)=DR (9002313.0 201)_";102 3:1032" ;G et alphanu meric NCPD P fields 1 023 throug h 1032 - B PS*1*15 | |
| 882 | S DR(900231 3.0201)=DR (9002313.0 201)_";202 6:2028;204 0:2042" ;G et alphanu meric NCPD P fields 2 026-2028 a nd 2040-20 42 - BPS*1 *19 | |
| 883 | S DA=CLAIMI EN,DA(9002 313.0201)= TRXIEN ; IEN and su b-file IEN | |
| 884 | S DIQ="BPS" ,DIQ(0)="I " ; "I" f or interna l format | |
| 885 | D EN^DIQ1 | |
| 886 | ; | |
| 887 | ; Copy Pres criber Pho ne Number (498.12) t o field 49 8 as this is where B PSOSH2 | |
| 888 | ; expects to find i t. This w orks for n ow but if we impleme nt the Pri or Auth | |
| 889 | ; segment (which ha s multiple field lab elled 498) , a more c omplete so lution | |
| 890 | ; will ne ed to be f ound | |
| 891 | S BPS(90023 13.0201,TR XIEN,498," I")=$G(BPS (9002313.0 201,TRXIEN ,498.12,"I ")) | |
| 892 | Q | |
| 893 | ... | |
| 894 | S DR(900231 3.0401)=". 01;338;339 ;340;341;4 43;471;353 ;392" ; f ields | |
| 895 | ||
| 896 | Modified L ogic (Chan ges are hi ghlighted) | |
| 897 | ||
| 898 | BPSECX0 ; BHAM ISC/F CS/DRS/VA/ DLF - Retr ieve Claim submissio n record ; 05/17/2004 | |
| 899 | ; ;1.0;E CLA IMS MGMT E NGINE;**1, 5,8,10,15, 19,23**;JU N 2004;Bui ld 18 | |
| 900 | ||
| 901 | ... | |
| 902 | ||
| 903 | ; Retrieve d ata in TRA NSACTIONS multiple i n BPS CLAI MS | |
| 904 | ; CLAIMIEN = ien in B PS CLAIMS (#9002313. 02) | |
| 905 | ; TRXIEN = ien in TRA NSACTIONS (#9002313. 0201) | |
| 906 | ; BPS - Pas sed by ref erence | |
| 907 | ; returns: BPS(900231 3.0201,TRX IEN,field #,"I") = i nternal fo rmat value | |
| 908 | GETBPS3(CL AIMIEN,TRX IEN,BPS) ; called fro m BPSECA1 | |
| 909 | ; | |
| 910 | Q :$G(CLAIMI EN)="" Q: $G(TRXIEN) ="" ; mus t have bot h | |
| 911 | ; | |
| 912 | N D0,DA,DIC ,DIQ,DIQ2, DR | |
| 913 | ; | |
| 914 | ; There are other alp hanumeric fields tha t could be added but since the y are for segments t hat are no t | |
| 915 | ; supporte d by E1, B 1, B3 tran sactions a nd/or not segments n ot used by VA. Thes e can be a dded later , if | |
| 916 | ; needed f or those s egments. | |
| 917 | S DIC=90023 13.02,DR=" 400",DR(90 02313.0201 )="113:996 " ; all T RANSACTION fields | |
| 918 | S DR(900231 3.0201)=DR (9002313.0 201)_";102 3:1032" ;G et alphanu meric NCPD P fields 1 023 throug h 1032 - B PS*1*15 | |
| 919 | S DR(900231 3.0201)=DR (9002313.0 201)_";202 4:2032;203 9:2043" | |
| 920 | S DR=DR_“;1 093;2013:2 021;2034;2 035;2037” | |
| 921 | S DR=DR_“;2 056:2061;2 095:2097;2 101;2102” | |
| 922 | S DA=CLAIMI EN,DA(9002 313.0201)= TRXIEN ; IEN and su b-file IEN | |
| 923 | S DIQ="BPS" ,DIQ(0)="I " ; "I" f or interna l format | |
| 924 | D EN^DIQ1 | |
| 925 | ; | |
| 926 | ; Copy Pres criber Pho ne Number (498.12) t o field 49 8 as this is where B PSOSH2 | |
| 927 | ; expects to find i t. This w orks for n ow but if we impleme nt the Pri or Auth | |
| 928 | ; segment (which ha s multiple field lab elled 498) , a more c omplete so lution | |
| 929 | ; will ne ed to be f ound | |
| 930 | S BPS(90023 13.0201,TR XIEN,498," I")=$G(BPS (9002313.0 201,TRXIEN ,498.12,"I ")) | |
| 931 | Q | |
| 932 | ... | |
| 933 | S DR(900231 3.0401)=". 01;338;339 ;340;341;4 43;471;353 ;392;393" ; fields | |
| 934 | ||
| 935 | ||
| 936 | ||
| 937 | 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. 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 . | |
| 938 | ||
| 939 | XLOOP^BPSO SCF will b e modified so that, after loop ing throug h each fie ld on a se gment, it will check for the p resence of additiona l fields t o be added to that s egment of the claim. | |
| 940 | ||
| 941 | Subroutine Name | |
| 942 | XLOOP^BPSO SH2 | |
| 943 | Enhancemen t Category | |
| 944 | New | |
| 945 | Modify | |
| 946 | Delete | |
| 947 | No Change | |
| 948 | Current Lo gic | |
| 949 | ||
| 950 | BPSOSH2 ; BHAM ISC/S D/lwj/DLF - Assemble formatted claim ;06 /01/2004 | |
| 951 | ; ;1.0;E CLA IMS MGMT E NGINE;**1, 5,8,10,15, 19,20**;JU N 2004;Bui ld 27 | |
| 952 | ||
| 953 | ... | |
| 954 | ||
| 955 | ; Put toget her ASCII formatted record per the Payer Sheet Def inition | |
| 956 | ; Input: | |
| 957 | ; NODES - "100^110^ 120" or "1 30^140^150 ^160^170^1 80^190^200 ^210^220^2 30^240^250 ^260^270^2 80^290^300 " | |
| 958 | ; Passed by Ref: | |
| 959 | ; .IEN - I nternal En try Number array | |
| 960 | ; .BPS - F ormatted D ata Array with claim and trans action dat a | |
| 961 | ; .REC - F ormatted A SCII recor d (result) | |
| 962 | ; | |
| 963 | XLOOP(NODE S,IEN,BPS, REC) ;EP - from BPSE CA1 | |
| 964 | ; | |
| 965 | N DATAFND,F DATA,FLAG, FLDDATA,FL DID,FLDIEN ,FLDNUM,IN DEX,MDATA, NODE,ORDER ,PMODE,REC MIEN,SEGRE C | |
| 966 | N VER,TYPE | |
| 967 | ; | |
| 968 | ; Get payer sheet ver sion and t ransaction type | |
| 969 | S VER=$P($G (^BPSF(900 2313.92,+$ G(IEN(9002 313.92)),1 )),U,2) | |
| 970 | S TYPE=$G(B PS(9002313 .02,+$G(IE N(9002313. 02)),103," I")) | |
| 971 | ; | |
| 972 | ; Loop thro ugh the NO DES variab le delimit ed by U | |
| 973 | F INDEX=1:1 :$L(NODES, U) D | |
| 974 | . S NODE=$P (NODES,U,I NDEX) Q:NO DE="" | |
| 975 | . ; | |
| 976 | . ; VA does not suppo rt these s egments | |
| 977 | . Q:",300,2 90,280,270 ,260,250,2 40,230,220 ,210,200,1 70,140,"[N ODE | |
| 978 | . ; | |
| 979 | . ; Quit if the payer sheet doe s not have the node | |
| 980 | . Q:'$D(^BP SF(9002313 .92,+IEN(9 002313.92) ,NODE,0)) | |
| 981 | . ; | |
| 982 | . ; Per NCP DP standar d, reversa ls do not support se gments lis ted below | |
| 983 | . I TYPE="B 2",",300,2 90,280,270 ,260,250,2 40,230,220 ,210,200,1 70,150,140 ,"[NODE Q | |
| 984 | . I TYPE="B 2",VER="D0 ",NODE=110 Q ;Patie nt segment not suppo rted in a D0 reversa l | |
| 985 | . ; | |
| 986 | . ; Per NCP DP standar d, eligibi lity does not suppor t segments listed be low | |
| 987 | . I TYPE="E 1",",290,2 80,270,260 ,250,230,2 20,210,200 ,190,180,1 70,160,130 ,"[NODE Q | |
| 988 | . ; | |
| 989 | . S DATAFND =0 ; indi cates if d ata is on the segmen t for us t o send | |
| 990 | . S SEGREC= "" ; segm ent's info rmation | |
| 991 | . ; | |
| 992 | . D:NODE=18 0 PROCDUR | |
| 993 | . ; | |
| 994 | . ;COB fiel ds | |
| 995 | . D:NODE=16 0 PROCCOB | |
| 996 | . ; | |
| 997 | . S ORDER=" " | |
| 998 | . F D Q:' ORDER | |
| 999 | . . ; | |
| 1000 | . . Q:NODE=1 80 ; DUR/ PPS sectio n (repeati ng), alrea dy process ed | |
| 1001 | . . Q:NODE=1 60 ; COB data proce ssed earli er | |
| 1002 | . . S ORDER= $O(^BPSF(9 002313.92, +IEN(90023 13.92),NOD E,"B",ORDE R)) | |
| 1003 | . . Q:'ORDER | |
| 1004 | . . S RECMIE N="" | |
| 1005 | . . S RECMIE N=$O(^BPSF (9002313.9 2,+IEN(900 2313.92),N ODE,"B",OR DER,RECMIE N)) | |
| 1006 | . . Q:RECMIE N="" | |
| 1007 | . . ; | |
| 1008 | . . S MDATA= $G(^BPSF(9 002313.92, +IEN(90023 13.92),NOD E,RECMIEN, 0)) | |
| 1009 | . . Q:MDATA= "" | |
| 1010 | . . ; | |
| 1011 | . . S FLDIEN =$P(MDATA, U,2) | |
| 1012 | . . Q:FLDIEN ="" | |
| 1013 | . . ; | |
| 1014 | . . S FDATA= $G(^BPSF(9 002313.91, FLDIEN,0)) | |
| 1015 | . . Q:FDATA= "" | |
| 1016 | . . S FLDNUM =$P(FDATA, U,1) | |
| 1017 | . . Q:FLDNUM ="" | |
| 1018 | . . ;Check f or alphanu meric NCPD P numbers - BPS*1*15 | |
| 1019 | . . I $P(FLD NUM,".")'? 3N S FLDNU M=$$VNUM^B PSECMPS(FL DNUM) Q:'F LDNUM | |
| 1020 | . . ; | |
| 1021 | . . S FLDID= $P($G(^BPS F(9002313. 91,FLDIEN, 5)),U) ; BPS NCPDP FIELD DEFS , (#.06) I D | |
| 1022 | . . ; | |
| 1023 | . . ;header data | |
| 1024 | . . S:NODE<1 30 FLDDATA =$G(BPS(90 02313.02,I EN(9002313 .02),FLDNU M,"I")) | |
| 1025 | . . ; | |
| 1026 | . . ;transac tion data | |
| 1027 | . . S:NODE>1 20 FLDDATA =$G(BPS(90 02313.0201 ,IEN(90023 13.0201),F LDNUM,"I") ) | |
| 1028 | . . I $TR($E (FLDDATA,3 ,999),"0 { }")'="" S DATAFND=1 ;BPS*1*15 - allow fo r zero in NCPDP ID | |
| 1029 | . . ; | |
| 1030 | . . ;check i f this is the seg id - call th is after f ld chk sin ce | |
| 1031 | . . ;we don' t want to send the s egment if this is al l there is | |
| 1032 | . . I (NODE> 100)&(FLDN UM=111) S FLDDATA=$$ SEGID(NODE ) | |
| 1033 | . . ; | |
| 1034 | . . ; Specia l code to handle the Submissio n Clarific ation Code (420) rep eating gro up | |
| 1035 | . . I FLDNUM =420 D SUB CLAR(.DATA FND,.IEN,. SEGREC) Q | |
| 1036 | . . ; | |
| 1037 | . . ; Specia l code to handle the Other Amo unt Claime d repeatin g group | |
| 1038 | . . I FLDNUM =480 D OAM TCLMD(.DAT AFND,.IEN, .SEGREC) Q | |
| 1039 | . . I FLDNUM =479 Q ; fields 479 & 480 han dled as a pair in OA MTCLMD | |
| 1040 | . . ; | |
| 1041 | . . Q:FLDDAT A="" ;lj e;7/23/03; don't wan t extra fi eld separa tors when field is b lank for t esting for WebMD. | |
| 1042 | . . ; | |
| 1043 | . . S:NODE=1 00 SEGREC= SEGREC_FLD DATA ;no FS on the header rec | |
| 1044 | . . S:NODE>1 00 SEGREC= SEGREC_$C( 28)_FLDDAT A ;FS alw ays procee ds fld | |
| 1045 | . .; | |
| 1046 | . I (DATAFN D)&(NODE=1 00) S REC( NODE)=SEGR EC ;no S S when it' s the head er | |
| 1047 | . I (DATAFN D)&(NODE>1 00) D | |
| 1048 | . . I '$D(RE C(NODE)) S REC(NODE) =REC I REC [$C(29) S REC="" | |
| 1049 | . . S REC(NO DE)=REC(NO DE)_$C(30) _SEGREC ; SS before the seg | |
| 1050 | ; | |
| 1051 | Q | |
| 1052 | ||
| 1053 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1054 | ||
| 1055 | BPSOSH2 ; BHAM ISC/S D/lwj/DLF - Assemble formatted claim ;06 /01/2004 | |
| 1056 | ; ;1.0;E CLA IMS MGMT E NGINE;**1, 5,8,10,15, 19,20,23** ;JUN 2004; Build 27 | |
| 1057 | ||
| 1058 | ... | |
| 1059 | ||
| 1060 | ; Put toget her ASCII formatted record per the Payer Sheet Def inition | |
| 1061 | ; Input: | |
| 1062 | ; NODES - "100^110^ 120" or "1 30^140^150 ^160^170^1 80^190^200 ^210^220^2 30^240^250 ^260^270^2 80^290^300 " | |
| 1063 | ; Passed by Ref: | |
| 1064 | ; .IEN - I nternal En try Number array | |
| 1065 | ; .BPS - F ormatted D ata Array with claim and trans action dat a | |
| 1066 | ; .REC - F ormatted A SCII recor d (result) | |
| 1067 | ; | |
| 1068 | XLOOP(NODE S,IEN,BPS, REC) ;EP - from BPSE CA1 | |
| 1069 | ; | |
| 1070 | N DATAFND,F DATA,FLAG, FLDDATA,FL DID,FLDIEN ,FLDNUM,IE N511,IEN59 ,INDEX,MDA TA,NODE,OR DER,PMODE, RECMIEN,SE GREC | |
| 1071 | N VER,TYPE, BPSX | |
| 1072 | ; | |
| 1073 | ; Get payer sheet ver sion and t ransaction type | |
| 1074 | S VER=$P($G (^BPSF(900 2313.92,+$ G(IEN(9002 313.92)),1 )),U,2) | |
| 1075 | S TYPE=$G(B PS(9002313 .02,+$G(IE N(9002313. 02)),103," I")) | |
| 1076 | ; | |
| 1077 | ; Loop thro ugh the NO DES variab le delimit ed by U | |
| 1078 | F INDEX=1:1 :$L(NODES, U) D | |
| 1079 | . S NODE=$P (NODES,U,I NDEX) Q:NO DE="" | |
| 1080 | . ; | |
| 1081 | . ; VA does not suppo rt these s egments | |
| 1082 | . Q:",300,2 90,280,270 ,260,250,2 40,230,220 ,210,200,1 70,140,"[N ODE | |
| 1083 | . ; | |
| 1084 | . ; Quit if the payer sheet doe s not have the node | |
| 1085 | . Q:'$D(^BP SF(9002313 .92,+IEN(9 002313.92) ,NODE,0)) | |
| 1086 | . ; | |
| 1087 | . ; Per NCP DP standar d, reversa ls do not support se gments lis ted below | |
| 1088 | . I TYPE="B 2",",300,2 90,280,270 ,260,250,2 40,230,220 ,210,200,1 70,150,140 ,"[NODE Q | |
| 1089 | . I TYPE="B 2",VER="D0 ",NODE=110 Q ;Patie nt segment not suppo rted in a D0 reversa l | |
| 1090 | . ; | |
| 1091 | . ; Per NCP DP standar d, eligibi lity does not suppor t segments listed be low | |
| 1092 | . I TYPE="E 1",",290,2 80,270,260 ,250,230,2 20,210,200 ,190,180,1 70,160,130 ,"[NODE Q | |
| 1093 | . ; | |
| 1094 | . S DATAFND =0 ; indi cates if d ata is on the segmen t for us t o send | |
| 1095 | . S SEGREC= "" ; segm ent's info rmation | |
| 1096 | . ; | |
| 1097 | . D:NODE=18 0 PROCDUR | |
| 1098 | . ; | |
| 1099 | . ;COB fiel ds | |
| 1100 | . D:NODE=16 0 PROCCOB | |
| 1101 | . ; | |
| 1102 | . S ORDER=" " | |
| 1103 | . F D Q:' ORDER | |
| 1104 | . . ; | |
| 1105 | . . Q:NODE=1 80 ; DUR/ PPS sectio n (repeati ng), alrea dy process ed | |
| 1106 | . . Q:NODE=1 60 ; COB data proce ssed earli er | |
| 1107 | . . S ORDER= $O(^BPSF(9 002313.92, +IEN(90023 13.92),NOD E,"B",ORDE R)) | |
| 1108 | . . Q:'ORDER | |
| 1109 | . . S RECMIE N="" | |
| 1110 | . . S RECMIE N=$O(^BPSF (9002313.9 2,+IEN(900 2313.92),N ODE,"B",OR DER,RECMIE N)) | |
| 1111 | . . Q:RECMIE N="" | |
| 1112 | . . ; | |
| 1113 | . . S MDATA= $G(^BPSF(9 002313.92, +IEN(90023 13.92),NOD E,RECMIEN, 0)) | |
| 1114 | . . Q:MDATA= "" | |
| 1115 | . . ; | |
| 1116 | . . S FLDIEN =$P(MDATA, U,2) | |
| 1117 | . . Q:FLDIEN ="" | |
| 1118 | . . ; | |
| 1119 | . . S FDATA= $G(^BPSF(9 002313.91, FLDIEN,0)) | |
| 1120 | . . Q:FDATA= "" | |
| 1121 | . . S FLDNUM =$P(FDATA, U,1) | |
| 1122 | . . Q:FLDNUM ="" | |
| 1123 | . . ;Check f or alphanu meric NCPD P numbers - BPS*1*15 | |
| 1124 | . . I $P(FLD NUM,".")'? 3N S FLDNU M=$$VNUM^B PSECMPS(FL DNUM) Q:'F LDNUM | |
| 1125 | . . ; | |
| 1126 | . . S FLDID= $P($G(^BPS F(9002313. 91,FLDIEN, 5)),U) ; BPS NCPDP FIELD DEFS , (#.06) I D | |
| 1127 | . . ; | |
| 1128 | . . ;header data | |
| 1129 | . . S:NODE<1 30 FLDDATA =$G(BPS(90 02313.02,I EN(9002313 .02),FLDNU M,"I")) | |
| 1130 | . . ; | |
| 1131 | . . ;transac tion data | |
| 1132 | . . S:NODE>1 20 FLDDATA =$G(BPS(90 02313.0201 ,IEN(90023 13.0201),F LDNUM,"I") ) | |
| 1133 | . . I $TR($E (FLDDATA,3 ,999),"0 { }")'="" S DATAFND=1 ;BPS*1*15 - allow fo r zero in NCPDP ID | |
| 1134 | . . ; | |
| 1135 | . . ;check i f this is the seg id - call th is after f ld chk sin ce | |
| 1136 | . . ;we don' t want to send the s egment if this is al l there is | |
| 1137 | . . I (NODE> 100)&(FLDN UM=111) S FLDDATA=$$ SEGID(NODE ) | |
| 1138 | . . ; | |
| 1139 | . . ; Specia l code to handle the Submissio n Clarific ation Code (420) rep eating gro up | |
| 1140 | . . I FLDNUM =420 D SUB CLAR(.DATA FND,.IEN,. SEGREC) Q | |
| 1141 | . . ; | |
| 1142 | . . ; Specia l code to handle the Other Amo unt Claime d repeatin g group | |
| 1143 | . . I FLDNUM =480 D OAM TCLMD(.DAT AFND,.IEN, .SEGREC) Q | |
| 1144 | . . I FLDNUM =479 Q ; fields 479 & 480 han dled as a pair in OA MTCLMD | |
| 1145 | . . ; | |
| 1146 | . . Q:FLDDAT A="" ;lj e;7/23/03; don't wan t extra fi eld separa tors when field is b lank for t esting for WebMD. | |
| 1147 | . . ; | |
| 1148 | . . S:NODE=1 00 SEGREC= SEGREC_FLD DATA ;no FS on the header rec | |
| 1149 | . . S:NODE>1 00 SEGREC= SEGREC_$C( 28)_FLDDAT A ;FS alw ays procee ds fld | |
| 1150 | . .; | |
| 1151 | . ; If no d ata on thi s segment, Quit, don ’t check f or addl. f ields. | |
| 1152 | . ; | |
| 1153 | . I 'DATAFN D Q | |
| 1154 | . ; | |
| 1155 | . ; The use r has the ability, v ia the act ion RED / Resubmit w ith | |
| 1156 | . ; Edits, to add cla im fields not on the payer she et. Any | |
| 1157 | . ; fields to be adde d to the c laim are s tored in t he file BP S NCPDP | |
| 1158 | . ; OVERRID E. Pull t he BPS TRA NSACTION f rom the BP S CLAIMS f ile, | |
| 1159 | . ; then pu ll the fie ld NCPDP O VERRIDES. If popula ted, pull any | |
| 1160 | . ; additio nal fields . | |
| 1161 | . ; | |
| 1162 | . S IEN59=$ $GET1^DIQ( 9002313.02 ,IEN(90023 13.02),.08 ,"I") | |
| 1163 | . S IEN511= $$GET1^DIQ (9002313.5 9,IEN59,1. 13,"I") | |
| 1164 | . I IEN511 D | |
| 1165 | . . ; | |
| 1166 | . . ; Loop through ad ditional f ields for the curren t segment | |
| 1167 | . . ; (NODE ) and add to the cla im. | |
| 1168 | . . ; | |
| 1169 | . . S NODEI EN=$O(^BPS F(9002313. 9,"C",NODE ,"")) | |
| 1170 | . . I 'NODE IEN Q | |
| 1171 | . . S BPSX= "" | |
| 1172 | . . F S BP SX=$O(^BPS (9002313.5 11,IEN511, 2,"SEG",NO DEIEN,BPSX )) Q:BPSX= "" D | |
| 1173 | . . . S FLD IEN=$$GET1 ^DIQ(90023 13.5112,BP SX_","_IEN 511_",",.0 1,"I") | |
| 1174 | . . . ; | |
| 1175 | . . . ; The data in t he BPS arr ay is stor ed accordi ng to the number | |
| 1176 | . . . ; of each field in BPS CL AIMS. Tha t number c orresponds to the | |
| 1177 | . . . ; NCP DP field n umber when the NCPDP number is all numer ic. For | |
| 1178 | . . . ; alp hanumeric field numb ers, such as "B95", we must ca ll | |
| 1179 | . . . ; $$V NUM^BPSECM PS to pull the BPS C LAIMS fiel d number f rom BPS | |
| 1180 | . . . ; NCP DP FIELD D EFS. | |
| 1181 | . . . ; | |
| 1182 | . . . S FLD NUM=$$GET1 ^DIQ(90023 13.91,FLDI EN,.01,"E" ) | |
| 1183 | . . . I FLD NUM="" Q | |
| 1184 | . . . I $P( FLDNUM,"." )'?3N S FL DNUM=$$VNU M^BPSECMPS (FLDNUM) I 'FLDNUM Q | |
| 1185 | . . . ; | |
| 1186 | . . . I NOD E<130 S FL DDATA=$G(B PS(9002313 .02,IEN(90 02313.02), FLDNUM,"I" )) | |
| 1187 | . . . I NOD E>120 S FL DDATA=$G(B PS(9002313 .0201,IEN( 9002313.02 01),FLDNUM ,"I")) | |
| 1188 | . . . ; | |
| 1189 | . . . I FLD DATA="" Q | |
| 1190 | . . . ; | |
| 1191 | . . . ; $C( 28) = File Separator . On all segments e xcept the Header, | |
| 1192 | . . . ; FS precedes e ach field. | |
| 1193 | . . . ; | |
| 1194 | . . . I NOD E=100 S SE GREC=SEGRE C_FLDDATA | |
| 1195 | . . . I NOD E>100 S SE GREC=SEGRE C_$C(28)_F LDDATA | |
| 1196 | . . . ; | |
| 1197 | . . . Q | |
| 1198 | . . Q | |
| 1199 | . ; | |
| 1200 | . I (DATAFN D)&(NODE=1 00) S REC( NODE)=SEGR EC ;no S S when it' s the head er | |
| 1201 | . I (DATAFN D)&(NODE>1 00) D | |
| 1202 | . . I '$D(RE C(NODE)) S REC(NODE) =REC I REC [$C(29) S REC="" | |
| 1203 | . . S REC(NO DE)=REC(NO DE)_$C(30) _SEGREC ; SS before the seg | |
| 1204 | ; | |
| 1205 | Q | |
| 1206 | ||
| 1207 | ||
| 1208 | ||
| 1209 | The length of the co mment fiel d in the A ctivity Lo g was chan ged from 7 5 to 100 ( please see PSO*7.0*3 86, from 2 012, for m ore inform ation). Th e subrouti nes ECMEAC T^PSOBPSU1 and RXACT ^PSOBPSU2 should hav e been upd ated at th at time to reflect t his change . They wer e not. The y are bein g updated as part of this enha ncement, a long with two other minor chan ges descri bed below. | |
| 1210 | ||
| 1211 | Subroutine Name | |
| 1212 | ECMEACT^PS OBPSU1 | |
| 1213 | Enhancemen t Category | |
| 1214 | New | |
| 1215 | Modify | |
| 1216 | ||
| 1217 | ||
| 1218 | Current Lo gic | |
| 1219 | ||
| 1220 | ECMEACT(RX ,RFL,COMM, USR) ; - A dd an Act to the ECM E Act Log (FILE 52) | |
| 1221 | ; Input: (r) RX - Rx IEN (#52) | |
| 1222 | ; (o) RFL - Re fill # (D efault: mo st recent) | |
| 1223 | ; (r) COMM - Co mments (up to 75 cha racters) | |
| 1224 | ; (o) USR - Us er logging the comme nts (Defau lt: DUZ) | |
| 1225 | S :'$D(RFL) RFL=$$LSTR FL^PSOBPSU 1(RX) | |
| 1226 | D RXACT^PSO BPSU2(RX,R FL,COMM,"M ",+$G(USR) ) | |
| 1227 | Q | |
| 1228 | ||
| 1229 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1230 | ||
| 1231 | ECMEACT(RX ,RFL,COMM, USR) ; - A dd an Act to the ECM E Act Log (FILE 52) | |
| 1232 | ; Input: (r) RX - Rx IEN (#52) | |
| 1233 | ; (o) RFL - Re fill # (D efault: mo st recent) | |
| 1234 | ; (r) COMM - Co mments (up to 100 ch aracters) | |
| 1235 | ; (o) USR - Us er logging the comme nts (Defau lt: DUZ) | |
| 1236 | S :'$D(RFL) RFL=$$LSTR FL^PSOBPSU 1(RX) | |
| 1237 | D RXACT^PSO BPSU2(RX,R FL,COMM,"M ",+$G(USR) ) | |
| 1238 | Q | |
| 1239 | ||
| 1240 | ||
| 1241 | Add a <spa ce> to mak e the acti vity log l ook better . | |
| 1242 | ||
| 1243 | Subroutine Name | |
| 1244 | ECMESND^PS OBPSU1 | |
| 1245 | Enhancemen t Category | |
| 1246 | New | |
| 1247 | Modify | |
| 1248 | ||
| 1249 | ||
| 1250 | Current Lo gic | |
| 1251 | ||
| 1252 | ... | |
| 1253 | ; | |
| 1254 | ; - Creatin g ECME Act Log in fi le 52 | |
| 1255 | S ACT="" I $$STATUS^P SOBPSUT(RX ,RFL)="E P AYABLE" S ACT="Rev/R esubmit" | |
| 1256 | S ACT=ACT_" ECME:" | |
| 1257 | ; | |
| 1258 | ... | |
| 1259 | ||
| 1260 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1261 | ||
| 1262 | ... | |
| 1263 | ; | |
| 1264 | ; - Creatin g ECME Act Log in fi le 52 | |
| 1265 | S ACT="" | |
| 1266 | I $$STATUS^ PSOBPSUT(R X,RFL)="E PAYABLE" S ACT="Rev/ Resubmit " | |
| 1267 | S ACT=ACT_" ECME:" | |
| 1268 | ; | |
| 1269 | ... | |
| 1270 | ||
| 1271 | ||
| 1272 | ||
| 1273 | Subroutine Name | |
| 1274 | RXACT^PSOB PSU2 | |
| 1275 | Enhancemen t Category | |
| 1276 | New | |
| 1277 | Modify | |
| 1278 | ||
| 1279 | ||
| 1280 | Current Lo gic | |
| 1281 | ||
| 1282 | RXACT(RX,R FL,COMM,TY PE,USR) ; - Add an A ctivity to the ECME Activity L og (PRESCR IPTION fil e) | |
| 1283 | ; Input: (r) RX - Rx IEN (#52) | |
| 1284 | ; (o) RFL - Re fill # (D efault: mo st recent) | |
| 1285 | ; (r) COMM - Co mments (up to 75 cha racters) | |
| 1286 | ; (r) TYPE - Co mments typ e: (M-ECME ,E-Edit, e tc...) See file #52 DD for all values | |
| 1287 | ; (o) USR - Us er logging the comme nts (Defau lt: DUZ) | |
| 1288 | ; | |
| 1289 | S :'$D(RFL) RFL=$$LSTR FL^PSOBPSU 1(RX) S:'$ D(USR) USR =DUZ | |
| 1290 | S :'$D(^VA(2 00,+USR,0) ) USR=DUZ S COMM=$E( $G(COMM),1 ,75) | |
| 1291 | ; | |
| 1292 | I COMM="" Q | |
| 1293 | I '$D(^PSRX (RX)) Q | |
| 1294 | ; | |
| 1295 | N PSOTRIC S PSOTRIC=" ",PSOTRIC= $$TRIC^PSO REJP1(RX,R FL,PSOTRIC ) | |
| 1296 | I PSOTRIC=1 ,$E(COMM,1 ,7)'="TRIC ARE" S COM M=$E("TRIC ARE-"_COMM ,1,75) | |
| 1297 | I PSOTRIC=2 ,$E(COMM,1 ,7)'="CHAM PVA" S COM M=$E("CHAM PVA-"_COMM ,1,75) | |
| 1298 | N X,DIC,DA, DD,DO,DR,D INUM,Y,DLA YGO | |
| 1299 | S DA(1)=RX, DIC="^PSRX ("_RX_","" A"",",DLAY GO=52.3,DI C(0)="L" | |
| 1300 | S DIC("DR") =".02///"_ TYPE_";.03 ////"_USR_ ";.04///"_ $S(TYPE'=" M"&(RFL>5) :RFL+1,1:R FL)_";.05/ //"_COMM | |
| 1301 | S X=$$NOW^X LFDT() D F ILE^DICN | |
| 1302 | Q | |
| 1303 | ||
| 1304 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1305 | ||
| 1306 | RXACT(RX,R FL,COMM,TY PE,USR) ; - Add an A ctivity to the ECME Activity L og (PRESCR IPTION fil e) | |
| 1307 | ; Input: (r) RX - Rx IEN (#52) | |
| 1308 | ; (o) RFL - Re fill # (D efault: mo st recent) | |
| 1309 | ; (r) COMM - Co mments (up to 100 ch aracters) | |
| 1310 | ; (r) TYPE - Co mments typ e: (M-ECME ,E-Edit, e tc...) See file #52 DD for all values | |
| 1311 | ; (o) USR - Us er logging the comme nts (Defau lt: DUZ) | |
| 1312 | ; | |
| 1313 | S :'$D(RFL) RFL=$$LSTR FL^PSOBPSU 1(RX) S:'$ D(USR) USR =DUZ | |
| 1314 | S :'$D(^VA(2 00,+USR,0) ) USR=DUZ S COMM=$E( $G(COMM),1 ,100) | |
| 1315 | ; | |
| 1316 | I COMM="" Q | |
| 1317 | I '$D(^PSRX (RX)) Q | |
| 1318 | ; | |
| 1319 | N PSOTRIC S PSOTRIC=" ",PSOTRIC= $$TRIC^PSO REJP1(RX,R FL,PSOTRIC ) | |
| 1320 | I PSOTRIC=1 ,$E(COMM,1 ,7)'="TRIC ARE" S COM M=$E("TRIC ARE-"_COMM ,1,100) | |
| 1321 | I PSOTRIC=2 ,$E(COMM,1 ,7)'="CHAM PVA" S COM M=$E("CHAM PVA-"_COMM ,1,100) | |
| 1322 | N X,DIC,DA, DD,DO,DR,D INUM,Y,DLA YGO | |
| 1323 | S DA(1)=RX, DIC="^PSRX ("_RX_","" A"",",DLAY GO=52.3,DI C(0)="L" | |
| 1324 | S DIC("DR") =".02///"_ TYPE_";.03 ////"_USR_ ";.04///"_ $S(TYPE'=" M"&(RFL>5) :RFL+1,1:R FL)_";.05/ //"_COMM | |
| 1325 | S X=$$NOW^X LFDT() D F ILE^DICN | |
| 1326 | Q | |
| 1327 | ||
| 1328 | ||
| 1329 | New two ad ditional v ariables t o clean up the resul ts of XIND EX. | |
| 1330 | ||
| 1331 | Subroutine Name | |
| 1332 | UPDFL^PSOB PSU2 | |
| 1333 | Enhancemen t Category | |
| 1334 | New | |
| 1335 | Modify | |
| 1336 | ||
| 1337 | ||
| 1338 | Current Lo gic | |
| 1339 | ||
| 1340 | UPDFL(RXRE C,SUB,INDT ) ;update fill date with relea se date wh en NDC cha nges at CM OP and OPA I auto-rel ease | |
| 1341 | ; Input: RXR EC = Presc ription Fi le IEN | |
| 1342 | ; S UB = Refil l | |
| 1343 | ; IN DT = Relea se date | |
| 1344 | N DA,DIE,DR ,PSOX,SFN, DEAD,XOK,O LD,X,II,EX DAT,OFILLD ,COM,CNT,R FCNT,RF ; *459 - REM OVED SUB | |
| 1345 | ||
| 1346 | Modified L ogic (Chan ges are hi ghlighted) | |
| 1347 | ||
| 1348 | UPDFL(RXRE C,SUB,INDT ) ;update fill date with relea se date wh en NDC cha nges at CM OP and OPA I auto-rel ease | |
| 1349 | ; Input: RXR EC = Presc ription Fi le IEN | |
| 1350 | ; S UB = Refil l | |
| 1351 | ; IN DT = Relea se date | |
| 1352 | N DA,DIE,DR ,DTOUT,DUO UT,PSOX,SF N,DEAD,XOK ,OLD,X,II, EXDAT,OFIL LD,COM,CNT ,RFCNT,RF ;*459 - R EMOVED SUB | |
| 1353 | ||
| 1354 | ||
| 1355 | ||
| 1356 | ||
| 1357 | ||
| 1358 | The buildi ng of each claim req uest is di rected in part by th e Payer Sh eet, which is stored in the fi le BPS NCP DP FORMATS . In that file, the fields to be include d in the c laim reque st are gro uped by se gment. Sin ce this st ory calls for allowi ng the use r to add t o a claim request on e or more fields tha t are not on the pay er sheet, the system cannot us e the paye r sheet to determine which seg ment the a dditional fields sho uld be a p art of. | |
| 1359 | ||
| 1360 | The system needs to know what segment ea ch field g oes on, so a data fi eld (REQUE ST SEGMENT ) will be added to t he file BP S NCPDP FI ELD DEFS l inking eac h entry in that file to one se gment on t he claim r equest. Th at field w ill be a p ointer to a new file , BPS NCPD P SEGMENTS , which wi ll list th e possible NCPDP seg ments. | |
| 1361 | ||
| 1362 | NB: Althou gh this st ory does n ot call fo r any chan ges to the incoming claim resp onse, the claim resp onse segme nts will b e included in certai n changes prescribed in this d esign. | |
| 1363 | The file B PS NCPDP F IELD DEFS lists both outgoing claim requ est fields and incom ing claim response f ields. A f ield, RESP ONSE SEGME NT, will b e added to this file to indica te which s egment eac h response fields is a part of . Some fie lds are a part of bo th a reque st segment and a res ponse segm ent. | |
| 1364 | The new fi le BPS NCP DP SEGMENT S will lis t each seg ment on th e outgoing claim req uest and t he incomin g claim re sponse. A field on t his file w ill indica te whether a segment is a part of the re quest, res ponse, or both. | |
| 1365 | No changes will be m ade to the parsing, processing , or filin g of the i ncoming cl aim respon se. The ab ove two ch anges make sense at this time, based on adding seg ment-based data rela ted to the outgoing claim requ est. | |
| 1366 | ||
| 1367 | The file B PS NCPDP S EGMENTS is new and w ill be cre ated with the follow ing attrib utes. | |
| 1368 | ||
| 1369 | File Name | |
| 1370 | BPS NCPDP SEGMENTS | |
| 1371 | File Numbe r | |
| 1372 | 9002313.9 | |
| 1373 | Location | |
| 1374 | ^BPSF(9002 313.9, | |
| 1375 | Descriptio n | |
| 1376 | Each trans action des cribed in the NCPDP Telecommun ication St andard is comprised of one or more segme nts. This file cont ains a lis t of segme nts. The file BPS N CPDP FIELD DEFS list s each fie ld that ma y be on an outgoing claim requ est or an incoming c laim respo nse. Each entry in that file will have a field th at points to this fi le to indi cate which segment t hat field is a part of for the claim req uest (fiel d REQUEST SEGMENT) a nd/or the claim resp onse (fiel d RESPONSE SEGMENT). | |
| 1377 | ||
| 1378 | The new fi le BPS NCP DP SEGMENT S, file# 9 002313.9, will have the follow ing fields . | |
| 1379 | ||
| 1380 | Field Attr ibutes | |
| 1381 | Values | |
| 1382 | FIELD NAME | |
| 1383 | NAME | |
| 1384 | FIELD NUMB ER | |
| 1385 | .01 | |
| 1386 | NODE;PIECE | |
| 1387 | 0;1 | |
| 1388 | FIELD TYPE | |
| 1389 | Free Text | |
| 1390 | FIELD LENG TH | |
| 1391 | 50 | |
| 1392 | INPUT TRAN SFORM | |
| 1393 | K:$L(X)>50 !($L(X)<5) X | |
| 1394 | HELP PROMP T | |
| 1395 | Answer mus t be 5-50 characters in length . | |
| 1396 | DESCRIPTIO N | |
| 1397 | This is th e name of an NCPDP s egment. | |
| 1398 | ||
| 1399 | ||
| 1400 | FIELD NAME | |
| 1401 | VISTA SEGM ENT NUMBER | |
| 1402 | FIELD NUMB ER | |
| 1403 | 1 | |
| 1404 | NODE;PIECE | |
| 1405 | 0;2 | |
| 1406 | FIELD TYPE | |
| 1407 | Free Text | |
| 1408 | FIELD LENG TH | |
| 1409 | 50 | |
| 1410 | INPUT TRAN SFORM | |
| 1411 | K:$L(X)>5! ($L(X)<1) X | |
| 1412 | HELP PROMP T | |
| 1413 | Answer mus t be 1-5 c haracters in length | |
| 1414 | DESCRIPTIO N | |
| 1415 | This field is the Vi stA segmen t number a ssigned to this segm ent. | |
| 1416 | ||
| 1417 | ||
| 1418 | FIELD NAME | |
| 1419 | TYPE | |
| 1420 | FIELD NUMB ER | |
| 1421 | 2 | |
| 1422 | NODE;PIECE | |
| 1423 | 0;3 | |
| 1424 | FIELD TYPE | |
| 1425 | Set of Cod es | |
| 1426 | FIELD LENG TH | |
| 1427 | 1 | |
| 1428 | CODES | |
| 1429 | ‘C’ FOR CL AIM; ‘R’ F OR RESPONS E; ‘B’ FOR BOTH | |
| 1430 | INPUT TRAN SFORM | |
| 1431 | n/a | |
| 1432 | HELP PROMP T | |
| 1433 | Enter a va lue to ind icate whic h type(s) of transac tion this segment is a part of . | |
| 1434 | DESCRIPTIO N | |
| 1435 | Each NCPDP segment i s a part o f one or m ore types of transac tion. | |
| 1436 | ||
| 1437 | A new mult iple will be added t o file# 90 02313.511, BPS NCPDP OVERRIDE. It will l ist any fi elds to be added to the claim. It will a lso have a cross-ref erence of those fiel ds to inde x the fiel ds by thei r segment. | |
| 1438 | ||
| 1439 | Field Attr ibutes | |
| 1440 | Values | |
| 1441 | FIELD NAME | |
| 1442 | ADDL NCPDP FIELD | |
| 1443 | FIELD NUMB ER | |
| 1444 | 2 | |
| 1445 | SUB-FILE N UMBER | |
| 1446 | 9002313.51 12 | |
| 1447 | FIELD TYPE | |
| 1448 | Multiple | |
| 1449 | FIELD LENG TH | |
| 1450 | n/a | |
| 1451 | INPUT TRAN SFORM | |
| 1452 | n/a | |
| 1453 | HELP PROMP T | |
| 1454 | n/a | |
| 1455 | DESCRIPTIO N | |
| 1456 | Additional NCPDP fie lds to be added to t he claim. | |
| 1457 | ||
| 1458 | Field Attr ibutes | |
| 1459 | Values | |
| 1460 | FIELD NAME | |
| 1461 | ADDL NCPDP FIELD | |
| 1462 | FIELD NUMB ER | |
| 1463 | .01 | |
| 1464 | NODE;PIECE | |
| 1465 | 0;1 | |
| 1466 | FIELD TYPE | |
| 1467 | Pointer to file# 900 2313.91, | |
| 1468 | FIELD LENG TH | |
| 1469 | n/a | |
| 1470 | INPUT TRAN SFORM | |
| 1471 | Q | |
| 1472 | HELP PROMP T | |
| 1473 | Select the NCPDP fie ld to be a dded to th e claim. | |
| 1474 | DESCRIPTIO N | |
| 1475 | This data field is a n NCPDP fi eld to be added to t he claim. | |
| 1476 | ||
| 1477 | Field Attr ibutes | |
| 1478 | Values | |
| 1479 | FIELD NAME | |
| 1480 | SEGMENT | |
| 1481 | FIELD NUMB ER | |
| 1482 | .02 | |
| 1483 | NODE;PIECE | |
| 1484 | 0;2 | |
| 1485 | FIELD TYPE | |
| 1486 | Pointer to file 9002 313.9, BPS NCPDP SEG MENTS | |
| 1487 | FIELD LENG TH | |
| 1488 | n/a | |
| 1489 | INPUT TRAN SFORM | |
| 1490 | Q | |
| 1491 | HELP PROMP T | |
| 1492 | Select the Segment o n which th is field s hould appe ar. | |
| 1493 | DESCRIPTIO N | |
| 1494 | This data field indi cates the segment of a claim r esponse on which thi s NCPDP fi eld should appear. | |
| 1495 | ||
| 1496 | File | |
| 1497 | 9002313.51 1, BPS NCP DP OVERRID E | |
| 1498 | Sub-File | |
| 1499 | 9002313.51 11, NCPDP FIELD | |
| 1500 | Type of In dexing | |
| 1501 | REGULAR | |
| 1502 | To Be Used for Looku p? | |
| 1503 | YES | |
| 1504 | Descriptio n | |
| 1505 | This cross -reference lists eac h field by its SEGME NT. This index is u sed during the claim submissio n process to add any additiona l fields t o the appr opriate se gment (see XLOOP^BPS OSCF and X LOOP^BPSOS H2). | |
| 1506 | Name of In dex | |
| 1507 | “SEG” | |
| 1508 | ||
| 1509 | The follow ing fields will be a dded to fi le# 900231 3.91, BPS NCPDP FIEL D DEFS. | |
| 1510 | ||
| 1511 | Field Attr ibutes | |
| 1512 | Values | |
| 1513 | FIELD NAME | |
| 1514 | REQUEST SE GMENT | |
| 1515 | FIELD NUMB ER | |
| 1516 | 2 | |
| 1517 | NODE;PIECE | |
| 1518 | 5;4 | |
| 1519 | FIELD TYPE | |
| 1520 | Pointer to file 9002 313.9, BPS NCPDP SEG MENTS | |
| 1521 | HELP PROMP T | |
| 1522 | Select the Request S egment whi ch this fi eld would appear on. | |
| 1523 | DESCRIPTIO N | |
| 1524 | This data field indi cates the segment of a claim r equest on which this NCPDP fie ld would a ppear. If this NCPD P field ap pears only on the in coming res ponse, the n this fie ld would r emain blan k. | |
| 1525 | ||
| 1526 | Field Attr ibutes | |
| 1527 | Values | |
| 1528 | FIELD NAME | |
| 1529 | RESPONSE S EGMENT | |
| 1530 | FIELD NUMB ER | |
| 1531 | 3 | |
| 1532 | NODE;PIECE | |
| 1533 | 5;5 | |
| 1534 | FIELD TYPE | |
| 1535 | Pointer to file 9002 313.9, BPS NCPDP SEG MENTS | |
| 1536 | HELP PROMP T | |
| 1537 | Select the Response Segment wh ich this f ield would appear on . | |
| 1538 | DESCRIPTIO N | |
| 1539 | This data field indi cates the segment of a claim r esponse on which thi s NCPDP fi eld would appear. I f this NCP DP field a ppears onl y on the o utgoing cl aim reques t, then th is field w ould remai n blank. | |
| 1540 | ||
| 1541 | Two new cr oss-refere nces on fi le# 900231 3.91, BPS NCPDP FIEL D DEFS, wi ll be crea ted to ind ex fields by request segment a nd respons e segment. | |
| 1542 | ||
| 1543 | File | |
| 1544 | 9002313.91 BPS NCPDP FIELD DEF S | |
| 1545 | Type of In dexing | |
| 1546 | REGULAR | |
| 1547 | To Be Used for Looku p? | |
| 1548 | NO | |
| 1549 | Descriptio n | |
| 1550 | This cross -reference lists eac h field by its REQUE ST SEGMENT . | |
| 1551 | Name of In dex | |
| 1552 | “AC” | |
| 1553 | ||
| 1554 | File | |
| 1555 | 9002313.91 BPS NCPDP FIELD DEF S | |
| 1556 | Type of In dexing | |
| 1557 | REGULAR | |
| 1558 | To Be Used for Looku p? | |
| 1559 | NO | |
| 1560 | Descriptio n | |
| 1561 | This cross -reference lists eac h field by its RESPO NSE SEGMEN T. | |
| 1562 | Name of In dex | |
| 1563 | “AD” | |
| 1564 | ||
| 1565 | In the fil e BPS NCPD P FIELD DE FS, the ne w fields R EQUEST SEG MENT and R ESPONSE SE GMENT will be popula ted in the developme nt environ ment. When this file is added to the bui ld, it wil l be indic ated that the data w ill come w ith the fi le. Please refer to the latest NCPDP Tel ecommunica tion Stand ard Implem entation G uide, sect ions 10.4 and 10.5 f or a descr iption of which fiel ds are on which segm ents. | |
| 1566 | ||
| 1567 | These file s must be added to t he build i n the mann er describ ed in the following tables | |
| 1568 | BPS NCPDP FIELD DEFS | |
| 1569 | BPS NCPDP OVERRIDE | |
| 1570 | BPS NCPDP SEGMENTS | |
| 1571 | ||
| 1572 | File Name | |
| 1573 | BPS NCPDP FIELD DEFS | |
| 1574 | Send Full or Partial DD | |
| 1575 | Full | |
| 1576 | Update the Data Dict ionary | |
| 1577 | Yes | |
| 1578 | Send Secur ity Codes | |
| 1579 | No | |
| 1580 | Screen to Determine DD Update | |
| 1581 | n/a | |
| 1582 | Data Comes with File | |
| 1583 | Yes | |
| 1584 | Site’s Dat a | |
| 1585 | Merge | |
| 1586 | Resolve Po inters | |
| 1587 | Yes | |
| 1588 | May User O verride Da ta Update | |
| 1589 | No | |
| 1590 | Data List | |
| 1591 | n/a | |
| 1592 | Screen to Select Dat a | |
| 1593 | n/a | |
| 1594 | ||
| 1595 | File Name | |
| 1596 | BPS NCPDP OVERRIDE | |
| 1597 | Send Full or Partial DD | |
| 1598 | Partial | |
| 1599 | Update the Data Dict ionary | |
| 1600 | Yes | |
| 1601 | Send Secur ity Codes | |
| 1602 | No | |
| 1603 | Screen to Determine DD Update | |
| 1604 | n/a | |
| 1605 | Data Comes with File | |
| 1606 | No | |
| 1607 | Site’s Dat a | |
| 1608 | n/a | |
| 1609 | Field | |
| 1610 | Sub-file# 9002313.51 11, NCPDP FIELD, fie ld# .03, S EGMENT | |
| 1611 | Resolve Po inters | |
| 1612 | n/a | |
| 1613 | May User O verride Da ta Update | |
| 1614 | n/a | |
| 1615 | Data List | |
| 1616 | n/a | |
| 1617 | Screen to Select Dat a | |
| 1618 | n/a | |
| 1619 | ||
| 1620 | File Name | |
| 1621 | BPS NCPDP SEGMENTS | |
| 1622 | Send Full or Partial DD | |
| 1623 | Full | |
| 1624 | Update the Data Dict ionary | |
| 1625 | Yes | |
| 1626 | Send Secur ity Codes | |
| 1627 | No | |
| 1628 | Screen to Determine DD Update | |
| 1629 | No | |
| 1630 | Data Comes with File | |
| 1631 | Yes | |
| 1632 | Site’s Dat a | |
| 1633 | Overwrite | |
| 1634 | Resolve Po inters | |
| 1635 | n/a | |
| 1636 | May User O verride Da ta Update | |
| 1637 | No | |
| 1638 | Data List | |
| 1639 | n/a | |
| 1640 | Screen to Select Dat a | |
| 1641 | n/a |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.