We have implemented functionality for querying to remote MPI server to find similar patients.
Import patient functionality.
Covered mpi functionality with 52 tests. Created integration test for import patient workflow.
As you remember, we are using OpenEMPI utility as Master Patient Index repo, which is hosted on remote server.
So now, when you are going through registration workflow - we are not only searching for similar patient in local DB, but also perform querying to remote server for searching similar patient. In result we receive list of possible matches, which contains both: local and MPI matches.
For local matched clerk is available to âopenâ patient page and see all information, but for MPI patient (as they are not located in local DB) we implemented âImportPatientâ functionality, which flow is next:
Get patient from MPI server.
Get mpi custom identifiers, for each of them try to find âMapping by nameâ, create it, set to patient. (more about âMapping by nameâ see below).
If mpi patient already contains OpenMRS identifier - import it, else - generate new one.
Save it to db.
About âMapping identifier type by nameâ - the point it that when we receive patient from OpenEMPI we have to import all patient identifiers too. But, for this we have to know which local identifier type to use for each Mpi identifier. So, we implemented it through Global Properties, so Administrator can set, for example that for OpenEMPI identifier should be used patient_identifier_type=4, which was created for imported patient and named OpenEMPI identifier too.
Functionality we are going to implement in near future:
Export newly crated patient to MPI server.
Provide âhandlingâ edited patient, so if they have been edited locally - push it to MPI server, if edited in mpi - import them to local DB.
Bugs which have to be fixed/issues in which we need advices/suggestions of community.
UI for exact matches. Here we are interested in opinion of community. What do you think about UI that we implemented for âSimilar matchesâ? And what should we do with exact matches UI?
Patient duplication in âmatched patientsâ after importing patient to DB. Now after importing patient to local DB when we will query to find âsimilar patientsâ we will receive one from local DB and exactly the same patient from MPI server. We are going to fix it my creating something like âfilterâ.
Saving instance of MpiPatient to local DB. We have problem with this issue. Our MpiPatient is extending Patient class, and we want to save it to DB but during saving we get Exception âjava.sql.SQLException: Field âdate_createdâ doesnât have a default valueâ. Right now, we do not want to save additional fields/columns to DB (probably we will want in future) but we just want to operate with instance of MpiPatient when we are performing âconvertingâ, âsavingâ, etc. Currently we are using workaround when save it to DB, and thatâs not OK.
The thing which worries me. Do we need another one UI for âSimilar patientsâ, and if we need that, how we should change it?
For me, second one UI is redundant. The thing we can do is just change colour of âSimilar patientsâ div from Green to orange on âConfirmâ stage.
I have deployed OpenMRS with our enhanced Registration module to server: http://188.166.68.46:8080/openmrs
You can access it by credentials: clerk/Clerk123, admin/Admin123.
Check it out and give your feedback
We have implemented Filter for âmatched patientsâ. So now, after importing patient to local DB, you will receive that patient as âfound similar patientâ only from local DB, but not from both local DB and MPI.
We have done with âExport patient to MPI server on registration eventâ
If you are interesting, check out my screenshots on my blogpost: link .
Soon I will update module on my dev server, sorry about server is down now.
Use a bigger font for the name and/or any other details which you want to draw attention to. Generally, it should look kind of like what the header looks like on the regular patient pages.
But unlike on the regular patient page, I think we should be showing all the information we have available, including all identifiers (and not just the preferred one, or the one of the main type).
Get rid of the word âPatient:â. If it isnât obvious that what weâre displaying is a patient, weâve failed.
Fit more things on each line â thereâs no need for all this whitespace.
Have a border all the way around each result, so it looks like a panel, and itâs clear what is grouped with what. (I would also suggest a thinner border.)
See this mockup to give a sense of what I mean. (I also added the âlast visitâ, which I know you havenât implemented yet, but I think we should prioritize. Obviously local patients may have this, but MPI patients never will.)
Definitely we should only be showing one UI widget on the confirmation screen.
Note that we have the idea of two distinct algorithms for âfastâ vs âpreciseâ and in general we want to preserve this distinction.
The idea is supposed to be:
After each field, we perform the âfastâ search so we can show results quickly in the background
After all fields are completed, we perform the âpreciseâ search, and we block them from Confirming until this search has returned, and we are displaying the match (if any).
My suggestion is:
Do not do the âfastâ search on the confirmation screen (or, just donât show the results, if you canât avoid the query)
Instead, show the results of the âpreciseâ search on top, expanded (i.e. thereâs no âx patient(s) found [review]â), because we want to force the user to review them at this point.
in the current UI itâs confusing to have this result between the confirmation fields and the buttons
Use the same display template for the precise matches as the fast ones.
When I was a GSoC student, that always made me laughâŠI think it has @burke written all over itâŠ@paul made John T. Patient I think it was? Itâs been so long.