npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@medical-mcp/pregnancy-due-dates-mcp-server

v1.0.0

Published

预产期计算器 - 基于中国人群数据的妊娠期计算工具 MCP Server

Downloads

12

Readme

预产期计算器 MCP Server

基于中国人群数据的专业妊娠期预产期计算工具,采用最新医学研究成果,为临床医生和孕妇提供精确的预产期估算。

功能特性

🎯 多种计算方法

  • 末次月经法(LMP): 基于Naegele规则,支持非标准月经周期调整
  • 头臀长测量法(CRL): 采用中国2025年多中心研究公式,专为中国人群优化
  • 孕龄估算法(EGA): 基于超声检查的孕龄逆推预产期
  • 受孕日期法: 精确的受孕日期直接计算
  • IVF/FET专用法: 辅助生殖技术专用算法,支持不同胚胎日龄

📊 先进的医学公式

  • 中国2025公式: GA(天) = 59.590085 + 0.458539 × CRL(mm)
  • Sahota 2009公式: GA(天) = 26.643 + 7.822 × √CRL(mm)
  • ACOG改期标准: 自动评估是否需要根据超声结果调整预产期

🏥 临床实用功能

  • 妊娠期里程碑时间表(NT筛查、系统筛查、糖耐量试验等)
  • 智能预产期方法对比和准确性评估
  • 完整的临床警告和注意事项
  • 符合中国产科临床实践标准

🔒 安全性保障

  • 严格的输入验证和边界检查
  • 完善的错误处理和异常提示
  • 医疗免责声明和临床指导建议

快速开始

安装

npm install @medical-mcp/pregnancy-due-dates-mcp-server

Claude Desktop 配置

在 Claude Desktop 配置文件中添加:

{
  "mcpServers": {
    "pregnancy-due-dates": {
      "command": "npx",
      "args": ["@medical-mcp/pregnancy-due-dates-mcp-server"]
    }
  }
}

基本使用

1. 根据末次月经计算预产期

计算预产期:
- 末次月经:2024年1月1日
- 月经周期:28天

2. 根据头臀长(CRL)计算预产期

根据超声检查计算预产期:
- 头臀长:65毫米
- 检查日期:2024年3月15日
- 使用中国人群公式

3. IVF胚胎移植预产期

IVF预产期计算:
- 移植日期:2024年2月20日
- 胚胎日龄:Day5囊胚

工具详解

calculate_edd_from_lmp

根据末次月经计算预产期,支持非标准月经周期

参数:

  • lmpDate: 末次月经第一天(YYYY-MM-DD)
  • cycleLength: 月经周期长度(21-45天,默认28天)
  • calculationDate: 计算基准日期(可选,默认今天)

calculate_edd_from_crl

根据头臀长计算预产期,使用中国人群专用公式

参数:

  • crlLength: 头臀长测量值(15-100毫米)
  • scanDate: 超声检查日期(YYYY-MM-DD)
  • formula: 计算公式(chinese2025/sahota2009,默认chinese2025)
  • calculationDate: 计算基准日期(可选)

calculate_edd_from_ivf

IVF/FET专用预产期计算

参数:

  • transferDate: 胚胎移植日期(YYYY-MM-DD)
  • embryoAge: 胚胎日龄(3、5或6天)
  • calculationDate: 计算基准日期(可选)

get_pregnancy_milestones

获取妊娠期重要时间点和产检建议

参数:

  • edd: 预产期(YYYY-MM-DD)
  • lmp: 末次月经日期(YYYY-MM-DD)
  • calculationDate: 计算基准日期(可选)

compare_due_date_methods

比较不同计算方法的准确性,提供ACOG改期建议

参数:

  • lmpDate: 末次月经日期(YYYY-MM-DD)
  • crlLength: 头臀长(可选,毫米)
  • scanDate: 扫描日期(可选,YYYY-MM-DD)
  • cycleLength: 月经周期(可选,默认28天)

医学背景

中国人群专用公式

