返回顶部
d

digital-twin-patient-builder数字孪生患者建模

Build digital twin patient models to test drug efficacy and toxicity

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
163
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

digital-twin-patient-builder

数字孪生患者构建器 (ID: 208)

功能概述

构建患者的数字孪生模型,整合基因型、临床病史和影像数据,在虚拟环境中测试不同药物剂量的疗效和毒性。

应用场景

  • - 个性化药物治疗方案设计
  • 药物剂量优化
  • 不良反应风险评估
  • 临床试验虚拟仿真

输入

数据类型描述格式
genotype患者基因型数据(SNPs、CNVs)JSON
clinical_history
临床病史和实验室指标 | JSON | | imaging_features | 影像特征(MRI、CT等) | JSON |

输出

输出类型描述
efficacyprediction疗效预测结果
toxicityprediction
毒性反应预测 | | optimal_dose | 最佳剂量推荐 |

使用方法

命令行使用

bash
python scripts/main.py --patient patientdata.json --drug drugprofile.json --doses [50, 100, 150]

参数

参数类型默认值必需描述
--patient字符串-患者数据JSON文件路径
--drug
字符串 | - | 是 | 药物配置文件JSON文件路径 | | --doses | 字符串 | - | 是 | 待测试剂量范围(JSON数组格式) | | --output, -o | 字符串 | - | 否 | 模拟结果输出文件路径 | | --simulation-days | 整数 | 30 | 否 | 模拟天数 | | --timestep | 浮点数 | 0.5 | 否 | 模拟时间步长(天) |

Python API

python
from scripts.main import DigitalTwinBuilder

builder = DigitalTwinBuilder()
twin = builder.buildtwin(patientdata)
results = twin.simulatedrugregimen(drugprofile, doserange)

技术架构

digital-twin-patient-builder/
├── SKILL.md # 本文件
├── scripts/
│ └── main.py # 核心实现

├── 核心组件:
│ ├── PatientProfile # 患者档案管理
│ ├── GenotypeModel # 基因型建模
│ ├── ClinicalModel # 临床数据建模
│ ├── ImagingModel # 影像特征建模
│ ├── DigitalTwin # 数字孪生主类
│ ├── PharmacokineticModel # 药代动力学模型
│ └── DrugSimulator # 药物模拟器

依赖项

  • - numpy >= 1.21.0
  • scipy >= 1.7.0
  • pandas >= 1.3.0

示例数据格式

患者数据 (patient_data.json)

json { patient_id: P001, genotype: { CYP2D6: 1/4, TPMT: 1/3C, SNPs: {rs12345: AG, rs67890: CC} }, clinical: { age: 58, weight: 70.5, height: 170, lab_values: {creatinine: 1.2, alt: 45, ast: 38}, comorbidities: [hypertension, diabetes] }, imaging: { tumor_volume: 45.2, perfusion_rate: 0.85, texture_features: {entropy: 5.2, uniformity: 0.45} } }

药物配置文件 (drug_profile.json)

json { drug_name: ExampleDrug, drug_class: chemotherapy, metabolizing_enzymes: [CYP2D6, CYP3A4], target_genes: [EGFR, KRAS], pk_params: { clearance: 15.5, volume_distribution: 45.0, half_life: 8.0 }, efficacybiomarkers: [tumorreduction, survival_rate], toxicity_markers: [neutropenia, hepatotoxicity] }

模型原理

  1. 1. 基因型建模:解析药物代谢酶基因型以预测代谢表型(超快代谢/正常代谢/慢代谢)
  2. 生理建模:基于年龄、体重和器官功能计算个性化药代动力学参数
  3. 影像建模:提取肿瘤特征以预测药物反应性
  4. 集成模型:多模态数据融合构建综合数字孪生
  5. 药物模拟:PBPK(基于生理的药代动力学)+ PD(药效学)模型

参考文献

  • - PBPK建模指南(FDA,2018)
  • 精准医学中的药物基因组学(Nature Reviews,2020)

风险评估

风险指标评估等级
代码执行带工具的Python脚本
网络访问
外部API调用 | 高 | | 文件系统访问 | 读写数据 | 中 | | 指令篡改 | 标准提示指南 | 低 | | 数据泄露 | 安全处理数据 | 中 |

安全检查清单

  • - [ ] 无硬编码的凭据或API密钥
  • [ ] 无未经授权的文件系统访问(../)
  • [ ] 输出不暴露敏感信息
  • [ ] 已实施提示注入防护
  • [ ] API请求仅使用HTTPS
  • [ ] 输入已根据允许模式进行验证
  • [ ] 已实现API超时和重试机制
  • [ ] 输出目录限制在工作空间内
  • [ ] 在沙盒环境中执行脚本
  • [ ] 错误消息已清理(不暴露内部路径)
  • [ ] 已审计依赖项
  • [ ] 不暴露内部服务架构

前置条件

bash

Python依赖项


pip install -r requirements.txt

评估标准

成功指标

  • - [ ] 成功执行主要功能
  • [ ] 输出符合质量标准
  • [ ] 优雅处理边界情况
  • [ ] 性能可接受

测试用例

  1. 1. 基本功能:标准输入 → 预期输出
  2. 边界情况:无效输入 → 优雅的错误处理
  3. 性能:大数据集 → 可接受的处理时间

生命周期状态

  • - 当前阶段:草稿
  • 下次审核日期:2026-03-06
  • 已知问题:无
  • 计划改进
- 性能优化 - 额外功能支持

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 digital-twin-patient-builder-1776156061 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 digital-twin-patient-builder-1776156061 技能

通过命令行安装

skillhub install digital-twin-patient-builder-1776156061

下载

⬇ 下载 digital-twin-patient-builder v0.1.0(免费)

文件大小: 8.9 KB | 发布时间: 2026-4-17 14:39

v0.1.0 最新 2026-4-17 14:39
Initial release of Digital Twin Patient Builder.

- Enables building of virtual patient models with genotype, clinical, and imaging data.
- Simulates drug efficacy, toxicity, and optimal dosing in a virtual environment.
- Provides command-line and Python API interfaces.
- Includes example input/output formats for patient and drug profiles.
- Incorporates modular architecture for genotype, clinical, imaging, and PK/PD simulation.
- Documentation outlines security, usage, and evaluation criteria.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部