/AWS1/IF_TNB=>STARTMEDICALSCRIBEJOB()¶
About StartMedicalScribeJob¶
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.com.rproxy.govskope.cato 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.
Method Signature¶
METHODS /AWS1/IF_TNB~STARTMEDICALSCRIBEJOB
IMPORTING
!IV_MEDICALSCRIBEJOBNAME TYPE /AWS1/TNBTRANSCRIPTIONJOBNAME OPTIONAL
!IO_MEDIA TYPE REF TO /AWS1/CL_TNBMEDIA OPTIONAL
!IV_OUTPUTBUCKETNAME TYPE /AWS1/TNBOUTPUTBUCKETNAME OPTIONAL
!IV_OUTPUTENCRYPTIONKMSKEYID TYPE /AWS1/TNBKMSKEYID OPTIONAL
!IT_KMSENCRYPTIONCONTEXT TYPE /AWS1/CL_TNBKMSENCCONTEXTMAP_W=>TT_KMSENCRYPTIONCONTEXTMAP OPTIONAL
!IV_DATAACCESSROLEARN TYPE /AWS1/TNBDATAACCESSROLEARN OPTIONAL
!IO_SETTINGS TYPE REF TO /AWS1/CL_TNBMEDICALSCRIBESTGS OPTIONAL
!IT_CHANNELDEFINITIONS TYPE /AWS1/CL_TNBMEDICALSCRIBECHA00=>TT_MEDICALSCRIBECHANNELDEFNS OPTIONAL
!IT_TAGS TYPE /AWS1/CL_TNBTAG=>TT_TAGLIST OPTIONAL
!IO_MEDICALSCRIBECONTEXT TYPE REF TO /AWS1/CL_TNBMEDICALSCRIBECTX OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tnbstrtmedicalscrib01
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_medicalscribejobname TYPE /AWS1/TNBTRANSCRIPTIONJOBNAME /AWS1/TNBTRANSCRIPTIONJOBNAME¶
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.
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 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.
iv_dataaccessrolearn TYPE /AWS1/TNBDATAACCESSROLEARN /AWS1/TNBDATAACCESSROLEARN¶
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.
io_settings TYPE REF TO /AWS1/CL_TNBMEDICALSCRIBESTGS /AWS1/CL_TNBMEDICALSCRIBESTGS¶
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.
Optional arguments:¶
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 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.
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.
it_channeldefinitions TYPE /AWS1/CL_TNBMEDICALSCRIBECHA00=>TT_MEDICALSCRIBECHANNELDEFNS TT_MEDICALSCRIBECHANNELDEFNS¶
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).
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 the Medical Scribe job.
To learn more about using tags with Amazon Transcribe, refer to Tagging resources.
io_medicalscribecontext TYPE REF TO /AWS1/CL_TNBMEDICALSCRIBECTX /AWS1/CL_TNBMEDICALSCRIBECTX¶
The
MedicalScribeContextobject that contains contextual information which is used during clinical note generation to add relevant context to the note.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tnbstrtmedicalscrib01 /AWS1/CL_TNBSTRTMEDICALSCRIB01¶
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->startmedicalscribejob(
io_media = new /aws1/cl_tnbmedia(
iv_mediafileuri = |string|
iv_redactedmediafileuri = |string|
)
io_medicalscribecontext = new /aws1/cl_tnbmedicalscribectx( new /aws1/cl_tnbmedicalscribepat00( |string| ) )
io_settings = new /aws1/cl_tnbmedicalscribestgs(
io_clinicalnotegenerations00 = new /aws1/cl_tnbclinicalnotegene00( |string| )
iv_channelidentification = ABAP_TRUE
iv_maxspeakerlabels = 123
iv_showspeakerlabels = ABAP_TRUE
iv_vocabularyfiltermethod = |string|
iv_vocabularyfiltername = |string|
iv_vocabularyname = |string|
)
it_channeldefinitions = VALUE /aws1/cl_tnbmedicalscribecha00=>tt_medicalscribechanneldefns(
(
new /aws1/cl_tnbmedicalscribecha00(
iv_channelid = 123
iv_participantrole = |string|
)
)
)
it_kmsencryptioncontext = VALUE /aws1/cl_tnbkmsenccontextmap_w=>tt_kmsencryptioncontextmap(
(
VALUE /aws1/cl_tnbkmsenccontextmap_w=>ts_kmsenccontextmap_maprow(
value = new /aws1/cl_tnbkmsenccontextmap_w( |string| )
key = |string|
)
)
)
it_tags = VALUE /aws1/cl_tnbtag=>tt_taglist(
(
new /aws1/cl_tnbtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_dataaccessrolearn = |string|
iv_medicalscribejobname = |string|
iv_outputbucketname = |string|
iv_outputencryptionkmskeyid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_medicalscribejob = lo_result->get_medicalscribejob( ).
IF lo_medicalscribejob IS NOT INITIAL.
lv_transcriptionjobname = lo_medicalscribejob->get_medicalscribejobname( ).
lv_medicalscribejobstatus = lo_medicalscribejob->get_medicalscribejobstatus( ).
lv_medicalscribelanguageco = lo_medicalscribejob->get_languagecode( ).
lo_media = lo_medicalscribejob->get_media( ).
IF lo_media IS NOT INITIAL.
lv_uri = lo_media->get_mediafileuri( ).
lv_uri = lo_media->get_redactedmediafileuri( ).
ENDIF.
lo_medicalscribeoutput = lo_medicalscribejob->get_medicalscribeoutput( ).
IF lo_medicalscribeoutput IS NOT INITIAL.
lv_uri = lo_medicalscribeoutput->get_transcriptfileuri( ).
lv_uri = lo_medicalscribeoutput->get_clinicaldocumenturi( ).
ENDIF.
lv_datetime = lo_medicalscribejob->get_starttime( ).
lv_datetime = lo_medicalscribejob->get_creationtime( ).
lv_datetime = lo_medicalscribejob->get_completiontime( ).
lv_failurereason = lo_medicalscribejob->get_failurereason( ).
lo_medicalscribesettings = lo_medicalscribejob->get_settings( ).
IF lo_medicalscribesettings IS NOT INITIAL.
lv_boolean = lo_medicalscribesettings->get_showspeakerlabels( ).
lv_maxspeakers = lo_medicalscribesettings->get_maxspeakerlabels( ).
lv_boolean = lo_medicalscribesettings->get_channelidentification( ).
lv_vocabularyname = lo_medicalscribesettings->get_vocabularyname( ).
lv_vocabularyfiltername = lo_medicalscribesettings->get_vocabularyfiltername( ).
lv_vocabularyfiltermethod = lo_medicalscribesettings->get_vocabularyfiltermethod( ).
lo_clinicalnotegenerations = lo_medicalscribesettings->get_clinicalnotegeneration00( ).
IF lo_clinicalnotegenerations IS NOT INITIAL.
lv_medicalscribenotetempla = lo_clinicalnotegenerations->get_notetemplate( ).
ENDIF.
ENDIF.
lv_dataaccessrolearn = lo_medicalscribejob->get_dataaccessrolearn( ).
LOOP AT lo_medicalscribejob->get_channeldefinitions( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_medicalscribechannelid = lo_row_1->get_channelid( ).
lv_medicalscribeparticipan = lo_row_1->get_participantrole( ).
ENDIF.
ENDLOOP.
lv_boolean = lo_medicalscribejob->get_medicalscribectxprovided( ).
LOOP AT lo_medicalscribejob->get_tags( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_tagkey = lo_row_3->get_key( ).
lv_tagvalue = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.