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.forms import (
|
||||
BaseInlineFormSet,
|
||||
@@ -9,6 +10,7 @@ from django.forms import (
|
||||
CharField,
|
||||
ValidationError,
|
||||
modelformset_factory,
|
||||
CheckboxSelectMultiple
|
||||
)
|
||||
from django.forms import inlineformset_factory
|
||||
from django.shortcuts import get_object_or_404
|
||||
@@ -25,6 +27,7 @@ from atlas.models import (
|
||||
SeriesFinding,
|
||||
Condition,
|
||||
Structure,
|
||||
Subspecialty,
|
||||
)
|
||||
|
||||
from anatomy.models import Modality
|
||||
@@ -315,6 +318,8 @@ class CaseForm(ModelForm):
|
||||
"presentation": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:presentation-autocomplete"
|
||||
),
|
||||
"subspecialty": CheckboxSelectMultiple(),
|
||||
"pathological_process": CheckboxSelectMultiple()
|
||||
}
|
||||
|
||||
def save(self, commit=True):
|
||||
|
||||
@@ -318,10 +318,13 @@
|
||||
|
||||
|
||||
} 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++) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user