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.3-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: edc_mnsi-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3845ddfadf919ea896448fd4dcb048e9fb52314827fba50f94822723d841aa24
MD5 59583995e3c095721d04c591338fb765
BLAKE2b-256 50977600165b220c30a714e10872ac04ecd5f8caf99f3f10c16a4d234fe3ff7d

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