Skip to main content
Version: v0.0.4

Interface: AppointmentResource

One appointment resource grouped under a SCH: an AIS (service), AIG (general resource), AIL (location), or AIP (personnel / provider) segment. The resource identifier lives at position 3 of every AI* segment; for the personnel resource (AIP) it is additionally surfaced as a typed person (XCN), while the coded code (first component verbatim) is always available.

Example

import type { AppointmentResource } from "@cosyte/hl7";
const r: AppointmentResource = { kind: "location", code: { identifier: "OR-1" } };

Properties

code?

readonly optional code?: CWE

The AI*-3 resource identifier surfaced as a coded element: code.identifier is the resource id (first component, verbatim). AIS-3 / AIG-3 are coded elements, so code.text / code.nameOfCodingSystem are meaningful there; AIL-3 is a PL (location) rather than a coded element, so only code.identifier (the location id, PL.1) is meaningful and the other CWE fields are positional provenance, not a coding system. Provenance-only.


kind

readonly kind: "service" | "general" | "location" | "personnel"

Which AI* segment sourced this resource: AIS→service, AIG→general, AIL→location, AIP→personnel.


person?

readonly optional person?: XCN

AIP-3 personnel resource as a typed XCN (personnel resources only): the appointment provider.