这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mozzy11
Copy link
Member

@mozzy11 mozzy11 commented Feb 12, 2019

Ticket : https://issues.openmrs.org/browse/LUI-136

in this commit , i trimmed off unnecesary characters , so that the converted input value can remain a pure Numeric string that can be converted to a conceptId

* @param conceptId the id to look for
* @return a {@link ConceptListItem} or null if conceptId is not found
*/
public ConceptListItem getConcept(Integer conceptId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason behind changing from the integer conceptId to string phrase as the method parameter?

Copy link
Member Author

@mozzy11 mozzy11 Mar 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the issue is that, the cause of the error was arising from the fact that the value to be taken as a conceptId here getConcept(Integer conceptId) was in the form say "Concept #33" for id 33, "Concept #6" for id 6, "Concept #10" for id 10. hence say "Concept #66" couldnt be taken directly as an Integer conceptid ,thats why it was throwing the javascript error described in the ticket.
So i changed it from integer to string , so that the value eg "Concept #66" be recieved as a string , then i trimm off the "Concept #" to remain with a Numeric string "66" , and then i convert it back to a concept id .which worked fine and the Javascript error is no longer thrown

@mozzy11
Copy link
Member Author

mozzy11 commented Mar 15, 2019

hello @dkayiwa , made a change in the PR, i think this is a better way

})
function convert(conc){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this function doing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it converts the string(concept object) eg "concept #12" to a numeric string (concept id) eg "12"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants