CalendarItem
The CalendarItem is an encryptable root-level entity that records the an appointment for a the patient.
Fields Encrypted by Default​
By default, the following fields of this entity will be encrypted:
detailstitlepatientIdphoneNumberaddressaddressTextmeetingTags[].*flowItem
You can customize the encrypted fields as explained in this how to.
Properties​
Below you will find an explanation of the most commonly used properties in the entity that are not among the shared fields. For a full list, check the reference documentation (🚧).
title​
A human-readable description for the purpose of the appointment.
details​
A human-readable description for the appointment with all the details that could be of interest for the practitioner.
homeVisit​
A boolean that indicates if the appointment is a home visit.
phoneNumber​
The phone number of the patient.
addressText​
A human-readable description of the address where the appointment will take place.
startTime​
A FuzzyDateTime that represents the moment when the appointment starts.
endTime​
A FuzzyDateTime that represents the moment when the appointment ends.
allDay​
A boolean that indicates if the appointment is an all day event.
duration​
The duration of the appointment.
agendaId​
The id of the Agenda where the appointment is scheduled.
hcpId​
The id of the healthcare party that will take care of the patient during the appointment.
Linking a calendar item to a patient​
A calendar item is linked to a patient through its encryption metadata, usually by passing the patient when
initializing the calendar item with withEncryptionMetadata. If you created a calendar item without a patient (for
example an appointment booked before the patient was known), you can link it afterwards with
calendarItem.linkToPatient(calendarItem, patient, shareLinkWithDelegates). shareLinkWithDelegates contains the
data owners, other than the current one, that should also be able to decrypt the id of the linked patient: those that
don't have access to the calendar item yet are granted read access.
The operation is not reversible: the method fails if the calendar item is already linked to a patient, and it is not possible to change the patient linked to a calendar item.
Before SDK 2.12.1 linkToPatient had an inverted precondition: it rejected calendar items that were not linked to a
patient yet, and accepted the ones that were already linked. Use SDK 2.12.1 or later if you need this method.
- Kotlin
- Typescript
- Python
- Dart
val linkedCalendarItem = sdk.calendarItem.linkToPatient(
calendarItem,
patient,
shareLinkWithDelegates = setOf(otherHcpId)
)
const linkedCalendarItem = await sdk.calendarItem.linkToPatient(calendarItem, patient, [otherHcpId])
linked_calendar_item = sdk.calendar_item.link_to_patient_blocking(calendar_item, patient, {other_hcp_id})
final linkedCalendarItem = await sdk.calendarItem.linkToPatient(calendarItem, patient, {otherHcpId});