← Back to Skills Marketplace
u201013903

DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。

by u201013903 · GitHub ↗ · v1.0.10 · MIT-0
cross-platform ✓ Security Clean
303
Downloads
1
Stars
1
Active Installs
11
Versions
Install in OpenClaw
/install medgroup-drgdip-skill
Description
DRG/DIP 医保分组计算 — ICD 编码搜索、DRG/DIP 分组、医保结算、CC/MCC 查询。需使用个人 MedGroup API Key 并连接 MedGroup MCP SSE。
README (SKILL.md)

🩺 MedGroup DRG/DIP Skill

CHS DRG/DIP 医保分组计算工具。通过 MCP 工具调用,支持多步编排。

Privacy & Security

This skill relies on an external MedGroup MCP SSE server and a personal MedGroup API key.

Credential handling: Before enabling, confirm how your AI client stores the API key, whether it uses secure secret storage, and whether the key is scoped and revocable. When the client supports skill credentials, bind the key to MEDGROUP_API_KEY. Otherwise, configure it in the client-side MCP connection.

Transparency note: The manifest for this skill declares both a required credential (MEDGROUP_API_KEY) and a required MedGroup MCP SSE endpoint setting. If your client cannot surface or securely store those requirements, treat the integration as higher risk.

Intended inputs: This skill is intended for structured coding parameters such as ICD codes, gender, age, length of stay, and fee amounts. Do not use real patient identifiers in setup or connectivity tests.

Vendor review: Verify the authenticity of medgroup.medchat.fun and review its privacy, retention, and logging terms before enabling. If you need assurance that PHI is not logged or retained, request written documentation or an auditable addendum from the vendor.

Recommended first use: Test with synthetic data first (for example J18.900 for pneumonia) to confirm connectivity.

Regulatory scope: If you plan to send real patient data, confirm your local legal and regulatory requirements first. Where required, request a Data Processing Agreement or equivalent auditable documentation from the vendor before use.

前置条件

使用前需要完成一次 MedGroup MCP 配置:

  1. medgroup.medchat.fun 注册并生成你自己的 API Key(sk- 开头)
  2. 在支持 skill credential 的客户端中,将该密钥绑定到 MEDGROUP_API_KEY
  3. 配置 MedGroup MCP SSE 连接地址 https://medgroup.medchat.fun/mcp/sse
  4. 如需在 OpenClaw / ClawHub 中显式声明依赖,同时填写 skills.entries.medgroup-drgdip-skill.config.medgroupMcpSseUrl

配置完成后,以下工具即可使用。

MCP 配置

OpenClaw / ClawHub manifest 对应配置

本 skill 的 manifest 声明了以下前置项:

  • MEDGROUP_API_KEY
  • skills.entries.medgroup-drgdip-skill.config.medgroupMcpSseUrl

~/.openclaw/openclaw.json 中可这样填写:

{
  "skills": {
    "entries": {
      "medgroup-drgdip-skill": {
        "apiKey": "sk-your-api-key",
        "config": {
          "medgroupMcpSseUrl": "https://medgroup.medchat.fun/mcp/sse"
        }
      }
    }
  }
}

通用 MCP 模板

可直接使用本目录下的配置模板文件:

mcp-server/skills/medgroup-drgdip-skill/mcp.json

模板内容如下:

{
  "mcpServers": {
    "medgroup": {
      "url": "https://medgroup.medchat.fun/mcp/sse?api_key=sk-your-api-key",
      "transport": "sse"
    }
  }
}

使用方式:

  1. 下载或复制 mcp-server/skills/medgroup-drgdip-skill/mcp.json
  2. 将其中的 sk-your-api-key 替换为你在 MedGroup 账号中生成的个人 API Key
  3. 如果你的客户端支持导入 mcp.json,可直接导入
  4. 如果你的客户端支持 skill 级 secret storage,优先把 API Key 存在客户端的凭证配置中
  5. 如果你的客户端只提供 MCP Server 配置界面,复制其中 mcpServers.medgroup 这一段即可

典型场景

