From eb1db9c2f9f120c257bfef184a92604a1fab0725 Mon Sep 17 00:00:00 2001 From: Chenchal Subraveti Date: Wed, 3 Jan 2024 10:04:13 -0600 Subject: [PATCH] [DT-683-684] Use death table for is deceased attribute and group dempgraphic (#652) * Updated with is_deceased attribute for person table from death table - updated UI groupings * cleaned up SQLs * changed deceased to Demographics category --- .../datamapping/aouCT/entity/person/all.sql | 127 +++++++----------- .../aouCT/entity/person/entity.json | 5 +- .../datamapping/aouRT/entity/person/all.sql | 111 ++++++--------- .../aouRT/entity/person/entity.json | 5 +- .../config/underlay/aouSC2023Q3R1/ui.json | 44 +++--- .../config/underlay/aouSR2023Q3R1/ui.json | 44 +++--- 6 files changed, 148 insertions(+), 188 deletions(-) diff --git a/underlay/src/main/resources/config/datamapping/aouCT/entity/person/all.sql b/underlay/src/main/resources/config/datamapping/aouCT/entity/person/all.sql index f950c550e..49893e568 100644 --- a/underlay/src/main/resources/config/datamapping/aouCT/entity/person/all.sql +++ b/underlay/src/main/resources/config/datamapping/aouCT/entity/person/all.sql @@ -33,84 +33,51 @@ SELECT p.person_id, CASE WHEN svd.sample_name IS NULL THEN 0 ELSE 1 END has_structural_variant_data, CASE - WHEN ehr.person_id IS NULL THEN 0 ELSE 1 END has_ehr_data + WHEN ehr.person_id IS NULL THEN 0 ELSE 1 END has_ehr_data, + CASE + WHEN d.death_date is null THEN 0 ELSE 1 END is_deceased FROM `${omopDataset}.person` p - -LEFT JOIN `${omopDataset}.concept` gc - ON gc.concept_id = p.gender_concept_id - -LEFT JOIN `${omopDataset}.concept` rc - ON rc.concept_id = p.race_concept_id - -LEFT JOIN `${omopDataset}.concept` ec - ON ec.concept_id = p.ethnicity_concept_id - -LEFT JOIN `${omopDataset}.concept` sc - ON sc.concept_id = p.sex_at_birth_concept_id - - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.activity_summary`) asum ON (p.person_id = asum.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.heart_rate_minute_level`) hrml ON (p.person_id = hrml.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.heart_rate_summary`) hrs ON (p.person_id = hrs.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.steps_intraday`) si ON (p.person_id = si.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.sleep_daily_summary`) sds ON (p.person_id = sds.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.sleep_level`) sl ON (p.person_id = sl.person_id) - LEFT JOIN - (SELECT DISTINCT sample_name - FROM `${omopDataset}.prep_wgs_metadata`) wgv ON (CAST(p.person_id AS STRING) = wgv.sample_name) - LEFT JOIN - (SELECT DISTINCT sample_name - FROM `${omopDataset}.prep_microarray_metadata`) mad ON (CAST(p.person_id AS STRING) = mad.sample_name) - LEFT JOIN - (SELECT DISTINCT sample_name - FROM `${omopDataset}.prep_longreads_metadata`) lrwgv ON (CAST(p.person_id AS STRING) = lrwgv.sample_name) - LEFT JOIN - (SELECT DISTINCT sample_name - FROM `${omopDataset}.prep_structural_variants_metadata`) svd ON (CAST(p.person_id AS STRING) = svd.sample_name) - LEFT JOIN - (SELECT DISTINCT person_id - FROM`${omopDataset}.measurement` as a - LEFT JOIN`${omopDataset}.measurement_ext` as b on a.measurement_id = b.measurement_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.condition_occurrence` as a - LEFT JOIN`${omopDataset}.condition_occurrence_ext` as b on a.condition_occurrence_id = b.condition_occurrence_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.device_exposure` as a - LEFT JOIN`${omopDataset}.device_exposure_ext` as b on a.device_exposure_id = b.device_exposure_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.drug_exposure` as a - LEFT JOIN`${omopDataset}.drug_exposure_ext` as b on a.drug_exposure_id = b.drug_exposure_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.observation` as a - LEFT JOIN`${omopDataset}.observation_ext` as b on a.observation_id = b.observation_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.procedure_occurrence` as a - LEFT JOIN`${omopDataset}.procedure_occurrence_ext` as b on a.procedure_occurrence_id = b.procedure_occurrence_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.visit_occurrence` as a - LEFT JOIN`${omopDataset}.visit_occurrence_ext` as b on a.visit_occurrence_id = b.visit_occurrence_id - WHERE lower(b.src_id) like 'ehr site%' - ) ehr ON (p.person_id = ehr.person_id) +LEFT JOIN `${omopDataset}.concept` gc ON gc.concept_id = p.gender_concept_id +LEFT JOIN `${omopDataset}.concept` rc ON rc.concept_id = p.race_concept_id +LEFT JOIN `${omopDataset}.concept` ec ON ec.concept_id = p.ethnicity_concept_id +LEFT JOIN `${omopDataset}.concept` sc ON sc.concept_id = p.sex_at_birth_concept_id +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.activity_summary`) asum ON (p.person_id = asum.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.heart_rate_minute_level`) hrml ON (p.person_id = hrml.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.heart_rate_summary`) hrs ON (p.person_id = hrs.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.steps_intraday`) si ON (p.person_id = si.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.sleep_daily_summary`) sds ON (p.person_id = sds.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.sleep_level`) sl ON (p.person_id = sl.person_id) +LEFT JOIN (SELECT DISTINCT sample_name FROM `${omopDataset}.prep_wgs_metadata`) wgv ON (CAST(p.person_id AS STRING) = wgv.sample_name) +LEFT JOIN (SELECT DISTINCT sample_name FROM `${omopDataset}.prep_microarray_metadata`) mad ON (CAST(p.person_id AS STRING) = mad.sample_name) +LEFT JOIN (SELECT DISTINCT sample_name FROM `${omopDataset}.prep_longreads_metadata`) lrwgv ON (CAST(p.person_id AS STRING) = lrwgv.sample_name) +LEFT JOIN (SELECT DISTINCT sample_name FROM `${omopDataset}.prep_structural_variants_metadata`) svd ON (CAST(p.person_id AS STRING) = svd.sample_name) +LEFT JOIN (SELECT DISTINCT person_id FROM`${omopDataset}.measurement` as a + LEFT JOIN`${omopDataset}.measurement_ext` as b on a.measurement_id = b.measurement_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.condition_occurrence` as a + LEFT JOIN`${omopDataset}.condition_occurrence_ext` as b on a.condition_occurrence_id = b.condition_occurrence_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.device_exposure` as a + LEFT JOIN`${omopDataset}.device_exposure_ext` as b on a.device_exposure_id = b.device_exposure_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.drug_exposure` as a + LEFT JOIN`${omopDataset}.drug_exposure_ext` as b on a.drug_exposure_id = b.drug_exposure_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.observation` as a + LEFT JOIN`${omopDataset}.observation_ext` as b on a.observation_id = b.observation_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.procedure_occurrence` as a + LEFT JOIN`${omopDataset}.procedure_occurrence_ext` as b on a.procedure_occurrence_id = b.procedure_occurrence_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.visit_occurrence` as a + LEFT JOIN`${omopDataset}.visit_occurrence_ext` as b on a.visit_occurrence_id = b.visit_occurrence_id + WHERE lower(b.src_id) like 'ehr site%' + ) ehr ON (p.person_id = ehr.person_id) +LEFT JOIN (SELECT person_id, max(death_date) as death_date FROM `${omopDataset}.death` GROUP BY person_id) d + ON (p.person_id = d.person_id) diff --git a/underlay/src/main/resources/config/datamapping/aouCT/entity/person/entity.json b/underlay/src/main/resources/config/datamapping/aouCT/entity/person/entity.json index c17179936..b4a9729cf 100644 --- a/underlay/src/main/resources/config/datamapping/aouCT/entity/person/entity.json +++ b/underlay/src/main/resources/config/datamapping/aouCT/entity/person/entity.json @@ -20,8 +20,9 @@ { "name": "has_whole_genome_variant", "dataType": "INT64", "isComputeDisplayHint": true }, { "name": "has_lr_whole_genome_variant", "dataType": "INT64", "isComputeDisplayHint": true }, { "name": "has_structural_variant_data", "dataType": "INT64", "isComputeDisplayHint": true }, - { "name": "has_ehr_data", "dataType": "INT64", "isComputeDisplayHint": true } + { "name": "has_ehr_data", "dataType": "INT64", "isComputeDisplayHint": true }, + { "name": "is_deceased", "dataType": "INT64", "isComputeDisplayHint": true } ], "idAttribute": "id", - "optimizeGroupByAttributes": [ "gender", "race", "age" ] + "optimizeGroupByAttributes": [ "gender", "race", "age", "ethnicity" ] } diff --git a/underlay/src/main/resources/config/datamapping/aouRT/entity/person/all.sql b/underlay/src/main/resources/config/datamapping/aouRT/entity/person/all.sql index 4ad2b7dca..12534b1ef 100644 --- a/underlay/src/main/resources/config/datamapping/aouRT/entity/person/all.sql +++ b/underlay/src/main/resources/config/datamapping/aouRT/entity/person/all.sql @@ -25,72 +25,47 @@ SELECT p.person_id, WHEN asum.person_id IS NULL AND hrml.person_id IS NULL AND hrs.person_id IS NULL AND si.person_id IS NULL AND sds.person_id IS NULL AND sl.person_id IS NULL THEN 0 ELSE 1 END has_fitbit, CASE - WHEN ehr.person_id IS NULL THEN 0 ELSE 1 END has_ehr_data + WHEN ehr.person_id IS NULL THEN 0 ELSE 1 END has_ehr_data, + CASE + WHEN d.death_date is null THEN 0 ELSE 1 END is_deceased FROM `${omopDataset}.person` p - -LEFT JOIN `${omopDataset}.concept` gc - ON gc.concept_id = p.gender_concept_id - -LEFT JOIN `${omopDataset}.concept` rc - ON rc.concept_id = p.race_concept_id - -LEFT JOIN `${omopDataset}.concept` ec - ON ec.concept_id = p.ethnicity_concept_id - -LEFT JOIN `${omopDataset}.concept` sc - ON sc.concept_id = p.sex_at_birth_concept_id - - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.activity_summary`) asum ON (p.person_id = asum.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.heart_rate_minute_level`) hrml ON (p.person_id = hrml.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.heart_rate_summary`) hrs ON (p.person_id = hrs.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.steps_intraday`) si ON (p.person_id = si.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.sleep_daily_summary`) sds ON (p.person_id = sds.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM `${omopDataset}.sleep_level`) sl ON (p.person_id = sl.person_id) - LEFT JOIN - (SELECT DISTINCT person_id - FROM`${omopDataset}.measurement` as a - LEFT JOIN`${omopDataset}.measurement_ext` as b on a.measurement_id = b.measurement_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.condition_occurrence` as a - LEFT JOIN`${omopDataset}.condition_occurrence_ext` as b on a.condition_occurrence_id = b.condition_occurrence_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.device_exposure` as a - LEFT JOIN`${omopDataset}.device_exposure_ext` as b on a.device_exposure_id = b.device_exposure_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.drug_exposure` as a - LEFT JOIN`${omopDataset}.drug_exposure_ext` as b on a.drug_exposure_id = b.drug_exposure_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.observation` as a - LEFT JOIN`${omopDataset}.observation_ext` as b on a.observation_id = b.observation_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.procedure_occurrence` as a - LEFT JOIN`${omopDataset}.procedure_occurrence_ext` as b on a.procedure_occurrence_id = b.procedure_occurrence_id - WHERE lower(b.src_id) like 'ehr site%' - UNION DISTINCT - SELECT DISTINCT person_id - FROM`${omopDataset}.visit_occurrence` as a - LEFT JOIN`${omopDataset}.visit_occurrence_ext` as b on a.visit_occurrence_id = b.visit_occurrence_id - WHERE lower(b.src_id) like 'ehr site%' - ) ehr ON (p.person_id = ehr.person_id) +LEFT JOIN `${omopDataset}.concept` gc ON gc.concept_id = p.gender_concept_id +LEFT JOIN `${omopDataset}.concept` rc ON rc.concept_id = p.race_concept_id +LEFT JOIN `${omopDataset}.concept` ec ON ec.concept_id = p.ethnicity_concept_id +LEFT JOIN `${omopDataset}.concept` sc ON sc.concept_id = p.sex_at_birth_concept_id +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.activity_summary`) asum ON (p.person_id = asum.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.heart_rate_minute_level`) hrml ON (p.person_id = hrml.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.heart_rate_summary`) hrs ON (p.person_id = hrs.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.steps_intraday`) si ON (p.person_id = si.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.sleep_daily_summary`) sds ON (p.person_id = sds.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM `${omopDataset}.sleep_level`) sl ON (p.person_id = sl.person_id) +LEFT JOIN (SELECT DISTINCT person_id FROM`${omopDataset}.measurement` as a + LEFT JOIN`${omopDataset}.measurement_ext` as b on a.measurement_id = b.measurement_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.condition_occurrence` as a + LEFT JOIN`${omopDataset}.condition_occurrence_ext` as b on a.condition_occurrence_id = b.condition_occurrence_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.device_exposure` as a + LEFT JOIN`${omopDataset}.device_exposure_ext` as b on a.device_exposure_id = b.device_exposure_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.drug_exposure` as a + LEFT JOIN`${omopDataset}.drug_exposure_ext` as b on a.drug_exposure_id = b.drug_exposure_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.observation` as a + LEFT JOIN`${omopDataset}.observation_ext` as b on a.observation_id = b.observation_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.procedure_occurrence` as a + LEFT JOIN`${omopDataset}.procedure_occurrence_ext` as b on a.procedure_occurrence_id = b.procedure_occurrence_id + WHERE lower(b.src_id) like 'ehr site%' + UNION DISTINCT + SELECT DISTINCT person_id FROM`${omopDataset}.visit_occurrence` as a + LEFT JOIN`${omopDataset}.visit_occurrence_ext` as b on a.visit_occurrence_id = b.visit_occurrence_id + WHERE lower(b.src_id) like 'ehr site%' + ) ehr ON (p.person_id = ehr.person_id) +LEFT JOIN (SELECT person_id, max(death_date) as death_date FROM `${omopDataset}.death` GROUP BY person_id) d + ON (p.person_id = d.person_id) diff --git a/underlay/src/main/resources/config/datamapping/aouRT/entity/person/entity.json b/underlay/src/main/resources/config/datamapping/aouRT/entity/person/entity.json index e915ddebb..bf0913d6f 100644 --- a/underlay/src/main/resources/config/datamapping/aouRT/entity/person/entity.json +++ b/underlay/src/main/resources/config/datamapping/aouRT/entity/person/entity.json @@ -16,8 +16,9 @@ { "name": "has_fitbit_sleep_daily_summary", "dataType": "INT64", "isComputeDisplayHint": true }, { "name": "has_fitbit_sleep_level", "dataType": "INT64", "isComputeDisplayHint": true }, { "name": "has_fitbit", "dataType": "INT64", "isComputeDisplayHint": true }, - { "name": "has_ehr_data", "dataType": "INT64", "isComputeDisplayHint": true } + { "name": "has_ehr_data", "dataType": "INT64", "isComputeDisplayHint": true }, + { "name": "is_deceased", "dataType": "INT64", "isComputeDisplayHint": true } ], "idAttribute": "id", - "optimizeGroupByAttributes": [ "gender", "race", "age" ] + "optimizeGroupByAttributes": [ "gender", "race", "age", "ethnicity" ] } diff --git a/underlay/src/main/resources/config/underlay/aouSC2023Q3R1/ui.json b/underlay/src/main/resources/config/underlay/aouSC2023Q3R1/ui.json index 969e7415d..7dcc8e6e3 100644 --- a/underlay/src/main/resources/config/underlay/aouSC2023Q3R1/ui.json +++ b/underlay/src/main/resources/config/underlay/aouSC2023Q3R1/ui.json @@ -601,6 +601,13 @@ "start_date_group_by_count" ] }, + { + "type": "attribute", + "id": "tanagra-has-ehr-data", + "title": "Has EHR Data", + "category": "Domains", + "attribute": "has_ehr_data" + }, { "type": "classification", "id": "tanagra-cpt4", @@ -785,45 +792,46 @@ }, { "type": "attribute", - "id": "tanagra-has-ehr-data", - "title": "Has EHR Data", - "category": "Program data", - "attribute": "has_ehr_data" + "id": "tanagra-age", + "title": "Age", + "category": "Demographics", + "attribute": "age" + }, + { + "type": "attribute", + "id": "tanagra-is-deceased", + "title": "Deceased", + "category": "Demographics", + "attribute": "is_deceased" }, { + "type": "attribute", "id": "tanagra-ethnicity", "title": "Ethnicity", - "category": "Program data", + "category": "Demographics", "attribute": "ethnicity" }, { "type": "attribute", "id": "tanagra-gender", "title": "Gender identity", - "category": "Program data", + "category": "Demographics", "attribute": "gender" }, - { - "type": "attribute", - "id": "tanagra-sex-at-birth", - "title": "Sex At Birth", - "category": "Program data", - "attribute": "sex_at_birth" - }, { "type": "attribute", "id": "tanagra-race", "title": "Race", - "category": "Program data", + "category": "Demographics", "attribute": "race" }, { "type": "attribute", - "id": "tanagra-age", - "title": "Age", - "category": "Program data", - "attribute": "age" + "id": "tanagra-sex-at-birth", + "title": "Sex At Birth", + "category": "Demographics", + "attribute": "sex_at_birth" }, { "type": "attribute", diff --git a/underlay/src/main/resources/config/underlay/aouSR2023Q3R1/ui.json b/underlay/src/main/resources/config/underlay/aouSR2023Q3R1/ui.json index 8860791b5..5a220f248 100644 --- a/underlay/src/main/resources/config/underlay/aouSR2023Q3R1/ui.json +++ b/underlay/src/main/resources/config/underlay/aouSR2023Q3R1/ui.json @@ -595,6 +595,13 @@ "start_date_group_by_count" ] }, + { + "type": "attribute", + "id": "tanagra-has-ehr-data", + "title": "Has EHR Data", + "category": "Domains", + "attribute": "has_ehr_data" + }, { "type": "classification", "id": "tanagra-cpt4", @@ -779,45 +786,46 @@ }, { "type": "attribute", - "id": "tanagra-has-ehr-data", - "title": "Has EHR Data", - "category": "Program data", - "attribute": "has_ehr_data" + "id": "tanagra-age", + "title": "Age", + "category": "Demographics", + "attribute": "age" + }, + { + "type": "attribute", + "id": "tanagra-is-deceased", + "title": "Deceased", + "category": "Demographics", + "attribute": "is_deceased" }, { + "type": "attribute", "id": "tanagra-ethnicity", "title": "Ethnicity", - "category": "Program data", + "category": "Demographics", "attribute": "ethnicity" }, { "type": "attribute", "id": "tanagra-gender", "title": "Gender identity", - "category": "Program data", + "category": "Demographics", "attribute": "gender" }, - { - "type": "attribute", - "id": "tanagra-sex-at-birth", - "title": "Sex At Birth", - "category": "Program data", - "attribute": "sex_at_birth" - }, { "type": "attribute", "id": "tanagra-race", "title": "Race", - "category": "Program data", + "category": "Demographics", "attribute": "race" }, { "type": "attribute", - "id": "tanagra-age", - "title": "Age", - "category": "Program data", - "attribute": "age" + "id": "tanagra-sex-at-birth", + "title": "Sex At Birth", + "category": "Demographics", + "attribute": "sex_at_birth" }, { "type": "attribute",