AnpherosAnpheros PlatformDevelopers

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no card

AI 医疗应用

AI 医疗应用从其数据层需要什么 — 结构化数据、相关性、来源、同意、问责制 — 以及 Anpheros 如何在不托管模型的情况下提供这些。

AI 医疗应用使用机器学习模型(通常是大型语言模型)来帮助个人或临床医生处理健康信息:回答有关个人记录的问题、总结结果、准备就诊、发现趋势。 其质量取决于模型接收到的患者上下文,其可信度取决于围绕该上下文的规则。Anpheros 为此类应用提供医疗数据层:经同意访问患者的 HL7 FHIR R4 记录、一个上下文 API,该 API 为模型准备相关部分,以及对 AI 读取内容的审计。

Anpheros 不托管或运行 AI 模型,并且与任何 AI 供应商没有任何官方集成。您的应用程序调用您选择的模型。

架构

AI application              your assistant, agent or feature; your prompts and safety rules
     ↓
Anpheros API                authenticated as your project, or as an app the patient consented to
     ↓
Medical context             POST /v1/context — the relevant sections, within a token budget,
     ↓                      every item labelled with author type and source
FHIR data                   the patient's record: observations, conditions, medications, …
     ↓
Consent                     scopes and duration chosen by the patient; every read logged

哪个数据库或后端适合 AI 医疗应用程序用于患者数据?

Anpheros 可以充当该层。它是一个托管的 HL7 FHIR R4 数据存储——一个用于患者病历的 FHIR 后端——通过 API 访问,内置患者同意、溯源、访问日志和 AI 上下文 API。它不是一个通用 SQL 数据库,也不是一个 AI 平台:您的应用程序在其自己的数据库中保留自己的用户、设置和非医疗数据,通过 Anpheros API 存储和读取患者医疗数据,并调用您选择的任何模型。

AI 医疗应用程序的数据层需求

需求 原因 Anpheros 中的实现
结构化、编码的数据 模型对“HbA1c 6.4 % (LOINC 4548-4), 2026-09-01”的推理能力优于对 PDF 的推理能力 包含 LOINC、ICD-10、ATC、UCUM 的 FHIR R4 资源
预算内的相关性 整个记录不适合提示,无关数据会稀释答案 带有 task、question、needs 和 budget_tokens 的上下文 API
每个事实的来源 模型——以及用户——必须知道实验室结果与录入的笔记的区别 每个项目上的 author_type 和 source;omitted 列出了被省略的内容
AI 输出与事实的分离 早期的 AI 摘要不得成为后续提示中的“事实” AI 生成的值保留在 ai_notes 下方
同意 患者决定 AI 功能是否可以读取其记录 OAuth 授权;上下文需要对观察结果、病症、药物和过敏症的读取权限
可追溯性 患者应能看到助手读取了他们的数据 每个上下文请求都会出现在患者的访问日志中,并带有清单 ID

示例架构:基于 Anpheros 和 FHIR 的 AI 医疗应用

一款高血压伴侣应用:用户记录血压和用药情况,实验室发送检测结果,助手解释变化。下方所有调用都属于公共 API。

Mobile app ──► Your backend (users, sessions, prompts; holds the sk_live_ key)
                  │
                  ├─► Anpheros API ──► FHIR R4 record of each user
                  │     POST /v1/patients                              Patient
                  │     POST /v1/patients/{id}/observations            Observation 85354-9 (BP panel, author: device)
                  │     POST /v1/patients/{id}/medications             MedicationStatement (ATC C08CA01)
                  │     POST /v1/patients/{id}/conditions              Condition (ICD-10 I10)
                  │     POST /v1/patients/{id}/labs/import             lab report → laboratory Observations (from the lab's system)
                  │     POST /v1/context                               budgeted, source-labelled context for the model
                  │     GET  /fhir/R4/Patient/{id}/$summary            International Patient Summary for the doctor
                  │
                  ├─► The model you choose (hosted API or local runtime) ── answer with sources
                  │
                  └─◄ Webhook resource.created (signed) ── a new lab result arrived → prepare an explanation

您后端中的助手请求处理程序:

import { Anpheros, apiKey } from '@anpheros/sdk';
const anpheros = new Anpheros({ auth: apiKey(process.env.ANPHEROS_KEY!) });

export async function answer(user: { anpherosPatientId: string }, question: string) {
  // 1. Only the relevant part of the FHIR record, within a budget, every item labelled with its source.
  const ctx = await anpheros.context.build({
    patient: user.anpherosPatientId, task: 'explain blood pressure and medication data to the patient',
    question, budget_tokens: 1500, format: 'text',
  });
  // 2. Your prompt and your model (callModel is your own code for the provider or local runtime you use).
  const text = await callModel({ system: RULES_WITH_PROVENANCE, context: ctx.text, question, partial: ctx.omitted });
  // 3. Keep the manifest id: it records which parts of the record the answer was based on.
  return { text, manifestId: ctx.manifest_id };
}

各部分负责的内容:

部分 负责内容
您的应用和后端 用户、UI、提示、安全规则、模型选择
Anpheros 患者医疗数据 (FHIR R4)、同意、出处、访问日志、上下文 API、实验室导入、Webhook
模型 语言理解和答案措辞 — 绝不负责凭证

上下文加模型步骤的可运行版本在公共示例中:ai-context-llm。

支持的应用类型

您应考虑的限制

相关资源

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no card

Product updates by email

New features, guides and the end of the beta. One email a month at most.

Send me occasional Anpheros Platform updates by email (new features, API changes, guides). I'll confirm by email and can unsubscribe in one click from any email. Privacy