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

Added OpenCR compatibility fixes for #11 #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmanko
Copy link
Member

@pmanko pmanko commented Jul 4, 2021

Description of what I changed

Added OpenCR compatibility, specifically in terms of Patient Identifiers.

Issue I worked on

see https://issues.openmrs.org/browse/FM2-

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • I have added tests to cover my changes. (If you refactored
    existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.

    No? -> execute above command

  • All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@pmanko pmanko requested a review from moshonk July 4, 2021 03:21
@pmanko pmanko self-assigned this Jul 4, 2021
@pmanko pmanko linked an issue Jul 4, 2021 that may be closed by this pull request
@ibacher
Copy link

ibacher commented Jul 6, 2021

@pmanko Could you take a look at this commit and see if those changes can be adapted to your needs? Basically it adds a fhir_patient_identifier_system that maps between a patient_identifier_type and a URL for that identifier type, allowing us to set a URL-per-identifier type. (The idea behind this being that, in some systems, patients have multiple identifiers, including a national health id, a local mrn, etc. and this way we can map those identifiers to their own systems, if necessary).

@pmanko
Copy link
Member Author

pmanko commented Jul 6, 2021

this commit

Thanks, will do! I'll discuss this with @moshonk as well, to make sure I'm not missing anything for making the OpenCR compatibility work, and we can test out using the main FHIR2 module on our workflows.

@moshonk
Copy link

moshonk commented Jul 14, 2021

@pmanko, this works.

To implement this, we will need to create a new Identifier type for IsantePlus, SYSTEM and assign it the appropriate URL. However, the value of the identifier MUST be limited to a length of 50 as per the column length restriction in the patient_identifier table. We can discuss this further during our next call.

cc @ccwhite333

@pmanko
Copy link
Member Author

pmanko commented Jul 15, 2021

@moshonk @ibacher A recent OpenCR release seems to have again changed the validation for Patient identifiers for no apparent reason: https://github.com/intrahealth/client-registry/blob/e83e9011fb6ee28561254ecd27229380b2af9d7d/server/lib/mixins/matchMixin.js#L919

See the git blames at lines 910 and 920: https://github.com/intrahealth/client-registry/blame/e83e9011fb6ee28561254ecd27229380b2af9d7d/server/lib/mixins/matchMixin.js#L920

This change just affects the system we have to set for the identifier, so it shouldn't affect the support in the FHIR2 module.

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.

Add OpenCR compatiblity to core OpenMRS FHIR2 Module
3 participants