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

LUI-136 : adding comments
  • Loading branch information
mozzy11 committed Feb 12, 2019
1 parent 521d14f commit a0bc0fe
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ 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) {

//trimming off unnecesarry characters to remain with a Pure Numeric String that can be converted to ConceptId
String numeric_phrase = phrase.replaceAll("Concept #", "").trim();
Integer conceptId = Integer.valueOf(numeric_phrase);
Locale locale = Context.getLocale();
ConceptService cs = Context.getConceptService();
Concept c = cs.getConcept(conceptId);
Expand Down

0 comments on commit a0bc0fe

Please sign in to comment.