Skip to content

Commit 81f4629

Browse files
committed
LUI-136 : adding comments
1 parent 61309f3 commit 81f4629

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

omod/src/main/java/org/openmrs/web/dwr/DWRConceptService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public List<Object> findBatchOfConcepts(String phrase, boolean includeRetired, L
137137
ConceptService cs = Context.getConceptService();
138138
Set<ConceptSearchResult> searchResults = new HashSet<ConceptSearchResult>();
139139

140-
/*phrase.replaceAll("Concept #", "").trim();*/
141140
if (phrase.matches("\\d+")) {
142141
// user searched on a number. Insert concept with
143142
// corresponding conceptId
@@ -239,8 +238,9 @@ public List<Object> findBatchOfConcepts(String phrase, boolean includeRetired, L
239238
*/
240239
public ConceptListItem getConcept(String phrase) {
241240

242-
String x = phrase.replaceAll("Concept #", "").trim();
243-
Integer conceptId = Integer.valueOf(x);
241+
//trimming off unnecesarry characters to remain with a Pure Numeric String that can be converted to ConceptId
242+
String numeric_phrase = phrase.replaceAll("Concept #", "").trim();
243+
Integer conceptId = Integer.valueOf(numeric_phrase);
244244
Locale locale = Context.getLocale();
245245
ConceptService cs = Context.getConceptService();
246246
Concept c = cs.getConcept(conceptId);

0 commit comments

Comments
 (0)