Definition
Information
Section titled “Information”The Appointment Bookingmethod model holds descriptions of appointment booking methods. Each entry records a method identifier, its description and source organisation information.
Soft-Deleted Records
Section titled “Soft-Deleted Records”_deleted indicates whether the record has been deleted in the source system.
Examples
Section titled “Examples”appointment.slot count per appointment.bookingmethod
Section titled “appointment.slot count per appointment.bookingmethod”Count related appointment.slot records for each appointment.bookingmethod record, joined on bookingmethodid.
:::caution[Unverified join] This join is inferred from matching column names and is not part of the documented relationships. Check the results before relying on it. :::
SELECT m."methodid", m."methoddescription", COUNT(c."bookingmethodid") AS slot_countFROM appointment.bookingmethod AS mLEFT JOIN appointment.slot AS c ON m."methodid" = c."bookingmethodid" AND m."organisation" = c."organisation"GROUP BY m."methodid", m."methoddescription"ORDER BY slot_count DESC;appointment.slot records with appointment.bookingmethod details
Section titled “appointment.slot records with appointment.bookingmethod details”List appointment.slot records with the appointment.bookingmethod values they reference through bookingmethodid.
:::caution[Unverified join] This join is inferred from matching column names and is not part of the documented relationships. Check the results before relying on it. :::
SELECT c."slotid", c."enddatetime", m."methodid", m."methoddescription" AS "bookingmethod_methoddescription"FROM appointment.slot AS cINNER JOIN appointment.bookingmethod AS m ON m."methodid" = c."bookingmethodid" AND m."organisation" = c."organisation";appointment.slothistory count per appointment.bookingmethod
Section titled “appointment.slothistory count per appointment.bookingmethod”Count related appointment.slothistory records for each appointment.bookingmethod record, joined on bookingmethodid.
:::caution[Unverified join] This join is inferred from matching column names and is not part of the documented relationships. Check the results before relying on it. :::
SELECT m."methodid", m."methoddescription", COUNT(c."bookingmethodid") AS slothistory_countFROM appointment.bookingmethod AS mLEFT JOIN appointment.slothistory AS c ON m."methodid" = c."bookingmethodid" AND m."organisation" = c."organisation"GROUP BY m."methodid", m."methoddescription"ORDER BY slothistory_count DESC;