Skip to content

start_fhir_import_job

start_fhir_import_job(
    input_data_config: InputDataConfig,
    job_output_data_config: OutputDataConfig,
    datastore_id: DatastoreId,
    data_access_role_arn: IamRoleArn,
    *,
    config_overrides: Optional[HealthLakeClientConfig] = None,
    job_name: Optional[JobName] = None,
    client_token: Optional[ClientTokenString] = None,
    validation_level: Optional[ValidationLevel] = None,
    profile_id: Optional[BoundedLengthString] = None,
    input_format: Optional[BoundedLengthString] = None,
    drift_detection_enabled: Optional[HealthLakeBoolean] = None,
    provenance_enabled: Optional[DefaultEnabledBoolean] = None,
) -> StartFHIRImportJobResponse

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.

Parameters:

  • job_name (Optional[JobName], default: None ) –

    The import job name.

  • input_data_config (InputDataConfig) –

    The input properties for the import job request.

  • datastore_id (DatastoreId) –

    The data store identifier.

  • data_access_role_arn (IamRoleArn) –

    The Amazon Resource Name (ARN) that grants access permission to HealthLake.

  • client_token (Optional[ClientTokenString], default: None ) –

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

  • validation_level (Optional[ValidationLevel], default: None ) –

    The validation level of the import job.

  • profile_id (Optional[BoundedLengthString], default: None ) –

    The data transformation profile identifier to use for the import job.

  • input_format (Optional[BoundedLengthString], default: None ) –

    The input format of the data to be imported.

  • drift_detection_enabled (Optional[HealthLakeBoolean], default: None ) –

    Specifies whether to enable drift detection for the import job.

  • provenance_enabled (Optional[DefaultEnabledBoolean], default: None ) –

    Specifies whether to enable provenance for the import job.

Raises:

Source code in docs_src/capo_healthlake/_services/health_lake.py
def start_fhir_import_job(
    self,
    input_data_config: "capo_healthlake.types.input_data_config.InputDataConfig",
    job_output_data_config: "capo_healthlake.types.output_data_config.OutputDataConfig",
    datastore_id: "capo_healthlake.types.datastore_id.DatastoreId",
    data_access_role_arn: "capo_healthlake.types.iam_role_arn.IamRoleArn",
    *,
    config_overrides: Optional[HealthLakeClientConfig] = None,
    job_name: Optional["capo_healthlake.types.job_name.JobName"] = None,
    client_token: Optional[
        "capo_healthlake.types.client_token_string.ClientTokenString"
    ] = None,
    validation_level: Optional[
        "capo_healthlake.types.validation_level.ValidationLevel"
    ] = None,
    profile_id: Optional[
        "capo_healthlake.types.bounded_length_string.BoundedLengthString"
    ] = None,
    input_format: Optional[
        "capo_healthlake.types.bounded_length_string.BoundedLengthString"
    ] = None,
    drift_detection_enabled: Optional[
        "capo_healthlake.types.health_lake_boolean.HealthLakeBoolean"
    ] = None,
    provenance_enabled: Optional[
        "capo_healthlake.types.default_enabled_boolean.DefaultEnabledBoolean"
    ] = None,
) -> "capo_healthlake.types.start_fhir_import_job_response.StartFHIRImportJobResponse":
    """<p>Start importing bulk FHIR data into an ACTIVE data store. The import job imports FHIR data found in the <code>InputDataConfig</code> object and stores processing results in the <code>JobOutputDataConfig</code> object.</p>

    Args:
        job_name: <p>The import job name.</p>
        input_data_config: <p>The input properties for the import job request.</p>
        datastore_id: <p>The data store identifier.</p>
        data_access_role_arn: <p>The Amazon Resource Name (ARN) that grants access permission to HealthLake.</p>
        client_token: <p>The optional user-provided token used for ensuring API idempotency.</p>
        validation_level: <p>The validation level of the import job.</p>
        profile_id: <p>The data transformation profile identifier to use for the import job.</p>
        input_format: <p>The input format of the data to be imported.</p>
        drift_detection_enabled: <p>Specifies whether to enable drift detection for the import job.</p>
        provenance_enabled: <p>Specifies whether to enable provenance for the import job.</p>

    Raises:
        capo_healthlake.errors.access_denied_exception.AccessDeniedException: <p>Access is denied. Your account is not authorized to perform this operation.</p>
        capo_healthlake.errors.failed_dependency_exception.FailedDependencyException: <p>A dependent service failed to fulfill the request.</p>
        capo_healthlake.errors.internal_server_exception.InternalServerException: <p>An unknown internal error occurred in the service.</p>
        capo_healthlake.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested data store was not found.</p>
        capo_healthlake.errors.throttling_exception.ThrottlingException: <p>The user has exceeded their maximum number of allowed calls to the given API. </p>
        capo_healthlake.errors.validation_exception.ValidationException: <p>The user input parameter was invalid.</p>
        capo_healthlake.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_healthlake.types.start_fhir_import_job_request.StartFHIRImportJobRequest]",
    ) -> OperationResponse[
        "capo_healthlake.types.start_fhir_import_job_response.StartFHIRImportJobResponse"
    ]:
        import capo_healthlake._operations.health_lake.start_fhir_import_job

        output, http_response = (
            capo_healthlake._operations.health_lake.start_fhir_import_job.start_fhir_import_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartFHIRImportJob")
    )
    input_: capo_healthlake.types.start_fhir_import_job_request.StartFHIRImportJobRequest = {
        "input_data_config": input_data_config,
        "job_output_data_config": job_output_data_config,
        "datastore_id": datastore_id,
        "data_access_role_arn": data_access_role_arn,
    }
    if job_name is not None:
        input_["job_name"] = job_name
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if validation_level is not None:
        input_["validation_level"] = validation_level
    if profile_id is not None:
        input_["profile_id"] = profile_id
    if input_format is not None:
        input_["input_format"] = input_format
    if drift_detection_enabled is not None:
        input_["drift_detection_enabled"] = drift_detection_enabled
    if provenance_enabled is not None:
        input_["provenance_enabled"] = provenance_enabled

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output