| 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 | * `SearchImageSets` request with `datastoreId` injected from the bound data |
| 8 | * store. |
| 9 | */ |
| 10 | export interface SearchImageSetsRequest extends Omit< |
| 11 | medicalimaging.SearchImageSetsRequest, |
| 12 | "datastoreId" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for the `SearchImageSets` operation (IAM action |
| 17 | * `medical-imaging:SearchImageSets`), scoped to one {@link Datastore}. |
| 18 | * |
| 19 | * Searches the data store's image sets by DICOM attributes (patient id, |
| 20 | * accession number, study/series instance UID, study date/time) or by |
| 21 | * created/updated timestamps. Omit `searchCriteria` to page through every |
| 22 | * image set. Provide the implementation with |
| 23 | * `Effect.provide(AWS.MedicalImaging.SearchImageSetsHttp)`. |
| 24 | * |
| 25 | * ### Searching Image Sets |
| 26 | * **Example:** Search by Patient Id |
| 27 | * ```typescript |
| 28 | * const searchImageSets = yield* MedicalImaging.SearchImageSets(datastore); |
| 29 | * |
| 30 | * const results = yield* searchImageSets({ |
| 31 | * searchCriteria: { |
| 32 | * filters: [{ operator: "EQUAL", values: [{ DICOMPatientId: patientId }] }], |
| 33 | * }, |
| 34 | * }); |
| 35 | * // results.imageSetsMetadataSummaries[i].imageSetId |
| 36 | * ``` |
| 37 | * |
| 38 | * **Example:** List Every Image Set |
| 39 | * ```typescript |
| 40 | * const results = yield* searchImageSets(); |
| 41 | * ``` |
| 42 | * |
| 43 | * @binding |
| 44 | */ |
| 45 | export interface SearchImageSets extends Binding.Service< |
| 46 | SearchImageSets, |
| 47 | "AWS.MedicalImaging.SearchImageSets", |
| 48 | ( |
| 49 | datastore: Datastore, |
| 50 | ) => Effect.Effect< |
| 51 | ( |
| 52 | request?: SearchImageSetsRequest, |
| 53 | ) => Effect.Effect< |
| 54 | medicalimaging.SearchImageSetsResponse, |
| 55 | medicalimaging.SearchImageSetsError |
| 56 | > |
| 57 | > |
| 58 | > {} |
| 59 | export const SearchImageSets = Binding.Service<SearchImageSets>( |
| 60 | "AWS.MedicalImaging.SearchImageSets", |
| 61 | ); |