.
This commit is contained in:
@@ -330,18 +330,41 @@
|
|||||||
// To access the data for an element, we need to know its type and its tag.
|
// To access the data for an element, we need to know its type and its tag.
|
||||||
// We will get the sopInstanceUid from the file which is a string and
|
// We will get the sopInstanceUid from the file which is a string and
|
||||||
// has the tag (0020,000D)
|
// has the tag (0020,000D)
|
||||||
var study_description = dataSet.string('x00081030').toLowerCase();
|
var study_description = dataSet.string('x00081030');
|
||||||
var accession_number = dataSet.string('x00080050').toLowerCase();
|
var accession_number = dataSet.string('x00080050').toLowerCase();
|
||||||
var patient_id = dataSet.string('x00100020').toLowerCase();
|
var patient_id = dataSet.string('x00100020').toLowerCase();
|
||||||
var modality = dataSet.string('x00080060');
|
var modality = dataSet.string('x00080060');
|
||||||
var projection = dataSet.string('x00185101');
|
var projection = dataSet.string('x00185101');
|
||||||
var plate = dataSet.string('x00180022');
|
var plane = dataSet.string('x00180022').toLowerCase();
|
||||||
console.log("STUDY", study_description);
|
console.log("STUDY", study_description);
|
||||||
console.log("acc", accession_number);
|
console.log("acc", accession_number);
|
||||||
console.log("pid", patient_id);
|
console.log("pid", patient_id);
|
||||||
console.log("projection", projection);
|
console.log("projection", projection);
|
||||||
console.log("plane", plane);
|
console.log("plane", plane);
|
||||||
|
|
||||||
|
function select_plane(option) {
|
||||||
|
let plane_select_object = document.getElementsByName("plane")[0]
|
||||||
|
const $options = Array.from(plane_select_object.options);
|
||||||
|
const optionToSelect = $options.find(item => item.text === option);
|
||||||
|
optionToSelect.selected = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plane.includes("axial")) {
|
||||||
|
select_plane("axial");
|
||||||
|
} else if (plane.includes("sagittal")) {
|
||||||
|
select_plane("sagittal");
|
||||||
|
} else if (plane.includes("coronal")) {
|
||||||
|
select_plane("coronal");
|
||||||
|
} else if (plane.includes("ap")) {
|
||||||
|
select_plane("AP");
|
||||||
|
} else if (plane.includes("lat") | plane.includes("lateral")) {
|
||||||
|
select_plane("lateral");
|
||||||
|
} else if (plane.includes("pa")) {
|
||||||
|
select_plane("PA");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
modality_map = {
|
modality_map = {
|
||||||
"DX": "Radiograph",
|
"DX": "Radiograph",
|
||||||
@@ -364,7 +387,7 @@
|
|||||||
toastr.info(`Unable to automatically set modality: ${modality}`)
|
toastr.info(`Unable to automatically set modality: ${modality}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
to_replace = ["lt", "rt", "constrast"]
|
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