Hello all,
I have updated OpenMRS from 2.3 to 2.5. I was faced by the following problem:
OpenMRS is showing concepts on saved forms as numbers not names. For example for
coded concepts like DOES PATIENT HAVE RASH
The answers on the form before saving it were : yes , no , unknown
Once you select one answer and go to patient dashboard to review the information, it will look like this
DOES PATIENT HAVE RASH: # concept 1234
Instead of
DOES PATIENT HAVE RASH: No
in other words, openmrs won’t show the concept name on saved forms but rather concept # as an answer. Do u have an idea what is going on here.
My recollection is that typically this happens when there is an underlying exception trying to retrieve Concept Names for a Concept (usually use to a Hibernate Lazy Loading error or similar), and the fallback behavior when all else fails is to use the toString() method,
Are there any errors or warnings being logged that might indicate the underlying error that is causing this?
Also, sometimes restarting the server helps with this (though I know that isn’t an adequate solution). Any chance that fixes things?
In other words, we have added this “displayWithHtmlForm”: true
I have created another encounter without “displayWithHtmlForm”: true , the concepts was displayed fine on the saved forms. However, we cannot remove “displayWithHtmlForm”: true as we have 100s of forms designed using this feature.
Restarting the server didnt solve the issue
I will clear all logs tonight and attach error logs. However, no apparent errors there
@yadamz to get a log that is specific to this, you could remove all log contents just before u load the form, such that it clear all startup messages and errors caused by other things. Once you confirm that the log is clean, then you click the link which loads the form. Then new log contents will be created that are specifically to do with this.
I built the module with this commit and confirm that this commit fixes the issue on both situations:
I verified this in both edit and view modes in the Legacy UI and the Reference App UI.
This is amazing @craigappl and @dkayiwa . Just to make sure that I am getting the correct one. Do you mind posting the link to the source I should get. I appreciate your help
Hello @craigappl and @dkayiwa ,
The initial problem above was not fully resolved. I used getField function to retrieve a concept (coded concept) value. The concept ID was retrieved but not the concept name. I am now using the latest snapshot of HTML Form Entry 3.4.