Saltar al contenido principal

HL7 Validate

Category: Healthcare Standards
Node id: hl7-validate

Standards: HIPAA, GDPR, SOC2

Validates HL7v2 messages for structural correctness, content compliance, required segments, and custom rules

What it does​

  • Five validation modes: basic, structure, content, custom, comprehensive
  • Strict mode that treats warnings as errors
  • Required segment and segment order validation
  • Segment cardinality (max occurrences) checking
  • Field-level data type validation (NM, DT, TM, TS, CX, XPN, etc.)
  • Custom rules: field_dependency, conditional_required, value_set
  • Pattern matching via regex on field values

Use cases​

  • Validate incoming HL7 messages before processing in integration engines
  • Enforce message structure compliance for regulatory submissions
  • Quality-check HL7 feeds from third-party systems
  • Gate pipeline execution on message validation results

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
messagetextYesRaw HL7v2 message string to validate

Output ports​

NameTypeRequiredDescription
resultjsonNoValidation result (message, errors, warnings, warning_count, message_type, version)
validbooleanNoWhether the message passed all validation checks
successbooleanNoWhether the validation operation completed

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Validation Typevalidation_typeenumYesbasicbasic, structure, content, custom, comprehensiveType of validation to perform
Strict Modestrict_modebooleanNofalseTreat warnings as errors in strict mode

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Required Segmentsrequired_segmentsjsonNoArray of segment IDs that must be present (for structure validation)
Segment Ordersegment_orderjsonNoExpected segment order (for structure validation)
Max Occurrencesmax_occurrencesjsonNoMap of segment ID to max allowed occurrences
Field Validationsfield_validationsjsonNoArray of field validation rules (for content validation)
Custom Rulescustom_rulesjsonNoArray of custom validation rules (field_dependency, conditional_required, value_set)

Errors​

CodeDescription
MESSAGE_REQUIREDHL7 message input is missing
PARSE_FAILEDHL7 message could not be parsed
MISSING_MSHMessage is missing the required MSH segment
MISSING_REQUIRED_SEGMENTA required segment is not present in the message
INVALID_DATA_TYPEField value does not match expected HL7 data type

Runtime notes​

  • valid is true only when errors array is empty — warnings alone do not invalidate
  • In strict_mode, items that would normally be warnings are promoted to errors
  • Use valid output to gate downstream processing (e.g., only route valid messages to FHIR conversion)
  • errors and warnings share the same shape: {severity, code, message, location}

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..