This page provides an overview on how and when to configure a schema on an HL7v2 store to parse HL7v2 messages.
Default schema
The Cloud Healthcare API uses a default schema to parse HL7v2 messages that conform to the HL7v2 standard. If your HL7v2 messages conform to the standard, and do not contain custom segments, fields, or any other data that deviates from the standard, see Enable schematized parsing for HL7v2 messages.
Custom schema
If you have HL7v2 messages that don't conform to the HL7v2 standard, see Use a custom schema to parse HL7v2 messages.
Select a parser version
You can specify options for the parser in the ParserConfig
object, regardless of whether you're using the
default schema or a custom schema. The ParserConfig
contains a
ParserVersion
object that lets you specify a version for the parser. See the reference documentation for details on each version.
We recommend that, for all use cases, you specify the
V3
version of the parser. The V3
version has the following advantages:
- It contains the existing functionality in the
V2
version. When used with the default parser, it unescapes the following default escaped HL7v2 control characters:
- Field separator:
|
- Component separator:
^
- Sub-component separator:
&
- Repetition separator:
~
- Escape character:
\
- Truncation character:
#
- Field separator:
When used with a custom parser, the
V3
parser uses improved matching techniques over the other parser versions.