Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverting incorrect content changes RE: global properties

...

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);
       }
    }
}

...

Tickets, etc

Sprint wiki page: https://wikiopenmrs.openmrsatlassian.orgnet/wiki/display/RES/Export+of+HL7+Messages+Sprint
Jira dashboard for sprint: https://tickets.openmrs.org/secure/Dashboard.jspa?selectPageId=12052
All tickets for this module: https://tickets.openmrs.org/browse/HLQRY

...

1. Admin installs the hl7query module
2. Admin does not make any changes to the default configuration (He does not change the settings (formerly global property 1.8 and below) identifying the selected ORUR01 message template to export, and nor does he attempt to edit any templates / segments)
3A. User makes a valid request to the hl7query controller class passing in the uuid of the patient and uuid of the encounter
The controller retrieves the "orur01" groovy template.
The template rendered uses the given patient+encounter and turns the template into hl7-like xml (see A Developer's Guide to the ORUR01 Message)
The xml is passed through HAPI to turn the xml into hl7
Details of the user's request are logged.
3B. User makes an invalid request to the hl7query controller class.
The user receives an ACK message notifying him of the error.
Details of the users request are logged.

...