edc-blood-results

Simple blood result data collection format


Keywords
django, edc, blood, results
Licenses
xpp/MIT-feh
Install
pip install edc-blood-results==0.1.17

Documentation

pypi actions codecov downloads

edc-lab-results

Simple blood result data collection format for django models

In this design
  • a specimen requisition for a panel is completed first (SubjectRequisition)
  • result is received and entered into a result form
  • if a result is admnormal or gradable, an ActionItem is created.

Building the Model

Below we create a model class with BloodResultsModelMixin. On the class we specify the lab_panel and limit the FK the requisitions of this panel using limit_choices_to.

The above example has no fields for results, so let's add some model mixins, one for each result item.

If an ActionItem is to be created because of an abnormal or reportable result item, add the ActionItem.

Building the ModeForm class

The ModelForm class just needs the Model class and the panel. In this case BloodResultsFbc and fbc_panel.

Building the ModelAdmin class

The ModelAdmin class needs the Model class, ModelForm class and the panel.

The SubjectRequistion ModelAdmin class

When using autocomplete for the subject requsition FK on the result form ModelAdmin class, the subject requsition model admin class needs to filter the search results passed to the autocomplete control.

If all result models are prefixed with "bloodresult", you can filter on the path name like this: