OHDSI Home | Forums | Wiki | Github

ATLAS Characteristions Feature Analyses design


Hi all,
I have some questions about Characterizations on ATLAS :

  1. How could I design new feature analyses using aggregated functions. e.g. patient maximum temperature in the first 24 h of admission

  2. How can I report missing data in characterization?

  3. where could I find SQL code for existing feature analyses? now the #71 Demographics Age Group analysis is in 5 year age groups, I want to edit the age groups to 10 year age. Is there any method to see the original design and edit based on it?

Atlas - characterization - how are condition [era] groups defined?
(Chris Knoll) #2

In 2.8, you can now define distribution statistics, such as max temp within a time window of cohort entry. Assuming your cohort entry is the admission, the following link will take you to a distribution criteria that will find the max temp (C and F separately, there may be other ways to measure temp? (K)?) You add it to your cohort characterization to use:

I’m not sure what you mean by ‘missing data’.

The demographics age group SQL is found here: https://github.com/OHDSI/FeatureExtraction/blob/master/inst/sql/sql_server/DemographicsAgeGroup.sql.

You can make your own SQL and create a custom feature where you provide your own custom SQL script. If you go to ‘new feature’ and look at the sample sql, you can see how you need to return the appropriate columns in order for the custom sql to work. here is the template:

-- Custom analysis producing same results as Feature Extraction's "One covariate per drug in the drug_era table overlapping with any time prior to index."
  CAST(drug_concept_id AS BIGINT) * 1000 + @analysis_id AS covariate_id,
  c.concept_name                                                                  AS covariate_name,
  drug_concept_id                                                                 AS concept_id,
  COUNT(*)                                                                            AS sum_value,
  COUNT(*) * 1.0 / stat.total_cnt * 1.0                                   AS average_value
       FROM @cohort_table cohort
         INNER JOIN @cdm_database_schema.drug_era ON cohort.subject_id = drug_era.person_id
       WHERE drug_era_start_date <= cohort.cohort_start_date
             AND drug_concept_id != 0
             AND cohort.cohort_definition_id = @cohort_id
     ) drug_entries
  JOIN @cdm_database_schema.concept c ON drug_entries.drug_concept_id = c.concept_id
              FROM @cohort_table
              WHERE cohort_definition_id = @cohort_id) stat
GROUP BY drug_concept_id, c.concept_name, stat.total_cnt

Note the place holders of @cdm_database_schema and @cohort_table must be used in your own SQL in order for the program to properly replace the cohort and schemas in your local CDM.


Thank you!