This commit is contained in:
Ross
2021-10-30 22:36:50 +01:00
parent f4a3cca774
commit d179030881
+34 -3
View File
@@ -38,14 +38,18 @@
$('#id_answers-TOTAL_FORMS').val(parseInt(form_idx) + 1);
}
function input_change () {
function input_change(evt) {
$(this).removeClass("image-ident-warning");
$(this).removeClass("image-ident-ok");
updateFileList();
console.log("input change1");
console.log("input change1", evt);
console.log("input change", this);
ocr(this);
// Check if we have selected a examination type
console.log($("#id_examination_from").val())
}
function updateFileList() {
@@ -332,6 +336,31 @@
}
function extractDicomStudyDescription(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{
// parse byteArray into a DataSet object using the parseDicom library
var dataSet = dicomParser.parseDicom(byteArray);
// dataSet contains the parsed elements. Each element is available via a property
// in the dataSet.elements object. The property name is based on the elements group
// and element in the following format: xggggeeee where gggg is the group number
// and eeee is the element number with lowercase hex characters.
// 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
// has the tag (0020,000D)
var study_description = dataSet.string('x00081030');
}
catch(err)
{
console.log(err);
}
}
</script>
{{ form.media }}
@@ -341,7 +370,9 @@
<a href="{% url 'rapids:rapid_create_defaults' %}">Edit defaults</a>
<p>
<h3>Instructions</h3>
Abnormality, Region and Laterality are used to categorise within the system (they are not used for marking). String answers that match those added below will be used for automatic marking. Multiple images can be added to a question. If the feedback image box is checked they will not be displayed when taking the question.
Abnormality, Region and Laterality are used to categorise within the system (they are not used for marking). String
answers that match those added below will be used for automatic marking. Multiple images can be added to a question. If
the feedback image box is checked they will not be displayed when taking the question.
</p>
<form action="" method="post" enctype="multipart/form-data" id="rapid-form">
{% csrf_token %}