HL7
An HL7 v2 message is a line per segment, named by its first field: MSH, PID, OBX. Fields are split by |, and a field can hold parts split by ^, repeats split by ~, and sub-parts split by &:
PID|1||123^^^HOSP~456^^^LAB||SMITH^JOHN^Q
There, the identifiers field holds two repeats, and the name has three parts. The MSH segment says which separators a message uses, so the builder reads them from there.
Tell Crosswalk how to read it
To read a file, Crosswalk needs its schema: the name and type of each field, and which ones are lists. The builder below makes one from an example, and shows the JSON it reads as you go. When it reads the example the way you want, the Schema tab has the schema to use in a map.
- Pick a segment by clicking its tag at the start of any of its lines.
- Name its fields. Click a field on any of its lines and name it in the bar under the lines. A field with parts, such as
SMITH^JOHN^Q, shows each part on its own: click one to name it. Sub-parts, split by&, work the same way. A field that's a list, such as the identifiers split by~, has its items shaded in turn. - Name the segment above the lines. The dropdown beside each tag says whether it reads as one record or a list: one
PIDis a record, and theOBXsegments are a list.
Sample 4 lines, CSV: MSH|^~\&|LAB|HOSP|20260302120000…
Paste a few lines of your own file to make a schema for it; the layout is worked out from what you paste.
MSH lines are calledClick a tag on the left to work on other lines.Every setting is in the flat files reference.