msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
20 stars 12 forks source link

Create vaccinations table #4675

Closed lache-melvin closed 1 month ago

lache-melvin commented 1 month ago

During an immunisation program encounter, each vaccination event needs to be captured.

This should be a new table vaccination:

id: String encounter_id: String user_id: String (user making the entry) created_datetime: NaiveDateTime (time of entry) vaccination_date: NaiveDate (user entered date of vaccination) vaccine_course_schedule_id: String vaccine_item_id: Option stock_line_id: Option (item and stock line are optional clinician_link_id: Option (healthcare professional administering the dose) vaccine_given: bool reason: Option (customisable? REFUSAL/OUT OF STOCK/NO REASON) comment: Option

TODO: do we think date and clinician can be from the encounter level or needed for each individual vaccination?

Needs to sync via v6 as remote data

stock lines/items etc. references shouldn't break when synced to different sites! So no ref constraints

adamdewey commented 1 month ago

TODO: do we think date and clinician can be from the encounter level or needed for each individual vaccination?

Don't think these can be from encounter as the user may enter historical vaccination events for the patient during an encounter

adamdewey commented 1 month ago

vaccine_item_id: Option

At some point this will need to transition to item variant..

marthakeezy commented 1 week ago

Tested by Tainá in #4642 - moving to Done ✅