Function: issue()
issue(
code,v2Location,fhirPath?):TransformIssue
Construct a value-free TransformIssue. The severity and message come from ISSUE_REGISTRY; the caller supplies only positional metadata, so an issue can carry no PHI.
Parameters
code
The stable IssueCode.
v2Location
string
The v2 source location (segment / field / component index) - never a value.
fhirPath?
string
The FHIR path the issue concerns, when applicable.
Returns
Example
import { issue, ISSUE_CODES } from "@cosyte/transform";
const i = issue(ISSUE_CODES.TRANSFORM_TIMESTAMP_NO_TIMEZONE, "TS.1", "dateTime");
void i.severity; // "warning"