opensrp / opensrp-client-eusm

OpenSRP client for EUSM
Other
0 stars 1 forks source link

Add Action And Goal to Trigger Fix Problem Task For Consult Beneficiaries #121

Closed hamza-vd closed 1 year ago

hamza-vd commented 1 year ago

The following Action and Goal need to be added to the plan definition templates to trigger the Fix Problem Task when COnsult Beneficiaries is submitted with a problem. Required for #116

Action

{ "code": "fix_problem_consult_beneficiaries", "condition": [ { "expression": { "description": "Product exists", "expression": "$this.is(FHIR.QuestionnaireResponse)" }, "kind": "applicability" }, { "expression": { "description": "check consult_beneficiaries_flag field", "expression": "$this.item.where(linkId='consult_beneficiaries_flag').answer.value ='yes'" }, "kind": "applicability" } ], "definitionUri": "fix_problem.json", "description": "Fix problems for consult beneficiaries with problem", "goalId": "fix_problem_consult_beneficiaries", "identifier": "8caf7c0a-5a86-4fb9-a020-3a92eddbb85c", "prefix": 11, "reason": "Routine", "subjectCodableConcept": { "text": "Location" }, "timingPeriod": { "end": "2023-02-27", "start": "2023-02-20" }, "title": "Fix Problem", "trigger": [ { "expression": { "description": "Trigger when a Fix Beneficiary Consultation event is submitted", "expression": "questionnaire = 'beneficiary_consultation'" }, "name": "event-submission", "type": "named-event" } ], "type": "create" },

Goal

{ "description": "Fix problems for all flagged consult beneficiaries task", "id": "fix_problem_consult_beneficiaries", "priority": "medium-priority", "target": [ { "detail": { "detailQuantity": { "comparator": ">", "unit": "Percent", "value": 100.0 } }, "due": "2023-02-27", "measure": "Percent of products problems fixed" } ] }