AWS.MedicalImaging reference
CopyImageSet
Section titled “CopyImageSet”Source:
src/AWS/MedicalImaging/CopyImageSet.ts
Runtime binding for the CopyImageSet operation (IAM action
medical-imaging:CopyImageSet), scoped to one Datastore.
Copies an image set into a new one (omit destinationImageSet) or merges
it into an existing destination image set within the same data store.
Provide the implementation with
Effect.provide(AWS.MedicalImaging.CopyImageSetHttp).
CopyImageSet: Updating Image Sets
Section titled “CopyImageSet: Updating Image Sets”const copyImageSet = yield* MedicalImaging.CopyImageSet(datastore);
const copy = yield* copyImageSet({ sourceImageSetId, copyImageSetInformation: { sourceImageSet: { latestVersionId: "1" }, },});// copy.destinationImageSetProperties.imageSetIdDatastore
Section titled “Datastore”Source:
src/AWS/MedicalImaging/Datastore.ts
An AWS HealthImaging data store — a HIPAA-eligible store for DICOM P10 medical images with sub-second image-frame retrieval.
Data stores provision asynchronously (CREATING → ACTIVE, typically a few minutes) and must be empty (no image sets) before they can be deleted. HealthImaging has no update API, so every property except tags triggers a replacement.
Datastore: Creating a Data Store
Section titled “Datastore: Creating a Data Store”Basic Data Store
const datastore = yield* Datastore("Imaging", {});Data Store with a Customer-Managed KMS Key
const datastore = yield* Datastore("Imaging", { kmsKeyArn: key.keyArn, tags: { team: "radiology" },});Datastore: Importing DICOM Data
Section titled “Datastore: Importing DICOM Data”const datastore = yield* Datastore("Imaging", {});// startDICOMImportJob and image-set APIs address the store by idconst id = datastore.datastoreId;DeleteImageSet
Section titled “DeleteImageSet”Source:
src/AWS/MedicalImaging/DeleteImageSet.ts
Runtime binding for the DeleteImageSet operation (IAM action
medical-imaging:DeleteImageSet), scoped to one Datastore.
Deletes an image set (asynchronously — the response reports
imageSetWorkflowStatus: "DELETING"). A data store must contain no image
sets before it can be deleted. Provide the implementation with
Effect.provide(AWS.MedicalImaging.DeleteImageSetHttp).
DeleteImageSet: Updating Image Sets
Section titled “DeleteImageSet: Updating Image Sets”const deleteImageSet = yield* MedicalImaging.DeleteImageSet(datastore);
const deleted = yield* deleteImageSet({ imageSetId });// deleted.imageSetWorkflowStatus === "DELETING"GetDICOMImportJob
Section titled “GetDICOMImportJob”Source:
src/AWS/MedicalImaging/GetDICOMImportJob.ts
Runtime binding for the GetDICOMImportJob operation (IAM action
medical-imaging:GetDICOMImportJob), scoped to one Datastore.
Reads the properties of a DICOM import job started with
StartDICOMImportJob — poll jobProperties.jobStatus until
COMPLETED (or FAILED), then review the output manifests at
outputS3Uri for per-object results. Provide the implementation with
Effect.provide(AWS.MedicalImaging.GetDICOMImportJobHttp).
GetDICOMImportJob: Importing DICOM Data
Section titled “GetDICOMImportJob: Importing DICOM Data”const getImportJob = yield* MedicalImaging.GetDICOMImportJob(datastore);
const job = yield* getImportJob({ jobId }).pipe( Effect.map((r) => r.jobProperties), Effect.repeat({ schedule: Schedule.spaced("10 seconds"), until: (j) => j.jobStatus !== "SUBMITTED" && j.jobStatus !== "IN_PROGRESS", times: 30, }),);GetImageFrame
Section titled “GetImageFrame”Source:
src/AWS/MedicalImaging/GetImageFrame.ts
Runtime binding for the GetImageFrame operation (IAM action
medical-imaging:GetImageFrame), scoped to one Datastore.
Streams the pixel data of a single image frame (HTJ2K- or
JPEG2000-encoded, per the data store’s losslessStorageFormat). Image
frame ids come from the image set metadata blob read with
GetImageSetMetadata. Provide the implementation with
Effect.provide(AWS.MedicalImaging.GetImageFrameHttp).
GetImageFrame: Reading Image Frames
Section titled “GetImageFrame: Reading Image Frames”const getImageFrame = yield* MedicalImaging.GetImageFrame(datastore);
const frame = yield* getImageFrame({ imageSetId, imageFrameInformation: { imageFrameId },});// frame.imageFrameBlob (streaming body), frame.contentTypeGetImageSet
Section titled “GetImageSet”Source:
src/AWS/MedicalImaging/GetImageSet.ts
Runtime binding for the GetImageSet operation (IAM action
medical-imaging:GetImageSet), scoped to one Datastore.
Reads an image set’s properties — state, workflow status, version and
ARN. Pass versionId to read a specific version; omit it for the latest.
Provide the implementation with
Effect.provide(AWS.MedicalImaging.GetImageSetHttp).
GetImageSet: Reading Image Sets
Section titled “GetImageSet: Reading Image Sets”const getImageSet = yield* MedicalImaging.GetImageSet(datastore);
const imageSet = yield* getImageSet({ imageSetId });// imageSet.imageSetState === "ACTIVE", imageSet.versionId, imageSet.imageSetArnGetImageSetMetadata
Section titled “GetImageSetMetadata”Source:
src/AWS/MedicalImaging/GetImageSetMetadata.ts
Runtime binding for the GetImageSetMetadata operation (IAM action
medical-imaging:GetImageSetMetadata), scoped to one Datastore.
Streams the DICOM JSON metadata blob of an image set (gzip-encoded —
check contentEncoding). The metadata carries the patient/study/series
DICOM attributes plus the image frame ids used with GetImageFrame.
Provide the implementation with
Effect.provide(AWS.MedicalImaging.GetImageSetMetadataHttp).
GetImageSetMetadata: Reading Image Sets
Section titled “GetImageSetMetadata: Reading Image Sets”const getMetadata = yield* MedicalImaging.GetImageSetMetadata(datastore);
const metadata = yield* getMetadata({ imageSetId });// metadata.imageSetMetadataBlob (streaming body), metadata.contentEncoding === "gzip"ListDICOMImportJobs
Section titled “ListDICOMImportJobs”Source:
src/AWS/MedicalImaging/ListDICOMImportJobs.ts
Runtime binding for the ListDICOMImportJobs operation (IAM action
medical-imaging:ListDICOMImportJobs), scoped to one Datastore.
Lists the data store’s DICOM import jobs, optionally filtered by
jobStatus. Provide the implementation with
Effect.provide(AWS.MedicalImaging.ListDICOMImportJobsHttp).
ListDICOMImportJobs: Importing DICOM Data
Section titled “ListDICOMImportJobs: Importing DICOM Data”const listImportJobs = yield* MedicalImaging.ListDICOMImportJobs(datastore);
const jobs = yield* listImportJobs({ jobStatus: "IN_PROGRESS" });// jobs.jobSummaries[i].jobIdListImageSetVersions
Section titled “ListImageSetVersions”Source:
src/AWS/MedicalImaging/ListImageSetVersions.ts
Runtime binding for the ListImageSetVersions operation (IAM action
medical-imaging:ListImageSetVersions), scoped to one Datastore.
Lists every version of an image set — each UpdateImageSetMetadata
call produces a new version, and older versions remain readable and
revertible. Provide the implementation with
Effect.provide(AWS.MedicalImaging.ListImageSetVersionsHttp).
ListImageSetVersions: Reading Image Sets
Section titled “ListImageSetVersions: Reading Image Sets”const listVersions = yield* MedicalImaging.ListImageSetVersions(datastore);
const versions = yield* listVersions({ imageSetId });// versions.imageSetPropertiesList[i].versionIdSearchImageSets
Section titled “SearchImageSets”Source:
src/AWS/MedicalImaging/SearchImageSets.ts
Runtime binding for the SearchImageSets operation (IAM action
medical-imaging:SearchImageSets), scoped to one Datastore.
Searches the data store’s image sets by DICOM attributes (patient id,
accession number, study/series instance UID, study date/time) or by
created/updated timestamps. Omit searchCriteria to page through every
image set. Provide the implementation with
Effect.provide(AWS.MedicalImaging.SearchImageSetsHttp).
SearchImageSets: Searching Image Sets
Section titled “SearchImageSets: Searching Image Sets”Search by Patient Id
const searchImageSets = yield* MedicalImaging.SearchImageSets(datastore);
const results = yield* searchImageSets({ searchCriteria: { filters: [{ operator: "EQUAL", values: [{ DICOMPatientId: patientId }] }], },});// results.imageSetsMetadataSummaries[i].imageSetIdList Every Image Set
const results = yield* searchImageSets();StartDICOMImportJob
Section titled “StartDICOMImportJob”Source:
src/AWS/MedicalImaging/StartDICOMImportJob.ts
Runtime binding for the StartDICOMImportJob operation (IAM action
medical-imaging:StartDICOMImportJob), scoped to one Datastore.
Starts a bulk import of DICOM P10 files from S3 into the bound data
store. The binding is constructed with the data store and the
data-access role (the IAM role HealthImaging assumes to read
inputS3Uri and write the outputS3Uri manifests; its trust policy must
allow medical-imaging.amazonaws.com). The role’s ARN is injected as
dataAccessRoleArn on every runtime request and the host is granted
iam:PassRole on it alongside medical-imaging:StartDICOMImportJob on
the data store. Track the job with GetDICOMImportJob. Provide the
implementation with
Effect.provide(AWS.MedicalImaging.StartDICOMImportJobHttp).
StartDICOMImportJob: Importing DICOM Data
Section titled “StartDICOMImportJob: Importing DICOM Data”// deploy time — bind the data store and the HealthImaging data-access roleconst startImport = yield* MedicalImaging.StartDICOMImportJob(datastore, dataAccessRole);
// runtimeconst job = yield* startImport({ clientToken: crypto.randomUUID(), inputS3Uri: "s3://my-bucket/dicom-input/", outputS3Uri: "s3://my-bucket/dicom-output/",});// job.jobId, job.jobStatus === "SUBMITTED"UpdateImageSetMetadata
Section titled “UpdateImageSetMetadata”Source:
src/AWS/MedicalImaging/UpdateImageSetMetadata.ts
Runtime binding for the UpdateImageSetMetadata operation (IAM action
medical-imaging:UpdateImageSetMetadata), scoped to one
Datastore.
Adds, updates, or removes DICOM attributes on an image set (each update
produces a new version), or reverts the image set to a previous version
via revertToVersionId. Provide the implementation with
Effect.provide(AWS.MedicalImaging.UpdateImageSetMetadataHttp).
UpdateImageSetMetadata: Updating Image Sets
Section titled “UpdateImageSetMetadata: Updating Image Sets”const updateMetadata = yield* MedicalImaging.UpdateImageSetMetadata(datastore);
const updated = yield* updateMetadata({ imageSetId, latestVersionId, updateImageSetMetadataUpdates: { revertToVersionId: "1" },});// updated.latestVersionId