
本项目是基于@asymmetrik/node-fhir-server-core构建的示例项目,采用MongoDB作为后端存储样本数据,支持通过Docker或Node.js环境运行。该服务器可同时服务多个FHIR版本,默认启用R4(4_0_0)版本,同时支持DSTU2(1.0.2)和STU3(3.0.1)版本,可通过配置选择支持全部或特定版本。
适用于健康领域的FHIR API服务器快速部署、开发与测试,支持系统集成、FHIR版本兼容性验证、资源自定义配置等场景,尤其适合需要快速搭建FHIR服务原型的开发人员和***机构。
shelldocker-compose up
env.json文件中定义的默认配置值是否有效。shellyarn install # 或 npm install
shellyarn start # 或 npm run start
服务启动后默认监听3000端口,成功启动后将输出以下日志信息:
shell... - verbose: Server is up and running!
访问能力声明
默认启用R4版本的Patient和Organization资源,能力声明可通过以下链接访问:
如已启用其他版本,可访问:
患者资源操作示例
使用请求工具(如Postman)执行以下操作:
创建患者(R4版本)
httpPUT /4_0_0/Patient/example HTTP/1.1 Host: localhost:3000 Content-Type: application/fhir+json Cache-Control: no-cache { "resourceType": "Patient", "id": "example", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t<td>Peter James \n <b>Chalmers</b> ("Jim")\n </td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Address</td>\n\t\t\t\t\t\t<td>534 Erewhon, Pleasantville, Vic, 3999</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Contacts</td>\n\t\t\t\t\t\t<td>Home: unknown. Work: (03) 5555 6473</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Id</td>\n\t\t\t\t\t\t<td>MRN: 12345 (Acme Healthcare)</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>" }, "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345", "period": { "start": "2001-05-06" }, "assigner": { "display": "Acme Healthcare" } } ], "active": true, "name": [ { "use": "official", "family": "Chalmers", "given": ["Peter", "James"] }, { "use": "usual", "given": ["Jim"] }, { "use": "maiden", "family": "Windsor", "given": ["Peter", "James"], "period": { "end": "2002" } } ], "telecom": [ { "use": "home" }, { "system": "phone", "value": "(03) 5555 6473", "use": "work", "rank": 1 }, { "system": "phone", "value": "(03) 3410 5613", "use": "mobile", "rank": 2 }, { "system": "phone", "value": "(03) 5555 8834", "use": "old", "period": { "end": "2014" } } ], "gender": "male", "birthDate": "1974-12-25", "_birthDate": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", "valueDateTime": "1974-12-25T14:35:45-05:00" } ] }, "deceasedBoolean": false, "address": [ { "use": "home", "type": "both", "text": "534 Erewhon St PeasantVille, Rainbow, Vic 3999", "line": ["534 Erewhon St"], "city": "PleasantVille", "district": "Rainbow", "state": "Vic", "postalCode": "3999", "period": { "start": "1974-12-25" } } ], "contact": [ { "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0131", "code": "N" } ] } ], "name": { "family": "du Marché", "_family": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix", "valueString": "VV" } ] }, "given": ["Bénédicte"] }, "telecom": [ { "system": "phone", "value": "+33 (237) 998327" } ], "address": { "use": "home", "type": "both", "line": ["534 Erewhon St"], "city": "PleasantVille", "district": "Rainbow", "state": "Vic", "postalCode": "3999", "period": { "start": "1974-12-25" } }, "gender": "female", "period": { "start": "2012" } } ], "managingOrganization": { "reference": "Organization/1" } }
读取患者(R4版本)
httpGET /4_0_0/Patient/example HTTP/1.1 Host: localhost:3000 Content-Type: application/fhir+json Cache-Control: no-cache
本示例默认仅配置Patient和Organization资源。如需支持其他FHIR资源,需为相应资源实现服务代码。仅启用的资源会生成对应的API路由。可参考https://github.com/Asymmetrik/node-fhir-server-core#profiles%E6%96%87%E6%A1%A3%E6%9F%A5%E7%9C%8B%E6%94%AF%E6%8C%81%E7%9A%84%E8%B5%84%E6%BA%90%E5%88%97%E8%A1%A8%E3%80%82
@asymmetrik/fhir-server-mongo 采用 MIT 许可。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务