Start improving atlas forms
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
from django import forms
|
||||||
from django.contrib.admin import widgets
|
from django.contrib.admin import widgets
|
||||||
from django.forms import (
|
from django.forms import (
|
||||||
BaseInlineFormSet,
|
BaseInlineFormSet,
|
||||||
@@ -9,6 +10,7 @@ from django.forms import (
|
|||||||
CharField,
|
CharField,
|
||||||
ValidationError,
|
ValidationError,
|
||||||
modelformset_factory,
|
modelformset_factory,
|
||||||
|
CheckboxSelectMultiple
|
||||||
)
|
)
|
||||||
from django.forms import inlineformset_factory
|
from django.forms import inlineformset_factory
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
@@ -25,6 +27,7 @@ from atlas.models import (
|
|||||||
SeriesFinding,
|
SeriesFinding,
|
||||||
Condition,
|
Condition,
|
||||||
Structure,
|
Structure,
|
||||||
|
Subspecialty,
|
||||||
)
|
)
|
||||||
|
|
||||||
from anatomy.models import Modality
|
from anatomy.models import Modality
|
||||||
@@ -315,6 +318,8 @@ class CaseForm(ModelForm):
|
|||||||
"presentation": autocomplete.ModelSelect2Multiple(
|
"presentation": autocomplete.ModelSelect2Multiple(
|
||||||
url="atlas:presentation-autocomplete"
|
url="atlas:presentation-autocomplete"
|
||||||
),
|
),
|
||||||
|
"subspecialty": CheckboxSelectMultiple(),
|
||||||
|
"pathological_process": CheckboxSelectMultiple()
|
||||||
}
|
}
|
||||||
|
|
||||||
def save(self, commit=True):
|
def save(self, commit=True):
|
||||||
|
|||||||
@@ -318,10 +318,13 @@
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
toastr.info(`Unable to automatically set modality: ${modality}`)
|
toastr.info(`Unable to automatically set modality: ${modality}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
to_replace = ["lt", "rt", "contrast", "LT", "RT", "Contrast"]
|
// If the dicom study_description contains multiple values select the first
|
||||||
|
study_description = study_description.split(",")[0].trim();
|
||||||
|
|
||||||
|
to_replace = ["lt", "rt", "contrast", "LT", "RT", "Contrast"];
|
||||||
|
|
||||||
for (let i = 0; i < to_replace.length; i++) {
|
for (let i = 0; i < to_replace.length; i++) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user