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
| Name | Type | Required | Description |
|---|---|---|---|
message | text | Yes | Raw HL7v2 message string to validate |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Validation result (message, errors, warnings, warning_count, message_type, version) |
valid | boolean | No | Whether the message passed all validation checks |
success | boolean | No | Whether the validation operation completed |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Validation Type | validation_type | enum | Yes | basic | basic, structure, content, custom, comprehensive | Type of validation to perform |
| Strict Mode | strict_mode | boolean | No | false | Treat warnings as errors in strict mode |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Required Segments | required_segments | json | No | Array of segment IDs that must be present (for structure validation) | ||
| Segment Order | segment_order | json | No | Expected segment order (for structure validation) | ||
| Max Occurrences | max_occurrences | json | No | Map of segment ID to max allowed occurrences | ||
| Field Validations | field_validations | json | No | Array of field validation rules (for content validation) | ||
| Custom Rules | custom_rules | json | No | Array of custom validation rules (field_dependency, conditional_required, value_set) |
Errors
| Code | Description |
|---|---|
MESSAGE_REQUIRED | HL7 message input is missing |
PARSE_FAILED | HL7 message could not be parsed |
MISSING_MSH | Message is missing the required MSH segment |
MISSING_REQUIRED_SEGMENT | A required segment is not present in the message |
INVALID_DATA_TYPE | Field 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..