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:DetectEntitiesV2` — extract medical
7 * entities (medications, medical conditions, anatomy, PHI, tests/treatments)
8 * and their attributes and traits from clinical text.
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:DetectEntitiesV2` (the action has no resource-level
13 * IAM). Pass the clinical note as raw text — no marshalling.
14 *
15 * ### Detecting Medical Entities
16 * **Example:** Detect Entities in a Clinical Note
17 * ```typescript
18 * // init
19 * const detectEntities = yield* AWS.ComprehendMedical.DetectEntitiesV2();
20 *
21 * // runtime
22 * const result = yield* detectEntities({
23 * Text: "Patient takes 50 mg atenolol daily for hypertension.",
24 * });
25 * const names = (result.Entities ?? []).map((entity) => entity.Text);
26 * ```
27 *
28 * @binding
29 */
30export interface DetectEntitiesV2 extends Binding.Service<
31 DetectEntitiesV2,
32 "AWS.ComprehendMedical.DetectEntitiesV2",
33 () => Effect.Effect<
34 (
35 request: comprehendmedical.DetectEntitiesV2Request,
36 ) => Effect.Effect<
37 comprehendmedical.DetectEntitiesV2Response,
38 comprehendmedical.DetectEntitiesV2Error
39 >
40 >
41> {}
42export const DetectEntitiesV2 = Binding.Service<DetectEntitiesV2>(
43 "AWS.ComprehendMedical.DetectEntitiesV2",
44);