continue working on case collections
This commit is contained in:
@@ -3,6 +3,7 @@ from django.contrib.admin import widgets
|
||||
from django.forms import (
|
||||
BaseInlineFormSet,
|
||||
Form,
|
||||
HiddenInput,
|
||||
ModelForm,
|
||||
ModelMultipleChoiceField,
|
||||
ModelChoiceField,
|
||||
@@ -22,6 +23,7 @@ from atlas.models import (
|
||||
CidReportAnswer,
|
||||
Differential,
|
||||
Finding,
|
||||
SelfReview,
|
||||
Series,
|
||||
SeriesImage,
|
||||
SeriesFinding,
|
||||
@@ -571,3 +573,18 @@ class AddCollectionToCaseForm(Form):
|
||||
raise ValidationError("Invalid collection")
|
||||
|
||||
return collection_set
|
||||
|
||||
|
||||
class SelfReviewForm(ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = SelfReview
|
||||
fields = ["user_exam", "case", "comments", "findings", "interpretation"]
|
||||
widgets = {"user_exam": HiddenInput(), "case": HiddenInput()}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
user_exam_id = kwargs.pop("user_exam_id")
|
||||
case_id = kwargs.pop("case_id")
|
||||
|
||||
ModelForm.__init__(self, *args, **kwargs)
|
||||
super(SelfReviewForm, self).__init__(*args, **kwargs)
|
||||
Reference in New Issue
Block a user