Updating image set metadata
Use the UpdateImageSetMetadata
action to update image set metadata in AWS HealthImaging. You can use this asynchronous process
to add, update, and remove image set metadata attributes, which are manifestations of DICOM normalization elements that are created during
import. Using the UpdateImageSetMetadata
action, you can also remove Series and SOP
Instances to keep image sets in sync with external systems and to de-identify image set
metadata. For more information, see UpdateImageSetMetadata
in the AWS HealthImaging API
Reference.
Note
Real-world DICOM imports require updating, adding, and removing attributes from the image set metadata. Keep the following points in mind when updating image set metadata:
-
Updating image set metadata creates a new version in the image set history. For more information, see Listing image set versions. To revert to a previous image set version ID, use the optional
revertToVersionId
parameter. -
Updating image set metadata is an asynchronous process. Therefore,
imageSetState
andimageSetWorkflowStatus
response elements are available to provide the respective state and status of an image set undergoing update. You cannot perform other write operations on aLOCKED
image set. -
If the
UpdateImageSetMetadata
action is not successful, call and review themessage
response element to seecommon errors
. -
DICOM element constraints are applied to metadata updates. The
force
request parameter allows you to update elements of non-primary image sets in cases where you want to override DICOM metadata constraints. -
The Patient and Series level metadata elements can not be updated for primary image sets. The UpdateImageSet will not support --
force
to update StudyInstanceUID, SeriesInstanceUID, and SOPInstanceUID for primary image sets. -
Set the
force
request parameter to force completion of theUpdateImageSetMetadata
action on non-primary image sets. Setting this parameter allows the following updates to an image set:-
Updating the
Tag.StudyInstanceUID
,Tag.SeriesInstanceUID
,Tag.SOPInstanceUID
, andTag.StudyID
attributes -
Adding, removing, or updating instance level private DICOM data elements
-
-
The action of promoting an image set to primary will change the image set ID.
The following diagram represents image set metadata being updated in HealthImaging.

To update image set metadata
Choose a tab based on your access preference to AWS HealthImaging.
Example availability
Can't find what you need? Request a code example using the Provide feedback link on the right sidebar of this page.
You can move SOP Instances between image sets, resolve metadata element conflicts, and
add or remove instances from the primary image sets using the CopyImageSet
, UpdateImageSetMetadata
,
and DeleteImageSet
APIs.
You can remove an image set from the primary collection with the DeleteImageSet
action.
To update the metadata of a primary image set
-
Use the CopyImageSet action to create a non-primary image set that is a copy of the primary image set you want to modify. Let's say this returns
103785414bc2c89330f7ce51bbd13f7a
as the non-primary image set ID.aws medical-imaging copy-image-set --datastore-id a8d19e7875e1532d9b5652f6b25e12c9 --source-image-set-id 0778b83b36eced0b76752bfe32192fb7 --copy-image-set-information '{"sourceImageSet": {"latestVersionId": "1" }}' --region us-west-2
-
Use the UpdateImageSetMetadata action to make changes on the non-primary image set
(103785414bc2c89330f7ce51bbd13f7a)
. For example, changing the PatientID.aws medical-imaging update-image-set-metadata \ --region us-west-2 \ --datastore-id a8d19e7875e1532d9b5652f6b25e12c9 \ --image-set-id 103785414bc2c89330f7ce51bbd13f7a \ --latest-version-id 1 \ --cli-binary-format raw-in-base64-out \ --update-image-set-metadata-updates '{ "DICOMUpdates": { "updatableAttributes": "{\"SchemaVersion\":1.1,\"Patient\": {\"DICOM\":{\"PatientID\":\"1234\"}}}" } }'
-
Delete the primary image set that you are modifying.
aws medical-imaging delete-image-set --datastore- id a8d19e7875e1532d9b5652f6b25e12c9 --image-set- id 0778b83b36eced0b76752bfe32192fb7
-
Use the CopyImageSet action with the argument
--promoteToPrimary
to add the updated image set to the primary collection.aws medical-imaging copy-image-set --datastore- id a8d19e7875e1532d9b5652f6b25e12c9 --source-image-set- id 103785414bc2c89330f7ce51bbd13f7a --copy-image-set-information '{"sourceImageSet": {"latestVersionId": "2" }}' --region us-west-2 -- promote-to-primary
-
Delete the non-primary image set.
aws medical-imaging delete-image-set --datastore- id a8d19e7875e1532d9b5652f6b25e12c9 --image-set- id 103785414bc2c89330f7ce51bbd13f7a
To make a non-primary image set primary
-
Use the UpdateImageSetMetadata action to resolve conflicts with existing Primary image sets.
aws medical-imaging update-image-set-metadata \ --region us-west-2 \ --datastore-id a8d19e7875e1532d9b5652f6b25e12c9 \ --image-set-id 103785414bc2c89330f7ce51bbd13f7a \ --latest-version-id 1 \ --cli-binary-format raw-in-base64-out \ --update-image-set-metadata-updates '{ "DICOMUpdates": { "updatableAttributes": "{\"SchemaVersion\":1.1,\"Patient\":{\"DICOM\": {\"PatientID\":\"1234\"}}}" } }'
-
When the conflicts are resolved, use the CopyImageSet action with the argument
--promoteToPrimary
to add the image set to the primary image set collection.aws medical-imaging copy-image-set --datastore- id a8d19e7875e1532d9b5652f6b25e12c9 --source-image-set- id 103785414bc2c89330f7ce51bbd13f7a --copy-image-set-information '{"sourceImageSet": {"latestVersionId": "2" }}' --region us-west-2 -- promote-to-primary
-
After confirming that the CopyImageSet action was successful, delete the source non-primary image set.
aws medical-imaging delete-image-set --datastore- id a8d19e7875e1532d9b5652f6b25e12c9 --image-set- id 103785414bc2c89330f7ce51bbd13f7a