...
Code Block |
---|
"frameworkTemplate": { "domain": [ { "name": "<name_given_by_creator>", "domain": "domain1", "description": "" } ], "criteria": [ { "name": "<name_given_by_creator>", "domain": "domain1", "description": "", "criteria": "criteria1" }, { "name": "<name_given_by_creator>", "domain": "domain1", "description": "", "criteria": "criteria2" } ] } |
list of ecm ECMs will be stored as
ecm
metadata at root levelall children will be stored at level 1
additional metadata
pageNumber
need to be stampedSample Hierarchy Structure is as below:
Code Block |
---|
{ "Observation": { "name": "observation", "description": "test observation", "primaryCtegory": "Observation", "identifier": "do_1_observation", "ecm": [ "ecm1", "ecm2", "ecm3" ], "children": [ { "identifier": "do_1_question1", "name": "question1", "parent": "do_1_observation", "domain": "domain1", "criteria": "criteria1", "pageNumber": 1, "ecm": "ecm1" // ecm meta is optional }, { "identifier": "do_1_question2", "name": "question2", "parent": "do_1_observation", "domain": "domain1", "criteria": "criteria1", "pageNumber": 2, "ecm": "ecm2" // ecm meta is optional } ] } } |
Pros:
This approach is simpler one as we are not changing the structure
Cons:
Approach 2: FrameworkTemplate and View
...
Code Block | ||
---|---|---|
| ||
{ "Observation": { "name": "observation", "type": "self", "frameworkTemplate": { "domain": [], "criteria": [] { }, "labelsections": "<name_given_by_creator>"[], "name"view": "domain1"[], "children": [] "description} } |
Code Block | ||
---|---|---|
| ||
{ "Observation": ""{ "name": "observation", } "type": "self", ], "frameworkTemplate": { "criteriadomain": [ { "namelabel": "<name_given_by_creator>", "domainname": "domain1", "description": "", } "criteria": "criteria1" ], }, "criteria": [ { "name": "<name_given_by_creator>", "domain": "domain1", "description": "", "criteria": "criteria2criteria1" }, ] { }, "sectionsname": [ "<name_given_by_creator>", { "iddomain": "do_1_sectiondomain1", "childrendescription": ["", "criteria": "do_1_questioncriteria2", } "do_2_question" ] ] }, },"sections": [ { "id": "do_21_section", "children": [ "do_21_question", ] "do_2_question" } ], "view": [ }, { "typeid": "criteriado_2_section", "domainchildren": "domain1",[ "criteria": "criteria1do_2_question", "section":] [ } "do_1_section"], "do_2_section" "view": [ { ] } ] "children": [ // existing structure with new question properties { "type": "criteria", "iddomain": "do_1_questiondomain1", "domaincriteria": "domain1criteria1", "criteriasection": "criteria1"[ }, "do_1_section", { "id": "do_2_questionsection", "domain": "domain1",] } ] "children": [ // existing structure with new question properties { "id": "do_1_question", "domain": "domain1", "criteria": "criteria1" }, { "id": "do_2_question", "domain": "domain1", "criteria": "criteria2" } ] } } |
ObservationType - 'External' (with ECM)
Code Block |
---|
{ "Observation": { "type": "external", "ecm": [], "frameworkTemplate": { "domain": [], "criteria": [] }, "criteria2sections": [], }"view": [], "children": [] } } |
...
Code Block | ||
---|---|---|
| ||
{ "Observation": { "name": "observation", "identifier": "do_obs_1" "type": "external", "ecm": ["ecm1", "ecm2"], "frameworkTemplate": { "domain": [ { "name": "<name_given_by_creator>", "domain": "domain1", "description": "" } ], "criteria": [ { "name": "<name_given_by_creator>", "domain": "domain1", "description": "", "criteria": "criteria1" }, { "name": "<name_given_by_creator>", "domain": "domain1", "description": "", "criteria": "criteria2" } ] }, "sections": [ { "id": "do_1_section", "children": [ "do_1_question", "do_2_question" ] }, { "id": "do_2_section", "children": [ "do_2_question" ] } ], "view": [ { "type": "ecm", "ecm": "ecm1", "section": [ "do_1_section", "do_2_section" ] } ], "children": [ { "id": "do_1_question", "parent": "do_obs_1" "domain": "domain1", "criteria": "criteria1", "ecm": "ecm1" }, { "id": "do_2_question", "domain": "domain1", "criteria": "criteria2", "ecm": "ecm1" } ] } } |
...