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) Use optional chaining to safely access current session provider #1882

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

charity553
Copy link
Contributor

@charity553 charity553 commented Jun 27, 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 adds an optional chaining operator to the createEmptyLabOrder function’s current session provider argument for safe access.

Screenshots

https://github.com/openmrs/openmrs-esm-patient-chart/assets/57391531/c82f6f20-8a90-4387-b7e8-afcb186f9641

Related Issue

https://openmrs.atlassian.net/browse/O3-3496

Other

…tyLabOrder to handle cases where currentProvider might be null
@charity553 charity553 force-pushed the FixDrugOrderBasket branch from 3073053 to efe6192 Compare June 27, 2024 09:31
@charity553 charity553 changed the title Fix: Accessing the drug order basket if the user is not a provider (fix) LabOrder : using null coalescing for provider UUID in CreateEmptyLabOrder Jun 28, 2024
@denniskigen denniskigen changed the title (fix) LabOrder : using null coalescing for provider UUID in CreateEmptyLabOrder (fix) LabOrder : using null coalescing for provider UUID in CreateEmptyLabOrder. Jun 29, 2024
@denniskigen denniskigen changed the title (fix) LabOrder : using null coalescing for provider UUID in CreateEmptyLabOrder. (fix) Use optional chaining to safely access current session provider Jun 29, 2024
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

Thanks, @charity553!

@denniskigen denniskigen merged commit 7069c87 into openmrs:main Jul 1, 2024
5 of 6 checks passed
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.

3 participants