This module allows any version of OpenMRS 1.9.8 or above to communicate with a PIX/PDQv2 compatible Master Patient Index such as SanteMPI or the MEDIC CR. This module implements the following profiles:
Javadocs for this API can be found on the SanteSuite Community Server.
You can reference this API from MAVEN with the following Maven repos:
<repositories>
<repository>
<id>marc-te</id>
<name>MEDIC TECH EXCHANGE</name>
<url>http://te.marc-hi.ca/mvn</url>
</repository>
<repository>
<id>santesute-main</id>
<url>http://santesuite.org/mvn</url>
<name>SanteSuite</name>
</repository>
</repositories>
To reference the API:
<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>santedb-mpiclient-api</artifactId>
<version>0.9.5</version>
</dependency>
Once installed into OpenMRS, the MPI client needs to be configured. The parameters are created as global settings when you install the module, below is a "quick" guide on which settings to populate:
Many OpenMRS deployments will use person attributes to record telephone, email, mother/father's name. These are important attributes to map in the MPI, as such the mpi-client.ext.extendedAttributes
setting can be used to map these. The format is quite simple, and needs to be rewritten (community help accepted) if you wanted to map an extension Mother's Name to PID-6-2 (Mother's Maiden Name / Given Name) you would use:
Mother's Name:PID-6-2
You can map multiple attributes as well, for example:
Mother's Name:PID-6-2,Mother's ID:PID-21-1
If you want to place a guard condition use a ?. For example, Father's Name needs to go into an NK1 segment with relationship type FTH.
Father's Name:NK1-2-2?NK1-3-1=FTH
In many OpenMRS deployments given names are used only, hover to reduce duplicates it may be useful to split the name apart getting rid of MR/MRS/DR/etc. This is done with the mpi-client.pid.nameRewriteRegex
. The regex is executed against a string concatenation of Prefix Given Middle Family Suffix
. This in the format of a JavaScript regex. For example, to strip away Mr or Ms or Mrs from a name:
/^(?:(mrs?|ms)\s)?([A-Za-z\s]*?)(?:\s\(NULL\))?$/^$2^^^$1^^^A/i
You will need to have Java 1.6+ and Maven 2.x+ installed. Use the command 'mvn package' to compile and package the module. The .omod file will be in the omod/target folder.
Alternatively you can add the snippet provided in the Creating Modules page to your omod/pom.xml and use the mvn command:
mvn package -P deploy-web -D deploy.path="../../openmrs-1.8.x/webapp/src/main/webapp"
It will allow you to deploy any changes to your web resources such as jsp or js files without re-installing the module. The deploy path says where OpenMRS is deployed.
If uploads are not allowed from the web (changable via a runtime property), you can drop the omod into the ~/.OpenMRS/modules folder. (Where ~/.OpenMRS is assumed to be the Application Data Directory that the running openmrs is currently using.) After putting the file in there simply restart OpenMRS/tomcat and the module will be loaded and started.