Diagnostic Service Sections
Introduction
In DiagnosticReport FHIR resource contains field called "serviceCategory". This filed has zero to one relationship and can take one of values presented in Codes for Diagnostic Service sections.
When the "serviceCategory" field is not presented in FHIR resource instance, those requests are handled by Default Service section.
FHIR module is using Handlers to support each type of serviceCategory sections. You can build your own handler and register for handler a particular type of DiagnosticReport.
Workflow
Above diagram show the handler hierarchy for the DiagnosticReport.
- Create a handler for particular Diagnostic Service Section with implementing DiagnosticReportHandler interface
- Register handler using Spring injection by ModuleApplicationContext.xml
- RESTfulDiagnosticReportResourceProvider listen to the HTTP requests and invoke appropriate method in DiagnosticReportServiceImpl according to the requested parameters
- Then DiagnosticReportServiceImpl will select the register handler which can fulfill that request and forward it to the DiagnosticReportUtil
- DiagnosticReportUtil trigger the handler and send back the response
How to Create a DiagnosticReportHandler
Requirements
- A DiagnosticReportHandler must implement the DiagnosticReportHandler interface
- A DiagnosticReportHandler may extend the AbtractHandler which contains common set of functionalities
- The DiagnosticReportHandler must be registered by Spring with a key
Examples
Laboratory Handler
- Found in the org.openmrs.module.fhir.api.diagnosticreport.handler package
- Extends org.openmrs.module.fhir.api.diagnosticreport.handler
Register LaboratoryHandler
Register handler in FHIR module ModuleApplicationContext.xml configuration (locate in /api/src/main/resources/moduleApplicationContext.xml).
List of Handlers
Following is a list of currently implemented handlers for Different type of Diagnostic Service sections;