onaio / reveal-frontend

WebUI for the Reveal epidemiological surveillance platform
8 stars 4 forks source link

Sync data is completed, but no data show on the report page web UI #1624

Open Naima-Bashir opened 3 years ago

Naima-Bashir commented 3 years ago
ciremusyoka commented 3 years ago

@Naima-Bashir this plan is available on the reporting page here. cc @madrinekariuki

madrinekariuki commented 3 years ago

@Naima-Bashir please clarify which specific data was missing initially. see below current data. https://mhealth.ddc.moph.go.th/focus-investigation/map/67430469-e669-5005-ada6-d2014f99f4c2 image

samkanga commented 3 years ago

@ciremusyoka the client confirmed that there was a Blood screening data captured that can be seen on the DB but does not show on the report.

ciremusyoka commented 3 years ago

@samkanga we don't have any complete blood screening task Jurisdiction id: ccfb736e-d090-44ff-ae67-e65933481086 The group identifier refers to jurisdiction id, see this.

Both the following queries give a count of 0

SELECT count(*) FROM tasks
WHERE plan_identifier = '60791504-3106-580a-9744-ee21221a0c2f'
AND code = 'Blood Screening'
AND group_identifier = 'ccfb736e-d090-44ff-ae67-e65933481086'
AND business_status IN ('Complete', 'Sprayed')
AND status NOT IN ('Archived', 'Cancelled');

SELECT count(*) FROM raw_tasks
WHERE full_json->>'planIdentifier' = '60791504-3106-580a-9744-ee21221a0c2f'
AND full_json->>'code' = 'Blood Screening'
AND full_json->>'businessStatus' IN ('Complete', 'Sprayed')
AND full_json->>'groupIdentifier' = 'ccfb736e-d090-44ff-ae67-e65933481086';
ciremusyoka commented 3 years ago

@Rkareko help confirm if there is task on the OpenSRP DB with plan id: 60791504-3106-580a-9744-ee21221a0c2f jurisdiction id: ccfb736e-d090-44ff-ae67-e65933481086 code: Blood Screening businessStatus: 'Complete' or 'Sprayed'

on Thailand Local instance

Rkareko commented 3 years ago

@Rkareko help confirm if there is task on the OpenSRP DB with plan id: 60791504-3106-580a-9744-ee21221a0c2f jurisdiction id: ccfb736e-d090-44ff-ae67-e65933481086 code: Blood Screening businessStatus: 'Complete' or 'Sprayed'

on Thailand Local instance

@ciremusyoka Appears all the Blood screening tasks are in Not Visited state

select count(*), json->>'businessStatus' from core.task where json->>'planIdentifier' = '60791504-3106-580a-9744-ee21221a0c2f' and json->>'groupIdentifier' = 'ccfb736e-d090-44ff-ae67-e65933481086' and json->>'code' = 'Blood Screening' group by 2;
 count |  ?column?   
-------+-------------
   259 | Not Visited
ciremusyoka commented 3 years ago

@samkanga @Rkareko we have no records of the task IDs for completed blood screening tasks provided on the data warehouse. 7981A32A-6C75-4E5B-BB80-22FAA0A7CF73 00F5B1F4-935A-4139-87C8-44BFA6FDCCCF DAC532A2-14F3-4A43-9927-1D8D6DF83B19

SELECT count(*) FROM tasks WHERE identifier IN ('7981A32A-6C75-4E5B-BB80-22FAA0A7CF73' ,'00F5B1F4-935A-4139-87C8-44BFA6FDCCCF', 'DAC532A2-14F3-4A43-9927-1D8D6DF83B19');

SELECT count(*) FROM raw_tasks WHERE id IN ('7981A32A-6C75-4E5B-BB80-22FAA0A7CF73' ,'00F5B1F4-935A-4139-87C8-44BFA6FDCCCF', 'DAC532A2-14F3-4A43-9927-1D8D6DF83B19');

