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

Set up Mapping config from Glific Output to Avni Subject Input #87

Closed
Tracked by #24
himeshr opened this issue Sep 11, 2023 · 1 comment
Closed
Tracked by #24

Set up Mapping config from Glific Output to Avni Subject Input #87

himeshr opened this issue Sep 11, 2023 · 1 comment
Assignees

Comments

@himeshr
Copy link

himeshr commented Sep 11, 2023

Set up Mapping config from Glific Output to Avni Subject Input.

Tasks for mapping choosen fields of Student - from Glific flow_results to Avni Subject :

  • Map all fields as shown in this sheet : https://docs.google.com/spreadsheets/d/191uuBE2R9Q8U0WKfBDsfECX0OiI0zXHpjkBxiZPeK58/edit#gid=970433613
  • Initialize default Subject attributes like firstname, lastname, address, age, dob, gender, address, registrationDate, etc.. in StudentAvniSubject
  • Refer this Swagger documentation for API request body format..
  • implement generic mapping logic to set values in StudentAvniSubject from BigQuery API response, except for default subject attributes(those would have been init in above step)
  • Background details like Phone number of the respondent, date of registration should also be filled
  • For all the location columns in the student's profile should be filled in as "Other"
  • The location details that are captured in Gliffic will be put together and added to "Other School name" column as a Comma-separated value

Query that has to be parameterized and used:

Later after Lahi team adds flag to indicate completion of flow, using the following Query:

select c.phone, fr.results, s.inserted_at
from `glific-lms-lahi.918956411022.contacts` c, UNNEST(c.fields) AS s
join `glific-lms-lahi.918956411022.flow_results` fr 
on fr.contact_phone = c.phone 
WHERE
(s.label, s.value) = ('avni_reg_complete', 'Yes')
AND
fr.name = 'Avni Students Registrations Flow'
AND 
s.inserted_at > DATETIME('2023-09-20T19:45:27')
order by s.inserted_at
limit 10
offset 0
@vedfordev vedfordev self-assigned this Sep 15, 2023
@vedfordev
Copy link

Developer's Note:

Metadata Mapping Query: Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants