GSoC 2022 with OpenMRS: Week 11
The Week 11 of Google Summer of Code started on 22nd of August. In my previous blog post I talked about the progress of the interactive builder. If you haven’t read my previous post here is a link for that post. My main goal for this week was to complete the interactive builder component.
As mentioned in the previous blog post this week my goal was to implement the remaining features (Add, remove elements) of the interactive builder. A form consists of Pages, sections and questions. Pages contain sections and sections questions. Therefore the base element of a form is a Page. The page object contains the page name, and sections object array. In order to add a new page user has to click on Create Page
button and a modal will appear, there user should provide a name for the page. Once done and submitted a page element will be created.
Page consists of sections. A section object contains section name, boolean to check whether the section should be expanded or not, and a question object array. To create a section user can click on the Create Section
button then a modal will appear, there user should set a name to the section and set isExpanded
to true or false. Once saved the new section will appear inside the relevant page.
To create a new question user should follow a similar process as the ones above but here inside the modal user should set a label to the question, question type, type of element to render and a concept. Concepts are the individual data points collected from a population of patients. Concepts include both questions and answers. Once these required details are provided and saved a new question will be created.
Users should be able to delete these elements as well. In order to delete an element users can click on the Trash-bin icon in front of the element then the element will be removed.
This week I was able to complete the interactive builder and the schema editor pull request got merged, since the time is running out my next goal is to start working on the form render component. Thank you for reading, Stay tuned and check back next week for the twelve week’s blog post. Peace ✌️