Tasks that have been completed thus far with a target milestone of using a mock Form, enable persistence of Questions and Values to the database:
- Mock out a report form using the domain classes
- Using the mocked up schema, generate a simple report form
- Design the SQL Schema (for just FacilityDataValue and FacilityDataQuestion)
- Write Hibernate Mapping files (for just FacilityDataValue and FacilityDataQuestion)
- Write Data Access layer (for FacilityDataValue and FacilityDataQuestion)
- Write Service layer (for FacilityDataValue and FacilityDataQuestion)
- Refactor the rendering logic to use the JSP and write EL function(s) to check types using instanceof.
- Allow a simple the mocked form from Week 1 to save the question answers.
Tasks that are are in progress, soon to be finished with a target milestone of removing the code used to mock up everything from the first few weeks; ability to use the saved schemas for rendering the report form:
- Design SQL Schema for the rest of the domain classes
- Write mappings for the rest of the domain classes
- Support loading the previously saved values for a form/startdate/enddate/location into a page for viewing or editing
- Write methods to save the rest of the domain classes in the data access layer
- Write methods to save the rest of the domain in the service layer
Now that I have summarized work completed and in progress, let's explain the overall design:
- FacilityDataFormSchema serves as the overall representation of the report form in the system.
- FacilityDataFormSection is simply that, sections on the form, e.g., monitoring equipment status, stock status of vaccinations, number of people vaccinated, etc.
- FacilityDataFormQuestion holds metadata regarding a question.
- FacilityDataQuestion is the question itself; it specifies the datatype; it is subclassed for each question datatype; if not subclassed, then the question is considered to be "freetext" -- in other words: just simply a text-based question.
- CodedQuestion is a question that has a coded answer. This too is subclassed for each coded question datatype.
- StockQuestion is exactly as the name says, to track stock of items such as vaccinations. The coded answers are: "not_stocked_out","stocked_out","expired","not_applicable"
- BooleanCodedQuestion is a simple "yes","no","not applicable" type of thing; e.g., "Was there mobile clinic today?"
- NumericQuestion is a question which has a numeric answer, e.g., "Number of Adults Vaccinated."
- FacilityDataValue is what holds the values entered in the report forms for each question.
- FacilityDataReportFormData is a non-persisted class used for retrieving the answers for a specific report for a specified period.
Hopefully this makes up for my lack of updates.