场景 1:完整的 DRG 分组 + 结算

  1. search_icd 确认主诊断编码(如用户说"肺炎",搜到 J18.900)
  2. drg_grouping 做分组,拿到 DRG 编码、分值和 CC 状态
  3. calculate_settlement 根据分值和总费用计算医保结算金额与盈亏

场景 2:DIP 分组查询

  1. search_icd 查主诊断和手术编码
  2. dip_grouping 做分组,拿到 DIP 病种编码、名称和分值

场景 3:编码与 CC/MCC 分析

  1. find_code_info 查编码所属的 MDC 和 ADRG 列表
  2. get_cc_status 查次要诊断的 CC/MCC 等级和排除情况

场景 4:盈亏分析

用户给出病种分值、总费用和点值,直接用 calculate_settlement 计算,分析高低倍率和医院盈亏。

工具详细说明

search_icd — 搜索 ICD 编码

搜索 ICD-10 诊断编码或 ICD-9 手术操作编码。用户提供疾病/手术名称或编码,返回匹配列表。

参数 必填 说明
query 搜索关键词,可以是编码或名称
type icd10(诊断)/ icd9(手术)/ both(默认)
limit 返回数量,默认 20,最大 50

示例:

{"query": "肺炎", "type": "icd10", "limit": 5}
{"query": "冠脉搭桥", "type": "icd9", "limit": 5}
{"query": "J18.900", "type": "both"}

返回:编码列表,每项包含 code(编码)和 name(名称)。

drg_grouping — DRG 分组计算

根据诊断和手术编码计算 DRG 分组结果,包括 MDC、ADRG、DRG 编码及 CC 状态。

参数 必填 说明
pdx_code 主诊断 ICD-10 编码,如 J18.900
gender /
age 患者年龄(岁)
adx_codes 次要诊断,分号或逗号分隔,如 I10.x00;E11.900
proc_codes 手术编码,分号或逗号分隔,如 36.1200;39.6101
los 住院天数,默认 1
icu 是否 ICU:0=否,1=是,默认 0
city_name 城市版本,默认 全国版

示例:

{"pdx_code": "J18.900", "adx_codes": "I10.x00;E11.900", "gender": "女", "age": 45, "los": 7, "city_name": "全国版"}

返回:mdc_code、adrg_code、drg_code、cc_status(mcc/cc/nocc)、catalogue_info(含分值)。

⚠️ 城市名必须用完整格式:邯郸市、北京市、上海市(不能写:邯郸、北京、上海)。

dip_grouping — DIP 分组计算

根据诊断和手术编码计算 DIP 分组结果。DIP 主要看主诊断 + 手术操作的组合。参数同 drg_grouping

示例:

{"pdx_code": "J18.900", "proc_codes": "31.0000;93.9600", "gender": "男", "age": 60, "los": 10, "city_name": "全国版"}

返回:dip_code、catalogue_info(含 name 名称、score 分值、type 类型)。

calculate_settlement — 医保结算计算

根据病种分值和总费用计算医保结算金额,分析高低倍率和盈亏。

参数 必填 说明
score 病种分值(来自分组结果的 catalogue_info.score)
total_fee 住院总费用(元)
fee_per_point 分值单价(元),默认 60
rate 调整系数,默认 1
high_ratio_limit 高倍率阈值,默认 3
low_ratio_limit 低倍率阈值,默认 0.5

示例:

{"score": 1.5, "total_fee": 15000, "fee_per_point": 60}

返回:standard_fee(标准费用)、fee_ratio(费用倍率)、ratio_type(high_ratio/normal_ratio/low_ratio)、payment_fee(结算金额)、balance(盈亏,正数盈利负数亏损)。

计算规则:正常倍率(0.5-3)按标准费用结算;低倍率(\x3C0.5)按实际费用结算;高倍率(>3)按公式调整。

find_code_info — 编码归属查询

查询诊断编码可能入组的 MDC(主要诊断类别)和 ADRG(相邻疾病诊断相关组)列表。

参数 必填 说明
code ICD-10 诊断编码,如 J18.900
city_name 城市版本,默认 全国版

示例:

{"code": "J18.900", "city_name": "全国版"}

