ATLAS Characteristions Feature Analyses design

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:
http://atlas-demo.ohdsi.org/#/cc/feature-analyses/172

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

The demographics age group SQL is found here: FeatureExtraction/inst/sql/sql_server/DemographicsAgeGroup.sql at main · OHDSI/FeatureExtraction · GitHub.

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."
SELECT
  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 (
       SELECT DISTINCT
         drug_concept_id,
         cohort.subject_id,
         cohort.cohort_start_date
       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
  CROSS JOIN (SELECT COUNT(*) total_cnt
              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.

2 Likes