/AWS1/IF_TNB=>STARTMEDICALTRANSCRIPTIONJOB()¶
About StartMedicalTranscriptionJob¶
Transcribes the audio from a medical dictation or conversation and applies any additional Request Parameters you choose to include in your request.
In addition to many standard transcription features, Amazon Transcribe Medical provides you with a robust medical vocabulary and, optionally, content identification, which adds flags to personal health information (PHI). To learn more about these features, refer to How Amazon Transcribe Medical works.
To make a StartMedicalTranscriptionJob 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:
-
region: The Amazon Web Services Region where you are making your request. For a list of Amazon Web Services Regions supported with Amazon Transcribe, refer to Amazon Transcribe endpoints and quotas. -
MedicalTranscriptionJobName: A custom name you create for your transcription job that is unique within your Amazon Web Services account. -
Media(MediaFileUri): The Amazon S3 location of your media file. -
LanguageCode: This must been-US. -
OutputBucketName: The Amazon S3 bucket where you want your transcript stored. If you want your output stored in a sub-folder of this bucket, you must also includeOutputKey. -
Specialty: This must bePRIMARYCARE. -
Type: Choose whether your audio is a conversation or a dictation.
Method Signature¶
METHODS /AWS1/IF_TNB~STARTMEDICALTRANSCRIPTIONJOB
IMPORTING
!IV_MEDICALTRANSCRIPTIONJOB00 TYPE /AWS1/TNBTRANSCRIPTIONJOBNAME OPTIONAL
!IV_LANGUAGECODE TYPE /AWS1/TNBLANGUAGECODE OPTIONAL
!IV_MEDIASAMPLERATEHERTZ TYPE /AWS1/TNBMEDICALMEDIASAMPLER00 OPTIONAL
!IV_MEDIAFORMAT TYPE /AWS1/TNBMEDIAFORMAT OPTIONAL
!IO_MEDIA TYPE REF TO /AWS1/CL_TNBMEDIA OPTIONAL
!IV_OUTPUTBUCKETNAME TYPE /AWS1/TNBOUTPUTBUCKETNAME OPTIONAL
!IV_OUTPUTKEY TYPE /AWS1/TNBOUTPUTKEY OPTIONAL
!IV_OUTPUTENCRYPTIONKMSKEYID TYPE /AWS1/TNBKMSKEYID OPTIONAL
!IT_KMSENCRYPTIONCONTEXT TYPE /AWS1/CL_TNBKMSENCCONTEXTMAP_W=>TT_KMSENCRYPTIONCONTEXTMAP OPTIONAL
!IO_SETTINGS TYPE REF TO /AWS1/CL_TNBMEDICALTRANSCRIP01 OPTIONAL
!IV_CONTENTIDENTIFICATIONTYPE TYPE /AWS1/TNBMEDICALCONTIDENTIFI00 OPTIONAL
!IV_SPECIALTY TYPE /AWS1/TNBSPECIALTY OPTIONAL
!IV_TYPE TYPE /AWS1/TNBTYPE OPTIONAL
!IT_TAGS TYPE /AWS1/CL_TNBTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tnbstrtmedicaltrans01
RAISING
/AWS1/CX_TNBBADREQUESTEX
/AWS1/CX_TNBCONFLICTEXCEPTION
/AWS1/CX_TNBINTERNALFAILUREEX
/AWS1/CX_TNBLIMITEXCEEDEDEX
/AWS1/CX_TNBCLIENTEXC
/AWS1/CX_TNBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_medicaltranscriptionjob00 TYPE /AWS1/TNBTRANSCRIPTIONJOBNAME /AWS1/TNBTRANSCRIPTIONJOBNAME¶
A unique name, chosen by you, for your medical transcription job. The name that you specify is also used as the default name of your transcription output file. If you want to specify a different name for your transcription output, use the
OutputKeyparameter.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.
iv_languagecode TYPE /AWS1/TNBLANGUAGECODE /AWS1/TNBLANGUAGECODE¶
The language code that represents the language spoken in the input media file. US English (
en-US) is the only valid value for medical transcription jobs. Any other value you enter for language code results in aBadRequestExceptionerror.
io_media TYPE REF TO /AWS1/CL_TNBMEDIA /AWS1/CL_TNBMEDIA¶
Media
iv_outputbucketname TYPE /AWS1/TNBOUTPUTBUCKETNAME /AWS1/TNBOUTPUTBUCKETNAME¶
The name of the Amazon S3 bucket where you want your medical transcription output stored. Do not include the
S3://prefix of the specified bucket.If you want your output to go to a sub-folder of this bucket, specify it using the
OutputKeyparameter;OutputBucketNameonly accepts the name of a bucket.For example, if you want your output stored in
S3://DOC-EXAMPLE-BUCKET, setOutputBucketNametoDOC-EXAMPLE-BUCKET. However, if you want your output stored inS3://DOC-EXAMPLE-BUCKET/test-files/, setOutputBucketNametoDOC-EXAMPLE-BUCKETandOutputKeytotest-files/.Note that Amazon Transcribe 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.
iv_specialty TYPE /AWS1/TNBSPECIALTY /AWS1/TNBSPECIALTY¶
Specify the predominant medical specialty represented in your media. For batch transcriptions,
PRIMARYCAREis the only valid value. If you require additional specialties, refer to .
iv_type TYPE /AWS1/TNBTYPE /AWS1/TNBTYPE¶
Specify whether your input media contains only one person (
DICTATION) or contains a conversation between two people (CONVERSATION).For example,
DICTATIONcould be used for a medical professional wanting to transcribe voice memos;CONVERSATIONcould be used for transcribing the doctor-patient dialogue during the patient's office visit.
Optional arguments:¶
iv_mediasampleratehertz TYPE /AWS1/TNBMEDICALMEDIASAMPLER00 /AWS1/TNBMEDICALMEDIASAMPLER00¶
The sample rate, in hertz, of the audio track in your input media file.
If you do not specify the media sample rate, Amazon Transcribe Medical determines it for you. If you specify the sample rate, it must match the rate detected by Amazon Transcribe Medical; if there's a mismatch between the value that you specify and the value detected, your job fails. Therefore, in most cases, it's advised to omit
MediaSampleRateHertzand let Amazon Transcribe Medical determine the sample rate.
iv_mediaformat TYPE /AWS1/TNBMEDIAFORMAT /AWS1/TNBMEDIAFORMAT¶
Specify the format of your input media file.
iv_outputkey TYPE /AWS1/TNBOUTPUTKEY /AWS1/TNBOUTPUTKEY¶
Use in combination with
OutputBucketNameto specify the output location of your transcript and, optionally, a unique name for your output file. The default name for your transcription output is the same as the name you specified for your medical transcription job (MedicalTranscriptionJobName).Here are some examples of how you can use
OutputKey:
If you specify 'DOC-EXAMPLE-BUCKET' as the
OutputBucketNameand 'my-transcript.json' as theOutputKey, your transcription output path iss3://DOC-EXAMPLE-BUCKET/my-transcript.json.If you specify 'my-first-transcription' as the
MedicalTranscriptionJobName, 'DOC-EXAMPLE-BUCKET' as theOutputBucketName, and 'my-transcript' as theOutputKey, your transcription output path iss3://DOC-EXAMPLE-BUCKET/my-transcript/my-first-transcription.json.If you specify 'DOC-EXAMPLE-BUCKET' as the
OutputBucketNameand 'test-files/my-transcript.json' as theOutputKey, your transcription output path iss3://DOC-EXAMPLE-BUCKET/test-files/my-transcript.json.If you specify 'my-first-transcription' as the
MedicalTranscriptionJobName, 'DOC-EXAMPLE-BUCKET' as theOutputBucketName, and 'test-files/my-transcript' as theOutputKey, your transcription output path iss3://DOC-EXAMPLE-BUCKET/test-files/my-transcript/my-first-transcription.json.If you specify the name of an Amazon S3 bucket sub-folder that doesn't exist, one is created for you.
iv_outputencryptionkmskeyid TYPE /AWS1/TNBKMSKEYID /AWS1/TNBKMSKEYID¶
The Amazon Resource Name (ARN) of a KMS key that you want to use to encrypt your medical transcription 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.
it_kmsencryptioncontext TYPE /AWS1/CL_TNBKMSENCCONTEXTMAP_W=>TT_KMSENCRYPTIONCONTEXTMAP TT_KMSENCRYPTIONCONTEXTMAP¶
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.
io_settings TYPE REF TO /AWS1/CL_TNBMEDICALTRANSCRIP01 /AWS1/CL_TNBMEDICALTRANSCRIP01¶
Specify additional optional settings in your request, including channel identification, alternative transcriptions, and speaker partitioning. You can use that to apply custom vocabularies to your transcription job.
iv_contentidentificationtype TYPE /AWS1/TNBMEDICALCONTIDENTIFI00 /AWS1/TNBMEDICALCONTIDENTIFI00¶
Labels all personal health information (PHI) identified in your transcript. For more information, see Identifying personal health information (PHI) in a transcription.
it_tags TYPE /AWS1/CL_TNBTAG=>TT_TAGLIST TT_TAGLIST¶
Adds one or more custom tags, each in the form of a key:value pair, to a new medical transcription job at the time you start this new job.
To learn more about using tags with Amazon Transcribe, refer to Tagging resources.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tnbstrtmedicaltrans01 /AWS1/CL_TNBSTRTMEDICALTRANS01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->startmedicaltranscriptionjob(
io_media = new /aws1/cl_tnbmedia(
iv_mediafileuri = |string|
iv_redactedmediafileuri = |string|
)
io_settings = new /aws1/cl_tnbmedicaltranscrip01(
iv_channelidentification = ABAP_TRUE
iv_maxalternatives = 123
iv_maxspeakerlabels = 123
iv_showalternatives = ABAP_TRUE
iv_showspeakerlabels = ABAP_TRUE
iv_vocabularyname = |string|
)
it_kmsencryptioncontext = VALUE /aws1/cl_tnbkmsenccontextmap_w=>tt_kmsencryptioncontextmap(
(
VALUE /aws1/cl_tnbkmsenccontextmap_w=>ts_kmsenccontextmap_maprow(
key = |string|
value = new /aws1/cl_tnbkmsenccontextmap_w( |string| )
)
)
)
it_tags = VALUE /aws1/cl_tnbtag=>tt_taglist(
(
new /aws1/cl_tnbtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_contentidentificationtype = |string|
iv_languagecode = |string|
iv_mediaformat = |string|
iv_mediasampleratehertz = 123
iv_medicaltranscriptionjob00 = |string|
iv_outputbucketname = |string|
iv_outputencryptionkmskeyid = |string|
iv_outputkey = |string|
iv_specialty = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_medicaltranscriptionjob = lo_result->get_medicaltranscriptionjob( ).
IF lo_medicaltranscriptionjob IS NOT INITIAL.
lv_transcriptionjobname = lo_medicaltranscriptionjob->get_medicaltranscriptionjo00( ).
lv_transcriptionjobstatus = lo_medicaltranscriptionjob->get_transcriptionjobstatus( ).
lv_languagecode = lo_medicaltranscriptionjob->get_languagecode( ).
lv_medicalmediasamplerateh = lo_medicaltranscriptionjob->get_mediasampleratehertz( ).
lv_mediaformat = lo_medicaltranscriptionjob->get_mediaformat( ).
lo_media = lo_medicaltranscriptionjob->get_media( ).
IF lo_media IS NOT INITIAL.
lv_uri = lo_media->get_mediafileuri( ).
lv_uri = lo_media->get_redactedmediafileuri( ).
ENDIF.
lo_medicaltranscript = lo_medicaltranscriptionjob->get_transcript( ).
IF lo_medicaltranscript IS NOT INITIAL.
lv_uri = lo_medicaltranscript->get_transcriptfileuri( ).
ENDIF.
lv_datetime = lo_medicaltranscriptionjob->get_starttime( ).
lv_datetime = lo_medicaltranscriptionjob->get_creationtime( ).
lv_datetime = lo_medicaltranscriptionjob->get_completiontime( ).
lv_failurereason = lo_medicaltranscriptionjob->get_failurereason( ).
lo_medicaltranscriptionset = lo_medicaltranscriptionjob->get_settings( ).
IF lo_medicaltranscriptionset IS NOT INITIAL.
lv_boolean = lo_medicaltranscriptionset->get_showspeakerlabels( ).
lv_maxspeakers = lo_medicaltranscriptionset->get_maxspeakerlabels( ).
lv_boolean = lo_medicaltranscriptionset->get_channelidentification( ).
lv_boolean = lo_medicaltranscriptionset->get_showalternatives( ).
lv_maxalternatives = lo_medicaltranscriptionset->get_maxalternatives( ).
lv_vocabularyname = lo_medicaltranscriptionset->get_vocabularyname( ).
ENDIF.
lv_medicalcontentidentific = lo_medicaltranscriptionjob->get_contidentificationtype( ).
lv_specialty = lo_medicaltranscriptionjob->get_specialty( ).
lv_type = lo_medicaltranscriptionjob->get_type( ).
LOOP AT lo_medicaltranscriptionjob->get_tags( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_tagkey = lo_row_1->get_key( ).
lv_tagvalue = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.