startFHIRImportJob method

Future<StartFHIRImportJobResponse> startFHIRImportJob({
  1. required String dataAccessRoleArn,
  2. required String datastoreId,
  3. required InputDataConfig inputDataConfig,
  4. required OutputDataConfig jobOutputDataConfig,
  5. String? clientToken,
  6. String? jobName,
  7. ValidationLevel? validationLevel,
})

Start importing bulk FHIR data into an ACTIVE data store. The import job imports FHIR data found in the InputDataConfig object and stores processing results in the JobOutputDataConfig object.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dataAccessRoleArn : The Amazon Resource Name (ARN) that grants access permission to AWS HealthLake.

Parameter datastoreId : The data store identifier.

Parameter inputDataConfig : The input properties for the import job request.

Parameter clientToken : The optional user-provided token used for ensuring API idempotency.

Parameter jobName : The import job name.

Parameter validationLevel : The validation level of the import job.

Implementation

Future<StartFHIRImportJobResponse> startFHIRImportJob({
  required String dataAccessRoleArn,
  required String datastoreId,
  required InputDataConfig inputDataConfig,
  required OutputDataConfig jobOutputDataConfig,
  String? clientToken,
  String? jobName,
  ValidationLevel? validationLevel,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'HealthLake.StartFHIRImportJob'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DataAccessRoleArn': dataAccessRoleArn,
      'DatastoreId': datastoreId,
      'InputDataConfig': inputDataConfig,
      'JobOutputDataConfig': jobOutputDataConfig,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (jobName != null) 'JobName': jobName,
      if (validationLevel != null) 'ValidationLevel': validationLevel.value,
    },
  );

  return StartFHIRImportJobResponse.fromJson(jsonResponse.body);
}