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

Add checklists to ETL #29

Open
Tracked by #1385 ...
vinayvenu opened this issue Nov 4, 2022 · 4 comments
Open
Tracked by #1385 ...

Add checklists to ETL #29

vinayvenu opened this issue Nov 4, 2022 · 4 comments

Comments

@vinayvenu
Copy link
Member

vinayvenu commented Nov 4, 2022

The following items have not yet been moved to ETL, and should be

  • checklists

Solution

Assuming there is one form associated with checklist_item_detail which is the case for now.

In ETL we need to create only two tables which covers checklist and checklist item both. The table for checklist with only have the common fields and foreign key fields, with checklist_detail.name becoming the table name. In future if we have multiple checklist support then we will have one table for each checklist detail.

One table for checklist item and observations like we have for the forms. The checklist item detail name goes as a column.

@vinayvenu vinayvenu changed the title Add individual_relationship to etl Add tables to etl Nov 4, 2022
@vinayvenu vinayvenu moved this to New Issues in Avni Product Jun 15, 2023
@vinayvenu vinayvenu moved this from New Issues to Focus Items in Avni Product Jun 15, 2023
@vinayvenu vinayvenu changed the title Add tables to etl Add checklists to ETL Jun 19, 2023
@vinayvenu vinayvenu moved this from Focus Items to Analysis Complete in Avni Product Jun 20, 2023
@vinayvenu vinayvenu moved this from Analysis Complete to Ready in Avni Product Jun 23, 2023
@ashusvnath ashusvnath self-assigned this Jun 27, 2023
@ashusvnath ashusvnath moved this from Ready to In Progress in Avni Product Jun 27, 2023
@ashusvnath
Copy link

Will pair with someone today to setup a checklist on a form and look at the data produced

@ashusvnath
Copy link

Barebones Query :

SELECT cid.id, cpt.name, completion_date, cid.organisation_id, cid.form_id, cid.dependent_on
FROM
    checklist_item ci JOIN checklist_item_detail cid on ci.checklist_item_detail_id = cid.id
                      JOIN checklist_detail cd on cd.id = cid.checklist_detail_id
                      JOIN checklist cl ON cl.id = ci.checklist_id
                      JOIN concept cpt ON cid.concept_id = cpt.id

@ashusvnath
Copy link

Expected table structure for an ETL table with observations

Table - Columns (SubjectTypeName)
-------
first_name, last_name, registratin_date, Form Element 1 - Concept Name, Form Element 2 - Concept Name,, Form Element 3 - Concept Name,, Form Element 4 - Concept Name, Form Element 5 - Concept Name

suggested by @petmongrels

@ashusvnath
Copy link

Paired with @petmongrels .
A blank table 'vaccinations_' is created on ETL run (method call is commented out)

@ashusvnath ashusvnath moved this from In Progress to Ready in Avni Product Jul 12, 2023
@ashusvnath ashusvnath removed their assignment Jul 12, 2023
@vinayvenu vinayvenu moved this from Ready to Analysis Complete in Avni Product Jul 18, 2023
@mahalakshme mahalakshme moved this from In Analysis Review to In Analysis in Avni Product Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Analysis
Development

No branches or pull requests

2 participants