Skip to content

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).

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,
}),
);