Skip to content

Commit

Permalink
fix AZ used is timestamp (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalezi authored Nov 24, 2021
1 parent 8bb434f commit a6577f2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cepimose/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,11 @@ def _parse_vaccinations_by_manufacturer_used(data) -> "list[VaccinationDose]":
date = parse_date(C[0])
total_used = C[-1]

# lines below might be needed if we will have to check another R
# suppported_r = [30, 28, 18] # there are many Rs that we don't support.
# if R not in suppported_r:
# print(element)

if R == 30:
total_used = parsed_data[-1].dose

Expand All @@ -626,6 +631,12 @@ def _parse_vaccinations_by_manufacturer_used(data) -> "list[VaccinationDose]":
if R == 28 and Ø == 2:
total_used = parsed_data[-1].dose

if (
R == 18 and Ø == 12
): # ? Ø might be days between use doses AZ 2021-11-19, 2021-11-23
print(parsed_data[-1])
total_used = parsed_data[-1].dose

parsed_data.append(VaccinationDose(date, total_used))

return parsed_data
Expand Down

0 comments on commit a6577f2

Please sign in to comment.