Definition
Information
Section titled “Information”The Appointment Assignmentlistpatientscheduleslot model links assignment-list patient schedule entries with appointment slots. Each record stores the identifiers of the patient schedule entry and slot involved, together with source organisation information describing the organisational context of the recorded association.
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.assignmentlistpatientscheduleslot with appointment.assignmentlistpatientschedule and appointment.slot details
Section titled “appointment.assignmentlistpatientscheduleslot with appointment.assignmentlistpatientschedule and appointment.slot details”Return records alongside descriptive values from the related tables.
SELECT m."_primary_key", m."assignmentlistpatientscheduleid", p1."assignmentlistpatientscheduledeferredto" AS "assignmentlistpatientscheduledeferredto", m."slotid", p2."patientname" AS "slot_patientname"FROM appointment.assignmentlistpatientscheduleslot AS mLEFT JOIN appointment.assignmentlistpatientschedule AS p1 ON p1."assignmentlistpatientscheduleid" = m."assignmentlistpatientscheduleid" AND p1."organisation" = m."organisation"LEFT JOIN appointment.slot AS p2 ON p2."slotid" = m."slotid" AND p2."organisation" = m."organisation";Row count by appointment.assignmentlistpatientschedule assignmentlistpatientscheduledeferredto
Section titled “Row count by appointment.assignmentlistpatientschedule assignmentlistpatientscheduledeferredto”Count appointment.assignmentlistpatientscheduleslot records for each appointment.assignmentlistpatientschedule value, joined on assignmentlistpatientscheduleid.
SELECT p."assignmentlistpatientscheduledeferredto" AS "assignmentlistpatientscheduledeferredto", COUNT(*) AS row_countFROM appointment.assignmentlistpatientscheduleslot AS mINNER JOIN appointment.assignmentlistpatientschedule AS p ON p."assignmentlistpatientscheduleid" = m."assignmentlistpatientscheduleid" AND p."organisation" = m."organisation"GROUP BY p."assignmentlistpatientscheduledeferredto"ORDER BY row_count DESC;Row count by appointment.slot patientname
Section titled “Row count by appointment.slot patientname”Count appointment.assignmentlistpatientscheduleslot records for each appointment.slot value, joined on slotid.
SELECT p."patientname" AS "slot_patientname", COUNT(*) AS row_countFROM appointment.assignmentlistpatientscheduleslot AS mINNER JOIN appointment.slot AS p ON p."slotid" = m."slotid" AND p."organisation" = m."organisation"GROUP BY p."patientname"ORDER BY row_count DESC;