hzi-braunschweig / SORMAS-Stats-next-gen

SORMAS-Stats contain functions to analyze and visualize surveillance data collected by SORMAS.
GNU General Public License v3.0
4 stars 6 forks source link

caseExport function for situation report #99

Closed DavidSoSiZoch closed 2 years ago

DavidSoSiZoch commented 2 years ago

Adding a function that exports all necessary case based data for the creation of the situation report.

The function takes as arguments a connection to a SORMAS Postgres db, a start date and an end date.

The function's output consists of a line listing of cases reported in the defined time period.

In the line listing each row is a case, and the columns are the following variables: case_id, region_id, district_id, case_classifiaction, case_end_of_iso_reason, report_date_case, disease, vaccination_status, symptoms_id, person_id, hospitalization_id, age_person, sex_person, death_date_person, cause_of_death_disease_person, onset_date, admitted_to_health_facility, admission_date, hospitalization_reason, district_name, region_name

bernardsilenou commented 2 years ago

@DavidSoSiZoch Minor suggestion please:

  1. Can you create another issue for the second point 2, the export of population
  2. You can edit this issue to focus on case line list export
  3. You can add a description to the name of the functions since there may be more than one type of case export, eg caseExportDetailed or caseExportLinelist