diff --git a/cepimose/parser.py b/cepimose/parser.py index 4a6e6dd..944be3f 100644 --- a/cepimose/parser.py +++ b/cepimose/parser.py @@ -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 @@ -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