Details
-
Task
-
Status: Closed
-
TBD
-
Resolution: Won't Fix
-
Medium
-
Description
In the jsslab module, there is a .java and .hbm.xml file the lab_precondition table/LabPrecondition object. This needs to have a REST resource created. For instructions on creating a REST resource, see wiki.openmrs.org/display/docs/REST+Web+Services+API, and the related pages REST Web Service Technical Documentation and Adding a Web Service Step by Step Guide for Module Developers. For an example, in the omod code rest directory, see LabInstrumentResource.java and LabSupplyItemResource.java; however, these are both metadata tables, not data tables like lab_precondition. Check out the difference in responsibilities between the two DelegatingCRUD controller objects. It may be necessary to add some convenience methods to the LabPrecondition POJO, especially to get names instead of concepts. The POJO should implement Comparable, with the order being sortOrder within labTestPanel. It will be necessary to create LabPreconditionDAO interface and a HibernateLabPreconditionDAO implementation that contains all the POJO methods (the implementation just delegates them to the POJO). Other reusable methods can be added at the DAO level. It will also be necessary to modify LabCatalogService and LabCatalogServiceImpl to expose all the methods of the DAO (implemented through delegation). Any methods used by the REST resource should be in the LabCatalogService.