Question about handling asynchronous posts to the Client Registry

Hi Everyone,

My team is working on the client side application in OpenMRS to post data to OpenEMPI. Our OpenMRS implementations often work offline for an unspecified period and sync when an internet connection becomes available. We’re scoping a store and forward queue for patient registrations to accommodate for this.

I have an untested assumption that I would like to address. Right now, we assume that the last “update patient demographic record” document from the OpenMRS client will win and update the record. This could be problematic for the MPI if a site has been offline for a long period and sends their data. Can you help with the following questions?

Questions:

  • Have others handled ordering asynchronous posts to the MPI?

  • If so, does OpenEMPI or MedicCR have the ability to order the HL7 v2 messages by created dateTime instead of the date they were received?

– I believe we would want the MPI to evaluate whether each received document was created before the latest database update and choose to update the record only if the HL7 v2 message was created after the latest database update.

Thank you,

Craig