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

(fix) Fix conditional access check affecting patientIdentifier type fields #260

Merged
merged 2 commits into from
May 9, 2024

Conversation

gitcliff
Copy link
Contributor

@gitcliff gitcliff commented May 8, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR is addressing the issue whereby after saving a form of patient identifier type, upon subsequent attempts to reload the form in the form-renderer the schema fails to load.

Screenshots

https://www.loom.com/share/7d5e92a9e98c423cb05270701f7539cb

Related Issue

Other

@gitcliff gitcliff requested a review from denniskigen May 8, 2024 16:05
@gitcliff gitcliff changed the title 03-3140:adding validation for patient identifire 03-3140:adding validation for patient identifier May 8, 2024
@samuelmale
Copy link
Member

samuelmale commented May 8, 2024

The title of the PR mentions adding some kind of validation but I don't see any validation specific logic, all I see is optional chaining. @gitcliff is this a WIP?

@gitcliff
Copy link
Contributor Author

gitcliff commented May 8, 2024

@samuelmale this PR covers the initial part of failure to load the form schema for patient identifier questions, this was discovered during the patientIdentifier validation for testing. Going to raise another PR that cover the patient Identifier validation.
Thanks

@gitcliff gitcliff changed the title 03-3140:adding validation for patient identifier (fix):Enable loading of the form schema for patient Identifier type Questions May 8, 2024
@samuelmale
Copy link
Member

samuelmale commented May 8, 2024

@gitcliff the PR title doesn't clearly describe what the changes are about. Is it fixing a reference to null/undefined prop or it's enabling loading of the form schema for patient Identifier type Questions? The title is a bit ambiguous.

@gitcliff gitcliff changed the title (fix):Enable loading of the form schema for patient Identifier type Questions (fix):Fixing reference to prop when loading the form schema for patient Identifier type Questions May 8, 2024
@gitcliff gitcliff changed the title (fix):Fixing reference to prop when loading the form schema for patient Identifier type Questions (fix):Fixing reference to null prop when loading the form schema for patient Identifier type Questions May 8, 2024
@gitcliff
Copy link
Contributor Author

gitcliff commented May 8, 2024

@gitcliff the PR title doesn't clearly describe what the changes are about. Is it fixing a reference to null/undefined prop or it's enabling loading of the form schema for patient Identifier type Questions? The title is a bit ambiguous.

@samuelmale its **Fixing reference to null prop when loading the form schema for patient Identifier type Questions **

Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@samuelmale samuelmale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor suggestion, but this is good to go.

src/utils/patient-identifier-helper.ts Outdated Show resolved Hide resolved
@denniskigen denniskigen changed the title (fix):Fixing reference to null prop when loading the form schema for patient Identifier type Questions (fix) Fix conditional access check affecting patientIdentifier type fields May 9, 2024
Co-authored-by: Samuel Male <samuelsmalek@gmail.com>
@samuelmale samuelmale merged commit fe272f9 into openmrs:main May 9, 2024
4 checks passed
vasharma05 pushed a commit that referenced this pull request May 27, 2024
* 03-3140:adding validation for patient identifire

* Update src/utils/patient-identifier-helper.ts

Co-authored-by: Samuel Male <samuelsmalek@gmail.com>

---------

Co-authored-by: Samuel Male <samuelsmalek@gmail.com>
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.

4 participants