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
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 :
Query that has to be parameterized and used:
Later after Lahi team adds flag to indicate completion of flow, using the following Query: