Definition
Information
Section titled “Information”The Episodemanagement Organisationcarepathway model links organisations with recorded care pathways. Each association holds organisation and care-pathway identifiers, a default flag and source organisation information, retaining the pathway association and the default setting recorded against it within the organisation’s configuration.
Soft-Deleted Records
Section titled “Soft-Deleted Records”_deleted indicates whether the record has been deleted in the source system.
Examples
Section titled “Examples”episodemanagement.organisationcarepathway with episodemanagement.carepathway and dbo.organisation details
Section titled “episodemanagement.organisationcarepathway with episodemanagement.carepathway and dbo.organisation details”Return records alongside descriptive values from the related tables.
SELECT m."_primary_key", m."carepathwayid", p1."pathwayname" AS "carepathway_pathwayname", m."organisationid", p2."organisationdisplayname" AS "organisationdisplayname"FROM episodemanagement.organisationcarepathway AS mLEFT JOIN episodemanagement.carepathway AS p1 ON p1."carepathwayid" = m."carepathwayid" AND p1."organisation" = m."organisation"LEFT JOIN dbo.organisation AS p2 ON p2."organisationid" = m."organisationid" AND p2."organisation" = m."organisation";Row count by episodemanagement.carepathway pathwayname
Section titled “Row count by episodemanagement.carepathway pathwayname”Count episodemanagement.organisationcarepathway records for each episodemanagement.carepathway value, joined on carepathwayid.
SELECT p."pathwayname" AS "carepathway_pathwayname", COUNT(*) AS row_countFROM episodemanagement.organisationcarepathway AS mINNER JOIN episodemanagement.carepathway AS p ON p."carepathwayid" = m."carepathwayid" AND p."organisation" = m."organisation"GROUP BY p."pathwayname"ORDER BY row_count DESC;Row count by dbo.organisation organisationdisplayname
Section titled “Row count by dbo.organisation organisationdisplayname”Count episodemanagement.organisationcarepathway records for each dbo.organisation value, joined on organisationid.
SELECT p."organisationdisplayname" AS "organisationdisplayname", COUNT(*) AS row_countFROM episodemanagement.organisationcarepathway AS mINNER JOIN dbo.organisation AS p ON p."organisationid" = m."organisationid" AND p."organisation" = m."organisation"GROUP BY p."organisationdisplayname"ORDER BY row_count DESC;