Skip to main content

Study Report

Reports are piece of data associated with a participant, and generated by the system (like flags but with more complex data) during the processing of a study event. They can be used to provide a feedback to the participant of its participation.

A report is defined as (using typescript notation, field names are from the json representation of a Report):

{
key: string // Key of the report
timestamp: number
participantID: string // Id of the participant
responseID: string // Id of the response (for example survey response ID) generating this report
data: Array<{key: string, value: string, dtype?:string}>
}

Reports are created using the Study Rules by several study expression

  • INIT_REPORT(key) : create a report with a given key (with no data)
  • UPDATE_REPORT(key, name, value) : update or create a report with a given key, and add a data attribute with given name and value
  • CANCEL_REPORT(key)

During the processing of an event : Only one report with a given key can be created. Calling INIT_REPORT several times will remove the already set data (recreating an empty report).

Reports are stored after the rules are applied.

For a given participant, it's possible to have several reports with the same key, for each event processed. Then a 'key' is more to be seen as a kind of report or a category of data.

Reports can be used to create a summary of a survey submission, or to create data when some condition are fullfilled in the participant state (using submission or timer event).

The main use case for reports is to generate user interface based on the collected data.

Some use cases:

  • History of symptoms to create feedback interface
  • Badge attribution