本工具采用2025年发表在BMC Pregnancy and Childbirth的中国13家三甲医院多中心前瞻性研究成果,基于4,710例中国自然受孕单胎数据建立:

公式: GA(天) = 59.590085 + 0.458539 × CRL(mm) 适用范围: 11-14周胎儿头臀长测量 准确性: 与月经孕周平均差异仅0.32天 R²值: 0.8042

ACOG改期标准

  • 14周前: 超声与LMP差异 >7天 建议改期
  • 16-21+6周: 差异 >10天 建议改期
  • 22-27+6周: 差异 >14天 建议改期

IVF专用算法

公式: EDD = 胚胎移植日 + 266天 - 胚胎日龄

  • Day3胚胎: 移植日 + 263天
  • Day5胚胎: 移植日 + 261天
  • Day6胚胎: 移植日 + 260天

临床应用场景

1. 门诊初诊

  • 快速估算预产期
  • 评估孕龄准确性
  • 制定产检计划

2. 早孕期超声

  • CRL与LMP对比
  • 决定是否改期
  • 多胎妊娠筛查

3. 辅助生殖

  • IVF/FET精确计算
  • 胚胎发育评估
  • 助孕技术咨询

4. 科研应用

  • 妊娠期流行病学
  • 临床试验设计
  • 队列研究分析

开发指南

项目结构

src/
├── index.ts          # MCP服务器主文件
├── types.ts          # TypeScript类型定义
tests/
├── calculations.test.ts    # 计算功能测试
├── index.test.ts          # 主服务器测试
└── integration.test.ts    # 集成测试

本地开发

# 克隆项目
git clone <repository-url>
cd pregnancy-due-dates-mcp-server

# 安装依赖
npm install

# 开发模式
npm run dev

# 运行测试
npm test

# 构建项目
npm run build

# 生成DXT扩展
npm run pack:dxt

测试覆盖

  • 单元测试:验证各个计算函数的准确性
  • 集成测试:测试完整的计算流程
  • 边界测试:验证输入验证和边界条件
  • 临床场景测试:模拟真实医疗使用场景

注意事项

⚠️ 医疗免责声明

  • 本工具计算结果仅供医学参考,不能替代专业医疗判断
  • 预产期为估算值,实际分娩时间可能有±2周的正常变动
  • 高危妊娠或异常情况请及时就医咨询产科医生
  • 使用本工具请确保了解其局限性和适用范围

📋 使用限制

  • 适用于单胎妊娠,多胎妊娠需特殊考虑
  • CRL公式最佳适用范围为11-14周
  • 月经周期极不规律者建议以超声为准
  • 特殊医疗情况请咨询专科医生

🔍 准确性说明

  • 早孕期超声(11-14周)准确性最高
  • IVF/FET方法具有最高精确度
  • 中孕期后(20周+)准确性逐渐下降
  • 建议结合多种方法综合判断

参考文献

  1. Zhang Y, et al. Gestational age reference from crown-rump length during 11–14 weeks: a population-based multicenter cohort study in China. BMC Pregnancy and Childbirth (2025).

  2. Sahota DS, et al. Fetal crown–rump length and estimation of gestational age in an ethnic Chinese population. Ultrasound Obstet Gynecol (2009).

  3. ACOG Committee Opinion No.700: Methods for Estimating the Due Date. American College of Obstetricians and Gynecologists (2017).

  4. ISUOG Practice Guidelines: Performance of 11-14 week ultrasound scan. Ultrasound Obstet Gynecol (2023).

  5. 中华医学会围产医学分会. 胎儿生长发育评估指南. 中华围产医学杂志 (2024).

许可证

MIT License - 详见 LICENSE 文件

贡献

欢迎提交问题报告和功能建议!请参阅 贡献指南 了解详情。

联系方式

  • 项目主页: https://github.com/shanggqm/awesome-medical-mcp-server
  • 问题报告: https://github.com/shanggqm/awesome-medical-mcp-server/issues
  • 邮箱: [email protected]