Skip to content

Commit

Permalink
fix missing probant only in family report (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
adipaul1981 authored Jun 13, 2022
1 parent b56c1da commit 2fd0003
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/reports/family-clinical-data/configInclude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const participants: SheetConfig = {
columns: [
{ field: 'participant_id' },
{ field: 'external_id' },
{ field: 'family.family_id', header: 'Family ID' },
{ field: 'families_id', header: 'Family ID' },
{ field: 'family_type' },
{ field: 'family.father_id', header: 'Father ID' },
{ field: 'family.mother_id', header: 'Mother ID' },
Expand Down Expand Up @@ -43,7 +43,7 @@ const phenotypes: SheetConfig = {
columns: [
{ field: 'participant_id' },
{ field: 'external_id' },
{ field: 'family.family_id', header: 'Family ID' },
{ field: 'families_id', header: 'Family ID' },
{
field: 'phenotype.hpo_phenotype_observed',
additionalFields: ['phenotype.hpo_phenotype_not_observed'],
Expand Down Expand Up @@ -85,7 +85,7 @@ const diagnoses: SheetConfig = {
columns: [
{ field: 'participant_id' },
{ field: 'external_id' },
{ field: 'family.family_id', header: 'Family ID' },
{ field: 'families_id', header: 'Family ID' },
{
field: 'fhir_id',
header: 'Diagnosis Type',
Expand All @@ -101,7 +101,7 @@ const diagnoses: SheetConfig = {
},
{ field: 'diagnoses.source_text_tumor_location' },
],
sort: [{ 'family.family_id': 'asc' }, { participant_id: 'asc' }],
sort: [{ 'families_id': 'asc' }, { participant_id: 'asc' }],
};

export const queryConfigs: QueryConfig = {
Expand Down
2 changes: 1 addition & 1 deletion src/reports/family-clinical-data/generateFamilySqon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async (
const participantIds =
(sqon.content || []).filter(e => (e.content?.field || '') === 'participant_id')[0]?.content.value || [];

const field = program.toLowerCase() === ProjectType.include ? 'family.family_id' : 'family_id';
const field = program.toLowerCase() === ProjectType.include ? 'families_id' : 'family_id';
const esRequest = {
query,
aggs: {
Expand Down

0 comments on commit 2fd0003

Please sign in to comment.