Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Naima-Bashir opened this issue Jun 22, 2021 · 12 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@Naima-Bashir
Copy link

  • An issue from Ranong province
    problem: sync data completed, but no data show on the report page web UI (but has data on the metabase)
    plan name: A2 คลองไทร (8504051001) 2021-06-04
    plan id: 60791504-3106-580a-9744-ee21221a0c2f
    username: vbdu_11.5.3-2
@ciremusyoka
Copy link
Collaborator

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

@madrinekariuki
Copy link

@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
Copy link

samkanga commented Jul 2, 2021

@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
Copy link
Collaborator

@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
Copy link
Collaborator

ciremusyoka commented Jul 5, 2021

@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
Copy link

Rkareko commented Jul 5, 2021

@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
Copy link
Collaborator

@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
Copy link

Rkareko commented Jul 8, 2021

@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
Copy link

Rkareko commented Jul 8, 2021

@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
Copy link
Collaborator

@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
Copy link
Collaborator

@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
    ]
}
  1. 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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants