-
Notifications
You must be signed in to change notification settings - Fork 230
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
fix: Clean up gender support in registration app #911
Conversation
@@ -383,21 +383,13 @@ export class FormManager { | |||
// provide a valid fhir.Patient object. The various patient chart modules should be able to handle | |||
// such missing props correctly (and should be updated if they don't). | |||
|
|||
// Gender in the original object only uses a single letter. fhir.Patient expects a full string. |
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.
The "original object" gender uses the full lowercase name, as FHIR expects.
@@ -60,7 +60,6 @@ function renderDob() { | |||
identifierTypes: [], | |||
values: formValues, | |||
validationSchema: null, | |||
setValidationSchema: (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.
Can't imagine why the validationSchema had a setter. Anyway it was never used.
Size Change: -399 kB (-12%) 👏 Total Size: 2.84 MB
ℹ️ View Unchanged
|
is: true, | ||
then: Yup.string().required('identifierValueRequired'), | ||
otherwise: Yup.string().notRequired(), | ||
export function getValidationSchema(config: RegistrationConfig) { |
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.
This sets us up for more validated form configurability :)
6cce529
to
9683b78
Compare
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.
This looks good to me, @brandones. Could you look into the failing tests?. Does anything stand out for you, @ibacher?
Whoops, my bad. I've got the tests failing locally. Fixing that up. |
Okay, fixed up the tests. Needs a core update though, pending openmrs/openmrs-esm-core#862 . |
2f73296
to
a325dda
Compare
I've just merged that PR |
Looks like e2e tests are failing because of gender labels
|
Thanks for pointing me to the place, @denniskigen ! Fixing. |
Requirements
Summary
Improves the registration config schema gender options. Cleans up the gender-related code. Cleans up some other code. Re-instates a validator that got commented out for some reason.