This module will contain a Complex Observation Handler used to store unstructured data in the form of a complex observation to any storage systems suited for the purpose. It will also provide an API for other modules to store unstructured data using a DAO that can be implemented to store this data using various storage backends. It will also provide configuration options page allowing the user to select the preferred backend that is used for storage.
Complex Obs Handler
public class UnstructuredDataHandler extends AbstractHandler implements ComplexObsHandler { DocumentHandler handler = Context.getService(UnstructuredDataService.class).getHandler(); UnstructuredDataHandler(){ handler.initialize(); } @Override public Obs saveObs(Obs obs) throws APIException { return handler.saveObs(obs); } @Override public boolean purgeComplexData(Obs obs) { return handler.purgeComplexData(obs); } @Override public Obs getObs(Obs obs, String view) { return handler.getObs(obs, view); } }
Unstructured Data Service Interface
public interface UnstructuredDataService extends OpenMRSService { /** To be called by interface modules */ ContentHandler getUnstructuredDAO(String contentType); /** To be called by Unstructured DAO classes on startup */ void RegisterUnstructuredDAO (String contentType, UnstructuredDAO prototype) throws AlreadyRegisteredException; /** To be called by Unstructured DAO classes on shutdown */ void DeregisterUnstructuredDAO(String contentType); }
THIS PAGE IS A WORK IN PROGRESS