Definition
Information
Section titled “Information”The Careplan Displayedfielddisplaysection model holds descriptions of care-plan field display sections. Each entry records a display-section identifier and description, 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 count per careplan.displayedfielddisplaysection
Section titled “careplan.displayedfield count per careplan.displayedfielddisplaysection”Count related careplan.displayedfield records for each careplan.displayedfielddisplaysection record, joined on displayedfielddisplaysectionid.
SELECT m."displayedfielddisplaysectionid", m."description", COUNT(c."displayedfielddisplaysectionid") AS displayedfield_countFROM careplan.displayedfielddisplaysection AS mLEFT JOIN careplan.displayedfield AS c ON m."displayedfielddisplaysectionid" = c."displayedfielddisplaysectionid" AND m."organisation" = c."organisation"GROUP BY m."displayedfielddisplaysectionid", m."description"ORDER BY displayedfield_count DESC;careplan.displayedfield records with careplan.displayedfielddisplaysection details
Section titled “careplan.displayedfield records with careplan.displayedfielddisplaysection details”List careplan.displayedfield records with the careplan.displayedfielddisplaysection values they reference through displayedfielddisplaysectionid.
SELECT c."displayedfieldid", m."displayedfielddisplaysectionid", m."description" AS "displayedfielddisplaysection_description"FROM careplan.displayedfield AS cINNER JOIN careplan.displayedfielddisplaysection AS m ON m."displayedfielddisplaysectionid" = c."displayedfielddisplaysectionid" AND m."organisation" = c."organisation";careplan.displayedfielddisplaysection records not used by careplan.displayedfield
Section titled “careplan.displayedfielddisplaysection records not used by careplan.displayedfield”Find careplan.displayedfielddisplaysection records that no careplan.displayedfield record references.
SELECT m."displayedfielddisplaysectionid", m."description"FROM careplan.displayedfielddisplaysection AS mWHERE NOT EXISTS ( SELECT 1 FROM careplan.displayedfield AS c WHERE m."displayedfielddisplaysectionid" = c."displayedfielddisplaysectionid" AND m."organisation" = c."organisation");