fix: application crash if patientName is an object (#1138)

* fix: get adapter store picker to show

* fix: error caused by DICOMWeb "empty object" for patientName

* formatting

* refactor: kill the pills

* Indicate modalities is missing if not provided

* Consistent modality display

* Make sure modalities styles are applied

* revert config
This commit is contained in:
Danny Brown authored and GitHub committed 2019-10-31 14:41:08 -04:00
1 parent b7f315ca47
commit 64cf3b324d
7 files changed
+87 -246

No files matched your search

+9 -5
View File
@@ -1,11 +1,14 @@
export default function getModalities(modality, modalitiesInStudy) {
let modalities = {};
if (modality) {
modalities = modality;
if (!modality && !modalitiesInStudy) {
return {};
}
const modalities = modality || {
vr: 'CS',
Value: [],
};
if (modalitiesInStudy) {
// Find vr in modalities
if (modalities.vr && modalities.vr === modalitiesInStudy.vr) {
for (let i = 0; i < modalitiesInStudy.Value.length; i++) {
const value = modalitiesInStudy.Value[i];
@@ -14,8 +17,9 @@ export default function getModalities(modality, modalitiesInStudy) {
}
}
} else {
modalities = modalitiesInStudy;
return modalitiesInStudy;
}
}
return modalities;
}
@@ -30,7 +30,7 @@ function dateToString(date) {
function getQIDOQueryParams(filter, serverSupportsQIDOIncludeField) {
const commaSeparatedFields = [
'00081030', // Study Description
'00080060', //Modality
'00080060', // Modality
// Add more fields here if you want them in the result
].join(',');