@cosyte/transform
Public entry point for @cosyte/transform - the HL7 v2 → FHIR R4 transformation library.
@cosyte/transform is not a parser; it is a consumer one tier above the parser suite. It
takes already-parsed @cosyte/hl7 composites and produces validated @cosyte/fhir model nodes,
grounded on the official HL7 Version 2 to FHIR Implementation Guide (hl7.fhir.uv.v2mappings,
STU Edition 1). Its whole promise is narrow and honest: IG-grounded, fail-safe transformation
with typed, value-free diagnostics - never a confident wrong FHIR value.
This module ships the six safety-critical datatype converters, the immutable
OperationOutcome-shaped diagnostic channel and the NamingSystem resolver they consult,
the message-level assembly - HL7 v2 ADT → FHIR Patient + Encounter, the
ORU^R01 → DiagnosticReport + Observation results graph, the order-entry graph
(ORM_O01 / OML_O21 → ServiceRequest and RXO → MedicationRequest), and the thin IG
singles (VXU_V04 → Immunization, SIU_S12 → Appointment, MDM_T02 → DocumentReference),
all through toFhir(msg) - and the terminology value-translation layer: a
$translate-shaped toFhirCodeableConceptVia engine applying the license-clean IG value
ConceptMaps to the previously structural-only coded fields (route/site, appointment type, order
priority, substitution). Terminology depth beyond these maps, profiles, and the reverse
FHIR → v2 direction are not implemented.
Interfaces
- CodedTarget
- CodedValueMap
- ConvertResult
- NamingSystemRegistry
- NamingSystemSeed
- TransformContext
- TransformIssue
- TransformOptions
- TransformResult
Type Aliases
Variables
- ADDRESS_TYPE_MAP
- ADDRESS_USE_MAP
- ADMINISTRATIVE_GENDER_MAP
- APPOINTMENT_STATUS_MAP
- APPOINTMENT_TYPE_VALUE_MAP
- DEFAULT_V2_CODE_SYSTEMS
- DIAGNOSTIC_REPORT_STATUS_MAP
- ENCOUNTER_CLASS_V3_MAP
- ENCOUNTER_STATUS_MAP
- FATAL_CODES
- HL70078_INTERPRETATION_CODES
- IG_MAPPED_ADT_TRIGGERS
- IG_MAPPED_APPOINTMENT_TRIGGERS
- IG_MAPPED_DOCUMENT_TRIGGERS
- IG_MAPPED_IMMUNIZATION_TRIGGERS
- IG_MAPPED_ORDER_TRIGGERS
- IG_MAPPED_ORU_TRIGGERS
- IMMUNIZATION_STATUS_MAP
- ISSUE_CODES
- ISSUE_REGISTRY
- NAME_USE_MAP
- OBSERVATION_STATUS_MAP
- REQUEST_STATUS_MAP
- ROUTE_VALUE_MAP
- SERVICE_REQUEST_PRIORITY_MAP
- SITE_VALUE_MAP
- SUBSTITUTION_VALUE_MAP
- TRANSFORM_ISSUE_SYSTEM
- V2_0161_SYSTEM
- V2_0162_SYSTEM
- V2_0203_SYSTEM
- V2_0277_SYSTEM
- V2_0550_SYSTEM
- V3_ROUTE_OF_ADMINISTRATION_SYSTEM
- VERSION