.
This commit is contained in:
@@ -333,9 +333,59 @@
|
||||
var study_description = dataSet.string('x00081030').toLowerCase();
|
||||
var accession_number = dataSet.string('x00080050').toLowerCase();
|
||||
var patient_id = dataSet.string('x00100020').toLowerCase();
|
||||
var modality = dataSet.string('x00080060');
|
||||
var projection = dataSet.string('x00185101');
|
||||
var plate = dataSet.string('x00180022');
|
||||
console.log("STUDY", study_description);
|
||||
console.log("acc", accession_number);
|
||||
console.log("pid", patient_id);
|
||||
console.log("projection", projection);
|
||||
console.log("plane", plane);
|
||||
|
||||
|
||||
modality_map = {
|
||||
"DX": "Radiograph",
|
||||
"CR": "Radiograph",
|
||||
"CT": "CT",
|
||||
"MR": "MR",
|
||||
"RF": "Fluroscopy",
|
||||
"US": "Ultrasound",
|
||||
}
|
||||
|
||||
if (modality in modality_map) {
|
||||
let modality_select_object = document.getElementsByName("modality")[0]
|
||||
const $options = Array.from(modality_select_object.options);
|
||||
const optionToSelect = $options.find(item => item.text === modality_map[modality]);
|
||||
optionToSelect.selected = true;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
toastr.info(`Unable to automatically set modality: ${modality}`)
|
||||
}
|
||||
|
||||
to_replace = ["lt", "rt", "constrast"]
|
||||
|
||||
for (let i = 0; i < to_replace.length; i++) {
|
||||
|
||||
study_description = study_description.replace(to_replace[i], "");
|
||||
}
|
||||
|
||||
let select_object = document.getElementsByName("examination")[0]
|
||||
|
||||
if (select_object.value == "") {
|
||||
$.get(`${select_object.dataset.autocompleteLightUrl}?q=${study_description}`, (data) => {
|
||||
console.log(data)
|
||||
if (data.results.length==1){
|
||||
|
||||
$(select_object).select2("trigger","select", {
|
||||
data: data.results[0]
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
not_anon = false;
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Submit">
|
||||
<button _="on click remove <.form/>">Cancel</button>
|
||||
</form>
|
||||
</form>
|
||||
<button _="on click transition <.form/> opacity to 0 then remove <.form/> then remove me">Cancel</button>
|
||||
Reference in New Issue
Block a user