start_medical_scribe_job
¶
start_medical_scribe_job(
medical_scribe_job_name: TranscriptionJobName,
media: Media,
output_bucket_name: OutputBucketName,
data_access_role_arn: DataAccessRoleArn,
settings: MedicalScribeSettings,
*,
config_overrides: Optional[TranscribeClientConfig] = None,
output_encryption_kms_key_id: Optional[KMSKeyId] = None,
kms_encryption_context: Optional[KMSEncryptionContextMap] = None,
channel_definitions: Optional[MedicalScribeChannelDefinitions] = None,
tags: Optional[TagList] = None,
medical_scribe_context: Optional[MedicalScribeContext] = None,
) -> StartMedicalScribeJobResponse
Transcribes patient-clinician conversations and generates clinical notes.
Amazon Web Services HealthScribe automatically provides rich conversation transcripts, identifies speaker roles, classifies dialogues, extracts medical terms, and generates preliminary clinical notes. To learn more about these features, refer to Amazon Web Services HealthScribe.
To make a StartMedicalScribeJob request, you must first upload your media file into an Amazon S3 bucket; you can then specify the Amazon S3 location of the file using the Media parameter.
You must include the following parameters in your StartMedicalTranscriptionJob request:
-
DataAccessRoleArn: The ARN of an IAM role with the these minimum permissions: read permission on input file Amazon S3 bucket specified inMedia, write permission on the Amazon S3 bucket specified inOutputBucketName, and full permissions on the KMS key specified inOutputEncryptionKMSKeyId(if set). The role should also allowtranscribe.amazonaws.comto assume it. -
Media(MediaFileUri): The Amazon S3 location of your media file. -
MedicalScribeJobName: A custom name you create for your MedicalScribe job that is unique within your Amazon Web Services account. -
OutputBucketName: The Amazon S3 bucket where you want your output files stored. -
Settings: AMedicalScribeSettingsobject that must set exactly one ofShowSpeakerLabelsorChannelIdentificationto true. IfShowSpeakerLabelsis true,MaxSpeakerLabelsmust also be set. -
ChannelDefinitions: AMedicalScribeChannelDefinitionsarray should be set if and only if theChannelIdentificationvalue ofSettingsis set to true.
Parameters:
-
medical_scribe_job_name(TranscriptionJobName) –A unique name, chosen by you, for your Medical Scribe job.
This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. If you try to create a new job with the same name as an existing job, you get a
ConflictExceptionerror. -
output_bucket_name(OutputBucketName) –The name of the Amazon S3 bucket where you want your Medical Scribe output stored. Do not include the
S3://prefix of the specified bucket.Note that the role specified in the
DataAccessRoleArnrequest parameter must have permission to use the specified location. You can change Amazon S3 permissions using the Amazon Web Services Management Console. See also Permissions Required for IAM User Roles. -
output_encryption_kms_key_id(Optional[KMSKeyId], default:None) –The Amazon Resource Name (ARN) of a KMS key that you want to use to encrypt your Medical Scribe output.
KMS key ARNs have the format
arn:partition:kms:region:account:key/key-id. For example:arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. For more information, see KMS key ARNs.If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).
Note that the role making the request and the role specified in the
DataAccessRoleArnrequest parameter (if present) must have permission to use the specified KMS key. -
kms_encryption_context(Optional[KMSEncryptionContextMap], default:None) –A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added layer of security for your data. For more information, see KMS encryption context and Asymmetric keys in KMS.
-
data_access_role_arn(DataAccessRoleArn) –The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files, write to the output bucket, and use your KMS key if supplied. If the role that you specify doesn’t have the appropriate permissions your request fails.
IAM role ARNs have the format
arn:partition:iam::account:role/role-name-with-path. For example:arn:aws:iam::111122223333:role/Admin.For more information, see IAM ARNs.
-
settings(MedicalScribeSettings) –Makes it possible to control how your Medical Scribe job is processed using a
MedicalScribeSettingsobject. SpecifyChannelIdentificationifChannelDefinitionsare set. EnabledShowSpeakerLabelsifChannelIdentificationandChannelDefinitionsare not set. One and only one ofChannelIdentificationandShowSpeakerLabelsmust be set. IfShowSpeakerLabelsis set,MaxSpeakerLabelsmust also be set. UseSettingsto specify a vocabulary or vocabulary filter or both usingVocabularyName,VocabularyFilterName.VocabularyFilterMethodmust be specified ifVocabularyFilterNameis set. -
channel_definitions(Optional[MedicalScribeChannelDefinitions], default:None) –Makes it possible to specify which speaker is on which channel. For example, if the clinician is the first participant to speak, you would set
ChannelIdof the firstChannelDefinitionin the list to0(to indicate the first channel) andParticipantRoletoCLINICIAN(to indicate that it's the clinician speaking). Then you would set theChannelIdof the secondChannelDefinitionin the list to1(to indicate the second channel) andParticipantRoletoPATIENT(to indicate that it's the patient speaking). -
tags(Optional[TagList], default:None) –Adds one or more custom tags, each in the form of a key:value pair, to the Medical Scribe job.
To learn more about using tags with Amazon Transcribe, refer to Tagging resources.
-
medical_scribe_context(Optional[MedicalScribeContext], default:None) –The
MedicalScribeContextobject that contains contextual information which is used during clinical note generation to add relevant context to the note.
Raises:
-
BadRequestException–Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as
IN PROGRESS). See the exception message field for more information. -
ConflictException–A resource already exists with this name. Resource names must be unique within an Amazon Web Services account.
-
InternalFailureException–There was an internal error. Check the error message, correct the issue, and try your request again.
-
LimitExceededException–You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transcribe/_services/transcribe.py
2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 | |