Skip to main content

MNSI form/model for the clinicedc/edc and other django projects

Project description

pypi actions codecov downloads

edc-mnsi

Django classes for the Michigan Neuropathy Screening Instrument (MNSI).

MNSI scores are calculated in signals.py through a call to the MnsiCalculator and stored in two calculated fields on the model. The two calculated fields can also be viewed as read only on the form in Admin.

See also:

Sample usage:

# models.py
from edc_mnsi.model_mixins import MnsiModelMixin
from edc_model import models as edc_models

class Mnsi(
    MnsiModelMixin,
    edc_models.BaseUuidModel,
):
    class Meta(MnsiModelMixin.Meta, edc_models.BaseUuidModel.Meta):
        verbose_name = "Michigan Neuropathy Screening Instrument (MNSI)"
        verbose_name_plural = "Michigan Neuropathy Screening Instrument (MNSI)"
# forms.py
from django import forms
from edc_form_validators import FormValidatorMixin
from edc_mnsi.form_validator import MnsiFormValidator

from .models import Mnsi


class MnsiForm(FormValidatorMixin, forms.ModelForm):

    form_validator_cls = MnsiFormValidator

    class Meta:
        model = Mnsi
        fields = "__all__"
# admin.py
from edc_mnsi.admin import MnsiModelAdminMixin
from edc_mnsi.fieldsets import get_fieldsets

from .forms import MnsiForm

@admin.register(Mnsi, site=admin)
class MnsiAdmin(
    MnsiModelAdminMixin,
    SimpleHistoryAdmin,
):

    form = MnsiForm

    fieldsets = get_fieldsets()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

edc_mnsi-0.1.2-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file edc_mnsi-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: edc_mnsi-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for edc_mnsi-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 acf7a67d0b6cc496ded7a0e54ce9481508cb36366b9098ea80d7d413e2bf9ac5
MD5 f295db28b9809f2fa686a2fc8d12bd56
BLAKE2b-256 6014baef781c0b6ef5c6bf0ee909f9a354c8f3b8e242ba460ccb721363f43b2b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page