Help setting up a domain model for a compliance assessment tool
Hello, I am having trouble setting up a domain model for a new project. The application is a guideline compliance assessment tool, with 7 sections and about 30 lines of guidance per section. The flow of the tool should be as follows.: 1. The user is presented with a line of guidance - i.e. "Line 34: All firms should enforce appropriate health and safety in the the workplace." 2. The user can select whether this guideline is applicable to their business or not - "Is this applicable to your business?" Yes/No. If not applicable, the user must provide some rationale about why it's not applicable in a text box. 3. If the user selects "Yes", a controls assessment appears which asks a series of questions about how they ensure compliance with that specific guideline. - i.e. "Do you have training in place?" (yes/no + some text as evidence), "Do you have policies and procedures in place?" (yes/no + some text as evidence), etc... The control assessment will be the same series of questions for each line of guidance. 4. After completing the assessment, the data will need to be aggregated by section and produce a compliance score, i.e. "You are 89% compliant for Section X" So far, I have set up a "Controls Assessment" entity, with each question of the controls assessment as an object, as this is consistent across all guidelines. Should I then be creating a new entity for each line of guidance which requires an assessment? Or is there a way to have one entity per section and list the guidance as attributes? Thank you in advance - I am relatively new to Mendix and would really appreciate some help!
When designing your domain model, define an entity for each thing. The things you mentioned are a 'line of guidance', 'business' and a 'question'. 'section' might be the same as 'line of guidance'. Since 'line of guidance' has a series of 'question's, they will be related with a 1-many relation.
Controls Assessment is not a thing, it is a proces. For this, you will end up having a page with the line of guidance and the questions and a button for processing the answers. Your entity 'Controls Assessment' might only store attributes about logging the proces, like done by who, datetime, maybe a number etc.