You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Content Handler Module Design

Work In Progress

Please note that this page is under active development

The Content Handler module receives data from interface handlers along with the content type of that data. Using this information it is expected to forward data to the appropriate processing module that can handle that data. It is also required to have functionality to allow processing modules to be able to dynamically register and de-register their interest to data of particular content types.

Interfaces

ContentHandlerService
public interface ContentHandlerService extends OpenMRSService {
 
	/** To be called by interface modules */
	ContentHandler getContentHandler(String contentType);
 
	/** To be called by processor modules on startup */
	void RegisterContentHandler(String contentType, ContentHandler handler) throws AlreadyRegisteredException;
	/** To be called by processor modules on shutdown */
	void DeregisterContentHandler(String contentType);
}
ContentHandler
/**
 * Provided by Content Handler module for implementation by processor modules.
 */
public interface ContentHandler {
 
	void saveContent(Patient patient, String content);
	void saveContent(Patient patient, String documentId, String content);
 
	String fetchDocument(String documentId);
	String queryEncounters(Patient patient, Date from, Date to);
}
  • No labels