/*
    Clinical coding cluster lookup
    ==============================

    Purpose:
    List SNOMED codes attached to maintained clinical coding clusters.

    Use maintained clusters where possible instead of free-text matching on
    SNOMED descriptions.
*/

SET CLUSTER_ID = 'DEPR_COD';

SELECT DISTINCT
    ccs."Cluster_ID",
    ccs."SNOMEDCode",
    ccs."SNOMEDDescription"
FROM DATA_HUB.PHM."ClinicalCodingClusterSnomedCodes" ccs
WHERE ccs."Cluster_ID" = $CLUSTER_ID
ORDER BY ccs."SNOMEDDescription", ccs."SNOMEDCode";
