opensrp / opensrp-client-reveal

OpenSRP Client Reveal App
Other
7 stars 8 forks source link

Case Confirmation tasks not showing for Index case plans on Thai-Preview #1532

Closed madrinekariuki closed 3 years ago

madrinekariuki commented 3 years ago

issue description: index cases that have been created do not have case confirmation tasks. This has been noted on below sample plan IDs on Thai Preview.

We have noted a discrepancy on the case confirmation plan template: where for earlier plans we had a trigger and a condition which is missing on the current template.

Earlier Action part on the template:

  {
                "identifier": "6b2a7118-c6c9-43b7-8227-5d3275878d97",
                "prefix": 1,
                "title": "การยืนยันบ้านผู้ป่วย",
                "description": "ยืนยันบ้านผู้ป่วย",
                "code": "Case Confirmation",
                "timingPeriod": {
                    "start": "2021-09-09",
                    "end": "2021-09-19"
                },
                "reason": "Investigation",
                "goalId": "Case_Confirmation",
                "subjectCodableConcept": {
                    "text": "QuestionnaireResponse"
                },
                "trigger": [
                    {
                        "type": "named-event",
                        "name": "plan-activation"
                    }
                ],
                "condition": [
                    {
                        "kind": "applicability",
                        "expression": {
                            "description": "Event is case details event",
                            "expression": "questionnaire = 'Case_Details'"
                        }
                    }
                ],
                "definitionUri": "case_confirmation.json",
                "type": "create"
            }

Current Action part on the template:

   {
                "identifier": "2ee5a878-69f0-4446-9b06-119d15c520e7",
                "prefix": 1,
                "title": "การยืนยันบ้านผู้ป่วย",
                "description": "ยืนยันบ้านผู้ป่วย",
                "code": "Case Confirmation",
                "timingPeriod": {
                    "start": "2021-10-16",
                    "end": "2021-10-26"
                },
                "reason": "Investigation",
                "goalId": "Case_Confirmation",
                "subjectCodableConcept": {
                    "text": "Operational_Area"
                },
                "taskTemplate": "Case_Confirmation",
                "type": "create"
            },
 Sample planIDs
a1fa4791-1555-451e-9725-018e621aeeb3
b323972d-1e1a-4d06-b338-940c63971194
7d4be8b3-c3e5-4e66-82aa-3431914b9ad8

steps: -Create an index plan -activate the plan and assign a team to it. -login to the APK and sync the plan -open the list view and observe there are no Case confirmation tasks

image

lincmba commented 3 years ago

Updated the following processors:

madrinekariuki commented 3 years ago

Plan ID tested on : 78917776-e66f-42f5-94ec-354607044da0 Operational Area: 6304060703 Th-preview instance

Noted: The case confirmation tasks show.

However when you click on it on is getting the error "Index Case details not found". instead of showing the Case Classification Details

image

Rkareko commented 3 years ago

@samkanga @lincmba @ciremusyoka The case details task here is missing the reasonReference value. This value should be populated with the Id of the corresponding case details event.

The task json is

{
    "executionStartDate": "2021-10-25T0000",
    "executionEndDate": "2021-11-04T0000",
    "identifier": "2f7be629-ed45-42d3-91f8-8d4daa9ed762",
    "planIdentifier": "78917776-e66f-42f5-94ec-354607044da0",
    "groupIdentifier": "377f4b46-128f-4fdb-a159-165bcfa620dc",
    "status": "Ready",
    "businessStatus": "Not Visited",
    "priority": 3,
    "code": "Case Confirmation",
    "description": "ยืนยันบ้านผู้ป่วย",
    "focus": "9ce50c82-cd04-4beb-bf9e-9fd0cf383227",
    "for": "377f4b46-128f-4fdb-a159-165bcfa620dc",
    "authoredOn": "2021-10-25T1113",
    "lastModified": "2021-10-25T1113",
    "owner": "superset-user-preview",
    "serverVersion": 1607066384645,
    "requester": "superset-user-preview"
}
madrinekariuki commented 3 years ago

Tested on plan ID : 56dbd6fb-764d-4d49-a938-603e5306d573 Case confirmation tasks now showing user is able to click and the details of the case confirmation are shown when you create a structure or click on an existing structure, theres a prompt to Detect Case user is able to select which family member is the index case After recording the index case user cannot see the "Detect case" in another structure

see below screenshots:

  1. Details of the case confirmation generated. . image

  2. The "Detect Case" shows on a structure

image

  1. After clicking on "Detect Case". image

  2. when you confirm which family member is the index case.

image

lincmba commented 3 years ago

For this issue, we matched the preview template in the preview instance to the preview template in the preview PG in production.

samkanga commented 3 years ago

I will go ahead and close this ticket.