Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled writing of location and description in DICOM SR file #228

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
7 changes: 7 additions & 0 deletions src/adapters/Cornerstone/MeasurementReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ function getTID300ContentItem(

const TID300Measurement = new toolClass.TID300Representation(args);

if (tool.location) {
TID300Measurement.props.location = tool.location;
}
if (tool.description) {
TID300Measurement.props.description = tool.description;
}

return TID300Measurement;
}

Expand Down
46 changes: 46 additions & 0 deletions src/utilities/TID300/TID300Measurement.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export default class TID300Measurement {
...this.getTrackingGroups(),
...this.getFindingGroup(),
...this.getFindingSiteGroups(),
...this.getLocation(),
...this.getDescription(),
...contentSequenceEntries
];
}
Expand Down Expand Up @@ -94,4 +96,48 @@ export default class TID300Measurement {
};
});
}

getLocation() {
let location = this.props.location;

console.log(this.props);

if (!location) {
return [];
}

return [
{
RelationshipType: "HAS OBS CONTEXT",
ValueType: "TEXT",
ConceptNameCodeSequence: {
CodeValue: "112041",
CodingSchemeDesignator: "DCM",
CodeMeaning: "Location"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a link to the definition of this code?

From this document it seems that this code means "Target Lesion Complete Response".

http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_D.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to use "121226 Approximate spatial location"

"The approximate geometric location on an image or in space where an entity is located."

},
TextValue: location
}
];
}

getDescription() {
let description = this.props.description;

if (!description) {
return [];
}

return [
{
RelationshipType: "HAS OBS CONTEXT",
ValueType: "TEXT",
ConceptNameCodeSequence: {
CodeValue: "112042",
CodingSchemeDesignator: "DCM",
CodeMeaning: "Description"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly this one appears to mean "Target Lesion Partial Response"

},
TextValue: description
}
];
}
}