Patient Matching 2.0
I would like to divide my whole project into two parts for the better understanding.
1. Incremental Patient Matching 2. Merging Patients & Excluding non-matching Patients from the Patient-Matching Report
According to my GSoC project my primary goal was number 1 whereas the secondary goal was number 2. I have completed both of them successfully. Allow me to give a description about these two parts.
Incremental Patient Matching
To give a little introduction on what incremental patient matching is, it is a method of identifying duplicate patients very efficiently. In a real world scenario, the requirement would be to match thousands of patients with each other. Once this matching process continues it would be very time consuming since all of the patients are compared with each of them regardless of the fact that two or three new patients are added/updated. Incremental patient matching is used as a suggestion to save time.
Before showing how this has been done, I want to highlight few things related to this scenario.
- By default the checkbox Incremental Match is checked. User can perform a patient match as an incremental or as a normal patient match where all the patients are compared with each of them.
- A single report per a strategy. The report will be named as incremental-report-[strategy-name]
- To perform an incremental patient match it is necessary to have an already generated report for that particular strategy. otherwise module will compare every patient to all the others.
- Incremental patient matching will be performed only if a single strategy is selected.
Here is how the report generating user interface looks like after the changes
How this Works?
Run a report with the configuration name "test1"
This is how it looks like when a patient match is performed at the first time
Add a patient which shows a match with an existing record
Run the report again (Incremental patient matching)
The same incremental-report-test1 report will be updated.
New patient is added which do not exhibit any matching property with existing records
Then there will be no changes in the report.
Add another patient
Report will be updated as the following image
Update an existing patient in a way that it will show matching properties with existing records
Update an existing paitient in the patient-matching report in a way that it will no longer exhibit matching properties
Here is a new report
I am going to do two operations. Update patient IDs 9 and 53. After running the report again as an incremental patient matching the report will be as following
The group 1 has been updated and you can see that patient 9 is missing. The whole group 2 has been removed. After the patient 53 is updated it is pointless to have a single patient record in the report.
NOTE : Every changes happen to the same patient matching report
Merging Patients & Excluding Non-Matching Patients
After doing the changes to the report this is how it looks like.
There are two buttons, one is for merge patients and the other one is to exclude non-matching patients. Initially both the buttons are disabled and they will enabled once you select at least two patients from a group.
Merging Patients Suppose that patients 41 and 46 refer to the same person and 39 and 53 refer to the same person. If so, I will perform merging operation with them. (Should have to perform in two steps first merge 41 and 46 then 39 and 53) After performing that the report will looks like as follows
By re-running the report it will not generate those groups 2 and 3 again.
Excluding Non-Matching Patients
Let us do few things,
Suppose that patients 53 and 39 are referred to two different people. Then you can easily instruct the module that
these two records do not represent a single patient so don’t consider these two as a match when generating the report again.
After excluding those two and if the report is regenerated you can see that the whole group of patients 37, 39, and 53 has been removed.
If I do the same thing for patients 49 and 48 only those two records will be removed since there are other records which exhibit matching properties with themselves.
Issues that I opened
PTM-82 - Load patients for the incremental matching PTM-83 - Generate and save reports in incremental patient matching process PTM-84 - Perform patient match with two datasources PTM-85 - Option to select or deselect incremental patient matching PTM-86 - Update patient-matching report when patients in the report are updated PTM-87 : To merge patients in the patient matching report PTM-88 : To exclude non-matching patients from the report PTM-89 - Ignore voided patients when running patient match
All of the above issues are completed successfully.
Here are the commits related to each of the issue. (Note that all of the commits related to single issue has been squashed.)
PTM-82 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/b3ffd77b394cf021b3b4552bda726100e39b6190 PTM-83 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/7704534457797845ecf6896072a3c441494d8299 PTM-84 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/c81024533508ac91f57a48c9b41beb2ebdc74595 PTM-85 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/35172a90f9ec061b9027d37f6757f53463ea1df6 PTM-86 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/b624286e1ad362ecf283a942f6b4d4c1b9429b75 PTM-87 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/6ee57f19ef62eea642b18d1642c938cd2033f8ab PTM-88 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/b1f3fccf5151ee10f4d2282e62c88fa8b93dcca4 PTM-89 - https://github.com/Lahiru-J/openmrs-module-patientmatching/commit/be4f39153b976dc3493f7541ff3e590ba1ecb73c
Project Documentation Wiki
Here is the link to project documentation wiki.
Throughout this summer I learned a lot. Whenever there were problems related to the project I had a great support from my mentor and the community. Participating in daily scrums showed me how good this OpenMRS community is. My mentors are the best. They gave me guidance at the first place, conducting many video conferences because of that I could carry out this project with a sound knowledge. @burke, @sgrannis thank you very much for your support throughout this summer. I feel really grateful to these mentors
Thanks everyone for conducting GSoC projects in a well organized manner