Determines the onset of a condition in a dataset.
SELECT
MIN(condition_start_date::date) AS onset_condition_date
FROM @cdm.condition_occurrence
WHERE condition_concept_id = $1
AND EXISTS (SELECT 1 FROM @cdm.observation_period op
WHERE op.person_id = condition_occurrence.person_id
AND op.observation_period_start_date + 6 * INTERVAL '1 month' < condition_occurrence.condition_start_date)
;
| Parameter | Example | Mandatory | Notes | | --- | --- | --- | --- | | concept_id | 4084167 | Yes | Condition concept ID for 'Acute allergic reaction' |
| Field | Description | | --- | --- | | onset_condition_date | The date when the instance of the condition is recorded first time. |
| Field | Description | | --- | --- | | onset_condition_date | 9-Jul-2003 |
https://github.com/OHDSI/CommonDataModel/wiki/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.