Skip to content

Commit

Permalink
formating the concpet id value to a numeric string
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 committed Mar 15, 2019
1 parent 66da78e commit 224a879
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,7 @@ 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(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);
public ConceptListItem getConcept(Integer conceptId) {
Locale locale = Context.getLocale();
ConceptService cs = Context.getConceptService();
Concept c = cs.getConcept(conceptId);
Expand Down

0 comments on commit 224a879

Please sign in to comment.