sharpie.webserver.accounts.models
Functions
Classes
|
Model to formulate user consent for research participation. |
|
Model to track participants in the study. |
- sharpie.webserver.accounts.models.default_research_team()
- class sharpie.webserver.accounts.models.Consent(*args, **kwargs)
Model to formulate user consent for research participation.
- Parameters:
id (BigAutoField) – Primary key: ID
name (CharField) – Name
explanation_text (TextField) – Explanation text
research_team (JSONField) – Research team
ethical_guidelines (TextField) – Ethical guidelines
created_at (DateTimeField) – Created at
Reverse relationships:
- Parameters:
participants (Reverse
ForeignKeyfromParticipant) – All participants of this consent (related name ofconsent)
- name
Type:
CharFieldName
- explanation_text
Type:
TextFieldExplanation text
- research_team
Type:
JSONFieldResearch team
- ethical_guidelines
Type:
TextFieldEthical guidelines
- created_at
Type:
DateTimeFieldCreated at
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- delete(using=Ellipsis, keep_parents=Ellipsis)
- exception DoesNotExist
- exception MultipleObjectsReturned
- get_next_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=True, **kwargs)
Finds next instance based on
created_at. Seeget_next_by_FOO()for more information.
- get_previous_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=False, **kwargs)
Finds previous instance based on
created_at. Seeget_previous_by_FOO()for more information.
- id
Type:
BigAutoFieldPrimary key: ID
- objects = <django.db.models.Manager object>
- participants
Type: Reverse
ForeignKeyfromParticipantAll participants of this consent (related name of
consent)
- class sharpie.webserver.accounts.models.Participant(*args, **kwargs)
Model to track participants in the study.
- Parameters:
id (BigAutoField) – Primary key: ID
external_id (CharField) – External id
demographics (JSONField) – Demographics
agreed_at (DateTimeField) – Agreed at
withdrawn_at (DateTimeField) – Withdrawn at
created_at (DateTimeField) – Created at
last_modified (DateTimeField) – Last modified
Relationship fields:
- Parameters:
user (
OneToOneFieldtoUser) – User (related name:participant)consent (
ForeignKeytoConsent) – Consent (related name:participants)
Reverse relationships:
- Parameters:
sessions (Reverse
ManyToManyFieldfromSession) – All sessions of this participant (related name ofparticipants)
- user
Type:
OneToOneFieldtoUserUser (related name:
participant)
- external_id
Type:
CharFieldExternal id
- demographics
Type:
JSONFieldDemographics
- consent
Type:
ForeignKeytoConsentConsent (related name:
participants)
- agreed_at
Type:
DateTimeFieldAgreed at
- withdrawn_at
Type:
DateTimeFieldWithdrawn at
- created_at
Type:
DateTimeFieldCreated at
- last_modified
Type:
DateTimeFieldLast modified
- exception DoesNotExist
- exception MultipleObjectsReturned
- get_next_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=True, **kwargs)
Finds next instance based on
created_at. Seeget_next_by_FOO()for more information.
- get_next_by_last_modified(*, field=<django.db.models.DateTimeField: last_modified>, is_next=True, **kwargs)
Finds next instance based on
last_modified. Seeget_next_by_FOO()for more information.
- get_previous_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=False, **kwargs)
Finds previous instance based on
created_at. Seeget_previous_by_FOO()for more information.
- get_previous_by_last_modified(*, field=<django.db.models.DateTimeField: last_modified>, is_next=False, **kwargs)
Finds previous instance based on
last_modified. Seeget_previous_by_FOO()for more information.
- id
Type:
BigAutoFieldPrimary key: ID
- objects = <django.db.models.Manager object>
- sessions
Type: Reverse
ManyToManyFieldfromSessionAll sessions of this participant (related name of
participants)