edc-registration
The model RegisteredSubject is used by the Edc as the master subject registration table. Only one record may exist per individual. The table has space for PII so typically a RegisteredSubject instance is created or updated on completion of the informed consent. As always, PII in the Edc is encrypted at rest using django-crypto-field.
For the model and signal to be registered you need to add the AppConfig to your INSTALLED_APPS:
INSTALLED_APPS = (
....
'edc_registration.apps.AppConfig',
....
)
UpdatesOrCreatesRegistrationModelMixin
RegisteredSubject is never edited directly by the user. Instead some other model with the needed attributes is used as a proxy. To have a model perform the task of creating or updating RegisteredSubject, declare it with the UpdatesOrCreatesRegistrationModelMixin.
For example, a model, SubjectEligibility or a screening model creates or updates RegisteredSubject without a subject identifier then a model such as the SubjectConsent in tests.models, also creates or updates a subject’s RegisteredSubject instance on save. For this to happen, both models are declared with the UpdatesOrCreatesRegistrationModelMixin:
class SubjectEligibility(UniqueSubjectIdentifierModelMixin,
UpdatesOrCreatesRegistrationModelMixin, BaseUuidModel):
screening_identifier = models.CharField(
max_length=36,
null=True,
unique=True)
@property
def registration_unique_field(self):
return 'screening_identifier'
def update_subject_identifier_on_save(self):
"""Overridden to not set the subject identifier on save.
"""
if not self.subject_identifier:
self.subject_identifier = self.subject_identifier_as_pk.hex
self.subject_identifier_aka = self.subject_identifier_as_pk.hex
return self.subject_identifier
class SubjectConsent(
ConsentModelMixin, UpdatesOrCreatesRegistrationModelMixin,
CreateAppointmentsMixin, IdentityFieldsMixin, ReviewFieldsMixin,
PersonalFieldsMixin, CitizenFieldsMixin, VulnerabilityFieldsMixin,
BaseUuidModel):
@property
def registration_unique_field(self):
return 'screening_identifier'
class Meta:
app_label = 'my_app'
The property registration_unique_field returns a model attribute that is used to set a registration identifier on RegisteredSubject.
A subject’s RegisteredSubject instance is created and updated in a post_save signal. As mentioned, it is never edited directly by the user.
Metadata
Release files for edc-registration 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| edc_registration-1.0.1.tar.gz | 37.2 kB | Without provenance | Details for edc_registration-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| edc_registration-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for edc_registration-1.0.1-py3-none-any.whl |
Total release size: 89.8 kB
Release files / edc_registration-1.0.1.tar.gz
| Download URL | edc_registration-1.0.1.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb1aa99443bbbcfd8f5cd4e03f80eb6abc150e3503ce54b60b6390bee14beb1e
|
|
BLAKE2b-256 checksum How to use checksums |
e1332ddb5978ba779e24f4cfb362be34173b9f8a1e6531cc3696c6e907c2dd16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / edc_registration-1.0.1-py3-none-any.whl
| Download URL | edc_registration-1.0.1-py3-none-any.whl |
|---|---|
| Size | 52.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c65d1bd93935f5e56f6f4079f17a7dcd9c4a2407e76006cd839c3b955391721b
|
|
BLAKE2b-256 checksum How to use checksums |
ee0cb542b9fcc5ceac7140fa4dd97e4b882c37b429e1e521713066c8e81d132c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for edc-registration 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.