Getting FHIR import job properties
Use DescribeFHIRImportJob
to get FHIR import job properties. 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 DescribeFHIRImportJob
in the AWS HealthLake API Reference.
To get FHIR import job properties
Choose a menu based on your access preference to AWS HealthLake.
- CLI
-
- AWS CLI
-
To describe a FHIR import job
The following describe-fhir-import-job
example shows how to learn the properties of a FHIR import job using AWS HealthLake.
aws healthlake describe-fhir-import-job \
--datastore-id (Data
store
ID)
\
--job-id c145fbb27b192af392f8ce6e7838e34f
Output:
{
"ImportJobProperties": {
"InputDataConfig": {
"S3Uri": "s3://(Bucket Name)/(Prefix Name)/"
{ "arrayitem2": 2 }
},
"DataAccessRoleArn": "arn:aws:iam::(AWS Account ID):role/(Role Name)",
"JobStatus": "COMPLETED",
"JobId": "c145fbb27b192af392f8ce6e7838e34f",
"SubmitTime": 1606272542.161,
"EndTime": 1606272609.497,
"DatastoreId": "(Data store ID)"
}
}
- 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_import_job(
self, datastore_id: str, job_id: str
) -> dict[str, any]:
"""
Describes a HealthLake import job.
:param datastore_id: The data store ID.
:param job_id: The import job ID.
:return: The import job description.
"""
try:
response = self.health_lake_client.describe_fhir_import_job(
DatastoreId=datastore_id, JobId=job_id
)
return response["ImportJobProperties"]
except ClientError as err:
logger.exception(
"Couldn't describe import job with ID %s. Here's why %s",
job_id,
err.response["Error"]["Message"],
)
raise
Can't find what you need? Request a code example using the Provide
feedback link on the right sidebar of this page.
FHIR import job information is not available on the HealthLake Console. Instead, use the AWS CLI
with DescribeFHIRImportJob
to request import job properties such as JobStatus
. For more information, refer to the AWS CLI example on this
page.