...
For now, see OpenMRS HL7Query Module Design Page
Create the message
An ORUR01 message consists of several segments (MSH, PID, PVI, OBR, OBX)
We have created several default groovy templates to create each of these message segments. The main "orur01" template is responsible for joining them together to output the final (and complete) ORUR01 message.
The groovy template would essentially be this: (this is PSEUDO CODE and obviously not actual groovy)
Code Block |
---|
createORUR01Message(patient, encounterList) {
getMSHTemplate(patient);
Loop over list of encounters
getPIDTemplateOutput(patient);
getPV1TemplateOutput(patient, encounter);
Loop over list of obs in current encounter {
if obs group
getOBRTemplateOutput(obs);
else if not obs group
getOBXTemplateOutput(obs);
}
}
}
|
The admin can edit the orur01 main template above and call different templates or hard code more values.
The admin could also open the "PID" or "MSH" template and edit there (which would effect every other template calling the PID or MSH template)
Downloads
http://modules.openmrs.org/modules/view.jsp?module=hl7query
...