The OpenMRS HL7Query module An introduction to the HLQuery module, its design and useSuranga Nath Kasthurirathne
What we’ll coverPlanning and designing Specific uses cases Design processWhat the module currently supports Included hl7 message types / structureConfiguring the moduleHow the module can be extended / modifiedDemo
What, how and whyA means of exporting OpenMRS dataTranslates OpenMRS data into hl7 messagesAsynchronousSupports both pipe delimited and xml basedhl7 messagesGroovyscript to design message structure
Why ?No universally agreed approach to export hl7from OpenMRSJembi Health Systems needed thisrequirementNo two people agreed on the same hl7 toOpenMRS data mappingNeeded to support multiple message types
DesignHL7 message structureMessages broken down into segments Some segments are mandatory, some are not Some segments can be repeated, others cantAll depends on your definition of ‘whatscorrect’ How stringent do you want your message to be ?
Design cont.…How did we do this ? Create templates per each segment Introduce a template hierarchy Parent templates can call child templates Parent templates decide hl7 message structure Child templates decide message contents (data)
Template hierarchy cont.…Please refer tohttps://wiki.openmrs.org/display/projects/ORU_R01+Specification+for+the+hL7output+ModuleExample ORUR01 template calls the PID template. PID template may call PID.3 once or many times You can even introduce your own PID or PID.3 templates !
Why not Mirth ?Supports integration with mirth Module creates message, and hands it over to you Users can integrate Mirth for routing these messages (if you want to) Why don’t we provide Mirth as default ? We DON’T want a dependency on Mirth
Setting up the moduleRequired OpenMRS 1.8.2 or higherEdit global properties MSH data fields Name of parent template you’re usingSet implementation Id Used to export concepts without any mappings
Querying for ORUR01 messagesORUR01 messages represent medicalobservationsThey are supported by defaultIn OpenMRS-speak, ORUR01 representencounters and observationsSingle request can contain one or manyencounters
Sample query parameterspatientIdidTypeUuidencounterUuidstartDateendDate None of these parameters are mandatory !