Hi there,
How are you doing?
I have a question on how to combine two obs values and display them as one.
We have recently switched lab. Some of the test results from the new and old lab are not mapped to the same obs terms.
We have templates that could display the obs value and they are still pointing at the old obs term. I could change the template to point to the new obs term but the template would not display the old obs term after that. Since the template is meant to display all the test results, I would like to see if there is a way to display multiple obs values as one value and sorted by obs date.
Our current method for pulling the obs term is using LIST_OBS and put the return values to an array.
Is there a way to pulling the return values of two obs terms into one array?
Thanks for any input!
Simon
You have hit on an easily-caused issue when HL7 interfaces cross reference files aren't well managed. Ideally you always use a single obs term for a particular metric regardless of interface. However, it isn't all that easy to track, and there's often gray areas. When I'm doing a new interface, I query the database for the obs terms in use to make sure I select obs terms that are already in use. This also keeps the flowsheet views consistent.
My preferred solution to your particular issue is to update the HL7 interface cross reference files so the lab results in the HL7 map to the same lab result obs terms that they were originally. Then in the database I would change the values from the new obs terms to the original obs terms. That way you aren't using different obs terms for the same results at all, and you don't have to edit views, MEL code, templates, etc every time something changes.
Here's a query to start with for getting the obs terms that are in use. I usually save it to CSV so I can manipulate it in a spreadsheet.
select COUNT(o.HDID) as count,o.HDID, ob.name, ob.description, ob.unit, ob.MLCODE, ob.LOINCCODE from obs o, obshead ob where o.hdid = ob.hdid group by o.hdid, ob.name, ob.description, ob.unit, ob.MLCODE, ob.LOINCCODE order by DESCRIPTION
-dp