Eligibility Checks & Clearinghouses

@stephenwaite Any clue as to why most of the X12 Partner setup/configuration is hard coded?

looks like it was setup for just one customer a long time ago :man_shrugging:

Yep, thatā€™s not going to work. Do you have a spec that covers the 270/271? I didnā€™t find any that were worth much. Going to have to do some rewrite. I though at least the batch worked or if it does I doubt it works with very many clearing housesā€¦

I have the interface working on a button where I can tell if iā€™m sending good data or not so we at least have that to troubleshoot with. It works for sample data be then I bumped up on bugs in the 271 parse so ā€¦ nuts is the most polite way to express myself :slight_smile:

was working on these http://www.vtmedicaid.com/#/hipaaTools

Thanks, much better than what I have and it appear currently we are close to what this doc is saying. Somehow weā€™ll have to set up some hooks to handled the various approaches different clearinghouses interprets the spec. The Office Ally spec goes back to 2011 :slight_smile: Prob need to give more control back to the partner config.

@sjpadgett if weā€™re rewriting that screen letā€™s break it out into a proper namespace. library/insurance/eligibility/src/ and if you can get the classes done Iā€™ll get the UI setup on Twig.

Hi @robert.down, I think Stephen has been and is making his way through moving much of billing over to classes and I believe this module is in his plan. Terry wrote this feature and it is pretty clean code and should not be too difficult to move to classes.
My concern for now is that the X12 config is locked down in code and very little config comes from the partner ui. One can config away to no avail, drove me nuts. :slight_smile:
So while iā€™m adding the realtime eligibility checks iā€™m going to open the ui back up because weā€™ll have capability to now do both, realtime and batch.

On that note I could use some recm for integration of real time. Iā€™m thinking because eligibility checks are somewhat immediate a better implementation would be to do an auto check when an appointment is made/changed and add a button in the Eligibility tab in Insurance Demographics. For Reports iā€™m having to emulate batch by making a series of real time requests. Plus batch drill downs to qualify for a check needs to be improved.
In the end the UX needs some TLC just I donā€™t have plans to do now.

FYI: Hereā€™s a response from real time

ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œProcessingModeā€

RealTime
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œTimeStampā€

2019-02-23T16:32:46Z
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œPayloadIDā€

3b8c13f5-11e2-43bf-bc47-737cca04f3fe
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œCORERuleVersionā€

2.2.0
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œPayloadTypeā€

X12_999_Response_005010X231A1
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œSenderIDā€

OffAlly
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œReceiverIDā€

XXXXXXX
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œPayloadā€

ISA00 00 ZZOFFALLY ZZxxxxxx 1902240032*^005011264500150P*:~TA10000000011902231932A000~GSFAOFFALLY155214201902240032426450015X005010X231A1~ST99910001005010X231A1~AK1HS2005010X279A1~AK2270000000003005010X279A1~IK5R4~AK9R110~SE610001~GE1426450015~IEA1126450015~
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œErrorCodeā€

Success
ā€“8d699ac8acc9d25
Content-Disposition: form-data; name=ā€œErrorMessageā€

None
ā€“8d699ac8acc9d25ā€“

@stephenwaite Is this what you guys were chasing and what your mods covered?

ISA, GS, ST Control Number Segment Error Type
000000001,2,000000003 SE EE - Envelope error
Error Message Data Value Expected
SE has wrong number of included segments. 15 12


thought this fixed the segment count

Maybe I blew the patching. Iā€™ll check again and let ya know. That edi.inc library is begging to have some class :slight_smile:
I hope to have a PR today so you guys can do some testing. Iā€™m a little unsure about the x12 generation still so, hoping you can help me out with that.

1 Like

@albanyeye @stephenwaite @KyleNave
Iā€™ve got this to the point of integrating with the UI which I planned to change how tab and report work.
The attached patch is for testing. It will allow you to initiate a Request from Reports->Eligibility in real time. At this point iā€™m not writing to database but instead gives a download of the 270/271 X12 requests and responses with the 271 logs after parsing. Without real insurance data to send I canā€™t be sure about parsing so, thatā€™d be your guys mission. Note also that iā€™ve rewritten the 271 parse and it now resides in the edi.inc library. The old 271 inc is left as is for now. Eventually it will all become a single class.
Logs will show any AAA segments errors or an eligibility array if successful transactions. The batch Report upload is still the old stuff and the new real time is automatic where app will send the selected patients 270 x12 to OA, get the responses and then parse them and give you a results debug log to download.
Credentials for OA go into the X12 Partner plus the ISA05/07 and Testing/Production config items are turned back on.
Looking forward to some real time feedback especially concerning the X12 transactional with OA.

hereā€™s patch. two files.
eligibility-patch.zip (14.9 KB)

1 Like

Excellent. I will try it out today
EDIT:
just tried it. got an error

PHP Fatal error:  Uncaught Error: Call to undefined function xlj() in /var/www/openemr/interface/reports/edi_270.php:194
Stack trace:
#0 {main}
  thrown in /var/www/openemr/interface/reports/edi_270.php on line 194, referer: http://172.20.1.186/openemr/interface/main/tabs/main.php

I believe xlj() is a 5.0.2 functionā€¦

Thanks Rayā€¦
I ran eligibility on 5.02 this morning and got a text file to download. Unsure how to get the 271 file. Do I download it from Officeally?

270 Requests Sent:
ISA001234567 00 ZZ123456789 ZZ330897513 1902280850*^005010000000010P*:~
GSHS123456789330897513201902280850282X005010X279A1~
ST270000000003005010X279A1~
BHT
002213PROVTest600201902280850~
HL1**201~
NM1PR2*AETNA MEDICARE

Rayā€™s right, Iā€™m working from 502 master. Much easier to port back to 501. Hopefully you guys can setup a dev local branch to test. Otherwise will have to wait till iā€™m done and back port. (not real hard really).
I went into this thinking this feature at least worked to some extent but sadly no. One issue is that the parse engine is using the wrong delimā€™s and even then it only looks for the MSG segment to glean eligibility. In the end, old has to go.
Anyway iā€™m trying to get this up in a PR so we can work there. Itā€™s just that now I have all this eligibility information collected from the new parsing, I have to decide what and how to get to the UIā€¦
Itā€™s never easy, is it:).

1 Like

Missed this post. I automatically send to OA. If you look further in the log you will see the 271 response from OA and also any AAA errors and/or the EB segments parsed in to an arrayā€¦

canā€™t help with testing OA, but the old batch method produced a 270 that was accepted but likely wonā€™t deliver any 271 without the missing details in the specs above.

Sorry, I dont understand.
Where is the log? Is it part of the file I downloaded?