Skip to content

Repose | Change export format

So far, FHIR is used as an export format. Because Charité does not provide a FHIR server, we decided to change the export format. Each data transmission to the study server should now include two files: A CSV and a JSON.

The CSV should be generated using the existing CSV export functionality.

The JSON should be generated according to Jakob's suggestion:

Respondent ID Date Question Answer Note/misc
123456789 YYYY-MM-DD How are you feeling today? 1 xyz
string Date string number string

Taking into account the specifics of the questionnaire implementation, I therefore propose the following JSON structure (note that the first two items are the same question answered on 2 consecutive days):

[
  {
    "respondentId": "REP-0123",
    "date": "2023-01-18T14:47+01:00",
    "questionId": "rcc-curated-default-01-daily",
    "questionWording": "How well were you able to manage your usual daily tasks today?",
    "answerRaw": 1,
    "answerWording": "somewhat worse"
  },
  {
    "respondentId": "REP-0123",
    "date": "2023-01-19T18:33+01:00",
    "questionId": "rcc-curated-default-01-daily",
    "questionWording": "How well were you able to manage your usual daily tasks today?",
    "answerRaw": 2,
    "answerWording": "worse"
  },
  {
    "respondentId": "REP-0123",
    "date": "2023-01-19T18:33+01:00",
    "questionId": "rcc-curated-default-02-daily",
    "questionWording": "Did you feel down today?",
    "answerRaw": 2,
    "answerWording": "moderately"
  },
]