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?
readonlyoptionaladmitDateTime?:DtmParts
PV1-44 admit date/time as the fidelity TS.
attendingDoctor?
readonlyoptionalattendingDoctor?:XCN
PV1-7 attending doctor (D-24a XCN).
dischargeDateTime?
readonlyoptionaldischargeDateTime?:DtmParts
PV1-45 discharge date/time as the fidelity TS.
location?
readonlyoptionallocation?:PL
PV1-3 assigned patient location (ward / room / bed) as PL.
patientClass?
readonlyoptionalpatientClass?:string
PV1-2 patient class ("I"=inpatient, "O"=outpatient, "E"=ER, ...).
referringDoctor?
readonlyoptionalreferringDoctor?:XCN
PV1-8 referring doctor (D-24a XCN).
visitNumber?
readonlyoptionalvisitNumber?:string
PV1-19 visit number.