I have heard tell of a way to use a MEL form to send data to a SQL database. I can't find any evidence of this, outside of some really old code buried in some folders at our agency.
Here's what I'm looking to do: I want to take a form in Centricity, use it to capture information, then instead of saving everything into OBS terms, I want to open a connection directly to a SQL database and save the information in there.
I know I CAN just save the data into OBS terms and use a job to move that data from the OBS table to the external database, but that will require the construction of about 20 new OBS terms and won't challenge me at all.
I'm also thinking that an HTML form may be the way to go, because then I could build out a connection within the HTML code itself. Any thoughts on that?
Surely someone out there has done this. If so, can you share your code, offer an explanation, or at least point me towards a resource?
This may end up being a dead end, but I thought I'd ask here anyway, just in case.
I have not tried what you are describing. I have experimented with pulling data from the database that isn't accessible via MEL. I suspect you could push data back. I used the following to get me started:
Brad
Brad's info is probably the better 'native' option. While there may be other methods for doing what you desire, consider the legal implications carefully. The EMR is PHI and as such, any distribution of data outside of the system must be logged by law and retained for a defined period (typically 6-9 years). If using HTML or other 'external' method, you may want to consider this aspect as part of your design and establish local policy defining the scope, access, logging, and rationale for said functionality. To cover you and your facility, I would highly recommend that your local legal counsel sign off on said policy and/or offer insight for remaining in compliance with applicable rules. If your legal counsel is unable to assist, consider retaining additional counsel that has actually kept up with medical legal rules in the digital age.
This is great advice, and honestly not something I had thought of, as we're in the beginning stages of seeing what we can do with this feature. We already export data from CPS and into other databases, so we have experience with the process. I'll talk to our legal department about this specifically too.
Thanks for this document, Brad. This offers up some pointers for a great start.
If I actually make progress on this, I'll update this thread with my discoveries and work to share the wealth.
If you are able to create a web service that will accept data from the CPS and put it into a database, then HTML form can create an HTTPs request.
If you are using an Angular than there is an "http" service that you can use to send/receive data.