v2

latestOpenAPI 3.1.12026-08-078549932.4 MB
Appointments

Import a historical (already-occurred) visit as a Completed appointment (ITE-260). Skips the schedule-conflict check — batch imports of past history are expected to overlap each other and existing bookings. The backing schedule item is created without a location (exempt from the overlap EXCLUDE constraint, invisible to room-scoped calendar views) and stamped CreatedBySource = "import".

post/Appointments/import-historical

Request body

clientIdstring required
patientIdstring required

Patient under care. Historical import is patient-scoped only — group visits are not supported (appointments_subject_chk keeps exactly one subject).

reasonForVisitstring required
notesstring nullable

Visit notes from record extraction. Lands on Appointment.Notes so it surfaces in the patient's visit history.

clinicalNarrativestring nullable

Optional SOAP narrative extracted for this visit (already provider-prefixed). When present, the import creates an AI-generated SOAP note linked to the appointment so the narrative shows in the visit-history SOAP tab. Created here — in the same request/context as the appointment — rather than from the Orchestrate confirm flow, whose shared DbContext can carry a failed, still-tracked entity that a later SaveChanges would re-attempt (PAWTHOSX-BACKEND-7M).

startTimestring date-time required

Historical visit start (UTC). Must be in the past.

endTimestring date-time required

Historical visit end (UTC). Must be after StartTime and in the past.

titlestring nullable

Schedule item title. Defaults to ReasonForVisit when omitted.

appointmentTypeIdstring nullable

Optional appointment type. Group-visit types are rejected.

customAttributesstring nullable

Response

Created

idstring
scheduleItemIdstring
clientIdstring
patientIdstring nullable

Set on patient-scoped appointments. Null on group visits — see string? AppointmentResponseDto.PatientGroupId.

patientGroupIdstring nullable

Set on group-visit appointment types (litter / herd). Mutually exclusive with string? AppointmentResponseDto.PatientId.

reasonForVisitstring
notesstring nullable
statusstring
customAttributesstring nullable
recordingIdstring nullable
createdAtstring date-time
updatedAtstring date-time
isTravelAppointmentboolean
travelDestinationAddressstring nullable
travelDestinationPlaceIdstring nullable
travelStartingAddressstring nullable
travelStartingPlaceIdstring nullable
travelIsRoundTripboolean nullable
travelAccessNotesstring nullable
appointmentTypeIdstring nullable
requiresSurgeryRoomboolean

Whether this appointment type requires a surgery room.

isEmergencySurgeryConversionboolean

Whether this appointment was converted from a regular exam to emergency surgery.

appointmentTypeDefaultFlowIdstring nullable

Chronicle workflow id sourced from this appointment's <see cref="!:AppointmentType" />. Null falls back to appointment-default at the chronicle. Denormalized at read time so the chronicle doesn't need a second appointment-type lookup.

appointmentTypeExamTemplateIdstring nullable

Exam template id sourced from this appointment's <see cref="!:AppointmentType" /> (PAW-741). Resolution at the chronicle exam step: this value, else the provider's personal default, else the standard 7-system view. Denormalized at read time so the chronicle doesn't need a second appointment-type lookup.

appointmentTypeAutoGenerateSoapboolean

Auto-start SOAP generation when the treatment plan is converted to an invoice (PAW-675). Denormalized from the appointment type; true when the appointment has no type (the platform default is on).

appointmentTypeAutoGenerateDischargeboolean

Auto-start discharge generation when the SOAP note is approved (PAW-675). Denormalized from the appointment type; true when the appointment has no type (the platform default is on).

Example response

{
  "patient": {
    "species": "Cat",
    "breed": "Siamese",
    "sex": "Male"
  }
}