The above queries returns a count of 0.

Rkareko commented 3 years ago

@samkanga @ciremusyoka We also do not have any tasks with the following Ids in the opensrp db

7981A32A-6C75-4E5B-BB80-22FAA0A7CF73 00F5B1F4-935A-4139-87C8-44BFA6FDCCCF DAC532A2-14F3-4A43-9927-1D8D6DF83B19

select * from core.task_metadata where identifier in ('7981A32A-6C75-4E5B-BB80-22FAA0A7CF73','00F5B1F4-935A-4139-87C8-44BFA6FDCCCF','DAC532A2-14F3-4A43-9927-1D8D6DF83B19');
 id | task_id | identifier | plan_identifier | group_identifier | for_entity | server_version | owner | code | date_created | date_edited 
----+---------+------------+-----------------+------------------+------------+----------------+-------+------+--------------+-------------
(0 rows)
Rkareko commented 3 years ago

@samkanga @ciremusyoka The tasks exists it just that (as @moshthepitt pointed out) the letters should be in lowercase

select  json->>'status' status,  json->>'businessStatus' businessStatus, json->>'planIdentifier' plan,  json->>'groupIdentifier' jurisdiction  from core.task  WHERE json->>'identifier'  in ('7981a32a-6c75-4e5b-bb80-22faa0a7cf73','00f5b1f4-935a-4139-87c8-44bfa6fdcccf','dac532a2-14f3-4a43-9927-1d8d6df83b19');
 status | businessstatus |                 plan                 |             jurisdiction             
--------+----------------+--------------------------------------+--------------------------------------
 Ready  | Not Visited    | 60791504-3106-580a-9744-ee21221a0c2f | ccfb736e-d090-44ff-ae67-e65933481086
 Ready  | Not Visited    | 60791504-3106-580a-9744-ee21221a0c2f | ccfb736e-d090-44ff-ae67-e65933481086
 Ready  | Not Visited    | 60791504-3106-580a-9744-ee21221a0c2f | ccfb736e-d090-44ff-ae67-e65933481086
ciremusyoka commented 3 years ago

@Rkareko @samkanga the tasks are there after making the letters to lower case.

SELECT identifier, plan_identifier, status, business_status FROM tasks WHERE identifier IN ('7981a32a-6c75-4e5b-bb80-22faa0a7cf73' ,'00f5b1f4-935a-4139-87c8-44bfa6fdcccf', 'dac532a2-14f3-4a43-9927-1d8d6df83b19');
identifier plan_identifier status business_status
00f5b1f4-935a-4139-87c8-44bfa6fdcccf 60791504-3106-580a-9744-ee21221a0c2f Ready Not Visited
7981a32a-6c75-4e5b-bb80-22faa0a7cf73 60791504-3106-580a-9744-ee21221a0c2f Ready Not Visited
dac532a2-14f3-4a43-9927-1d8d6df83b19 60791504-3106-580a-9744-ee21221a0c2f Ready Not Visited
ciremusyoka commented 3 years ago

@Rkareko @samkanga

  1. The house holds are not appearing because the web only shows structures with MultiPolygon geometry type and all the structures have Point geometry type
    {
    "type": "Point",
    "coordinates": [
        98.8633891439585,
        10.31133576709
    ]
    }
  2. The BCC (Health Education activities) point (has only one point) is not showing because it doesn't have geometries.

All Blood Screening points are showing as expected (https://mhealth.ddc.moph.go.th/focus-investigation/map/67430469-e669-5005-ada6-d2014f99f4c2/RACD_Blood_Screening)

ciremusyoka commented 3 years ago

Note: By default when you navigate to the map view e.g https://mhealth.ddc.moph.go.th/focus-investigation/map/67430469-e669-5005-ada6-d2014f99f4c2 the points shown on the map are for RACD_register_families only. To see points for others you have to click on the name of the goal titles.