-
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-2100: Unknown patient name and estimated D.O.B config #697
Conversation
...es/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx
Show resolved
Hide resolved
d1f9b0a
to
14d22a7
Compare
c882b5b
to
ad533c3
Compare
...es/esm-patient-registration-app/src/patient-registration/field/name/name-field.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.
A few small things I noticed reading through this.
packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx
Outdated
Show resolved
Hide resolved
...es/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx
Outdated
Show resolved
Hide resolved
...es/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx
Show resolved
Hide resolved
packages/esm-patient-registration-app/src/patient-registration/form-manager.test.ts
Show resolved
Hide resolved
...ages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.tsx
Outdated
Show resolved
Hide resolved
Hi @ibacher ! |
It’s slightly more complicated than that. For patients 5 and under, it will return the year + month. But anyone six or older it just sends the year. This is because the WHO guidelines for children are broken down by month(s) for children up to 5 years of age. Past that, it’s an estimated birthdate, so including other date parts gives false precision (technically, we always store a full date). From a user perspective, I wouldn’t expect anyone to estimate an age as “30 years and 2 months”. The “2 months” are very unlikely to be clinically significant. However, for toddlers, infants, and newborns, 2 months can very clinically significant, so we return that data. |
This clears a lot. |
I'm actually surprised no one had asked about that before... |
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.
Looks like this is in good shape to me. A few comments / questions to make sure we're adhering to requirements.
@@ -25,7 +25,8 @@ export const DobField: React.FC = () => { | |||
const { t } = useTranslation(); | |||
const { | |||
fieldConfigurations: { dateOfBirth }, | |||
} = useConfig() as RegistrationConfig; | |||
} = useConfig<RegistrationConfig>(); | |||
const allowEstimatedBirthDate = dateOfBirth?.allowEstimatedDateOfBirth; | |||
const [dobUnknown] = useField('birthdateEstimated'); | |||
const dobKnown = !dobUnknown.value; |
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.
It's a little weird to create a variable which is !dobUnknown.value
and then use it as !dobKnown
. It might read more clearly just to have dobUnknown.value
in the OR, no?
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.
Can this be addressed?
packages/esm-patient-registration-app/src/patient-registration/form-manager.ts
Show resolved
Hide resolved
@Jexsie, could you respond to the comments raised in the PR review? |
Can we resolve the e2e tests? After that, this should be good to merge. |
Hi @ibacher ! |
This is required for Cambodia's latest server. |
So, one very small comment I had initially left; once that's addressed, I'm happy to merge this in and follow-up on the e2e tests later. |
I've made the requested changes @ibacher ! |
Looks like a syntax error... |
Fixed the error @ibacher and tested the changes locally too. |
…s#697) Co-authored-by: Vineet Sharma <[email protected]>
* added test for utils.ts * resolved review commits * (feat) Remove filtering todays queue entries on frontend (#752) * (refactor): Display all active visits by removing filter for showing only today's active visits (#755) * (refactor): changed activeVisits.idNumber assignment for improved code robustness (#756) * (feat) O3-2100: Unknown patient name and estimated DOB config (#697) Co-authored-by: Vineet Sharma <[email protected]> * (test) O3-2225/6: Add tests for cancel-patient-edit.component and delete-identifier-confirmation-modal (#750) * removed the extra types --------- Co-authored-by: Anjula Shanaka <[email protected]> Co-authored-by: Dennis Kigen <[email protected]> Co-authored-by: CynthiaKamau <[email protected]> Co-authored-by: Donald Kibet <[email protected]> Co-authored-by: Jexsie <[email protected]> Co-authored-by: Vineet Sharma <[email protected]>
…s#697) Co-authored-by: Vineet Sharma <[email protected]>
* added test for utils.ts * resolved review commits * (feat) Remove filtering todays queue entries on frontend (openmrs#752) * (refactor): Display all active visits by removing filter for showing only today's active visits (openmrs#755) * (refactor): changed activeVisits.idNumber assignment for improved code robustness (openmrs#756) * (feat) O3-2100: Unknown patient name and estimated DOB config (openmrs#697) Co-authored-by: Vineet Sharma <[email protected]> * (test) O3-2225/6: Add tests for cancel-patient-edit.component and delete-identifier-confirmation-modal (openmrs#750) * removed the extra types --------- Co-authored-by: Anjula Shanaka <[email protected]> Co-authored-by: Dennis Kigen <[email protected]> Co-authored-by: CynthiaKamau <[email protected]> Co-authored-by: Donald Kibet <[email protected]> Co-authored-by: Jexsie <[email protected]> Co-authored-by: Vineet Sharma <[email protected]>
Requirements
Summary
This PR introduces the allowing/ restricting of registering unidentified patients and patients with estimated date of birth using the configuration.
The new configuration points added are:
Screenshots
None.
Related Issue
Other
None.