-
Notifications
You must be signed in to change notification settings - Fork 211
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
(feat) O3-3840 : Improvements to the registration form Death info
section
#1290
Conversation
@usamaidrsk , the video is not playing for me, can you please add a new video for me? |
I have replaced the video, check now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall work done is good, but error scenarios are not handled at all, which will become an issue in the future.
Identified the error scenarios, we can take the PR forward after the same is done.
Thanks!
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-registration-app/src/patient-registration/field/field.scss
Outdated
Show resolved
Hide resolved
...ent-registration-app/src/patient-registration/validation/patient-registration-validation.tsx
Outdated
Show resolved
Hide resolved
...atient-registration-app/src/patient-registration/input/basic-input/input/input.component.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall work done is good, but error scenarios are not handled at all, which will become an issue in the future.
Identified the error scenarios, we can take the PR forward after the same is done.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks, looks good otherwise!
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
.../esm-patient-registration-app/src/patient-registration/field/date-of-death/date-of-death.tsx
Outdated
Show resolved
Hide resolved
...-registration-app/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx
Outdated
Show resolved
Hide resolved
Mind sharing what schema I can use to test this locally. |
.../esm-patient-registration-app/src/patient-registration/field/date-of-death/date-of-death.tsx
Outdated
Show resolved
Hide resolved
Yes @denniskigen , here is the schema you can test with. {
"@openmrs/esm-patient-registration-app": {
"registrationObs": {
"encounterTypeUuid": "7b68d557-85ef-4fc8-b767-4fa4f5eb5c23"
},
"sections": [
"demographics",
"death"
],
"fieldConfigurations": {
"name": {
"displayCapturePhoto": true,
"displayMiddleName": false,
"allowUnidentifiedPatients": false,
"displayReverseFieldOrder": false
},
},
"sectionDefinitions": [
{
"id": "demographics",
"name": "Basic Information",
"fields": [
"name",
"gender",
"dob",
"id"
]
},
{
"id": "death",
"name": "Death Information",
"fields": [
"dateAndTimeOfDeath",
"causeOfDeath"
]
}
]
}
} |
Should we include a free text field below the non-coded-cause-of-death.mp4This isn't a blocker though and could be worked in in the future. |
Also, might it be worth showing a separate time picker to record the time of death? |
I can add this.
I will add this as well |
Does editing work correctly for the |
Good improvements with adding validations, @vasharma05. I think you also need to add the corresponding translation strings to get them to display correctly in the UI. |
Yes @denniskigen, I was missing on the translations. I have added them. |
Ok. Reviewing now. |
f69a268
to
a6114b0
Compare
Death info
section
I will merge this PR shortly as it's a critical fix for the registration app (if the build passes). We should however ensure that the following loose ends are tied:
|
Death info
sectionDeath info
section
@usamaidrsk thank you so much for your work on this. Can you please file tickets for the remaining tasks that Dennis mentioned above? He was expecting you to but I think this maybe wasn't so clear :P :) |
Yeah, thanks @gracepotma for the reminder. |
@usamaidrsk Please post links to the tickets here once you create them. |
Here is the follow-up ticket https://openmrs.atlassian.net/browse/O3-3907 |
Requirements
Summary
This PR makes the following changes to the Death info section of the registration form:
Is dead
text field with a checkbox. This makes for better UX, as it's easier to understand and use.Date of death
date picker and aTime of death
date picker for capturing when the person died. TheDate of death
date picker also uses theOpenmrsDatePicker
component under the hood, which means it has support for multiple calendar systems and improved localization out of the box.Cause of death
dropdown field for recording the cause of death. The answers are taken from theCause of death
concept. IfOther
is selected, a text field is shown for the user to enter the non-coded cause of death.Sample schema for testing this PR
Paste it into the JSON editor in the Implementer tools panel when running your dev server.
Screenshots
register-dead-patient.mp4
Related Issue
https://openmrs.atlassian.net/browse/O3-3840
Other