Count of distinct patients per measured variable.
SELECT m_name.concept_name as measurement_name, m_unit.concept_name as unit, count(distinct person_id)::integer as patients
FROM measurement AS m
INNER JOIN concept as m_name ON m.measurement_concept_id = m_name.concept_id
INNER JOIN concept as m_unit ON m.unit_concept_id = m_unit.concept_id
GROUP BY m_name.concept_name, m_unit.concept_name;
None
measurement_name | unit | patients
---------------------------------------------------------------------------+------------------------------+---------- Alanine aminotransferase [Enzymatic activity/volume] in Serum or Plasma | international unit per liter | 6051
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.