@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 44 lines 1.51 KB
Raw
1 import type * as comprehendmedical from "@distilled.cloud/aws/comprehendmedical";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
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 */
30 export 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 > {}
42 export const DetectEntitiesV2 = Binding.Service<DetectEntitiesV2>(
43 "AWS.ComprehendMedical.DetectEntitiesV2",
44 );