hl7v2-analyze-flatfile command may be used to load a flat file containing HL7 v2.x messages; it analyzes the flat file's contents then reports on how they would map to FHIR resources if passed into a Smile CDR endpoint (e.g. a HL7 v2.x Listening Endpoint module).
bin/smileutil hl7v2-analyze-flatfile -f "messages.hl7"
In the example above,
messages.hl7 is a text file containing one or more raw HL7 v2.x messages.
-f [filename or directory](or
--filename) – This argument should point to an individual file or to a directory (in which case all files in the directory will be processed). Note that any files with an extension ending in
.bz2will be expanded during processing.
-b [control ID](or
--begin-at-id) – (optional) If set, all messages in the stream will be skipped until the one with the specified control ID.
-m [mapper classes](or
--mappers) – (optional) If set, this option specifies a comma-separated list of HL7v2 Mapper Classes that should be applied during translation.
--output) – (optional) If set, this option specifies the output file.
--use-obr2-as-primary) – (optional) If set, this option specifies that
OBR-2should be treated as the primary OBR identifier. See the hl7v2_fhir_mapper_obr.use_obr2_placer_order_number_as_primary configuration property for more information.
--use-obr3-as-primary) – (optional) If set, this option specifies that
OBR-3should be treated as the primary OBR identifier. See the hl7v2_fhir_mapper_obr.use_obr3_filler_order_number_as_primary configuration property for more information.
--stop-on-error) – (optional) If set, the command will stop upon receiving a non-successful code from the receiving system in an ACK.
--validate) – (optional) If set, the resulting bundle will be validated.
Note that both
-ob3 can be set at the same time. Where neither option is provided, we default to using