Fix/sr hydration non tracking (#3080)

* fix:DICOM SR hydration - remove redundancies

feat:Allow save and restore on non-tracking view

* PR comments
This commit is contained in:
Bill Wallace authored and GitHub committed 2022-12-29 10:13:06 -05:00
1 parent ec7cdba901
commit 9a03bde0ae
21 files changed
+466 -73

No files matched your search

@@ -0,0 +1,23 @@
/**
* Extracts the label from the toolData imported from dcmjs. We need to do this
* as dcmjs does not depeend on OHIF/the MeasurementService, it just produces data for cornestoneTools.
* This optional data is available for the consumer to process if they wish to.
* @param {object} toolData The tooldata relating to the
*
* @returns {string} The extracted label.
*/
export default function getLabelFromDCMJSImportedToolData(toolData) {
const { findingSites = [], finding } = toolData;
let freeTextLabel = findingSites.find(
fs => fs.CodeValue === 'CORNERSTONEFREETEXT'
);
if (freeTextLabel) {
return freeTextLabel.CodeMeaning;
}
if (finding && finding.CodeValue === 'CORNERSTONEFREETEXT') {
return finding.CodeMeaning;
}
}