api/participant_administration.py
def add_fields_and_interventions(participant: Participant, study: Study):
    """ Creates empty ParticipantFieldValue and InterventionDate objects for newly created
     participants, doesn't affect existing instances. """
    for field in study.fields.all():
        ParticipantFieldValue.objects.get_or_create(participant=participant, field=field)
    for intervention in study.interventions.all():
        InterventionDate.objects.get_or_create(participant=participant, intervention=intervention)
 Creates empty ParticipantFieldValue and InterventionDate objects for newly created
     participants, doesn't affect existing instances. 
Creates empty ParticipantFieldValue and InterventionDate objects for newly created
participants, doesn't affect existing instances.
Creates empty ParticipantFieldValue and InterventionDate objects for newly created participants doesn ' t affect existing instances .
def add_fields_and_interventions(participant: Participant, study: Study):
    for field in study.fields.all():
        ParticipantFieldValue.objects.get_or_create(participant=participant, field=field)
    for intervention in study.interventions.all():
        InterventionDate.objects.get_or_create(participant=participant, intervention=intervention)
def add_fields_and_interventions ( participant : Participant , study : Study ) : for field in study . fields . all ( ) : ParticipantFieldValue . objects . get_or_create ( participant = participant , field = field ) for intervention in study . interventions . all ( ) : InterventionDate . objects . get_or_create ( participant = participant , intervention = intervention )
Creates empty ParticipantFieldValue and InterventionDate objects for newly created
participants, doesn't affect existing instances.
Creates empty ParticipantFieldValue and InterventionDate objects for newly created participants doesn ' t affect existing instances .
""" Creates empty ParticipantFieldValue and InterventionDate objects for newly created
     participants, doesn't affect existing instances. """
participant
Participant
study
Study