Skip to content

Commit

Permalink
added Field Name Decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
Newatia authored and Newatia committed Jul 7, 2022
1 parent f6447bd commit 052d83e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package gov.hhs.gsrs.adverseevents;

import ix.core.FieldNameDecorator;

import java.util.HashMap;
import java.util.Map;

public class AdverseEventFieldNameDecorator implements FieldNameDecorator {

private static final Map<String, String> displayNames;

static {
Map<String, String> m = new HashMap<>();

m.put("root_name", "Ingredient Name");
m.put("root_adverseEvent", "Adverse Event");
m.put("root_routeOfAdmin", "Route of Administration");
m.put("root_ptTermMeddra", "PT Term Meddra");
m.put("root_dmeReactions", "DME Reactions");
m.put("root_ptTerm", "PT Term");
m.put("root_species", "Species");
m.put("root_primSoc", "Prim SOC");

displayNames = m;
}

@Override
public String getDisplayName(String field) {
String fdisp = displayNames.get(field);
if (fdisp == null) {
return field;
}
return fdisp;
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include "gsrs-core.conf"

##******* SUBSTANCE CONFIG BEGIN **************

#ix.structure{
# base = ${ix.home}/structure
#}
Expand Down Expand Up @@ -51,9 +53,6 @@ ix.core.exactsearchfields=[
}
]




ix.structure{
base = ${ix.home}/structure
}
Expand Down Expand Up @@ -553,4 +552,13 @@ gsrs.validators.substances +=
#}

## Disable MOLWITCH
gsrs.substances.molwitch.enabled=false
gsrs.substances.molwitch.enabled=false

##******* SUBSTANCE CONFIG END ******************

##******* ADVERSE EVENT CONFIG BEGIN **************

#Allows deep analysis of fields to do suggestions
ix.index.deepfieldsraw = "gov.hhs.gsrs.adverseevents.adverseeventpt.models.AdverseEventPt;gov.hhs.gsrs.adverseevents.adverseeventdme.models.AdverseEventDme;gov.hhs.gsrs.adverseevents.adverseeventcvm.models.AdverseEventCvm"

##******* ADVERSE EVENT CONFIG END ***************

0 comments on commit 052d83e

Please sign in to comment.