Skip to main content
Version: v0.0.3

Interface: Visit

PV1-derived visit view (HELPERS-03). msg.visit is undefined when no PV1 segment exists; this interface describes the shape when present. D-24a: doctor fields use XCN (not flat strings). Date/time fields are the fidelity TS (precision + timezone preserved).

Example

import type { Visit } from "@cosyte/hl7";
const v: Visit = {
patientClass: "I",
location: { pointOfCare: "ICU", room: "101" },
visitNumber: "VISIT001",
};
console.log(v.attendingDoctor?.familyName);
console.log(v.admitDateTime?.raw);

Properties

admitDateTime?

readonly optional admitDateTime?: DtmParts

PV1-44 admit date/time as the fidelity TS.


attendingDoctor?

readonly optional attendingDoctor?: XCN

PV1-7 attending doctor (D-24a XCN).


dischargeDateTime?

readonly optional dischargeDateTime?: DtmParts

PV1-45 discharge date/time as the fidelity TS.


location?

readonly optional location?: PL

PV1-3 assigned patient location (ward / room / bed) as PL.


patientClass?

readonly optional patientClass?: string

PV1-2 patient class ("I"=inpatient, "O"=outpatient, "E"=ER, ...).


referringDoctor?

readonly optional referringDoctor?: XCN

PV1-8 referring doctor (D-24a XCN).


visitNumber?

readonly optional visitNumber?: string

PV1-19 visit number.