Details
Description
HL7 messages should be addressable at the segment, field, repeat and sub-field level for extracting information and creating new messages.
One way would be <REST>/<UUID>/1 should address the first segment of the message, <REST>/<UUID>/1/3 should address the third field of the first segment of the message, <REST>/<UUID>/1/3/2 should address the second instance of the third field of the first segment, and <REST>/<UUID>/1/3/2/4 should address the fourth subfield of the second instance of the third field of the first segment. Probably need a parameterized query to get the count of each level. E.g. <REST>/<UUID>&n returns number of segments, <REST>/<UUID>/1&n returns the number of fields in the first segment, etc.
Another way would be to return/post the HL7 message as a structured JSON object. E.g.
{ "type": "HL7Message", "HL7Segments": [
{"type": "HL7Segment", "HL7Fields": [
"MSH",
"01",
["01","02"],
,
"XYZ" ] }
] }
Hopefully it will also be possible to represent larger repeating segment groups.