(fix) Default to using the current date#60
Merged
Conversation
3 tasks
ibacher
requested changes
Aug 15, 2023
| payload, | ||
| form.valueProcessingInfo.encounterTypeUuid | ||
| ); | ||
| this.setPayloadEncounterDateUuid(payload, form.valueProcessingInfo.encounterDatetime, form.valueProcessingInfo.utcOffset); |
Member
There was a problem hiding this comment.
Suggested change
| this.setPayloadEncounterDateUuid(payload, form.valueProcessingInfo.encounterDatetime, form.valueProcessingInfo.utcOffset); | |
| this.setPayloadEncounterDate(payload, form.valueProcessingInfo.encounterDatetime, form.valueProcessingInfo.utcOffset); |
| payload, | ||
| form.valueProcessingInfo.encounterTypeUuid | ||
| ); | ||
| this.setPayloadEncounterDateUuid(payload, form.valueProcessingInfo.encounterDatetime, form.valueProcessingInfo.utcOffset); |
Member
There was a problem hiding this comment.
This should be in it's own, separate guarded clause to ensure:
- That the payload encounterDatetime isn't already set (e.g., by an
encounterDateTimenode). - That the
form.valueProcessingInfo.encounterDatetimeis populated with a value. Unless, are we relying onnullreturning today's date and time?
6bbec01 to
b62f3ba
Compare
Member
|
So I think the underlying issue here was caused by a fault in the o3forms backend module. We've published an updated version (2.1.0) that should fix the issue. Could you try that out and see if it resolves things? |
ibacher
approved these changes
Aug 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements
Summary
This merge request is intended to resolve the issue with form saving. Currently, no form on the website can be saved because the encounterType is not being set in the request. While addressing this problem, I discovered that there is also an issue with encounterDatetime. This field is not being added as well, but these changes should rectify it.
Additionally, I found a problem where active visits, which are automatically created during application deployment, cannot work correctly with this date. When starting a visit manually, the date is set correctly, and everything starts working.
Screenshots
Related Issue
https://issues.openmrs.org/browse/O3-2312
Other
Should be merged with: openmrs/openmrs-esm-patient-chart#1314