Skip to content

Commit 021f73f

Browse files
authored
fix: SJIP-461 various fields fixes (#84)
1 parent b893f1e commit 021f73f

File tree

3 files changed

+28
-42
lines changed

3 files changed

+28
-42
lines changed

src/reports/biospecimen-data/configInclude.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ const biospecimens: SheetConfig = {
55
root: null,
66
columns: [
77
{ field: 'participant.participant_id', header: 'Participant ID' },
8+
{ field: 'participant.external_id', header: 'External Participant ID' },
89
{ field: 'collection_sample_id', header: 'Collection ID' },
910
{ field: 'collection_sample_type', header: 'Collection Sample Type' },
10-
{ field: 'sample_id', header: 'Sample Id' },
11-
{ field: 'container_id', header: 'Container Id' },
11+
{ field: 'sample_id', header: 'Sample ID' },
12+
{ field: 'container_id', header: 'Container ID' },
13+
{ field: 'external_sample_id', header: 'External Sample ID' },
1214
{ field: 'sample_type', header: 'Sample Type' },
13-
{ field: 'parent_sample_id', header: 'Parent Sample Id' },
15+
{ field: 'parent_sample_id', header: 'Parent Sample ID' },
1416
{ field: 'parent_sample_type', header: 'Parent Sample Type' },
1517
{ field: 'study.study_id', header: 'Study Code' },
1618
{ field: 'age_at_biospecimen_collection', header: 'Age At Biospecimen Collection (Days)' },

src/reports/clinical-data/configInclude.ts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const participants: SheetConfig = {
44
sheetName: 'Participants',
55
root: null,
66
columns: [
7-
{ field: 'participant_id' },
8-
{ field: 'external_id' },
7+
{ field: 'participant_id', header: 'Participant ID' },
8+
{ field: 'external_id', header: 'External Participant ID' },
99
{ field: 'family.family_id', header: 'Family ID' },
1010
{ field: 'family_type', header: 'Family Unit' },
1111
{ field: 'study.study_name', header: 'Study Name' },
@@ -14,7 +14,7 @@ const participants: SheetConfig = {
1414
{ field: 'race' },
1515
{ field: 'ethnicity' },
1616
{ field: 'down_syndrome_status' },
17-
{ field: 'outcomes.vital_status' },
17+
{ field: 'outcomes.vital_status', header: 'Vital Status' },
1818
{
1919
field: 'outcomes.age_at_event_days.value',
2020
header: 'Age at the Last Vital Status (Days)',
@@ -38,8 +38,8 @@ const phenotypes: SheetConfig = {
3838
sheetName: 'Phenotypes',
3939
root: 'phenotype',
4040
columns: [
41-
{ field: 'participant_id' },
42-
{ field: 'external_id' },
41+
{ field: 'participant_id', header: 'Participant ID' },
42+
{ field: 'external_id', header: 'External Participant ID' },
4343
{
4444
field: 'phenotype.hpo_phenotype_observed',
4545
additionalFields: ['phenotype.hpo_phenotype_not_observed'],
@@ -53,12 +53,12 @@ const phenotypes: SheetConfig = {
5353
},
5454
{
5555
field: 'phenotype.source_text',
56-
header: 'Phenotype (Source Text)'
56+
header: 'Condition (Source Text)',
5757
},
5858
{
5959
field: 'phenotype.hpo_phenotype_observed',
6060
header: 'Interpretation',
61-
transform: (value, row) => (value ? 'Observed' : 'Not Observed'),
61+
transform: (value, _) => (value ? 'Observed' : 'Not Observed'),
6262
},
6363
{
6464
field: 'phenotype.age_at_event_days',
@@ -72,22 +72,14 @@ const diagnoses: SheetConfig = {
7272
sheetName: 'Diagnoses',
7373
root: 'diagnosis',
7474
columns: [
75-
{ field: 'participant_id' },
76-
{ field: 'external_id' },
77-
{
78-
field: 'fhir_id',
79-
header: 'Diagnosis Type',
80-
transform: () => 'Clinical',
81-
},
75+
{ field: 'participant_id', header: 'Participant ID' },
76+
{ field: 'external_id', header: 'External Participant ID' },
8277
{ field: 'diagnosis.mondo_id_diagnosis', header: ' Diagnosis (MONDO)' },
83-
{ field: 'diagnosis.ncit_id_diagnosis', header: 'Diagnosis (NCIT)' },
84-
{ field: 'diagnosis.icd_id_diagnosis', header: 'Diagnosis (ICD)' },
85-
{ field: 'diagnosis.source_text', header: 'Diagnosis (Source Text)' },
78+
{ field: 'diagnosis.source_text', header: 'Condition (Source Text)' },
8679
{
8780
field: 'diagnosis.age_at_event_days',
8881
header: 'Age at Diagnosis (Days)',
8982
},
90-
{ field: 'diagnosis.source_text_tumor_location' },
9183
],
9284
sort: [{ fhir_id: 'asc' }],
9385
};
@@ -119,15 +111,15 @@ const familyRelationship: SheetConfig = {
119111
sheetName: 'Family Relationship',
120112
root: 'family.family_relations',
121113
columns: [
122-
{ field: 'participant_id' },
114+
{ field: 'participant_id', header: 'Participant ID' },
123115
{
124116
field: 'family.family_relations',
125117
header: 'Family Members ID',
126118
transform: (value, row) => (row.family ? row.family.family_relations.related_participant_id : ''),
127119
},
128120
{
129121
field: 'family.family_relations',
130-
header: 'Relationship',
122+
header: 'Family Member Relationship',
131123
transform: (value, row) => (row.family ? row.family.family_relations.relation : ''),
132124
},
133125
],

src/reports/family-clinical-data/configInclude.ts

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ const participants: SheetConfig = {
44
sheetName: 'Participants',
55
root: null,
66
columns: [
7-
{ field: 'participant_id' },
8-
{ field: 'external_id' },
7+
{ field: 'participant_id', header: 'Participant ID' },
8+
{ field: 'external_id', header: 'External Participant ID' },
99
{ field: 'families_id', header: 'Family ID' },
1010
{ field: 'family_type', header: 'Family Unit' },
1111
{ field: 'family.father_id', header: 'Father ID' },
1212
{ field: 'family.mother_id', header: 'Mother ID' },
13-
{ field: 'family.family_relations.relation', header: 'Family Relationship' },
13+
{ field: 'family.family_relations.relation', header: 'Family Member Relationship' },
1414
{ field: 'study.study_name', header: 'Study Name' },
1515
{ field: 'study.study_id', header: 'Study Code' },
1616
{ field: 'sex' },
1717
{ field: 'race' },
1818
{ field: 'ethnicity' },
1919
{ field: 'down_syndrome_status' },
20-
{ field: 'outcomes.vital_status' },
20+
{ field: 'outcomes.vital_status', header: 'Vital Status' },
2121
{
2222
field: 'outcomes.age_at_event_days.value',
2323
header: 'Age at the Last Vital Status (Days)',
@@ -41,8 +41,8 @@ const phenotypes: SheetConfig = {
4141
sheetName: 'Phenotypes',
4242
root: 'phenotype',
4343
columns: [
44-
{ field: 'participant_id' },
45-
{ field: 'external_id' },
44+
{ field: 'participant_id', header: 'Participant ID' },
45+
{ field: 'external_id', header: 'External Participant ID' },
4646
{ field: 'families_id', header: 'Family ID' },
4747
{
4848
field: 'phenotype.hpo_phenotype_observed',
@@ -57,12 +57,12 @@ const phenotypes: SheetConfig = {
5757
},
5858
{
5959
field: 'phenotype.source_text',
60-
header: 'Phenotype (Source Text)',
60+
header: 'Condition (Source Text)',
6161
},
6262
{
6363
field: 'phenotype.hpo_phenotype_observed',
6464
header: 'Interpretation',
65-
transform: (value, row) => (value ? 'Observed' : 'Not Observed'),
65+
transform: (value, _) => (value ? 'Observed' : 'Not Observed'),
6666
},
6767
{
6868
field: 'phenotype.age_at_event_days',
@@ -76,23 +76,15 @@ const diagnoses: SheetConfig = {
7676
sheetName: 'Diagnoses',
7777
root: 'diagnosis',
7878
columns: [
79-
{ field: 'participant_id' },
80-
{ field: 'external_id' },
79+
{ field: 'participant_id', header: 'Participant ID' },
80+
{ field: 'external_id', header: 'External Participant ID' },
8181
{ field: 'families_id', header: 'Family ID' },
82-
{
83-
field: 'fhir_id',
84-
header: 'Diagnosis Type',
85-
transform: () => 'Clinical',
86-
},
8782
{ field: 'diagnosis.mondo_id_diagnosis', header: ' Diagnosis (MONDO)' },
88-
{ field: 'diagnosis.ncit_id_diagnosis', header: 'Diagnosis (NCIT)' },
89-
{ field: 'diagnosis.icd_id_diagnosis', header: 'Diagnosis (ICD)' },
90-
{ field: 'diagnosis.source_text', header: 'Diagnosis (Source Text)' },
83+
{ field: 'diagnosis.source_text', header: 'Condition (Source Text)' },
9184
{
9285
field: 'diagnosis.age_at_event_days',
9386
header: 'Age at Diagnosis (Days)',
9487
},
95-
{ field: 'diagnoses.source_text_tumor_location' },
9688
],
9789
sort: [{ families_id: 'asc' }, { participant_id: 'asc' }],
9890
};

0 commit comments

Comments
 (0)