Definition
Information
Section titled “Information”The Careplan Displayedfield model holds definitions of fields displayed in care plans, including their descriptions and display order. It records a mandatory flag and identifiers for the field, its display section and parent field, together with 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”careplan.displayedfield with careplan.displayedfielddisplaysection details
Section titled “careplan.displayedfield with careplan.displayedfielddisplaysection details”Return records alongside descriptive values from the related careplan.displayedfielddisplaysection record.
SELECT m."displayedfieldid", m."displayedfielddisplaysectionid", p1."description" AS "displayedfielddisplaysection_description"FROM careplan.displayedfield AS mLEFT JOIN careplan.displayedfielddisplaysection AS p1 ON p1."displayedfielddisplaysectionid" = m."displayedfielddisplaysectionid" AND p1."organisation" = m."organisation";careplan.organisationdisplayedfield count per careplan.displayedfield
Section titled “careplan.organisationdisplayedfield count per careplan.displayedfield”Count related careplan.organisationdisplayedfield records for each careplan.displayedfield record, joined on displayedfieldid.
SELECT m."displayedfieldid", m."description", COUNT(c."displayedfieldid") AS organisationdisplayedfield_countFROM careplan.displayedfield AS mLEFT JOIN careplan.organisationdisplayedfield AS c ON m."displayedfieldid" = c."displayedfieldid" AND m."organisation" = c."organisation"GROUP BY m."displayedfieldid", m."description"ORDER BY organisationdisplayedfield_count DESC;Row count by careplan.displayedfielddisplaysection description
Section titled “Row count by careplan.displayedfielddisplaysection description”Count careplan.displayedfield records for each careplan.displayedfielddisplaysection value, joined on displayedfielddisplaysectionid.
SELECT p."description" AS "displayedfielddisplaysection_description", COUNT(*) AS row_countFROM careplan.displayedfield AS mINNER JOIN careplan.displayedfielddisplaysection AS p ON p."displayedfielddisplaysectionid" = m."displayedfielddisplaysectionid" AND p."organisation" = m."organisation"GROUP BY p."description"ORDER BY row_count DESC;