| name | abridge-sdk-patterns |
| description | Apply production-ready patterns for Abridge clinical AI integration.
Use when building reusable Abridge client wrappers, implementing HIPAA-compliant
error handling, or establishing team coding standards for healthcare AI.
Trigger: "abridge SDK patterns", "abridge best practices", "abridge code patterns".
|
| allowed-tools | Read, Write, Edit |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","healthcare","ai","abridge","patterns"] |
| compatibility | Designed for Claude Code |
Abridge SDK Patterns
Overview
Production-ready patterns for Abridge clinical AI integration. Since Abridge operates via partner APIs (not a public SDK), these patterns wrap the REST API with type-safe clients, HIPAA-compliant logging, and healthcare-specific error handling.
Prerequisites
- Completed
abridge-install-auth setup
- TypeScript project with strict mode enabled
- Understanding of HIPAA audit logging requirements
Instructions
Step 1: Type-Safe API Client Singleton
import axios, { AxiosInstance, AxiosError } from 'axios';
interface AbridgeConfig {
baseUrl: string;
clientSecret: string;
orgId: string;
timeoutMs?: number;
maxRetries?: number;
}
class AbridgeApiClient {
private static instance: AbridgeApiClient | null = null;
private api: AxiosInstance;
private config: AbridgeConfig;
private constructor(config: AbridgeConfig) {
this.config = config;
this.api = axios.({
: config.,
: config. || ,
: {
: ,
: config.,
: ,
: ,
},
});
....( {
req.[] = crypto.();
.(, req.!, req.!, req.[]);
req;
});
....(
{ .(, res..!, res..!, res.); res; },
{ .(, err.?., err.?., err.?.); err; }
);
}
(): {
(!.) {
. = ({
: process..!,
: process..!,
: process..!,
});
}
.;
}
(: , : , : , : ): {
entry = {
: ().(),
,
: method?.(),
: url?.(, ),
: detail === ? : ,
};
.(.(entry));
}
(): { .; }
}
{ };