fix: Inconsistencies and update the style setting on load for embedded styles from codingValues (#4599)

This commit is contained in:
Bill Wallace authored and GitHub committed 2025-01-09 09:28:02 -05:00
1 parent 3c848c6d34
commit e0088ec918
4 files changed
+58 -5

No files matched your search

@@ -208,7 +208,11 @@ export default function hydrateStructuredReport(
annotation.data.label = getLabelFromDCMJSImportedToolData(toolData);
annotation.data.finding = convertCode(codingValues, toolData.finding?.[0]);
annotation.data.findingSites = convertSites(codingValues, toolData.findingSites);
annotation.data.site = annotation.data.findingSites?.[0];
annotation.data.findingSites?.forEach(site => {
if (site.type) {
annotation.data[site.type] = site;
}
});
const matchingMapping = mappings.find(m => m.annotationType === annotationType);
@@ -220,6 +224,11 @@ export default function hydrateStructuredReport(
dataSource
);
commandsManager.runCommand('updateMeasurement', {
uid: newAnnotationUID,
code: annotation.data.finding,
});
if (disableEditing) {
const addedAnnotation = annotationManager.getAnnotation(newAnnotationUID);
locking.setAnnotationLocked(addedAnnotation, true);