This topic contains 8 replies, has 2 voices, and was last updated by Eliot Muir 8 years, 11 months ago.
Multiple rows in database for repeating segments
You must be logged in to reply to this topic.
This topic contains 8 replies, has 2 voices, and was last updated by Eliot Muir 8 years, 11 months ago.
Wishes to iNTERFACEWARE team,
I came across this post on your website.
I am having exactly the same problem, with repeating segments for a particular field, I need to populate multiple rows in the corresponding mapped field.However, the solution to it mentioned i.e The fix to the problem is simple – change the grammar root of the table to be the actual repeating segment, I could not exactly understand what needs to be done. Could you please explain it? A couple of snapshots may help.
Thank you
Okay, adding to it, My table in the chameleon are not mapped to any value, I have done mappings in the translator yet the tables in chameleon contain all the fields. My OBX segment is repeating and as suggested I made it Root grammar to OBX but it still doesn’t create multiple rows in the database corresponding to mapped fields.
You are looking at the old Chameleon manual. Grammar roots etc. are all to do with the legacy methods of mapping data. No point looking at that for new interfaces.
Okay, so what should I do to create multiple rows in database for repeating segments?
Load up the four demo channels that come with Iguana and see how the To Database one does it.
I did check that, not any reference for mapping repeating segments to individual rows in the database
It’s just a matter of having a for loop iterating through copying data something like this, if you imagine you have a repeating set of next of kin segments and say an output Kin table:
for i=1, #Msg.NK1 do
MapKin(Msg.NK1[i], Out.Kin[i])
end
if there are N NK1 segments then you will be mapping out N rows in the Kin table.
This page in the HL7 to database tutorial would be a good place to start:
If you follow the entire tutorial here:
http://help.interfaceware.com/kb/66
It will walk you through everything you need to know – hope that helps!
You must be logged in to reply to this topic.