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

What happens when you try to book a first dose slot for a 45+ individual and an 18+ individual? #392

Open
great1113 opened this issue May 28, 2021 · 16 comments
Labels
bug Something isn't working

Comments

@great1113
Copy link

great1113 commented May 28, 2021

(Assume same vaccine selection)

I am thinking

  • either only the hospital which have both 18+ and 45+ slots will be tried.
  • or the slot booking never happens

I would love to go through the code and understand what is going on, but I need to run it right now. And I don't want to be running it if there is no chance for success. (rather split them into two accounts)

@Nakul93
Copy link
Collaborator

Nakul93 commented May 28, 2021

For this scenario the script won’t proceed if selected beneficiaries are of different age grps.
Even the CoWIN portal doesn’t allow this, even if there is a centre with both age group slots open, you need to book them separately. This can’t be done in one go.

@great1113
Copy link
Author

great1113 commented May 28, 2021

Oh, In that case, shouldn't we warn the user of the same by asking them to select beneficiaries of the same age group?

We already have their ages anyway.


Another question, since all the 45+ people are still technically 18+, does that mean they are allowed to book those slots? Then shouldn't this be allowed?

We filter by 18+, and then book the slots for all the beneficiaries. And the 45+ slots won't be considered since we can't book them for the 18+ folks.

(This assumes 45+ folks can book 18+ slots)

@Nakul93
Copy link
Collaborator

Nakul93 commented May 28, 2021

Yeah so I noticed that in our script, it only takes the min of the age, but doesn't really warn the user during input if they provide beneficiaries of different age group.(A potential bug)

def get_min_age(beneficiary_dtls):
"""
This function returns a min age argument, based on age of all beneficiaries
:param beneficiary_dtls:
:return: min_age:int
"""
age_list = [item["age"] for item in beneficiary_dtls]
min_age = min(age_list)
return min_age

@Nakul93
Copy link
Collaborator

Nakul93 commented May 28, 2021

For your 2nd question, the CoWIN portal has 2 different slot options for booking, 1 for 18-44 age group and 1 for 45+ age group.
So no technically we can't book a 45+ beneficiary on a 18-44 slot.

@mrms123
Copy link

mrms123 commented Jun 4, 2021

This is a bug.
When the 18+ vaccinations started, anyone could book that slot - and hence the code was written such. However, now every center returns a max_age_limit field as well - this needs to be updated.

@Nakul93
Copy link
Collaborator

Nakul93 commented Jun 4, 2021

@mrms123 couldn’t find the max_age_limit field. Could you please point out to which API resp shows this field

@mrms123
Copy link

mrms123 commented Jun 4, 2021

My bad - I was referring to code from another script (non-pallupz forks), and it turns out that they are manually adding that field.

This issue has been referenced here as well
pallupz#218

The error obtained is also mentioned.

@Nakul93
Copy link
Collaborator

Nakul93 commented Jun 4, 2021

I'll label this as a bug, if you have a fix you can raise a PR. Although before selecting the beneficiaries it warns the user to select beneficiaries of same age grp.

@Nakul93 Nakul93 added the bug Something isn't working label Jun 4, 2021
@mjishnu
Copy link

mjishnu commented Aug 18, 2021

i was able to book slot for 45+ and 18+ in same center after using the new version v2.0.14, since now slot are available in 18+ format in my region and the program only looks for 18+ for both parties i am able to book slots for both together now

@sid8840
Copy link

sid8840 commented Aug 18, 2021

i was able to book slot for 45+ and 18+ in same center after using the new version v2.0.14, since now slot are available in 18+ format in my region and the program only looks for 18+ for both parties i am able to book slots for both together now

it says rate limited by cowin
how did you do this?

@sid8840
Copy link

sid8840 commented Aug 18, 2021

Rate-limited by CoWIN. Waiting for 5 seconds.
(You can reduce your refresh frequency. Please note that other devices/browsers using CoWIN/Umang/Arogya Setu also contribute to same limit.)

this happens

@Nakul93
Copy link
Collaborator

Nakul93 commented Aug 18, 2021

I think the rate limiting issue was resolved…anyhow it’s strange that ppl are still using this script to book slots. There are apps now which makes the process bit easier

@Nakul93
Copy link
Collaborator

Nakul93 commented Aug 18, 2021

You can checkout this repo: https://github.com/Nakul93/BooKie. It uses public APIs and doesn’t rate limit

@mjishnu
Copy link

mjishnu commented Aug 30, 2021

Rate-limited by CoWIN. Waiting for 5 seconds.
(You can reduce your refresh frequency. Please note that other devices/browsers using CoWIN/Umang/Arogya Setu also contribute to same limit.)

this happens

just book 2 or 3 numbers at a time dont book for too many numbers at same time and keep the refresh frequency at 15.in case u get rate limited just use a vpn connect to india.

@mjishnu
Copy link

mjishnu commented Aug 30, 2021

You can checkout this repo: https://github.com/Nakul93/BooKie. It uses public APIs and doesn’t rate limit

isnt these both same script ?
is there any new feature in it ?

@mjishnu
Copy link

mjishnu commented Aug 30, 2021

I think the rate limiting issue was resolved…anyhow it’s strange that ppl are still using this script to book slots. There are apps now which makes the process bit easier

its still hard to book slots in my region.

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