SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
293 stars 143 forks source link

[SurvNet Adaptations] Cases > Export from SORMAS to SurvNet (Automatic) [5] #4119

Open Candice-Louw opened 3 years ago

Candice-Louw commented 3 years ago

Situation Description

As Gesundheitsamt, I would like to export/transmit Case data from SORMAS to SurvNet on (1) an automatic, and (2) manual basis.

Feature Description

  1. All changes to existing cases and export of new cases should automatically happen at a scheduled time/according to a timer. | Automatisch nach Zeitschaltuhr alle Änderungen vorhandener Fälle und Export neuer Fälle.

  2. All changes to existing cases and export of new cases should be possible to be initiated manually. | Händisch angestoßen alle Änderungen vorhandener Fälle und Export neuer Fälle.

Possible Alternatives

It is NOT about manually setting a filter, selecting cases and then doing a mass export. Filters are therefore not considered an alternative.

Additional Information

This is closely related to the BAG export in Switzerland pertaining to their MED - https://github.com/hzi-braunschweig/SORMAS-Project/issues/3610

In the event of this becoming relevant for Contacts too, the following may have to be considered - https://github.com/hzi-braunschweig/SORMAS-Project/issues/3706

markusmann-vg commented 3 years ago

It is essential, that

So we need to add "onchange" to the options of automatic at a scheduled time and manually transferred cases as a 3rd option

JonasCir commented 3 years ago

@markusmann-vg This is the result of a quick discussion with @HolgerReiseVSys

SurvNet needs to be informed, when a case was changed

When the user hits the save button, we write the complete, updated record back to SurvNet

SurvNet needs to be informed, when a case was deleted

There is an ElementAction called Element Delete in SurvNet which we could send to the locale instance when we delete a case in SORMAS

SurvNet needs to be informed, when a case was passed with property

There is a Bearbeitungsstatus called abgegeben in SurvNet which is desired to reach when we pass a case. Unknown how to reach it (as of yet)

This needs to be verified by RKI to make sure this does not cause any undesired side effects.

markusmann-vg commented 3 years ago

When a case is transferred from SORMAS to SORMAS we inform Survnet

Please check also the document with the transport description

markusmann-vg commented 3 years ago

Bearbeitungsstatus "gelöscht" der Datensätze

Candice-Louw commented 3 years ago

Zur Info Zustandsdiagramm Datensätze im Gesundheitsamt - Stand: 20.06.2020 image2020-10-6_8-53-25 image2020-10-6_8-54-30

Candice-Louw commented 3 years ago

Feedback from RKI: " [...] a scheduled data transfer [might not be] the right solution. Many GA have agreed with the Landesbehörde on a time when they send the data from SurvNet. That means, data transfer from SORMAS must happen “just before”. But there will oftentimes be a situation where the staff haven’t managed to finish the day’s work yet and decide to delay the transfer for some minutes or maybe hours. Some GA transfer data several times per day.

I would strongly recommend doing it the same way it is done in SurvNet where transfer is initiated by a user. When the user starts the data transport, SurvNet collects all changes since the last export (new, changed and deleted cases and outbreaks) and put them all into one file that is then sent to the web service. That would allow the GA to trigger the export on demand and directly after start the import to SurvNet followed by the data transfer to the Landesbehörde.

By that they can ensure that the last one working on a record has finished their work before the export. If something happens later during the evening they can communicate with the Landesbehörde and check with them if an update can still be included in the reports and even re-send during the night. "

JaquM-HZI commented 3 years ago

It should be possible for the admin to set the parameters for automatic transmission in the settings. The following parameters should be covered:

And #4770 includig the comment needs to be implemented before or at the same time with this one.

markusmann-vg commented 3 years ago

As an admin I can change the configuration for the automatic transfer to the reporting tool. On the same page I can also click a button to execute the transfer manually. Time of sending will be input with: 08:00;12:00;16:00 [Time intervals of min. 30 mins]

Logging of errors from the converter are included.

Prevent n exports at the same time. Error message: "Another export is already running, pls. try again later"

If a manual export is running and the automatic export is supposed to start, the automatic export should try to do it again after another 5 minutes.