Skip to content

copy_image_set

copy_image_set(
    datastore_id: DatastoreId,
    source_image_set_id: ImageSetId,
    copy_image_set_information: CopyImageSetInformation,
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
    force: Optional[bool] = None,
    promote_to_primary: Optional[bool] = None,
) -> CopyImageSetResponse

Copy an image set.

Parameters:

  • datastore_id (DatastoreId) –

    The data store identifier.

  • source_image_set_id (ImageSetId) –

    The source image set identifier.

  • copy_image_set_information (CopyImageSetInformation) –

    Copy image set information.

  • force (Optional[bool], default: None ) –

    Providing this parameter will force completion of the CopyImageSet operation, even if there are inconsistent Patient, Study, and/or Series level metadata elements between the sourceImageSet and destinationImageSet.

  • promote_to_primary (Optional[bool], default: None ) –

    Providing this parameter will configure the CopyImageSet operation to promote the given image set to the primary DICOM hierarchy. If successful, a new primary image set ID will be returned as the destination image set.

Raises:

Source code in docs_src/capo_medical_imaging/_services/medical_imaging.py
def copy_image_set(
    self,
    datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
    source_image_set_id: "capo_medical_imaging.types.image_set_id.ImageSetId",
    copy_image_set_information: "capo_medical_imaging.types.copy_image_set_information.CopyImageSetInformation",
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
    force: Optional[bool] = None,
    promote_to_primary: Optional[bool] = None,
) -> "capo_medical_imaging.types.copy_image_set_response.CopyImageSetResponse":
    """<p>Copy an image set.</p>

    Args:
        datastore_id: <p>The data store identifier.</p>
        source_image_set_id: <p>The source image set identifier.</p>
        copy_image_set_information: <p>Copy image set information.</p>
        force: <p>Providing this parameter will force completion of the <code>CopyImageSet</code> operation, even if there are inconsistent Patient, Study, and/or Series level metadata elements between the <code>sourceImageSet</code> and <code>destinationImageSet</code>.</p>
        promote_to_primary: <p>Providing this parameter will configure the <code>CopyImageSet</code> operation to promote the given image set to the primary DICOM hierarchy. If successful, a new primary image set ID will be returned as the destination image set.</p>

    Raises:
        capo_medical_imaging.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_medical_imaging.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_medical_imaging.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request caused a service quota to be exceeded.</p>
        capo_medical_imaging.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling.</p>
        capo_medical_imaging.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints set by the service.</p>
        capo_medical_imaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medical_imaging.types.copy_image_set_request.CopyImageSetRequest]",
    ) -> OperationResponse[
        "capo_medical_imaging.types.copy_image_set_response.CopyImageSetResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.copy_image_set

        output, http_response = (
            capo_medical_imaging._operations.ahi_gateway_service.copy_image_set.copy_image_set(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_medical_imaging.types.copy_image_set_request.CopyImageSetRequest",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.copy_image_set_request

        return capo_medical_imaging.types.copy_image_set_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CopyImageSet", redact_input=_redact_input),
    )
    input_: capo_medical_imaging.types.copy_image_set_request.CopyImageSetRequest = {
        "datastore_id": datastore_id,
        "source_image_set_id": source_image_set_id,
        "copy_image_set_information": copy_image_set_information,
    }
    if force is not None:
        input_["force"] = force
    if promote_to_primary is not None:
        input_["promote_to_primary"] = promote_to_primary

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output