User Story: Create and Manage Visit Templates in Template Builder
Title: Create and manage visit templates from Clinical Section setup
User Story:
As a user, I want to create, search, filter, and update visit templates in the Template Builder under the Clinical Section, so that I can manage templates with sections, chief complaints, and order sets efficiently.
Description
In Setup > Clinical Section, the system provides a Template Builder option that allows users to create and manage templates.
All created templates are displayed under Template Types. Users can:
- search templates using the search bar
- filter active templates using the Active filter toggle
- create a new template using the Create New Template button
When the user clicks Create New Template, the system opens the Visit Template Detail modal. The user enters the required details and clicks Create Template.
After creation, the system opens the Visit Template Details screen, where the user can:
- add Sections
- add Order Sets such as Assessment and Plan
- add Chief Complaints
To add a section, the user clicks the Add button in the Section grid. A Section Search modal opens, allowing the user to search and link sections to the template. All created sections should be available in the search modal and searchable according to the required fields.
Within Order Sets and Chief Complaints, the user can remove attached items either:
- by clicking the cross icon beside an item, or
- by using the Remove All button
Once the user has entered or linked all template details, sections, chief complaints, and order sets, clicking the Update button saves the changes to the template.
Acceptance Criteria
Scenario 1: View template builder
Given the user navigates to Setup > Clinical Section
When the page loads
Then the user should see the Template Builder option
And all created templates should be listed under Template Types
Scenario 2: Search templates
Given templates are listed under Template Types
When the user enters text in the search bar
Then the system should display matching templates based on the search criteria
Scenario 3: Filter active templates
Given templates are listed on the screen
When the user enables the Active filter toggle
Then the system should display only active templates
Scenario 4: Create a new template
Given the user is on the Template Builder screen
When the user clicks Create New Template
Then the system should open the Visit Template Detail modal
When the user enters the required details and clicks Create Template
Then the system should create the template
And open the Visit Template Details screen
Scenario 5: Add sections to a template
Given the user is on the Visit Template Details screen
When the user clicks the Add button in the Section grid
Then the system should open the Section Search modal
And display all created sections searchable by required fields
When the user selects a section
Then the system should link the section to the template
Scenario 6: Add order sets and chief complaints
Given the user is on the Visit Template Details screen
When the user adds Order Sets and Chief Complaints
Then the selected items should be attached to the template successfully
Scenario 7: Remove attached order sets or chief complaints
Given order sets or chief complaints are attached to the template
When the user clicks the cross icon next to an item
Then the system should remove that specific attached item
When the user clicks Remove All
Then the system should remove all attached items from that section
Scenario 8: Update and save template
Given the user has entered all required template details
And added sections, chief complaints, and order sets
When the user clicks the Update button
Then the system should save all changes
And update the template successfully