The checklist requires data from mdms which is configurable and have the following schema codes:
Example Data for the above schema codes// Some code```postman_json
User enters the checklist search screen by clicking on the configure app.
The Search Checklist is the screen where u can search for created checklist and also create checklists for whose templates have been created. View button is present for the created checklists and Configure button for those which need to be created.
The Create Checklist page loads the default template for that particular use role and checklist type and then can be edited as per the user. On submission the api creates the checklist (service definition) and create localisation for all the questions and options
The questions can be Single Choice (Radio button) or Multiple Choice (Checkbox) and each single choice option can have multiple sub questions. Nesting is allowed uptil 3 levels. Nesting can be done by clicking on the Dependency button. Options can also have comments attached to them. Add options and delete options feature is also given. The required checkbox is to make any question mandatory.
Preview Checklist shows the mobile view of the created checklist
The View Checklist page shows the current checklist and is non-editable.
The create and update pages work same. The update checklist page loads the already created questions to be edited and can be reached by clicking the update button on view checklist button.
The following API’s are called while checklist creation :
Question type search: /mdms-v2/v2/_search
this is used to search the types of questions like radio button or checkboxes and these are taken from the mdms with schema code HCM-ADMIN-CONSOLE.appFieldTypes
Create: /service-request/service/definition/v1/_create
: used to create the service definition which is the checklist.
Upsert: /localization/messages/v1/_upsert
All the questions and options are localised by this api under the module name hcm-checklist
The following api is called to view the previously created checklist :
service-request/service/definition/v1/_search
The following API’s are called while checklist update :
Create: /service-request/service/definition/v1/_update
: used to update the service definition which is already created.
service-request/service/definition/v1/_create
CAMPAIGN_MANAGER
service-request/service/definition/v1/_update
CAMPAIGN_MANAGER
service-request/service/definition/v1/_search
CAMPAIGN_MANAGER
localization/messages/v1/_upsert
CAMPAIGN_MANAGER
Following is the procedure to configure default templates for checklists for different roles and types of checklist.
Following is the curl to create a template for:
The user needs to create a template for all the combinations of roles, campaign types, and checklist types for which he/she wants to have a checklist configured.
If any option needs to have sub-questions, then add an optionDependency attribute as true in the option's object. All the questions, whether at the parent or children level, need to be different objects and connected via their parentId which is nothing but the parent option's ID.
The question object is represented as a JSON structure with the following key properties:
id
(String, Required)
A unique identifier for the question.
Example: "2d4a7b1e-1f2f-4a8a-9672-43396c6c9a1c"
key
(Integer, Required)
The question's sequence or order in the questionnaire.
Example: 1
type
(Object, Required)
Represents the type of the question.
Contains a code
field to specify the question type.
Example: { "code": "SingleValueList" }
level
(Integer, Required)
Indicates the hierarchy level of the question.
Example: 1
(Top-level question)
title
(String, Required)
The text or content of the question.
Example: "Is there a feedback system for health facilities to report any issues or requests related to bednet distribution?"
value
(String/Null, Optional)
Holds the selected value once a choice is made.
Initially null
.
options
(Array of Objects, Required)
A list of predefined choices for the question.
Each option includes:
id
: Unique identifier for the option.
key
: Sequence/order of the option.
label
: Text describing the option.
optionComment
: (Boolean) Indicates if a comment is allowed for the option.
optionDependency
: (Boolean) Indicates if selecting the option triggers a dependent question.
parentQuestionId
: Links the option to its parent question.
Example:
isActive
(Boolean, Optional)
Indicates whether the question is active or visible in the form.
Example: true
parentId
(String/Null, Optional)
Specifies the parent question ID if the question is a subquestion.
Example: null
for top-level questions.
isRequired
(Boolean, Optional)
Indicates if answering the question is mandatory.
Example: false
The question object is represented as a JSON structure with the following key properties:
id
(String, Required)
A unique identifier for the question.
Example: "23ca54be-038e-42df-a557-bb5fcd374dd5"
key
(Integer, Required)
The question's sequence or order in the questionnaire.
Example: 3
type
(Object, Required)
Represents the type of the question.
Contains a code
field to specify the question type.
Example: { "code": "MultiValueList" }
level
(Integer, Required)
Indicates the hierarchy level of the question.
Example: 1
(Top-level question)
title
(String, Required)
The text or content of the question.
Example: "What services or products do you distribute to health facilities?"
value
(Array/Null, Optional)
Holds the selected values once options are chosen.
Initially null
.
options
(Array of Objects, Required)
A list of predefined choices for the question.
Each option includes:
id
: Unique identifier for the option.
key
: Sequence/order of the option.
label
: Text describing the option.
optionComment
: (Boolean) Indicates if a comment is allowed for the option.
optionDependency
: (Boolean) Indicates if selecting the option triggers a dependent question.
parentQuestionId
: Links the option to its parent question.
Example:
isActive
(Boolean, Optional)
Indicates whether the question is active or visible in the form.
Example: true
parentId
(String/Null, Optional)
Specifies the parent question ID if the question is a subquestion.
Example: null
for top-level questions.
isRequired
(Boolean, Optional)
Indicates if answering the question is mandatory.
Example: false
The parent question object (SingleValueList
) has the following properties:
id
(String, Required)
A unique identifier for the question.
Example: "4add5323-fc98-4e71-a783-27dbb922c99f"
key
(Integer, Required)
The order or sequence of the question.
Example: 2
type
(Object, Required)
Indicates the question type.
Example: { "code": "SingleValueList" }
level
(Integer, Required)
Denotes the hierarchy level. For parent questions, this is 1
.
Example: 1
title
(String, Required)
The content of the question.
Example: "What types of health facilities do you distribute to?"
value
(String/Null, Optional)
Holds the selected value after a user chooses an option.
Initially null
.
options
(Array of Objects, Required)
A list of predefined choices, where:
optionDependency
: Determines if selecting the option triggers a nested question.
Example:
isActive
(Boolean, Optional)
Specifies whether the question is active.
Example: true
parentId
(String/Null, Optional)
null
for top-level (parent) questions.
isRequired
(Boolean, Optional)
Indicates if the question is mandatory.
Example: false
Structure of Nested Question
The nested question object is similar to the parent question but includes additional context linking it to the triggering parent question.
id
(String, Required)
Unique identifier for the nested question.
Example: "c65ac34b-7cc0-4993-a8fe-37e854d2b189"
key
(Integer, Required)
Sequence/order of the question.
Example: 4
type
(Object, Required)
Specifies the type of question.
Example: { "code": "SingleValueList" }
level
(Integer, Required)
The hierarchy level. Nested questions have a higher level (e.g., 2
).
Example: 2
title
(String, Required)
The text of the nested question.
Example: "Do you have enough products for distribution to health facilities?"
value
(String/Null, Optional)
Holds the selected value after a user chooses an option.
Initially null
.
options
(Array of Objects, Required)
The predefined choices for the nested question.
Example:
isActive
(Boolean, Optional)
Indicates whether the question is active.
Example: true
parentId
(String, Required)
Links the nested question to the triggering parent option.
Example: "23ace43b-e0b5-428f-9d11-12fc5b10b1ac1"
isRequired
(Boolean, Optional)
Specifies if the nested question is mandatory.
Example: false