Skip to main content

pypi actions codecov downloads

edc_crf

In longitudinal clinical trials, CRFs (case report forms) are the most common data collection forms required in the data collection schedule.

In addition to the logic checks that you will add for a specfic CRF, you also need to validate a few general conditions. Most of these conditions are checked relative to the report_datetime of the CRF data being submitted. Some examples are:

  • that a participant is consented and that their consent is still valid on the report_datetime;

  • that the CRF report_datetime makes sense relative to the covering visit report report_datetime;

  • that the participant is enrolled to the schedule (onschedule) on or after the report_datetime and has not been taken off the schedule (offschedule) on or before the report_datetime;

  • that the participant has not been taken off study on or before the report_datetime.

CRF forms

The CrfModelFormMixin is used for all CRF modelforms. With this single mixin the form:

  • Checks for the consent relative to report datetime and this schedule (edc_consent);

  • checks if participant is on/off schedule relative to report datetime and this schedule (edc_visit_schedule);

  • validates subject_visit report datetime (edc_visit_tracking);

  • checks if participant is offstudy relative to report datetime (edc_offstudy).

If any of the above conditions fail, a forms.ValidationError is raised.

The mixin imports mixins functionality from edc_consent, edc_visit_schedule, edc_visit_tracking, and edc_offstudy.

from django import forms
from edc_crf.modelform_mixins import CrfModelFormMixin
from edc_form_validators import FormValidator

from ..models import FollowupVitals


class MyCrfFormValidator(FormValidator):
    pass


class MyCrfForm(CrfModelFormMixin, forms.ModelForm):

    form_validator_cls = MyCrfFormValidator

    class Meta:
        model = MyCrf
        fields = "__all__"

CRF models

Similar to the CrfModelFormMixin, the CrfModelMixin is used for all CRF models and checks for the same conditions. However, if any of the conditions is met, an exception is raised. You should render CRF models with a modelform class using the CRFModelFormMixin to catch these exceptions on the form where the user can respond.

class MyCrf(CrfModelMixin, BaseUuidModel):

    weight_determination = models.CharField(
        verbose_name="Is weight estimated or measured?",
        max_length=15,
        choices=WEIGHT_DETERMINATION,
    )

    class Meta(CrfModelMixin.Meta, BaseUuidModel.Meta):
        verbose_name = "My CRF"
        verbose_name_plural = "My CRFs"

Metadata

Release files for edc-crf 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edc-crf 1.0.2
File Size Uploaded Provenance
edc_crf-1.0.2.tar.gz 43.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for edc-crf 1.0.2
File Interpreter ABI Platform
edc_crf-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 95.5 kB

Release files / edc_crf-1.0.2.tar.gz

Download URL edc_crf-1.0.2.tar.gz
Size 43.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ec4b990d459fbda9aa1da709cc1d34d0da9972a3010710e6fb496fee183809ba
BLAKE2b-256 checksum
How to use checksums
de03d9eeeec521cccf9c092e23c44f36299a9af707bfd605fd0227839d67395e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / edc_crf-1.0.2-py3-none-any.whl

Download URL edc_crf-1.0.2-py3-none-any.whl
Size 52.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48630ad05adf85956e103bb7c56d9939b6aefdf58156da67a3337987943f7a0e
BLAKE2b-256 checksum
How to use checksums
ff3ac14bb561ce5172b1d55758a51545418607d71344114984e9863ecbbee0fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Security for edc-crf 1.0.2

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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page