Understanding the code for creating strategies in Patient Matching Module

In Bahmni, we are trying to use Patient Matching Module. When we create a strategy with a few fields as Should Match, It is not sent to the server from the client side javascript (We arrived at this conclusion by looking at this part of the code ). However in the UI at-least one field has to be selected as Should Match. We are wondering how is Should Match considered in Matching Patients.

We need your help understanding this part.

@sid, I don’t think many people have experience with that module, but hopefully some do and can answer! (I personally have not used the module, or looked at the code.)

I assume you have read the documentation wiki page. (This says you have to specify at least one Must and at least one Should.)

It might help if you could share an example of the strategy that you created, and whether running the matching algorithm behaved as you expected or not…

@darius, Here I have given an example strategy that we tried to create.

What we tried: Must Match : (Identifier) Old Identification Number Should Match: (Patient) Gender, (Address) City / Village, (Address) District

The error message we got: A javascript error has occurred: Proxy Error The full stacktrace for this error can usually be found in your server’s error logs.

####An image with the error message

We are unable to find out what is the problem. We are looking forward to resolving this problem.


It turns out that there are a few people actively working on this module as we speak.

In particular, Andrew Martin and @sgrannis are refreshing this module to make it more compatible with later versions of OpenMRS, and I believe are also adding new features.

@burke can probably share more.

I’ll try to get their attention in the meantime to answer your question (which I can’t help you with based upon what you’ve said above)

Are you able to find a more detailed error message? Is there something in the browser’s javascript console, or in the server-side logs?

(By the way, in the screenshot, the should/must are the opposite of what you typed in the text, if that matters.)

Also, it mentions Proxy Error. Could there be something in your specific setup that is causing this?

Hi All! Sid - looks like you might have switched the “must match” and “should match” fields. The National Identifier generally is a “Must Match”, the others are better configured as “Should Match.” Give that a try.