Variable: ISSUE_CODES
constISSUE_CODES:object
Stable non-fatal issue codes - the typed diagnostics the fail-safe rule emits.
Type Declaration
TRANSFORM_ADDRESS_USE_UNMAPPED
readonlyTRANSFORM_ADDRESS_USE_UNMAPPED:"TRANSFORM_ADDRESS_USE_UNMAPPED"="TRANSFORM_ADDRESS_USE_UNMAPPED"
An XAD.7 address-type code has no equivalent in the IG's HL70190 → address-use/type
ConceptMaps; Address.use/.type are left absent rather than guessed.
TRANSFORM_CODE_SYSTEM_UNRESOLVED
readonlyTRANSFORM_CODE_SYSTEM_UNRESOLVED:"TRANSFORM_CODE_SYSTEM_UNRESOLVED"="TRANSFORM_CODE_SYSTEM_UNRESOLVED"
A coding-system mnemonic (CWE.3 / CWE.6) was not recognized, so no canonical system URI could be emitted. The code is preserved; a URI is never invented.
TRANSFORM_CODE_UNMAPPED
readonlyTRANSFORM_CODE_UNMAPPED:"TRANSFORM_CODE_UNMAPPED"="TRANSFORM_CODE_UNMAPPED"
A coded value could not be mapped to a FHIR concept - either it carried no coding-system context
(CWE.3 absent), or it is a table code the IG ConceptMap has no target for (e.g. an OBX-11/
OBR-25 result status the HL70085/HL70123 map does not carry, or an OBX-8 abnormal flag absent from
HL70078). The original code is preserved / the FHIR value left absent; never coerced to a
neighbor and never guessed to final/normal.
TRANSFORM_ELEMENT_DROPPED
readonlyTRANSFORM_ELEMENT_DROPPED:"TRANSFORM_ELEMENT_DROPPED"="TRANSFORM_ELEMENT_DROPPED"
A populated source element was not carried to its FHIR target and was dropped - either because the IG map defines no target, or because that target's conversion is not implemented (e.g. XTN→ContactPoint telecom, PV1 participants). Surfaced here rather than silently discarded, never a fabricated value.
TRANSFORM_IDENTIFIER_SYSTEM_UNRESOLVED
readonlyTRANSFORM_IDENTIFIER_SYSTEM_UNRESOLVED:"TRANSFORM_IDENTIFIER_SYSTEM_UNRESOLVED"="TRANSFORM_IDENTIFIER_SYSTEM_UNRESOLVED"
The assigning authority (HD) could not be resolved to a FHIR Identifier.system URI via the
NamingSystem registry. The identifier is emitted with its value and no system - a system URI
is never synthesized from HD.1 alone.
TRANSFORM_NAME_USE_UNMAPPED
readonlyTRANSFORM_NAME_USE_UNMAPPED:"TRANSFORM_NAME_USE_UNMAPPED"="TRANSFORM_NAME_USE_UNMAPPED"
An XPN.7 name-type code has no equivalent in the IG's HL70200 → name-use ConceptMap;
HumanName.use is left absent rather than guessed.
TRANSFORM_QUANTITY_VALUE_INVALID
readonlyTRANSFORM_QUANTITY_VALUE_INVALID:"TRANSFORM_QUANTITY_VALUE_INVALID"="TRANSFORM_QUANTITY_VALUE_INVALID"
A v2 numeric value (NM) could not be represented as a FHIR decimal without altering it - e.g.
a leading +, a leading zero, or a trailing dot, which FHIR's decimal lexical form forbids. No
Quantity value is emitted rather than a canonicalized (and therefore altered) magnitude.
TRANSFORM_REQUIRED_ELEMENT_UNKNOWN
readonlyTRANSFORM_REQUIRED_ELEMENT_UNKNOWN:"TRANSFORM_REQUIRED_ELEMENT_UNKNOWN"="TRANSFORM_REQUIRED_ELEMENT_UNKNOWN"
A FHIR-required element's value could not be faithfully derived from the source, so it was
emitted with a data-absent-reason extension (value unknown) rather than fabricated - e.g.
MessageHeader.source.endpoint from an MSH-3 application namespace that is not a URL.
TRANSFORM_RESOURCE_INVALID
readonlyTRANSFORM_RESOURCE_INVALID:"TRANSFORM_RESOURCE_INVALID"="TRANSFORM_RESOURCE_INVALID"
A produced FHIR resource failed @cosyte/fhir R4 structural validation and was withheld
from the bundle rather than emitted as a silently-invalid resource - the conservative-emit gate.
TRANSFORM_SEGMENT_ASSEMBLED
readonlyTRANSFORM_SEGMENT_ASSEMBLED:"TRANSFORM_SEGMENT_ASSEMBLED"="TRANSFORM_SEGMENT_ASSEMBLED"
The message's trigger event has no IG message map, so its resource graph was assembled from the reusable IG segment maps rather than a message map. The graph is best-effort and flagged as such - never a fabricated message map.
TRANSFORM_TIMESTAMP_INVALID
readonlyTRANSFORM_TIMESTAMP_INVALID:"TRANSFORM_TIMESTAMP_INVALID"="TRANSFORM_TIMESTAMP_INVALID"
A v2 DTM/TS could not be parsed into a valid FHIR date/time; no value was emitted.
TRANSFORM_TIMESTAMP_NO_TIMEZONE
readonlyTRANSFORM_TIMESTAMP_NO_TIMEZONE:"TRANSFORM_TIMESTAMP_NO_TIMEZONE"="TRANSFORM_TIMESTAMP_NO_TIMEZONE"
A v2 DTM/TS carried a time-of-day but no timezone offset. FHIR forbids time-without-zone, so the value was reduced to date precision (or an explicit sender offset applied via options) - never a guessed UTC.
TRANSFORM_UNIT_NOT_UCUM
readonlyTRANSFORM_UNIT_NOT_UCUM:"TRANSFORM_UNIT_NOT_UCUM"="TRANSFORM_UNIT_NOT_UCUM"
A unit was not a valid UCUM code (or was not declared UCUM). It is preserved verbatim in
Quantity.unit; Quantity.code/.system are left absent - a UCUM code is never fabricated
and a magnitude is never converted.
Example
import { ISSUE_CODES } from "@cosyte/transform";
if (issue.code === ISSUE_CODES.TRANSFORM_TIMESTAMP_NO_TIMEZONE) {
// a v2 timestamp had a time-of-day but no timezone offset - reduced to date precision
}