Skip to content
Partner Developer Portal

Definition

The Unscheduledcare Dataentryprocedure model holds named data-entry procedure configurations for unscheduled care. It records attendance-stage, request and outcome form, protocol and location identifiers, timing settings and tracking-grid display details, alongside mandatory, active and deleted flags and settings concerning subsequent actions and ending an attendance.

_deleted indicates whether the record has been deleted in the source system.

unscheduledcare.dataentryprocedure with dbo.organisation details

Section titled “unscheduledcare.dataentryprocedure with dbo.organisation details”

Return records alongside descriptive values from the related dbo.organisation record.

:::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."dataentryprocedureid",
m."serviceorganisationid",
p1."organisationdisplayname" AS "organisationdisplayname"
FROM unscheduledcare.dataentryprocedure AS m
LEFT JOIN dbo.organisation AS p1
ON p1."organisationid" = m."serviceorganisationid"
AND p1."organisation" = m."organisation";

unscheduledcare.attendanceaction count per unscheduledcare.dataentryprocedure

Section titled “unscheduledcare.attendanceaction count per unscheduledcare.dataentryprocedure”

Count related unscheduledcare.attendanceaction records for each unscheduledcare.dataentryprocedure record, joined on requestdataentryprocedureid.

:::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."dataentryprocedureid",
m."description",
COUNT(c."requestdataentryprocedureid") AS attendanceaction_count
FROM unscheduledcare.dataentryprocedure AS m
LEFT JOIN unscheduledcare.attendanceaction AS c
ON m."dataentryprocedureid" = c."requestdataentryprocedureid"
AND m."organisation" = c."organisation"
GROUP BY m."dataentryprocedureid", m."description"
ORDER BY attendanceaction_count DESC;

Row count by dbo.organisation organisationdisplayname

Section titled “Row count by dbo.organisation organisationdisplayname”

Count unscheduledcare.dataentryprocedure records for each dbo.organisation value, joined on serviceorganisationid.

:::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
p."organisationdisplayname" AS "organisationdisplayname",
COUNT(*) AS row_count
FROM unscheduledcare.dataentryprocedure AS m
INNER JOIN dbo.organisation AS p
ON p."organisationid" = m."serviceorganisationid"
AND p."organisation" = m."organisation"
GROUP BY p."organisationdisplayname"
ORDER BY row_count DESC;