Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added @jsonproperty binding to OpenMRSObservation domain model #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Biruk-Abebe-Y
Copy link

@Biruk-Abebe-Y Biruk-Abebe-Y commented Sep 23, 2020

Added @JsonProperty binding to OpenMRSObservation domain model to prevent observations with coded values to cause a parse error as caused by forms created using implementers interface with no grouping of concepts used. This is true when creating an observation form in implementers interface by using individual concepts with coded data types without grouping them as concept sets. In such cases, the encounter API will return the observations ungrouped and the value of those observations will be a json object (since it is a coded value). This will result in a parse error as the bind for value expects it to be a string. Since there will always be a property "valueAsString" in each observation returned by the API, it will be better to bind that to the "value" property of the OpenMRSObservation object.

#23

To duplicate this issue:

  1. create a form using implementers interface
  2. add an obs control whose data type is coded
  3. save the form
  4. capture an observation using the form
  5. look at the output from bahmni-erp-connect log

Attached is partial (relevant) output a got from bahmni-erp-connect log
openerp-feed-service.log

…vent observations with coded values to cause a parse error as caused by forms created using implementers interface with no grouping of concepts used
@CLAassistant
Copy link

CLAassistant commented Sep 23, 2020

CLA assistant check
All committers have signed the CLA.

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.

3 participants