Newer Version Available
Custom HL7 JSON Object Parsing
The default parser supplied with Health Cloud works for most
purposes. If this parser doesn't meet your needs, you can create your own
parser class using the sample code provided.
You may wish to swap in an alternative parser if any of these is
true:
- You can't get JSON objects in the required format for Health Cloud.
- Your incoming message has extra elements that aren't supported in Health Cloud.
- You need to map an HL7 element to a non-default field in the corresponding Health Cloud object.
-
Create the new Apex class.
See the code samples for guidance.
- In Settings, under HL7 Parser Mapping, deactivate the existing parser mapping record.
-
Clone the existing parser mapping record and add the new
value.
If more than one is active, Salesforce uses the first listed, which is usually the one that was most recently used.
-
Define which nodes are parsed. If you want to parse all nodes in
the JSON object, not just the elements that are supported in Health
Cloud by default, set Parse Strategy to
2.
If you are using a custom parser to handle custom fields in your HL7 message that aren't represented in the supplied Health Cloud objects, you'll want to make sure all nodes are parsed. By default, the value is set to 1, which parses only those nodes that correspond to fields in the Health Cloud data objects. Any elements that aren't supported in Health Cloud are ignored.