Getting FHIR export job properties - AWS HealthLake

Getting FHIR export job properties

Use DescribeFHIRExportJob to get export job properties from a HealthLake data store. The following menus provide a procedure for the AWS Management Console and code examples for the AWS CLI and AWS SDKs. For more information, see DescribeFHIRExportJob in the AWS HealthLake API Reference.

Note

HealthLake supports the FHIR R4 specification for health care data exchange. Therefore, all health data is exported in FHIR R4 format.

To describe a FHIR export job

Choose a menu based on your access preference to AWS HealthLake.

CLI
AWS CLI

To describe a FHIR export job

The following describe-fhir-export-job example shows how to find the properties of a FHIR export job in Amazon HealthLake.

aws healthlake describe-fhir-export-job \ --datastore-id (Datastore ID) \ --job-id 9b9a51943afaedd0a8c0c26c49135a31

Output:

{ "ExportJobProperties": { "DataAccessRoleArn": "arn:aws:iam::(AWS Account ID):role/(Role Name)", "JobStatus": "IN_PROGRESS", "JobId": "9009813e9d69ba7cf79bcb3468780f16", "SubmitTime": 1609175692.715, "OutputDataConfig": { "S3Uri": "s3://(Bucket Name)/(Prefix Name)/59593b2d0367ce252b5e66bf5fd6b574-FHIR_EXPORT-9009813e9d69ba7cf79bcb3468780f16/" }, "DatastoreId": "(Datastore ID)" } }

For more information, see Exporting files from a FHIR Data Store in the Amazon HealthLake Developer Guide.

Python
SDK for Python (Boto3)
@classmethod def from_client(cls) -> "HealthLakeWrapper": """ Creates a HealthLakeWrapper instance with a default AWS HealthLake client. :return: An instance of HealthLakeWrapper initialized with the default HealthLake client. """ health_lake_client = boto3.client("healthlake") return cls(health_lake_client) def describe_fhir_export_job( self, datastore_id: str, job_id: str ) -> dict[str, any]: """ Describes a HealthLake export job. :param datastore_id: The data store ID. :param job_id: The export job ID. :return: The export job description. """ try: response = self.health_lake_client.describe_fhir_export_job( DatastoreId=datastore_id, JobId=job_id ) return response["ExportJobProperties"] except ClientError as err: logger.exception( "Couldn't describe export job with ID %s. Here's why %s", job_id, err.response["Error"]["Message"], ) raise
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

Example availability

Can't find what you need? Request a code example using the Provide feedback link on the right sidebar of this page.

Note

FHIR export job information is not available on the HealthLake Console. Instead, use the AWS CLI with DescribeFHIRExportJob to request export job properties such as JobStatus. For more information, refer to the AWS CLI example on this page.