临床记录服务

MCP服务器用于通过Claude将患者就诊记录直接录入电子病历,减少家庭健康护士的行政负担。

  • by m2ai-mcp-servers
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 MatthewSnow2/ratchet

使用说明

mcp-棘轮临床图

用于与Claude一起绘制临床图表的MCP服务器(代号:棘轮) -使Claude能够将患者就诊直接记录到电子病历中,从而减轻家庭健康护士的行政负担。

注: 目前以模拟模式运行以进行开发/测试。生产EMR集成即将推出。

状态

组件 状态
MCP服务器 ✅ 工作模式(模拟模式)
单元测试 ✅ 20/20传球
克劳德桌面 ✅ 准备测试
PointCare API ⏳ 待定API文档

当前模式: 模拟模式-使用真实的测试数据进行开发和测试。

快速开始

来自npm(推荐)

npx mcp-ratchet-clinical-charting

来源

git clone https://github.com/m2ai-mcp-servers/mcp-ratchet-clinical-charting.git
cd mcp-ratchet-clinical-charting
npm install
npm run build
npm run dev  # Development mode
npm test     # Run tests

模拟模式

棘轮跑了进来 模拟模式 默认情况下 POINTCARE_API_URL 未配置。模拟模式:

  • 使用5个虚构的测试患者
  • 将访问笔记存储在内存中
  • 返回现实的响应
  • 非常适合开发和Claude Desktop测试

可用工具

工具 描述 模拟模式
search_patient 按姓名、ID或电话查找患者 ✅ 工作
create_visit_note 记录患者生命体征 ✅ 工作
get_patient_history 检索患者就诊历史记录 ✅ 工作

示例用法(克劳德语)

"Search for patient Eleanor Thompson"
→ Returns patient PT-10001 with demographics and status

"Create a visit note for PT-10001 with blood pressure 120/80"
→ Creates and stores visit note with vitals

"Get visit history for PT-10001"
→ Returns list of previous visits

Claude桌面集成

配置Claude桌面

添加到您的Claude Desktop配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 窗户: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ratchet": {
      "command": "npx",
      "args": ["-y", "mcp-ratchet-clinical-charting"]
    }
  }
}

对于具有EMR集成的生产模式:

{
  "mcpServers": {
    "ratchet": {
      "command": "npx",
      "args": ["-y", "mcp-ratchet-clinical-charting"],
      "env": {
        "POINTCARE_API_URL": "https://api.pointcare.com",
        "POINTCARE_API_KEY": "your-api-key"
      }
    }
  }
}

步骤3:重新启动克劳德桌面

重新启动Claude Desktop以加载新的MCP服务器。

步骤4:验证

在Claude Desktop中,您应该看到:

  • search_patient 工具可用
  • create_visit_note 工具可用
  • get_patient_history 工具可用

试试:“寻找病人埃莉诺”

测试患者(模拟模式)

ID 名称 状态 初步诊断
PT-10001 埃莉诺·汤普森 活动期 2型糖尿病,慢性心力衰竭
PT-10002 罗伯特·马丁内斯 活动 慢性阻塞性肺病,术后
PT-10003 玛格丽特·威尔逊 活跃 帕金森病
PT-10004 詹姆斯·汤普森 活跃 中风后康复
PT-10005 多萝西·安德森 出院 髋关节置换术

起源故事

棘轮从 M2AI NurseCall n8n工作流程,旨在帮助家庭健康护士处理就诊文件:

Current Flow (M2AI NurseCall):
┌─────────┐    ┌─────────┐    ┌─────────┐    ┌─────────┐
│ Twilio  │───>│  n8n    │───>│  VAPI   │───>│  Email  │
│  SMS    │    │ Workflow│    │  Call   │    │ Summary │
└─────────┘    └─────────┘    └─────────┘    └─────────┘

问题: 就诊记录会发送到电子邮件,但仍需要手动输入PointCare EMR。

棘轮解决方案:

Future Flow (with Ratchet):
┌─────────┐    ┌─────────┐    ┌──────────┐    ┌───────────┐
│ Twilio  │───>│  n8n    │───>│ Ratchet  │───>│ PointCare │
│  SMS    │    │ Workflow│    │   MCP    │    │    EMR    │
└─────────┘    └─────────┘    └──────────┘    └───────────┘

配置

变量 必填 描述
POINTCARE_API_URL 否* PointCare API基础URL
POINTCARE_API_KEY 没有* API密钥或令牌
RATCHET_MOCK_MODE 否 强制模拟模式(true/false)
LOG_LEVEL 否 日志记录级别(debug/info/warn/error)

*生产使用所需。未设置时,模拟模式会激活。

项目结构

ratchet/
├── src/
│   ├── index.ts              # MCP server entry point
│   ├── config.ts             # Configuration management
│   ├── tools/                # Tool implementations
│   │   ├── search-patient.ts
│   │   ├── create-visit-note.ts
│   │   └── get-patient-history.ts
│   ├── services/             # Business logic
│   │   ├── patient-service.ts
│   │   └── mock-data.ts
│   ├── types/                # TypeScript types
│   └── utils/                # Logger, errors
├── tests/
│   └── patient-service.test.ts
├── dist/                     # Compiled output
├── prds/
│   └── RATCHET-PRD.yaml
├── docs/
│   └── API_REQUIREMENTS.md
├── package.json
├── tsconfig.json
└── jest.config.js

发展

# Run in watch mode
npm run dev

# Run tests
npm test

# Run tests with coverage
npm test -- --coverage

# Lint
npm run lint

后续步骤

  1. 获取PointCare API文档 -请参阅 docs/API_REQUIREMENTS.md
  2. 完成PRD -使用真实的API详细信息填写工具规范
  3. 实现真正的API调用 -替换模拟响应
  4. 集成测试 -使用PointCare沙盒进行测试

相关项目

许可证

麻省理工学院


内置于 钢锁 -自主MCP服务器工厂