This commit is contained in:
Ross
2021-11-01 18:35:34 +00:00
parent b1214eba07
commit ee8ae0f6d5
+9 -7
View File
@@ -33,7 +33,7 @@
function getUnusedInputs(inputs) {
new_inputs = [];
for (let i = 0; i < inputs.length; i++) {
input = inputs.get(i);
input = inputs.get(i);
if (!input.value) {
new_inputs.push(input);
@@ -458,14 +458,16 @@
console.log("STUDY", study_description);
// try to match with a study description
option = $(`#id_examination_from option[title*='${study_description}' i]`);
if ($(`#id_examination_from option`).length < 1) {
option = $(`#id_examination_from option[title*='${study_description}' i]`);
if (option.length) {
option.appendTo($("#id_examination_to"));
toastr.success(`Examination set to ${option.attr('title')} from dicom data`);
} else {
toastr.warning(`Unable to set examination ${study_description} from dicom data (it needs creating)`);
if (option.length) {
option.appendTo($("#id_examination_to"));
toastr.success(`Examination set to ${option.attr('title')} from dicom data`);
} else {
toastr.warning(`Unable to set examination ${study_description} from dicom data (it needs creating)`);
}
}
}