From 224a8795823ba5a22da4aac507485a3b192fb7a1 Mon Sep 17 00:00:00 2001 From: mozzy11 Date: Fri, 15 Mar 2019 10:31:53 +0300 Subject: [PATCH] formating the concpet id value to a numeric string --- .../main/java/org/openmrs/web/dwr/DWRConceptService.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 97965360..1b5b0c41 100644 --- a/omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java +++ b/omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java @@ -236,11 +236,7 @@ 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(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);