diff --git a/src/store/passport/metadata.ts b/src/store/passport/metadata.ts index 79fc2bb0a..b595f45f7 100644 --- a/src/store/passport/metadata.ts +++ b/src/store/passport/metadata.ts @@ -31,24 +31,23 @@ const extractParticipantMetaData = (participants: any[]) => { return { // Removed temporarily due to bug // case_id: joinUniquely(participants.map((x) => x.participant_id)), - external_participant_ids: joinUniquely(participants.map((x) => x.external_id)), - proband: joinUniquely(participants.map((x) => `${x.participant_id}: ${x.is_proband}`)), - // Removed temporarily due to bug // ethnicity: joinUniquely(participants.map((x) => x.ethnicity)), // gender: joinUniquely(participants.map((x) => x.sex)), // race: joinUniquely(participants.map((x) => x.race)), + // diagnosis_source_text: joinUniquely(diagnosis.map((d) => d.source_text)), + // diagnosis_mondo: joinUniquely(diagnosis.map((d) => d.mondo_display_term)), + // diagnosis_ncit: joinUniquely(diagnosis.map((d) => d.ncit_id_diagnosis)), + // observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_observed)), + // not_observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_not_observed)), + // observed_phenotype_source_text: joinUniquely(phenotype.map((p) => p.source_text)), + external_participant_ids: joinUniquely(participants.map((x) => x.external_id)), + proband: joinUniquely(participants.map((x) => `${x.participant_id}: ${x.is_proband}`)), age_at_participant_diagnosis: joinUniquely(diagnosis.map((d) => d.age_at_event_days)), age_at_vital_status: joinUniquely(outcomes.map((o) => o.age_at_event_days.value)), age_at_observed_phenotype: joinUniquely(phenotype.map((p) => p.age_at_event_days)), - diagnosis_mondo: joinUniquely(diagnosis.map((d) => d.mondo_display_term)), - diagnosis_ncit: joinUniquely(diagnosis.map((d) => d.ncit_id_diagnosis)), - diagnosis_source_text: joinUniquely(diagnosis.map((d) => d.source_text)), family_id: joinUniquely(participants.map((x) => x.families_id)), family_composition: joinUniquely(participants.map((x) => x.family_type)), family_role: joinUniquely(relation.map((r) => r.role)), - observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_observed)), - not_observed_phenotype_hpo: joinUniquely(phenotype.map((p) => p.hpo_phenotype_not_observed)), - observed_phenotype_source_text: joinUniquely(phenotype.map((p) => p.source_text)), vital_status: joinUniquely(outcomes.map((o) => o.vital_status)), }; }; diff --git a/src/store/passport/thunks.test.ts b/src/store/passport/thunks.test.ts index 3479f60be..2b8a0c641 100644 --- a/src/store/passport/thunks.test.ts +++ b/src/store/passport/thunks.test.ts @@ -305,18 +305,18 @@ describe(`${extractMetadata.name}()`, () => { // ethnicity: 'Not Hispanic or Latino', // gender: 'female', // race: 'White', + // observed_phenotype_hpo: 'hpo_phenotype_observed', + // not_observed_phenotype_hpo: 'hpo_phenotype_not_observed', + // observed_phenotype_source_text: 'mySourceText', + // diagnosis_source_text: 'Neuroblastoma', + // diagnosis_mondo: 'neuroblastoma (MONDO:0005072)', + // diagnosis_ncit: 'NCIT:C3270', age_at_participant_diagnosis: '174', age_at_vital_status: '3137', age_at_observed_phenotype: '31231', - diagnosis_mondo: 'neuroblastoma (MONDO:0005072)', - diagnosis_ncit: 'NCIT:C3270', - diagnosis_source_text: 'Neuroblastoma', family_id: 'FM_5ED41H3V', family_composition: 'trio', family_role: 'mother,father,proband', - observed_phenotype_hpo: 'hpo_phenotype_observed', - not_observed_phenotype_hpo: 'hpo_phenotype_not_observed', - observed_phenotype_source_text: 'mySourceText', vital_status: 'Alive', sample_id: '595495', sample_type: 'DNA',