Skip to content

Commit

Permalink
Update anni/src/database/helpers/cpic-constructors.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jannis Baum <85999315+jannis-baum@users.noreply.github.com>
  • Loading branch information
tamslo and jannis-baum committed May 2, 2023
1 parent 65d9e69 commit 24e3b11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions anni/src/database/helpers/cpic-constructors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ function contractByPhenotype(
const phenotypeMap = new Map<string, IGuideline_Any>();
guidelines.forEach((guideline) => {
const key = phenotypeKey(guideline);
if (phenotypeMap.has(key)) {
const existingGuideline = phenotypeMap.get(key);
const existingGuideline = phenotypeMap.get(key);
if (existingGuideline) {
// ensure that we don't miss information when
// getting only first index from externalData
// and lookupkey[gene]
ensureInitialGuidelineStructure(guideline);
existingGuideline!.externalData.push(guideline.externalData[0]);
Object.keys(existingGuideline!.lookupkey).forEach((gene) => {
existingGuideline!.lookupkey[gene].push(
existingGuideline.externalData.push(guideline.externalData[0]);
Object.keys(existingGuideline.lookupkey).forEach((gene) => {
existingGuideline.lookupkey[gene].push(
guideline.lookupkey[gene][0],
);
});
Expand Down

0 comments on commit 24e3b11

Please sign in to comment.