Determines the onset of a condition in a dataset.
Input:
Parameter |
Example |
Mandatory |
Notes |
concept_id |
23988 |
Yes |
Condition concept ID for 'Hemolytic anemia due to glutathione metabolism disorder' |
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue
SELECT min(c.condition_start_date) onset_condition_date
FROM condition_occurrence c
WHERE c.condition_concept_id = 23988
AND exists (SELECT 1 FROM observation_period op
WHERE op.person_id = c.person_id
AND add_months(op.observation_period_start_date, 6) < c.condition_start_date)
Output:
Output field list:
Field |
Description |
onset_condition_date |
The date when the instance of the condition is recorded first time. |
Sample output record:
Field |
Description |
onset_condition_date |
9-Jul-2003 |
|