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

(chore) O3-2120: Move OpenMRS ID patient search identifier to defaultIdentifierTypes #1061

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

usamaidrsk
Copy link
Contributor

@usamaidrsk usamaidrsk commented Mar 25, 2024

… config-schema

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 moves OpenMRS ID identifier to defaultIdentifierTypes in the config-schema.ts

Screenshots

Related Issue

O3-2120

Other

@usamaidrsk usamaidrsk changed the title (chore) O3-2120: Move OpenMRS ID identifier to defaultIdentifierTypes in the config-schema.ts (chore) O3-2120: Move OpenMRS ID patient search identifier to defaultIdentifierTypes Mar 25, 2024
Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Thanks @usamaidrsk ! Defer to @denniskigen and @ibacher who may have a better sense of how this is all used, but generally looks good to me.

'b4d66522-11fc-45c7-83e3-39a1af21ae0d',
'f85081e2-b4be-4e48-b3a4-7994b69bb101',
'05a29f94-c0ed-11e2-94be-8c13b969e334',
],
Copy link
Member

Choose a reason for hiding this comment

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

IMO we shouldn't be hardcoding any identifier uuids here but this should come from the ref app configuration, but I know there's not agreement on that (and that this is existing code, not a change introduced as part of this code)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mogoodrich for the feedback.
The only uuid introduced is one for the OpenMRS ID, that's the last in the list.

Copy link
Member

Choose a reason for hiding this comment

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

What are the other identifiers then?

Copy link
Member

Choose a reason for hiding this comment

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

So, these first two identifiers are Palladium-specific. Those are the Patient Clinic Number and the NUPI number. They should be provided via distro configuration instead of being hardcoded in the Patient Search config schema. @donaldkibet, can @usamaidrsk proceed to remove them from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the config file there is this comment, for the first two.

These values correspond to the Patient Clinic Number and National Unique Patient Identifier (NUPI) identifier types respectively

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @denniskigen ! In fairness to @usamaidrsk looks like those two identifiers constants existed prior to this PR, but if they are implementation-specific, they definitely should be removed as defaults. @donaldkibet

<FallbackIdentifier patient={patients[index]} identifierName={config.defaultIdentifier} />
)}
</>
<DefaultIdentifiers identifiers={patientIdentifiers} />
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the configuration still specifies no patient identifiers? It seems like we still need some fallback here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants