diff --git a/omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java b/omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java index 1b5b0c41..97965360 100644 --- a/omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java +++ b/omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java @@ -236,7 +236,11 @@ public List 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);