Definition
Information
Section titled “Information”The Episodemanagement Organisationcarepathwayepisodetitle model links organisations, care pathways and episode titles through their recorded identifiers. It also stores a default flag and source organisation information, retaining the episode-title association and the default setting recorded for the organisation and pathway combination.
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.organisationcarepathwayepisodetitle with episodemanagement.carepathway, episodemanagement.episodetitle and dbo.organisation details
Section titled “episodemanagement.organisationcarepathwayepisodetitle with episodemanagement.carepathway, episodemanagement.episodetitle 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."episodetitleid", p2."description" AS "episodetitle_description", m."organisationid", p3."organisationdisplayname" AS "organisationdisplayname"FROM episodemanagement.organisationcarepathwayepisodetitle AS mLEFT JOIN episodemanagement.carepathway AS p1 ON p1."carepathwayid" = m."carepathwayid" AND p1."organisation" = m."organisation"LEFT JOIN episodemanagement.episodetitle AS p2 ON p2."episodetitleid" = m."episodetitleid" AND p2."organisation" = m."organisation"LEFT JOIN dbo.organisation AS p3 ON p3."organisationid" = m."organisationid" AND p3."organisation" = m."organisation";Row count by episodemanagement.carepathway pathwayname
Section titled “Row count by episodemanagement.carepathway pathwayname”Count episodemanagement.organisationcarepathwayepisodetitle records for each episodemanagement.carepathway value, joined on carepathwayid.
SELECT p."pathwayname" AS "carepathway_pathwayname", COUNT(*) AS row_countFROM episodemanagement.organisationcarepathwayepisodetitle 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 episodemanagement.episodetitle description
Section titled “Row count by episodemanagement.episodetitle description”Count episodemanagement.organisationcarepathwayepisodetitle records for each episodemanagement.episodetitle value, joined on episodetitleid.
SELECT p."description" AS "episodetitle_description", COUNT(*) AS row_countFROM episodemanagement.organisationcarepathwayepisodetitle AS mINNER JOIN episodemanagement.episodetitle AS p ON p."episodetitleid" = m."episodetitleid" AND p."organisation" = m."organisation"GROUP BY p."description"ORDER BY row_count DESC;