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

Change automatic processing for Luxembourg to match only national health ID #13261

Open
2 tasks
SORMAS-JanBoehme opened this issue Feb 5, 2025 · 0 comments
Open
2 tasks
Assignees
Labels
change A change of an existing feature (ticket type) lu Adaptations requested by or implemented for Luxembourg

Comments

@SORMAS-JanBoehme
Copy link

SORMAS-JanBoehme commented Feb 5, 2025

Problem Description

Currently, the automatic processing is using the same matching criteria for persons as the duplicate detection, but this sometimes leads to no matches when there should be one.

Proposed Change

Change the automatic processing matching criteria for persons to only check for a perfect match of the national health ID for SORMAS servers that are configured for Luxembourg locale. In all other cases, keep the standard behaviour as the national health ID is Luxembourg specific and not available in other countries.

What is considered a "perfect match"?
A match is positive when the following criteria are true:

  • both values have the same length (trim blanks from the beginning and end before checking)
  • both values have the same characters in exactly the same order (trim blanks from the beginning and end before checking)

Added Value/Benefit

Making the criteria more simple and clear, it will reduce the likelihood of false positives as well as easier troubleshooting for the reason when the automatic processing does not find a match.

Acceptance Criteria

  • A match is considered positive when the national health is a "perfect match" to an existing person
  • A match is considered negative when the national health id is not a "perfect match" even though first name, last name and birthdate do match

Implementation Details

No response

Mockups

No response

Additional Information

No response

@SORMAS-JanBoehme SORMAS-JanBoehme added change A change of an existing feature (ticket type) lu Adaptations requested by or implemented for Luxembourg labels Feb 5, 2025
@raulbob raulbob assigned raulbob and unassigned SORMAS-JanBoehme Feb 8, 2025
raulbob added a commit that referenced this issue Feb 11, 2025
…ional health ID

This changes the `handlePickOrCreatePerson` method that handles
the process of picking an existing or creating a new person entity.
The logic is split into localized and a default implementations.

* **Localized Implementation :**
The `localizedHandlePickOrCreatePerson` method handles the process
specifically for Luxembourg. It uses the national health ID for
matching. If no match is found, a new person entity is created.
If multiple matches are found, the process is cancelled.
This method does nothing and returns false for other countries,
allowing for future localized implementations.

* **Default Implementation:**
The `defaultHandlePickOrCreatePerson` method provides a
fallback strategy. It prioritizes matching by national health ID.
If no national health ID is provided or no exact match is found,
it checks for similar person names.
If similar persons are found, the process is cancelled.
Otherwise, a new person entity is created.

* **Dispatching Logic:**
The `handlePickOrCreatePerson` method now dispatches the processing
to the localized implementation first. If the localized implementation
returns false (e.g., for a different country),
the default implementation is used.
raulbob added a commit that referenced this issue Feb 11, 2025
…alth ID

This commit changes the `handlePickOrCreatePerson` method that
handles the process of picking an existing or creating
a new person entity.

The logic is split into localized and a default implementation.

* **Localized Implementation :** The `localizedHandlePickOrCreatePerson`
method handles the process specifically for Luxembourg.
It uses the national health ID for matching.
If the origin persons national health ID is blank the process
is canceled.
If no match is found, a new person entity is created.
If multiple matches are found, the process is cancelled.
This method does nothing and returns false for other countries,
allowing for future localized implementations.

* **Default Implementation:** The `defaultHandlePickOrCreatePerson`
method provides a fallback strategy.
It prioritizes matching by national health ID. If no national health ID
is provided or no exact match is found, it checks for similar
person names.
If similar persons are found, the process is cancelled.
Otherwise, a new person entity is created.

* **Dispatching Logic:** The `handlePickOrCreatePerson` method now
dispatches the processing to the localized implementation first.
If the localized implementation returns false
(meaning it didn't handle the request, e.g., for a different country),
the default implementation is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change A change of an existing feature (ticket type) lu Adaptations requested by or implemented for Luxembourg
Projects
None yet
Development

No branches or pull requests

3 participants