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

Prevent duplicate student registration #96

Closed
himeshr opened this issue Oct 5, 2023 · 0 comments
Closed

Prevent duplicate student registration #96

himeshr opened this issue Oct 5, 2023 · 0 comments
Assignees

Comments

@himeshr
Copy link

himeshr commented Oct 5, 2023

Background

While syncing students to Avni, students might go through the same flow multiple times. It is important to remove duplicates as much as possible. As one mechanism of preventing this, we can prevent those with the same business primary key from being registered more than once.

Acceptance criteria

When the integration service notices that the flow for a flow_result_id has already been processed by Avni, it is ignored by the service.

To decide if this has already been processed, we match the contact number, first name, last name, date of birth and gender with Avni to see if they already exist.

Tech details

  • first fetch all Students for "Contact.phoneNumber" using external-api (/api/subjects, with Concepts filter)
  • Iterate and filter out based on "First Name, Last Name, Father Name, DOB, Gender" values specified in flow_result (case insensitive lookup)
  • IF an entry exists, then this is a duplicate entry, ignore and move to next flow_result record
  • Else, as there are no entries that match this unique constraint, create a new student

Out of scope

  • Same student registering through multiple phone numbers. These will be treated as separate
  • Spelling mistakes in two different submissions from the same phone number. This will also be treated as separate
@himeshr himeshr converted this from a draft issue Oct 5, 2023
@himeshr himeshr added the LAHI label Oct 5, 2023
@himeshr himeshr moved this from Focus Items to In Analysis Review in Avni Product Oct 5, 2023
@vedfordev vedfordev moved this from In Analysis Review to Analysis Complete in Avni Product Oct 9, 2023
@vinayvenu vinayvenu changed the title Implement unique student constraint Prevent duplicate student registration Oct 20, 2023
@vinayvenu vinayvenu moved this from Analysis Complete to Ready in Avni Product Oct 23, 2023
@mahalakshme mahalakshme moved this from Ready to Finalized for the upcoming release in Avni Product Oct 24, 2023
@vinayvenu vinayvenu moved this from Finalized for the upcoming release to Ready in Avni Product Oct 24, 2023
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Oct 26, 2023
@petmongrels petmongrels self-assigned this Oct 26, 2023
petmongrels added a commit to avniproject/avni-server that referenced this issue Oct 31, 2023
petmongrels added a commit that referenced this issue Oct 31, 2023
…asses/variable to Lahi* and Avni* of source of data.
petmongrels added a commit that referenced this issue Nov 7, 2023
petmongrels added a commit that referenced this issue Nov 7, 2023
…g of time. can be removed in future. util to compare string values.
petmongrels added a commit that referenced this issue Nov 7, 2023
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Nov 8, 2023
petmongrels added a commit that referenced this issue Nov 8, 2023
petmongrels added a commit that referenced this issue Nov 9, 2023
… by callers of integration process. removed unmapped fields. metadata data mapping.
@vinayvenu vinayvenu moved this from Code Review Ready to In Code Review in Avni Product Nov 15, 2023
@vinayvenu vinayvenu moved this from In Code Review to QA Ready in Avni Product Nov 16, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Nov 21, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Nov 22, 2023
@mahalakshme mahalakshme removed the LAHI label Nov 27, 2023
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