| 1 | import type * as medicalimaging from "@distilled.cloud/aws/medical-imaging"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Datastore } from "./Datastore.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `GetImageSetMetadata` request with `datastoreId` injected from the bound |
| 8 | * data store. |
| 9 | */ |
| 10 | export interface GetImageSetMetadataRequest extends Omit< |
| 11 | medicalimaging.GetImageSetMetadataRequest, |
| 12 | "datastoreId" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for the `GetImageSetMetadata` operation (IAM action |
| 17 | * `medical-imaging:GetImageSetMetadata`), scoped to one {@link Datastore}. |
| 18 | * |
| 19 | * Streams the DICOM JSON metadata blob of an image set (gzip-encoded — |
| 20 | * check `contentEncoding`). The metadata carries the patient/study/series |
| 21 | * DICOM attributes plus the image frame ids used with {@link GetImageFrame}. |
| 22 | * Provide the implementation with |
| 23 | * `Effect.provide(AWS.MedicalImaging.GetImageSetMetadataHttp)`. |
| 24 | * |
| 25 | * ### Reading Image Sets |
| 26 | * **Example:** Read Image Set Metadata |
| 27 | * ```typescript |
| 28 | * const getMetadata = yield* MedicalImaging.GetImageSetMetadata(datastore); |
| 29 | * |
| 30 | * const metadata = yield* getMetadata({ imageSetId }); |
| 31 | * // metadata.imageSetMetadataBlob (streaming body), metadata.contentEncoding === "gzip" |
| 32 | * ``` |
| 33 | * |
| 34 | * @binding |
| 35 | */ |
| 36 | export interface GetImageSetMetadata extends Binding.Service< |
| 37 | GetImageSetMetadata, |
| 38 | "AWS.MedicalImaging.GetImageSetMetadata", |
| 39 | ( |
| 40 | datastore: Datastore, |
| 41 | ) => Effect.Effect< |
| 42 | ( |
| 43 | request: GetImageSetMetadataRequest, |
| 44 | ) => Effect.Effect< |
| 45 | medicalimaging.GetImageSetMetadataResponse, |
| 46 | medicalimaging.GetImageSetMetadataError |
| 47 | > |
| 48 | > |
| 49 | > {} |
| 50 | export const GetImageSetMetadata = Binding.Service<GetImageSetMetadata>( |
| 51 | "AWS.MedicalImaging.GetImageSetMetadata", |
| 52 | ); |