Open jutunen opened 3 years ago
I redo the calculations and likely the example is wrong (or calculated from different samples).
I came quite close with your numbers but not exact Expired bottles count was 3482. Injections in the bottles 17423 Injections done from the expired bottles 4832 17423 - 4832 = 12591.
Difference is 25 jabs in bottles and 8 injections done. Quite close :)
In my calculation
Last bottle which is expired has
:arrived "2021-03-13T11:08:11.643530Z"
:expires "2021-04-12T11:08:11.643530Z",
:id "929b22a6-d810-428c-9807-fccd31147c6c",
First bottle expired (and arrived): :arrived "2021-01-02T13:26:29.670392Z", :expires "2021-02-01T13:26:29.670392Z", :id "96a3a22e-4935-4f1b-a35e-7a7331f2e13e"
Perhaps there is a difference in expired bottles count?
I calculated by parsing the files, filtering with (arrived + 30 days) < 2021-04-12T11:10:06.473587Z Then i filtered vaccinations with id:s received from the earlier stage to get the vaccinations which were made from the expired bottles.
How do you calculate the expiration date? One possibility to get it differ would be to calculate expiration by simply increasing month instead of adding 30 days.
That would make difference in the last bottle because if month is increased then "929b22a6-d810-428c-9807-fccd31147c6c" is still valid 2021-04-12 because expiration is 2021-04-13 (arrived 2021-03-13).
How do you calculate the expiration date?
I'm using Postgres and I have all orders in a 'bottle' table. I have a column for the expired dates and I seed it like this:
update bottle set expired = arrived + interval '30 days';
When I migrate the datetimes to my db, they are erroneously converted to local time. So when I add the 2 hour difference to my queries, I get almost same numbers as you: 4833 and 17423.
We are one injection far from consensus... :-D
Perhaps there is a difference in expired bottles count?
There's no difference after I fixed my queries.
4833 is the correct one. Maybe I typoed that 4832 (I am on vacation so not in the full throttle).
I am sorry that the original example was erroneus. Good luck to interview if you are going to apply for Solita academy :)
Hello!
I just can't get the same figure here.
First I try to calculate the total amount of injection doses in the expired bottles, getting number 17398. Then I try to calculate the total amount of injections that were injected from the expired bottles, getting number 4824. Thus I get 17398 - 4824 = 12574 expired vaccines.
Can you reveal your corresponding numbers (17398 / 4824)? Or give any other advice?
regards, Jussi