Open circuitmamu opened 3 years ago
THIS is a hardcoded example to book for slot 1 and avoid notifications for slot2
add this in utils.py (session['available_capacity_dose1']>0)\
code looks like following
if (session['available_capacity'] >= minimum_slots) \ and (session['min_age_limit'] <= min_age_booking)\ and (session['available_capacity_dose1']>0)\ and (center['fee_type'] in fee_type):
@pallupz I need to book my Dose 1 but session slot open with Does 2
so script shows as available to everyone but in actual it can be booked for Dose 2 setting we need to check below things dose1_date=blank then it will check for dose 1 otherwise check for dose 2
Below is the sample of dose 1 taken { "beneficiaries": [{ "beneficiary_reference_id": "94XXXXXXXX "name": "Chhatrola XXXXXX", "birth_year": "1985", "gender": "Male", "mobile_number": "7472", "photo_id_type": "Aadhaar Card", "photo_id_number": "XXXXXX", "comorbidity_ind": "N", "vaccination_status": "Partially Vaccinated", "vaccine": "COVISHIELD", "dose1_date": "15-05-2021", "dose2_date": "", "appointments": [{ "appointment_id": "c6fc8f57-XXXXXXXXX-a0be8441aaaa", "center_id": XXXXXX, "name": "APOLLO XXXXXX", "state_name": "Gujarat", "district_name": "Ahmedabad Corporation", "block_name": "West Zone", "from": "09:00", "to": "17:30", "dose": 1, "session_id": "3ee9cb81-XXXXXXXXXX-d52f8aa57b30", "date": "15-05-2021", "slot": "09:00AM-11:00AM" }] }, { "beneficiary_reference_id": "54XXXXXX", "name": "Shweta XXXXXXXX", "birth_year": "1988", "gender": "Female", "mobile_number": "7472", "photo_id_type": "Aadhaar Card", "photo_id_number": "XXXXXXX", "comorbidity_ind": "N", "vaccination_status": "Partially Vaccinated", "vaccine": "COVISHIELD", "dose1_date": "15-05-2021", "dose2_date": "", "appointments": [{ "appointment_id": "c6fc8f57-XXXXXXX-a0be8441aaaa", "center_id": XXXXXXX, "name": "APOLLO XXXXXXX", "state_name": "Gujarat", "district_name": "Ahmedabad Corporation", "block_name": "West Zone", "from": "09:00", "to": "17:30", "dose": 1, "session_id": "3ee9cb81-XXXXXXX-d52f8aa57b30", "date": "15-05-2021", "slot": "09:00AM-11:00AM" }] }] }