| 1 | import type * as comprehendmedical from "@distilled.cloud/aws/comprehendmedical"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `comprehendmedical:InferSNOMEDCT` — detect medical concepts in clinical text and link them to codes in the Systematized Nomenclature of Medicine, Clinical Terms (SNOMED CT) ontology. |
| 7 | * |
| 8 | * Comprehend Medical has no resource-level IAM, so the binding takes no |
| 9 | * arguments and grants `comprehendmedical:InferSNOMEDCT` on `*`. Provide the |
| 10 | * implementation with `Effect.provide(AWS.ComprehendMedical.InferSNOMEDCTHttp)`. |
| 11 | * |
| 12 | * ### Linking Concepts to SNOMED CT |
| 13 | * **Example:** Infer SNOMED CT Concepts for a Clinical Note |
| 14 | * ```typescript |
| 15 | * // init |
| 16 | * const inferSNOMEDCT = yield* AWS.ComprehendMedical.InferSNOMEDCT(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const result = yield* inferSNOMEDCT({ |
| 20 | * Text: "Patient presents with type 2 diabetes.", |
| 21 | * }); |
| 22 | * const concepts = (result.Entities ?? []).flatMap((e) => e.SNOMEDCTConcepts ?? []); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface InferSNOMEDCT extends Binding.Service< |
| 28 | InferSNOMEDCT, |
| 29 | "AWS.ComprehendMedical.InferSNOMEDCT", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: comprehendmedical.InferSNOMEDCTRequest, |
| 33 | ) => Effect.Effect< |
| 34 | comprehendmedical.InferSNOMEDCTResponse, |
| 35 | comprehendmedical.InferSNOMEDCTError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const InferSNOMEDCT = Binding.Service<InferSNOMEDCT>( |
| 40 | "AWS.ComprehendMedical.InferSNOMEDCT", |
| 41 | ); |