')
.text(tags[i].Name + ': ')
.append($('').text(v)));
}
}
}
function FormatPatient(patient, link, isReverse)
{
var node = $(' ').append($('')
.text('Status: ')
.append($('').text(series.Status))));
FormatMainDicomTags(node, series.MainDicomTags, [
SERIES_DESCRIPTION,
SERIES_TIME,
MANUFACTURER,
IMAGES_IN_ACQUISITION,
SERIES_DATE,
IMAGE_ORIENTATION_PATIENT
]);
return CompleteFormatting(node, link, isReverse, c);
}
function FormatInstance(instance, link, isReverse)
{
var node = $('').text(GetMainDicomTag(patient.MainDicomTags, PATIENT_NAME)));
FormatMainDicomTags(node, patient.MainDicomTags, [
PATIENT_NAME
//, OTHER_PATIENT_IDS
]);
return CompleteFormatting(node, link, isReverse, patient.Studies.length);
}
function FormatStudy(study, link, isReverse, includePatient)
{
var label;
var node;
if (includePatient) {
label = study.Label;
} else {
label = GetMainDicomTag(study.MainDicomTags, STUDY_DESCRIPTION);
}
node = $('
').text(label));
if (includePatient) {
FormatMainDicomTags(node, study.PatientMainDicomTags, [
PATIENT_NAME
]);
}
FormatMainDicomTags(node, study.MainDicomTags, [
STUDY_DESCRIPTION,
STUDY_TIME
]);
return CompleteFormatting(node, link, isReverse, study.Series.length);
}
function FormatSeries(series, link, isReverse)
{
var c;
var node;
if (series.ExpectedNumberOfInstances == null ||
series.Instances.length == series.ExpectedNumberOfInstances)
{
c = series.Instances.length;
}
else
{
c = series.Instances.length + '/' + series.ExpectedNumberOfInstances;
}
node = $('
').text(GetMainDicomTag(series.MainDicomTags, SERIES_DESCRIPTION)))
.append($('
').text('Instance: ' + instance.IndexInSeries));
FormatMainDicomTags(node, instance.MainDicomTags, [
ACQUISITION_NUMBER,
INSTANCE_NUMBER,
INSTANCE_CREATION_DATE,
INSTANCE_CREATION_TIME,
]);
return CompleteFormatting(node, link, isReverse);
}
$('[data-role="page"]').live('pagebeforeshow', function() {
$.ajax({
url: '../system',
dataType: 'json',
async: false,
cache: false,
success: function(s) {
if (s.Name != "") {
$('.orthanc-name').empty();
$('.orthanc-name').append($('')
.addClass('ui-link')
.attr('href', 'explorer.html')
.text(s.Name)
.append(' » '));
}
// New in Orthanc 1.5.8
if ('IsHttpServerSecure' in s &&
!s.IsHttpServerSecure) {
$('.warning-insecure').show();
} else {
$('.warning-insecure').hide();
}
// New in Orthanc 1.12.0
if ('HasLabels' in s &&
s.HasLabels) {
$('#lookup-study-labels-div').show();
} else {
$('#lookup-study-labels-div').hide();
}
}
});
});
$('#lookup').live('pagebeforeshow', function() {
// NB: "GenerateDicomDate()" is defined in "query-retrieve.js"
var target = $('#lookup-study-date');
$('option', target).remove();
target.append($('