Skip to content

submit_feedback async

submit_feedback(
    domain_id: DomainId,
    artifact_source_id: ArtifactSourceId,
    artifact_type: FeedbackArtifactType,
    signed_artifact_s3_uri: S3Uri,
    *,
    config_overrides: Optional[AsyncConnectHealthClientConfig] = None,
    subscription_id: Optional[SubscriptionId] = None,
    generated_artifact_s3_uri: Optional[S3Uri] = None,
    comments: Optional[FeedbackComments] = None,
    client_token: Optional[IdempotencyToken] = None,
) -> SubmitFeedbackResponse

Submits feedback on a clinical document or a set of medical codes that Amazon Connect Health generated.

Parameters:

  • domain_id (DomainId) –

    The unique identifier of the parent Domain.

  • artifact_source_id (ArtifactSourceId) –

    The identifier of the artifact source. For a clinical document, this is the session ID. For a set of medical codes, this is the medical coding job ID.

  • subscription_id (Optional[SubscriptionId], default: None ) –

    The unique identifier of the Subscription.

  • artifact_type (FeedbackArtifactType) –

    The type of artifact that you submit feedback for. The following values are valid:

    • CLINICAL_DOC is the clinical document generated for an ambient documentation session.

    • MEDICAL_CODES is the set of medical codes generated by a medical coding job.

  • signed_artifact_s3_uri (S3Uri) –

    The Amazon Simple Storage Service (Amazon S3) URI of the final artifact that the clinician signed.

  • generated_artifact_s3_uri (Optional[S3Uri], default: None ) –

    The Amazon S3 URI of the clinical document or set of medical codes that Amazon Connect Health generated.

  • comments (Optional[FeedbackComments], default: None ) –

    Optional comments about the feedback.

  • client_token (Optional[IdempotencyToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

Raises:

Source code in docs_src/capo_connecthealth/_services/async_connect_health.py
async def submit_feedback(
    self,
    domain_id: "capo_connecthealth.types.domain_id.DomainId",
    artifact_source_id: "capo_connecthealth.types.artifact_source_id.ArtifactSourceId",
    artifact_type: "capo_connecthealth.types.feedback_artifact_type.FeedbackArtifactType",
    signed_artifact_s3_uri: "capo_connecthealth.types.s3_uri.S3Uri",
    *,
    config_overrides: Optional[AsyncConnectHealthClientConfig] = None,
    subscription_id: Optional[
        "capo_connecthealth.types.subscription_id.SubscriptionId"
    ] = None,
    generated_artifact_s3_uri: Optional[
        "capo_connecthealth.types.s3_uri.S3Uri"
    ] = None,
    comments: Optional[
        "capo_connecthealth.types.feedback_comments.FeedbackComments"
    ] = None,
    client_token: Optional[
        "capo_connecthealth.types.idempotency_token.IdempotencyToken"
    ] = None,
) -> "capo_connecthealth.types.submit_feedback_response.SubmitFeedbackResponse":
    """<p>Submits feedback on a clinical document or a set of medical codes that Amazon Connect Health generated.</p>

    Args:
        domain_id: <p>The unique identifier of the parent Domain.</p>
        artifact_source_id: <p>The identifier of the artifact source. For a clinical document, this is the session ID. For a set of medical codes, this is the medical coding job ID.</p>
        subscription_id: <p>The unique identifier of the Subscription.</p>
        artifact_type: <p>The type of artifact that you submit feedback for. The following values are valid:</p> <ul> <li> <p>CLINICAL_DOC is the clinical document generated for an ambient documentation session.</p> </li> <li> <p>MEDICAL_CODES is the set of medical codes generated by a medical coding job.</p> </li> </ul>
        signed_artifact_s3_uri: <p>The Amazon Simple Storage Service (Amazon S3) URI of the final artifact that the clinician signed.</p>
        generated_artifact_s3_uri: <p>The Amazon S3 URI of the clinical document or set of medical codes that Amazon Connect Health generated.</p>
        comments: <p>Optional comments about the feedback.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.</p>

    Raises:
        capo_connecthealth.errors.access_denied_exception.AccessDeniedException: <p>This error is thrown when the client does not supply proper credentials to the API.</p>
        capo_connecthealth.errors.internal_server_exception.InternalServerException: <p>This error is thrown when a transient error causes our API to fail.</p>
        capo_connecthealth.errors.resource_not_found_exception.ResourceNotFoundException: <p>This error is thrown when the requested resource is not found.</p>
        capo_connecthealth.errors.throttling_exception.ThrottlingException: <p>This error is thrown when the client exceeds the allowed request rate.</p>
        capo_connecthealth.errors.validation_exception.ValidationException: <p>This error is thrown when the client supplies invalid input to the API.</p>
        capo_connecthealth.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connecthealth.types.submit_feedback_request.SubmitFeedbackRequest]",
    ) -> AsyncOperationResponse[
        "capo_connecthealth.types.submit_feedback_response.SubmitFeedbackResponse"
    ]:
        import capo_connecthealth._operations.connect_health.submit_feedback

        (
            output,
            http_response,
        ) = await capo_connecthealth._operations.connect_health.submit_feedback.async_submit_feedback(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_connecthealth.types.submit_feedback_request.SubmitFeedbackRequest",
    ) -> dict[str, Any]:
        import capo_connecthealth.types.submit_feedback_request

        return capo_connecthealth.types.submit_feedback_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("SubmitFeedback", redact_input=_redact_input),
    )
    input_: capo_connecthealth.types.submit_feedback_request.SubmitFeedbackRequest = {
        "domain_id": domain_id,
        "artifact_source_id": artifact_source_id,
        "artifact_type": artifact_type,
        "signed_artifact_s3_uri": signed_artifact_s3_uri,
    }
    if subscription_id is not None:
        input_["subscription_id"] = subscription_id
    if generated_artifact_s3_uri is not None:
        input_["generated_artifact_s3_uri"] = generated_artifact_s3_uri
    if comments is not None:
        input_["comments"] = comments
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output