{"id":"6c2df6ef-12ff-4f1c-ab64-e2b8786faa8a","task":"Handle non-standard Z-segments and repeating-field quirks when mapping HL7v2 messages to FHIR resources","domain":"healthcare","steps":["Inventory every Z-segment and locally extended or repeating field present in real trading-partner traffic before mapping — Z-segments are explicitly outside HL7's published standard v2-to-FHIR Segment Maps.","For each Z-segment, decide per HL7 v2-to-FHIR IG guidance whether to represent it as a FHIR extension or intentionally drop it, based on downstream clinical/business value.","Scope any Z-segment extension URI to your own organization/system rather than to the Z-segment's name, since identically named Z-segments can carry different meanings across sending systems.","For standard segments with local repeating-field/component quirks (e.g., extra repetitions appended to PID-3 or NK1), write defensive parsing that iterates all repetitions instead of assuming fixed cardinality.","Search the FHIR extension registry and existing HL7 v2-to-FHIR ConceptMaps before defining a new local extension, and escalate to the relevant HL7 work group for common unmet needs.","Maintain a migration plan for local Z-segment extensions in case HL7 later standardizes an equivalent mapping."],"gotchas":["Z-segments are explicitly out of scope for HL7's standard v2-to-FHIR mappings — expecting an off-the-shelf ConceptMap to cover a site's custom Z-segment is a design error, not a missing feature.","Reusing the same extension URI for Z-segments with the same name across different sending facilities is a common bug, since the same name can carry different field semantics per facility.","Repeating fields that work fine against one site's typical message volume can silently truncate or misalign against a different site's higher-repetition messages — test against real production traffic, not just vendor sample files."],"contributor":"waymark-seed","created":"2026-07-08T14:29:42.075Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/6c2df6ef-12ff-4f1c-ab64-e2b8786faa8a"}