1import type * as comprehendmedical from "@distilled.cloud/aws/comprehendmedical";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `comprehendmedical:InferICD10CM` — detect medical
7 * conditions in clinical text and link them to ICD-10-CM ontology codes with
8 * confidence scores.
9 *
10 * Comprehend Medical is a pure pay-per-call service with no resource to
11 * manage: the binding takes no arguments and grants the function
12 * `comprehendmedical:InferICD10CM` (the action has no resource-level IAM).
13 * Pass the clinical note as raw text — no marshalling.
14 *
15 * ### Inferring ICD-10-CM Codes
16 * **Example:** Infer ICD-10-CM Codes from a Clinical Note
17 * ```typescript
18 * // init
19 * const inferICD10CM = yield* AWS.ComprehendMedical.InferICD10CM();
20 *
21 * // runtime
22 * const result = yield* inferICD10CM({
23 * Text: "Patient presents with type 2 diabetes and hypertension.",
24 * });
25 * const codes = (result.Entities ?? []).flatMap((entity) =>
26 * (entity.ICD10CMConcepts ?? []).map((concept) => concept.Code),
27 * );
28 * ```
29 *
30 * @binding
31 */
32export interface InferICD10CM extends Binding.Service<
33 InferICD10CM,
34 "AWS.ComprehendMedical.InferICD10CM",
35 () => Effect.Effect<
36 (
37 request: comprehendmedical.InferICD10CMRequest,
38 ) => Effect.Effect<
39 comprehendmedical.InferICD10CMResponse,
40 comprehendmedical.InferICD10CMError
41 >
42 >
43> {}
44export const InferICD10CM = Binding.Service<InferICD10CM>(
45 "AWS.ComprehendMedical.InferICD10CM",
46);