This commit is contained in:
Ross
2022-04-06 22:36:02 +01:00
parent 9b6db27ea0
commit 719cc4e884
+34 -2
View File
@@ -237,7 +237,7 @@
if ($("#id_examination").find(":selected")[0].dataset.select2Id == "2") {
var byteArray = new Uint8Array(reader.result);
console.log("etrxact", reader)
extractDicomStudyDescription(byteArray);
extractDicomDetails(byteArray);
}
});
}
@@ -313,7 +313,7 @@
}
function extractDicomStudyDescription(byteArray) {
function extractDicomDetails(byteArray) {
// We need to setup a try/catch block because parseDicom will throw an exception
// if you attempt to parse a non dicom part 10 file (or one that is corrupted)
try {
@@ -337,6 +337,38 @@
console.log("acc", accession_number);
console.log("pid", patient_id);
not_anon = false;
site_codes = ["ref", "rk9", "ra9", "rh8", "rbz", "rba"]
for (let i = 0; i < site_codes.length; i++) {
if (study_description.startsWith(site_codes[i])
|| accession_number.startsWith(site_codes[i])
|| patient_id.startsWith(site_codes[i])) {
not_anon = true;
}
}
if (not_anon) {
toastr.warning(`Submiting question... please wait`, '', {
"closeButton": false,
"debug": false,
"newestOnTop": false,
"progressBar": true,
"positionClass": "toast-top-full-width",
"preventDuplicates": false,
"onclick": null,
"showDuration": "0",
"hideDuration": "0",
"timeOut": "0",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
});
}
$.ajax({
url: `{% url 'generic:examination-autocomplete' %}/${encodeURI(study_description)}`,
//context: document.body,