Skip to content

Commit

Permalink
🔧 Fix todo en env.ts and removed is_harmnonized in study mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
evans-g-crsj committed Jul 16, 2024
1 parent e79070e commit b34d72e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
2 changes: 1 addition & 1 deletion admin/findClinicalIndicesUsage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const unaliasedClinicalIndicesWithCreationDate = makeReleaseToCreationDate(clini

// Make sure that no aliased index contains previously found unaliased releases.
const unaliasedReleases = unaliasedClinicalIndicesWithCreationDate.map(x => x.release);
assert(clinicalAliases.every(x => !unaliasedReleases.includes(`re_${x.index.split('re_')[1]}`)));
assert(clinicalAliases.every(x => !unaliasedReleases.includes(`re_${x.index.split('re_')[1]}`)), 'more than one releases aliased was detected');

console.log(`===== Not Aliased (pattern:re_*)`);

Expand Down
14 changes: 0 additions & 14 deletions admin/mockStudies.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export const mockStudies = [
date_collection_start_year: '2016',
institutions: ['Linda Crnic Institute for Down Syndrome'],
investigator_names: ['Joaquin M. Espinosa'],
is_harmonized: true,
study_code: 'HTP',
},
{
Expand Down Expand Up @@ -153,7 +152,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ['Baylor College Of Medicine'],
investigator_names: ['Phillip J. Lupo'],
is_harmonized: true,
study_code: 'DS-COG-ALL',
},
{
Expand Down Expand Up @@ -209,7 +207,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ['Emory University School of Medicine'],
investigator_names: ['Stephanie Sherman'],
is_harmonized: true,
study_code: 'DS360-CHD',
},
{
Expand Down Expand Up @@ -265,7 +262,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ["Cincinnati Children's Hospital Medical Center"],
investigator_names: ['Eileen C. King'],
is_harmonized: true,
study_code: 'DS-PCGC',
},
{
Expand Down Expand Up @@ -344,7 +340,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ["Children's Hospital of Philadelphia"],
investigator_names: ['Hakon Hakonarson'],
is_harmonized: true,
study_code: 'X01-Hakonarson',
},
{
Expand Down Expand Up @@ -400,7 +395,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ['University of Oxford'],
investigator_names: ['Adam de Smith'],
is_harmonized: true,
study_code: 'X01-deSmith',
},
{
Expand All @@ -409,7 +403,6 @@ export const mockStudies = [
date_collection_start_year: '2018',
institutions: ['Benaroya Research Institute'],
investigator_names: ['Jane Buckner'],
is_harmonized: true,
study_code: 'BRI-DSR',
},
{
Expand All @@ -418,7 +411,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ['Linda Crnic Institute for Down Syndrome'],
investigator_names: ['Joaquin Espinosa'],
is_harmonized: true,
study_code: 'DS-NEXUS',
},
{
Expand All @@ -427,7 +419,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ['Geisinger Health System'],
investigator_names: ['Christa Martin'],
is_harmonized: true,
study_code: 'DS-Sleep',
},
{
Expand Down Expand Up @@ -460,7 +451,6 @@ export const mockStudies = [
date_collection_start_year: '2013',
institutions: ['Eunice Kennedy Shriver National Institute of Child Health and Human Development'],
investigator_names: ['Sujata Bardhan'],
is_harmonized: true,
study_code: 'DSC',
},
{
Expand All @@ -469,7 +459,6 @@ export const mockStudies = [
date_collection_start_year: '',
institutions: ['University of Pittsburgh'],
investigator_names: ['Bradley T. Christian', 'Benjamin L. Handen', 'Elizabeth Head', 'Mark Mapstone'],
is_harmonized: true,
study_code: 'ABC-DS',
},
];
Expand Down Expand Up @@ -570,9 +559,6 @@ const sSchema = {
type: 'string',
},
},
is_harmonized: {
type: 'boolean',
},
investigator_names: {
type: 'array',
items: {
Expand Down
28 changes: 12 additions & 16 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import dotenv from 'dotenv';

dotenv.config();

//TODO DELETE in confs //export const PROJECT_KIDSFIRST = 'KidsFirst';
//TODO DELETE in confs //export const PROJECT_INCLUDE = 'Include';

//TODO DELETE in confs //export const project = process.env.PROJECT || PROJECT_KIDSFIRST;
export const port = process.env.PORT || 5050;

export const keycloakURL = process.env.KEYCLOAK_URL || 'https://kf-keycloak-qa.kf-strides.org/auth';
Expand All @@ -28,20 +25,19 @@ export const maxNOfGenomicFeatureSuggestions = process.env.MAX_NUMBER_OF_GF_SUGG
export const indexNameGeneFeatureSuggestion = process.env.GENES_SUGGESTIONS_INDEX_NAME;
export const indexNameVariantFeatureSuggestion = process.env.VARIANTS_SUGGESTIONS_INDEX_NAME;

//TODO DELETE in confs //export const riffURL = process.env.RIFF_URL || 'https://riff-qa.kf-strides.org';

export const userApiURL = process.env.USER_API_URL || 'https://include-users-api-qa.373997854230.d3b.io';
//TODO DELETE in confs //export const sendUpdateToSqs = process.env.SEND_UPDATE_TO_SQS !== 'false';
//TODO DELETE in confs //export const sqsQueueUrl = process.env.SQS_QUEUE_URL || '';

export const maxSetContentSize: number = Number.parseInt(process.env.MAX_SET_CONTENT_SIZE) || 100000;
//TODO change default values
export const idKey = process.env.ID_KEY || 'kf_id';
export const fileIdKey = process.env.FILE_ID_KEY || 'kf_id';
export const studyIdKey = process.env.STUDY_ID_KEY || 'kf_id';
export const participantIdKey = process.env.PARTICIPANT_ID_KEY || 'kf_id';
export const biospecimenIdKey = process.env.BIOSPECIMEN_ID_KEY || 'kf_id';
export const familyIdKey = process.env.FAMILY_ID_KEY || 'family_id';
export const participantKey = process.env.TO_PARTICIPANT_ID_KEY || 'kf_id';
export const participantFileKey = process.env.TO_PARTICIPANT_FILE_ID_KEY || 'kf_id';
export const participantBiospecimenKey = process.env.TO_PARTICIPANT_BIOSPECIMEN_ID_KEY || 'kf_id';

export const idKey = process.env.ID_KEY || 'fhir_id';
export const fileIdKey = process.env.FILE_ID_KEY || 'file_id';
export const studyIdKey = process.env.STUDY_ID_KEY || 'study_id';
export const participantIdKey = process.env.PARTICIPANT_ID_KEY || 'participant_id';
export const biospecimenIdKey = process.env.BIOSPECIMEN_ID_KEY || 'sample_id';
export const familyIdKey = process.env.FAMILY_ID_KEY || 'family.family_id';
export const participantKey = process.env.TO_PARTICIPANT_ID_KEY || 'fhir_id';
export const participantFileKey = process.env.TO_PARTICIPANT_FILE_ID_KEY || 'files.fhir_id';
export const participantBiospecimenKey = process.env.TO_PARTICIPANT_BIOSPECIMEN_ID_KEY || 'files.biospecimens.fhir_id';

export const cacheTTL: number = Number.parseInt(process.env.CACHE_TTL_SEC) || 3600;

0 comments on commit b34d72e

Please sign in to comment.