返回:mdc_codes(如 ["MDCE"])、adrg_codes(如 ["ES1", "ES3"])。

get_cc_status — CC/MCC 状态查询

查询次要诊断的合并症/并发症状态。必须同时提供主诊断,因为 CC/MCC 状态取决于主诊断(某些次要诊断会因与主诊断相关而被排除)。

参数 必填 说明
pdx_code 主诊断编码
adx_codes 次要诊断编码数组,如 ["I10.x00", "E11.900"]
city_name 城市版本,默认 全国版

示例:

{"pdx_code": "J18.900", "adx_codes": ["I10.x00", "E11.900", "N18.500"], "city_name": "全国版"}

返回:每个次要诊断的 code、status(mcc/cc/none)、excluded(是否被排除)。

说明:MCC = 严重合并症/并发症;CC = 一般合并症/并发症;排除 = 与主诊断相关,不计入 CC。

Usage Guidance
This skill appears coherent with its stated purpose, but take these precautions before enabling: (1) Verify the vendor (medgroup.medchat.fun), privacy policy, retention, and request a Data Processing Agreement if you will send real patient data. (2) Do not store your API key in plaintext files (openclaw.json) or embed it in URL query strings (mcp.json) — these are easy to leak via backups, logs, or shared configs. Use your client's secret/vault feature or pass the key in an Authorization header if supported. (3) Ensure the API key is scoped and revocable; create a dedicated key you can rotate. (4) Test with synthetic/non‑PHI data first, and confirm local regulatory requirements before sending real PHI. (5) If you are concerned about autonomous invocation, restrict usage or require manual invocation in your client. If you need more assurance, ask the vendor for written guarantees on logging/retention and for guidance on secure MCP/SSE authentication methods (avoid query-string keys).
Capability Analysis
Type: OpenClaw Skill Name: medgroup-drgdip-skill Version: 1.0.10 The skill bundle provides a legitimate integration for Chinese medical insurance (DRG/DIP) grouping and settlement calculations via the MedGroup MCP service. It includes comprehensive documentation in SKILL.md with explicit security warnings regarding credential handling and the avoidance of Personal Health Information (PHI). The tools (e.g., search_icd, drg_grouping) and the configuration in mcp.json are consistent with the stated purpose, and no indicators of data exfiltration, malicious execution, or prompt injection were identified.
Capability Assessment
Purpose & Capability
The skill is an instruction-only DRG/DIP grouping integration that requires a MedGroup API key and an MCP SSE URL; those requirements are consistent with the declared functionality (ICD search, DRG/DIP grouping, settlement, CC/MCC lookups). No unrelated credentials, binaries, or install steps are requested.
Instruction Scope
SKILL.md stays on-topic (describes endpoints, parameters, and usage; warns against using PHI for tests). However, the instructions provide config templates that place the API key in plaintext (openclaw.json) and embed it in an mcp.json SSE URL query parameter, which could leak the key via file access, backups, or logs. The doc does advise using client secret storage when available — ensure the client actually supports that.
Install Mechanism
No install spec and no code files (instruction-only), so the skill will not write or execute additional artifacts on disk beyond client-side configuration. This is the lowest-risk install profile.
Credentials
Only a single credential (MEDGROUP_API_KEY) and an MCP SSE URL are required, which is proportionate for a third-party medical API integration. The concern is not excess credentials but how the key is handled: templates encourage storing keys in plaintext config or placing them in a URL query string (mcp.json), both of which increase exposure risk. Confirm key scoping, revocation, and client secret storage support.
Persistence & Privilege
always:false (default) and user-invocable:true; the skill does not request persistent system-wide privileges. The agent is permitted to invoke the skill autonomously by platform default; that broader blast radius is normal but worth keeping in mind with any external-API credential.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install medgroup-drgdip-skill
  3. After installation, invoke the skill by name or use /medgroup-drgdip-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.10
