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

Feature/134 bug ehr parameter #158

Merged
merged 3 commits into from
Feb 28, 2020
Merged

Conversation

jakesmolka
Copy link
Contributor

fixes https://github.com/ehrbase/project_management/issues/134

Technical problem: Our deserialization was defaulting the boolean values to false (Java spec) without any information left for the controller to see if this value was false on purpose or not.

Solution: Custom deserializer for EhrStatus, which

  • checks for is_modifiable and sets it to the default true value if necessary (vs. the Java default false for booleans)
  • checks for is_queryable and sets it to the default true value if necessary

followed by invoking the standard deserializer with the result input. So if the parameters were set to something valid in the request, everything is deserialized as before. But if not, the input is modified and routed into the normal deserialization.

Allows to force boolean is_modifiable and is_queryable to have the
default value 'true' despite boolean fields technically have default
'false'. Also defaults to 'true' on invalid input.

ehrbase/project_management#134
ehrbase/project_management#134
@jakesmolka jakesmolka self-assigned this Feb 27, 2020
ehrbase/project_management#134
@stefanspiska stefanspiska merged commit ed9b731 into develop Feb 28, 2020
@stefanspiska stefanspiska deleted the feature/134_bug-ehr-parameter branch February 28, 2020 07:56
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.

None yet

2 participants