startMedicalScribeJob method
- required String dataAccessRoleArn,
- required Media media,
- required String medicalScribeJobName,
- required String outputBucketName,
- required MedicalScribeSettings settings,
- List<
MedicalScribeChannelDefinition> ? channelDefinitions, - Map<
String, String> ? kMSEncryptionContext, - MedicalScribeContext? medicalScribeContext,
- String? outputEncryptionKMSKeyId,
- List<
Tag> ? tags,
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.
May throw BadRequestException.
May throw ConflictException.
May throw InternalFailureException.
May throw LimitExceededException.
Parameter 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.
Parameter medicalScribeJobName :
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 ConflictException
error.
Parameter 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 DataAccessRoleArn request
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.
Parameter settings :
Makes it possible to control how your Medical Scribe job is processed
using a MedicalScribeSettings object. Specify
ChannelIdentification if ChannelDefinitions are
set. Enabled ShowSpeakerLabels if
ChannelIdentification and ChannelDefinitions are
not set. One and only one of ChannelIdentification and
ShowSpeakerLabels must be set. If
ShowSpeakerLabels is set, MaxSpeakerLabels must
also be set. Use Settings to specify a vocabulary or
vocabulary filter or both using VocabularyName,
VocabularyFilterName. VocabularyFilterMethod
must be specified if VocabularyFilterName is set.
Parameter channelDefinitions :
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
ChannelId of the first ChannelDefinition in the
list to 0 (to indicate the first channel) and
ParticipantRole to CLINICIAN (to indicate that
it's the clinician speaking). Then you would set the
ChannelId of the second ChannelDefinition in the
list to 1 (to indicate the second channel) and
ParticipantRole to PATIENT (to indicate that
it's the patient speaking).
Parameter kMSEncryptionContext :
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.
Parameter medicalScribeContext :
The MedicalScribeContext object that contains contextual
information which is used during clinical note generation to add relevant
context to the note.
Parameter outputEncryptionKMSKeyId :
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
DataAccessRoleArn request parameter (if present) must have
permission to use the specified KMS key.
Parameter tags :
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.
Implementation
Future<StartMedicalScribeJobResponse> startMedicalScribeJob({
required String dataAccessRoleArn,
required Media media,
required String medicalScribeJobName,
required String outputBucketName,
required MedicalScribeSettings settings,
List<MedicalScribeChannelDefinition>? channelDefinitions,
Map<String, String>? kMSEncryptionContext,
MedicalScribeContext? medicalScribeContext,
String? outputEncryptionKMSKeyId,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Transcribe.StartMedicalScribeJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DataAccessRoleArn': dataAccessRoleArn,
'Media': media,
'MedicalScribeJobName': medicalScribeJobName,
'OutputBucketName': outputBucketName,
'Settings': settings,
if (channelDefinitions != null)
'ChannelDefinitions': channelDefinitions,
if (kMSEncryptionContext != null)
'KMSEncryptionContext': kMSEncryptionContext,
if (medicalScribeContext != null)
'MedicalScribeContext': medicalScribeContext,
if (outputEncryptionKMSKeyId != null)
'OutputEncryptionKMSKeyId': outputEncryptionKMSKeyId,
if (tags != null) 'Tags': tags,
},
);
return StartMedicalScribeJobResponse.fromJson(jsonResponse.body);
}