Hi all,
I have some questions about Characterizations on ATLAS :
How could I design new feature analyses using aggregated functions. e.g. patient maximum temperature in the first 24 h of admission
How can I report missing data in characterization?
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?
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ā.
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.
Thatās what Iām doing, but I donāt know how to get the custom feature added to an estimation package. The package I downloaded from Atlas has all the analyses in cmAnalysisList.json and I want to add this new feature into it. In the package this line loads the analyses: