AWS.HealthLake reference
DescribeFHIRExportJob
Section titled “DescribeFHIRExportJob”Source:
src/AWS/HealthLake/DescribeFHIRExportJob.ts
Runtime binding for the DescribeFHIRExportJob operation (IAM action
healthlake:DescribeFHIRExportJob), scoped to one FHIRDatastore.
Reads the properties of a bulk FHIR export job started with
StartFHIRExportJob — poll ExportJobProperties.JobStatus until
COMPLETED (or a failure status). Provide the implementation with
Effect.provide(AWS.HealthLake.DescribeFHIRExportJobHttp).
DescribeFHIRExportJob: Exporting FHIR Data
Section titled “DescribeFHIRExportJob: Exporting FHIR Data”const describeExport = yield* HealthLake.DescribeFHIRExportJob(datastore);
const job = yield* describeExport({ JobId: jobId }).pipe( Effect.map((r) => r.ExportJobProperties), Effect.repeat({ schedule: Schedule.spaced("10 seconds"), until: (j) => j.JobStatus !== "SUBMITTED" && j.JobStatus !== "IN_PROGRESS", times: 30, }),);DescribeFHIRImportJob
Section titled “DescribeFHIRImportJob”Source:
src/AWS/HealthLake/DescribeFHIRImportJob.ts
Runtime binding for the DescribeFHIRImportJob operation (IAM action
healthlake:DescribeFHIRImportJob), scoped to one FHIRDatastore.
Reads the properties and progress report of a bulk FHIR import job started
with StartFHIRImportJob — poll ImportJobProperties.JobStatus
until COMPLETED (or a failure status). Provide the implementation with
Effect.provide(AWS.HealthLake.DescribeFHIRImportJobHttp).
DescribeFHIRImportJob: Importing FHIR Data
Section titled “DescribeFHIRImportJob: Importing FHIR Data”const describeImport = yield* HealthLake.DescribeFHIRImportJob(datastore);
const job = yield* describeImport({ JobId: jobId }).pipe( Effect.map((r) => r.ImportJobProperties), Effect.repeat({ schedule: Schedule.spaced("10 seconds"), until: (j) => j.JobStatus !== "SUBMITTED" && j.JobStatus !== "IN_PROGRESS", times: 30, }),);FHIRDatastore
Section titled “FHIRDatastore”Source:
src/AWS/HealthLake/FHIRDatastore.ts
An AWS HealthLake FHIR-enabled data store — a HIPAA-eligible, managed store for FHIR R4 health data with a FHIR REST endpoint plus bulk import/export.
Data stores take roughly 15-30 minutes to provision (CREATING →
ACTIVE) and are billed while they exist; deletion is also asynchronous
(DELETING → gone). Destroy data stores you are not using.
FHIRDatastore: Creating a Data Store
Section titled “FHIRDatastore: Creating a Data Store”Basic FHIR R4 Data Store
const datastore = yield* FHIRDatastore("Records", {});Data Store Preloaded with Synthetic Data
const datastore = yield* FHIRDatastore("Sandbox", { preloadDataType: "SYNTHEA",});FHIRDatastore: Encryption
Section titled “FHIRDatastore: Encryption”const key = yield* KMS.Key("RecordsKey", { description: "healthlake data store key",});const datastore = yield* FHIRDatastore("Records", { kmsKeyId: key.keyArn,});ListFHIRExportJobs
Section titled “ListFHIRExportJobs”Source:
src/AWS/HealthLake/ListFHIRExportJobs.ts
Runtime binding for the ListFHIRExportJobs operation (IAM action
healthlake:ListFHIRExportJobs), scoped to one FHIRDatastore.
Lists the bulk FHIR export jobs of the bound data store, optionally
filtered by name, status or submit-time window. Provide the implementation
with Effect.provide(AWS.HealthLake.ListFHIRExportJobsHttp).
ListFHIRExportJobs: Exporting FHIR Data
Section titled “ListFHIRExportJobs: Exporting FHIR Data”const listExports = yield* HealthLake.ListFHIRExportJobs(datastore);
const jobs = yield* listExports({ JobStatus: "IN_PROGRESS" });// jobs.ExportJobPropertiesList, jobs.NextTokenListFHIRImportJobs
Section titled “ListFHIRImportJobs”Source:
src/AWS/HealthLake/ListFHIRImportJobs.ts
Runtime binding for the ListFHIRImportJobs operation (IAM action
healthlake:ListFHIRImportJobs), scoped to one FHIRDatastore.
Lists the bulk FHIR import jobs of the bound data store, optionally
filtered by name, status or submit-time window. Provide the implementation
with Effect.provide(AWS.HealthLake.ListFHIRImportJobsHttp).
ListFHIRImportJobs: Importing FHIR Data
Section titled “ListFHIRImportJobs: Importing FHIR Data”const listImports = yield* HealthLake.ListFHIRImportJobs(datastore);
const jobs = yield* listImports({ JobStatus: "COMPLETED" });// jobs.ImportJobPropertiesList, jobs.NextTokenStartFHIRExportJob
Section titled “StartFHIRExportJob”Source:
src/AWS/HealthLake/StartFHIRExportJob.ts
Runtime binding for the StartFHIRExportJob operation (IAM action
healthlake:StartFHIRExportJob), scoped to one FHIRDatastore.
Starts a bulk export of the bound data store’s FHIR R4 resources to S3 as
NDJSON. The binding is constructed with the data store and the
data-access role (the IAM role HealthLake assumes to write
OutputDataConfig.S3Configuration.S3Uri, encrypted with its KmsKeyId;
the role’s trust policy must allow healthlake.amazonaws.com). The role’s
ARN is injected as DataAccessRoleArn on every runtime request and the
host is granted iam:PassRole on it alongside
healthlake:StartFHIRExportJob on the data store. Track the job with
DescribeFHIRExportJob. Provide the implementation with
Effect.provide(AWS.HealthLake.StartFHIRExportJobHttp).
StartFHIRExportJob: Exporting FHIR Data
Section titled “StartFHIRExportJob: Exporting FHIR Data”// deploy time — bind the data store and the HealthLake data-access roleconst startExport = yield* HealthLake.StartFHIRExportJob(datastore, dataAccessRole);
// runtimeconst job = yield* startExport({ OutputDataConfig: { S3Configuration: { S3Uri: "s3://my-bucket/fhir-export/", KmsKeyId: kmsKeyArn, }, },});// job.JobId, job.JobStatus === "SUBMITTED"StartFHIRImportJob
Section titled “StartFHIRImportJob”Source:
src/AWS/HealthLake/StartFHIRImportJob.ts
Runtime binding for the StartFHIRImportJob operation (IAM action
healthlake:StartFHIRImportJob), scoped to one FHIRDatastore.
Starts a bulk import of FHIR R4 NDJSON from S3 into the bound data store.
The binding is constructed with the data store and the data-access
role (the IAM role HealthLake assumes to read InputDataConfig.S3Uri
and write JobOutputDataConfig; its trust policy must allow
healthlake.amazonaws.com). The role’s ARN is injected as
DataAccessRoleArn on every runtime request and the host is granted
iam:PassRole on it alongside healthlake:StartFHIRImportJob on the data
store. Track the job with DescribeFHIRImportJob. Provide the
implementation with Effect.provide(AWS.HealthLake.StartFHIRImportJobHttp).
StartFHIRImportJob: Importing FHIR Data
Section titled “StartFHIRImportJob: Importing FHIR Data”// deploy time — bind the data store and the HealthLake data-access roleconst startImport = yield* HealthLake.StartFHIRImportJob(datastore, dataAccessRole);
// runtimeconst job = yield* startImport({ InputDataConfig: { S3Uri: "s3://my-bucket/fhir-input/" }, JobOutputDataConfig: { S3Configuration: { S3Uri: "s3://my-bucket/fhir-output/", KmsKeyId: kmsKeyArn, }, },});// job.JobId, job.JobStatus === "SUBMITTED"