Skip to content

SORMAS 1.66.3

Compare
Choose a tag to compare
@sormas-jenkins sormas-jenkins released this 10 Dec 14:01
· 9301 commits to master since this release

⚠️ Release Information

This version migrates vaccination data from cases, contacts and event participants to the vaccination table which is then part of immunizations. Since the vaccination migration is complex, we cannot fully exclude the occurrance of data loss in some circumstances where data is inconsistent across entities of the same person. Therefore, we advise users to perform database exports on the previous version in order to revise vaccination data after the update if necessary.

For the migration itself, it is assumed that the latest entity of a person contains the most up to date vaccination data. If data is not available in the latest entity, available data in previous entities is considered. The vaccineDoses determine the number of entries in the subsequent vaccination database table.

In the mobile app, only new cases that have not yet been synchronized with the web app are migrated. Vaccination data that has been changed for existing cases which have not yet been synchronized will be lost.

The migrated variables are the following (directly from the case table for cases, and from the vaccinationInfo table for contacts and event participants):

vaccinationDoses
firstVaccinationDate
lastVaccinationDate
vaccinationInfoSource
vaccineName
otherVaccineName
vaccineManufacturer
otherVaccineManufacturer
vaccineInn
vaccineBatchNumber
vaccineUniiCode
vaccineAtcCode

⚠️ Important - Potential Migration Issues
It's possible that the migration fails for specific data constellations, i.e. when event participants associated to events without a disease have vaccination information, or possibly when event participants don't have a reporting user.

These issues will be resolved in the next release (1.67) which is scheduled for mid-January. If you don't want to wait for that version, you can use the following scripts to a) whether you potentially have such data in the system (the mere existence does not mean that the data is actually considered in the migration, so the migration might still work), and b) to clean up or correct this data AHEAD of updating to 1.66.3 in oder to ensure that the migration succeeds.

Check data on the server for potential issues:
SELECT id FROM eventparticipant WHERE reportinguser_id IS NULL;
SELECT eventparticipant.id FROM eventparticipant LEFT JOIN events ON eventparticipant.event_id = events.id LEFT JOIN vaccinationinfo ON eventparticipant.vaccinationinfo_id = vaccinationinfo.id WHERE events.disease IS NULL AND vaccinationinfo.vaccination = 'VACCINATED';

Correct/clean up the data:
Fill the reporting user of event participants without a reporting user with the reporting user of the event:
UPDATE eventparticipant SET reportinguser_id = (SELECT reportinguser_id FROM events WHERE events.id = eventparticipant.event_id) WHERE reportinguser_id IS NULL;

Remove vaccination info from event participants in events without a disease (if this is not desired for you, please instead use the select script above to see which event participants are affected and potentially add a disease to their associated events):
UPDATE vaccinationinfo SET vaccination = null FROM eventparticipant WHERE vaccinationinfo.id = eventparticipant.vaccinationinfo_id AND vaccination = 'VACCINATED' AND (SELECT disease FROM events WHERE events.id = eventparticipant.event_id) IS NULL;

Changelog

Changes

Web Application

  • Fixed a part of the immunization migration potentially leading to the whole migration failing on servers with a significant amount of vaccination information (#7491)