api-study-participant-create.study-participant-create

Service to create a Study Participation.

This class provides a method to create a study participation in the system based on the information provided in the request.

Channel POST /study/{version}/participant/.

This class creates a study participation with the following steps:
  • Check if the study provided exists and is opened in the system based on its primary_id.

  • TODO : Check if the patient can participate to the study.

  • TODO : Create a StudyParticipant in the database.

  • TODO : Create the matching StudyParticipant in Odoo.

  • TODO : Create a QuestionnaireResponse for each Questionnaire associated to the study in the database.

  • TODO : Create the matching QuestionnaireResponse in Odoo.

Returns:
HTTP status code:
  • 201: If all the ressources were created successfully

  • 400: If the input data are not valid

  • 403: TODO : text to build

  • 404: If the study doesn’t exist

  • 409: TODO : text to build

  • 500: If an error occurred while creating the ressources

JSON: payload with the StudyParticipant object
  • StudyParticipant (StudyParticipant)

Input

Name

Datatype

Required

Description

part_of

string

Yes

Study primary_id value

subject

string

Yes

Patient primary_id value

created

string

date

string

extension

StudyParticipantExtension

identifier

StudyParticipantIdentifierSlices

progress_status

string

questionnaire_response

string

rgpd_bases

string

processing_basis_primary_id_value ?

state

string

Output

Name

Datatype

Required

Description

part_of

string

Yes

Study primary_id value

subject

string

Yes

Patient primary_id value

created

string

date

string

extension

StudyParticipantExtension

identifier

StudyParticipantIdentifierSlices

progress_status

string

questionnaire_response

string

rgpd_bases

string

processing_basis_primary_id_value ?

state

string