NCommander / vaksina

MIT License
35 stars 5 forks source link

Typos in code/comments, some cleanup and fixed parse_immunization_record? #20

Closed Guiorgy closed 1 year ago

Guiorgy commented 2 years ago

On the last one (parse_immunization_record), the comment inside it states:

It's possible that multiple vaccines can be given in single day. This isn't done for COVID per se, but because FHIR is a general purpose specification, we should handle this, especially if there are future multishot COVID vaccinations that are given at later point, because data structures are important

If I understand this correctly, the method should handle multiple immunization records, store them in an list and return them all. If that is the intended behaviour, then I fixed it. If not then this should be reverted, and the method refactored, since before it created a list of imunizations that was filled but never used, and the method only ever returned the last parsed immunization, and if the received dictionarry was empty/had no immunizations, the method would return a variable before initialized (so my PyCharm linter was freaking out on that :P)