Skip to content

Commit

Permalink
LUI-136 : trimm off unnecesasry characters from the converted input s…
Browse files Browse the repository at this point in the history
…tring
  • Loading branch information
mozzy11 committed Feb 12, 2019
1 parent 521d14f commit 61309f3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public List<Object> findBatchOfConcepts(String phrase, boolean includeRetired, L
ConceptService cs = Context.getConceptService();
Set<ConceptSearchResult> searchResults = new HashSet<ConceptSearchResult>();

/*phrase.replaceAll("Concept #", "").trim();*/
if (phrase.matches("\\d+")) {
// user searched on a number. Insert concept with
// corresponding conceptId
Expand Down Expand Up @@ -236,7 +237,10 @@ public List<Object> findBatchOfConcepts(String phrase, boolean includeRetired, L
* @param conceptId the id to look for
* @return a {@link ConceptListItem} or null if conceptId is not found
*/
public ConceptListItem getConcept(Integer conceptId) {
public ConceptListItem getConcept(String phrase) {

String x = phrase.replaceAll("Concept #", "").trim();
Integer conceptId = Integer.valueOf(x);
Locale locale = Context.getLocale();
ConceptService cs = Context.getConceptService();
Concept c = cs.getConcept(conceptId);
Expand Down

0 comments on commit 61309f3

Please sign in to comment.