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:InferRxNorm` — detect medication entities in clinical text and link them to concept identifiers in the RxNorm ontology (medication names, dosages, frequencies).
7 *
8 * Comprehend Medical has no resource-level IAM, so the binding takes no
9 * arguments and grants `comprehendmedical:InferRxNorm` on `*`. Provide the
10 * implementation with `Effect.provide(AWS.ComprehendMedical.InferRxNormHttp)`.
11 *
12 * ### Linking Medications to RxNorm
13 * **Example:** Infer RxNorm Concepts for a Medication List
14 * ```typescript
15 * // init
16 * const inferRxNorm = yield* AWS.ComprehendMedical.InferRxNorm();
17 *
18 * // runtime
19 * const result = yield* inferRxNorm({
20 * Text: "Patient takes 50 mg atenolol daily.",
21 * });
22 * const concepts = (result.Entities ?? []).flatMap((e) => e.RxNormConcepts ?? []);
23 * ```
24 *
25 * @binding
26 */
27export interface InferRxNorm extends Binding.Service<
28 InferRxNorm,
29 "AWS.ComprehendMedical.InferRxNorm",
30 () => Effect.Effect<
31 (
32 request: comprehendmedical.InferRxNormRequest,
33 ) => Effect.Effect<
34 comprehendmedical.InferRxNormResponse,
35 comprehendmedical.InferRxNormError
36 >
37 >
38> {}
39export const InferRxNorm = Binding.Service<InferRxNorm>(
40 "AWS.ComprehendMedical.InferRxNorm",
41);