43.5.1smileutil: HL7 v2.x Analyze Flat File

 

The 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).

43.5.2Usage

 
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.

43.5.3Options

 
  • -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 .gz or .bz2 will 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.
  • -o [filename] (or --output) – (optional) If set, this option specifies the output file.
  • -ob2 (or --use-obr2-as-primary) – (optional) If set, this option specifies that OBR-2 should 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.
  • -ob3 (or --use-obr3-as-primary) – (optional) If set, this option specifies that OBR-3 should 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.
  • -s (or --stop-on-error) – (optional) If set, the command will stop upon receiving a non-successful code from the receiving system in an ACK.
  • -v (or --validate) – (optional) If set, the resulting bundle will be validated.

Note that both -ob2 and -ob3 can be set at the same time. Where neither option is provided, we default to using -ob2.