user.models.Center
- class user.models.Center(*args, **kwargs)[source]
A center, institution, or hospital etc., from which patient data has been collected.
This is also used to specify data visibility such that only users of a given center can access patient data from that center.
- id
Database primary key. Auto generated if not provided.
- Type:
django.models.UUIDField
- name
The name of the center.
- Type:
django.models.CharField
- country
The country in which the center is located. This can be used to determine data compliance, i.e., GDPR and HIPAA etc.
- Type:
django.models.CharField
- __init__(*args, **kwargs)
Methods
__init__(*args, **kwargs)adelete(*args, **kwargs)arefresh_from_db([using, fields, from_queryset])asave(*args, **kwargs)check(**kwargs)clean()Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields.
clean_fields([exclude])Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
date_error_message(lookup_type, field_name, ...)delete([using, keep_parents])Delete database instance.
delete_replica(*args, **kwargs)Replicate delete action on other database.
from_db(db, field_names, values)full_clean([exclude, validate_unique, ...])Call clean_fields(), clean(), validate_unique(), and validate_constraints() on the model.
get_constraints()get_deferred_fields()Return a set containing names of deferred fields for this instance.
prepare_database_save(field)refresh_from_db([using, fields, from_queryset])Reload field values from the database.
save([force_insert, force_update, using, ...])Save database instance.
save_base([raw, force_insert, force_update, ...])Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too.
save_replica(*args, **kwargs)Replicate save action on other database.
serializable_value(field_name)Return the value of the field name for this instance.
unique_error_message(model_class, unique_check)validate_constraints([exclude])validate_unique([exclude])Check unique constraints on the model and raise ValidationError if any failed.
Attributes
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
A wrapper for a deferred-loading field.
objectspkreplica_dbreplica_modeluserAccessor to the related objects manager on the reverse side of a many-to-one relation.