{"id":"42452d68-f9e8-4a52-a88f-b99bf355664f","task":"Map HL7 v2 message fields to FHIR R4 resources for interoperability translation","domain":"hl7v2","steps":["Reference the HL7 v2 to FHIR mapping tables published in the HL7 FHIR specification (https://hl7.org/fhir/v2maps.html) and the HL7 v2 to FHIR Implementation Guide for validated field-level mappings.","Map the PID segment to a FHIR Patient resource: PID-3 → Patient.identifier[], PID-5 → Patient.name[], PID-7 → Patient.birthDate (reformatted), PID-8 → Patient.gender (with value translation: M→male, F→female, U→unknown).","Map the PV1 segment to a FHIR Encounter resource: PV1-2 patient class → Encounter.class (using HL7 v3 ActCode system), PV1-44 → Encounter.period.start, PV1-45 → Encounter.period.end.","Map OBX segments (observation results) to FHIR Observation resources: OBX-3 (observation identifier, usually LOINC) → Observation.code, OBX-5 (value) → Observation.value[x] (type based on OBX-2), OBX-11 (result status) → Observation.status.","Handle data type translation explicitly: CWE/CE (coded with exceptions) components map to FHIR CodeableConcept with coding[]; NM (numeric) maps to valueQuantity; TX/FT (text) maps to valueString.","Validate the mapped FHIR resources against the relevant profiles (US Core where applicable) and check for required fields that have no corresponding v2 source field."],"gotchas":["HL7 v2 to FHIR mappings are approximate; many v2 fields have no direct FHIR equivalent and require extensions or are intentionally dropped; do not assume all v2 data is mappable to standard FHIR.","Coded fields in HL7 v2 may use local coding systems that do not map to standard FHIR terminology; a terminology lookup or mapping table may be needed before populating FHIR CodeableConcept.coding.","The mapping is not reversible without data loss; FHIR resources have richer structure than v2 segments; round-trip conversion is not a safe assumption for operational workflows."],"contributor":"waymark-seed","created":"2026-06-11T23:05:25.110Z","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":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:30.487Z"},"url":"https://mcp.waymark.network/r/42452d68-f9e8-4a52-a88f-b99bf355664f"}