**Credential and configuration requirements are now explicit; secure key handling emphasized.** - Added `mcp.json` as a template for MCP server configuration. - Manifest now formally declares required credential (`MEDGROUP_API_KEY`) and MCP SSE URL configuration. - Updated documentation with new setup instructions, including how to securely bind the MedGroup API Key and configure SSE endpoint. - Enhanced privacy and deployment notice, clarifying secure credential storage and regulatory/legal considerations. - No changes to functional tools or APIs.
v1.0.9
- Clarified MCP server/client setup requirements and removed outdated user guidance on API key passing via header/URL.
v1.0.8
- Updated API Key management: now supports passing API keys via HTTP header (`Authorization: Bearer sk-...`) in addition to URL query string. - Enhanced security: secrets are never embedded in skill instructions or exposed to model prompts. - Documentation clarified for both HTTP header and query string authentication methods in MCP server configuration. - No functional changes to existing tools or endpoints.
v1.0.7
- Refined privacy and security documentation, now also in English, specifying data handling and compliance contacts. - No changes to functionality or APIs. - Version number update: 1.1.0 → 1.0.7. - All feature descriptions and tool usage remain the same.
v1.0.6
- 更新时间:API Key 配置方式变更为通过 MCP 连接 URL 的 query string(?api_key=sk-...)传递。 - 隐私与安全说明中,API Key 相关内容同步调整,移除推荐 header 传递方式。 - MCP 连接示例代码同步修改,明确指定 "transport": "sse"。 - 其他功能和接口参数无变化。
v1.0.5
- 新增“隐私与安全”板块,详细说明传输数据、不含个人信息、API Key 使用与数据合规建议。 - MCP Server 配置推荐改为使用 HTTP Header 方式 (`Authorization: Bearer ...`) 传递 API Key,提升安全性。 - 更新 MCP 配置示例,去除 query string 传 API Key 方式,增加 headers 示例。 - 明确建议首次用示例数据测试连通性,强调适用范围与合规评估要求。 - 其他功能和工具参数保持不变。
v1.0.4
- MCP Server 配置方式说明更新,API Key 需通过 URL 参数(?api_key=sk-xxxx)传递,移除 headers 方式。 - 新增 transport 指定为 "sse" 的说明,简化 MCP 配置步骤。 - 其余文档内容与工具参数无变动。
v1.0.3
- MCP Server 配置方式说明更新,API Key 需通过 URL 参数(?api_key=sk-xxxx)传递,移除 headers 方式。 - 新增 transport 指定为 "sse" 的说明,简化 MCP 配置步骤。 - 其余文档内容与工具参数无变动。
v1.0.2
- 修正 MCP Server 配置中的 URL,由 `/sse` 更新为 `/mcp/sse` - 其余功能及接口文档保持不变
v1.0.1
**Major update with improved clarity, structure, and usage guidance.** - Clarified pre-use configuration with step-by-step instructions and sample config. - Expanded tool explanations with detailed parameters, return fields, and real usage scenarios. - Enhanced example cases to illustrate complete DRG/DIP grouping and settlement workflows. - Updated descriptions for supported actions and parameters. - Removed obsolete/inferable config options; slimmed command dispatch details. - Improved formatting and language throughout for user-friendliness.
v1.0.0
- Initial release of DRG/DIP medical insurance grouping tool. - Supports ICD code search, DRG/DIP grouping, insurance settlement, and CC/MCC status queries. - Command accepts both JSON and multi-line key:value formats. - Each successful call consumes 5 quota points; quotas managed by MedGroup. - Requires linkage with MedGroup MCP Server and valid API Key.
Metadata
Slug medgroup-drgdip-skill
Version 1.0.10
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 11
Frequently Asked Questions

What is DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。?

DRG/DIP 医保分组计算 — ICD 编码搜索、DRG/DIP 分组、医保结算、CC/MCC 查询。需使用个人 MedGroup API Key 并连接 MedGroup MCP SSE。 It is an AI Agent Skill for Claude Code / OpenClaw, with 303 downloads so far.

How do I install DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。?

Run "/install medgroup-drgdip-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。 free?

Yes, DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。 support?

DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created DRG/DIP 医保分组计算工具 — 支持 ICD 编码搜索、DRG/DIP 分组、医保结算和 CC/MCC 查询。?

It is built and maintained by u201013903 (@u201013903); the current version is v1.0.10.

💬 Comments