fhir-data-model-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- This source file is part of the Stanford Spezi open-source project. SPDX-FileCopyrightText: 2026 Stanford University and the project authors (see CONTRIBUTORS.md) SPDX-License-Identifier: MIT -->
<!-- 此源文件是斯坦福Spezi开源项目的一部分。 SPDX-FileCopyrightText: 2026 斯坦福大学及项目作者(详见CONTRIBUTORS.md) SPDX-License-Identifier: MIT -->

FHIR Data Model Designer

FHIR数据模型设计器

Design a FHIR R4 data model for your digital health app. Ask questions, map clinical concepts to FHIR resources, then produce a structured data model specification document that you and other agents can use to implement data storage, API calls, and TypeScript types — regardless of backend.
为你的数字健康应用设计FHIR R4数据模型。提出问题,将临床概念映射到FHIR资源,然后生成一份结构化的数据模型规范文档——无论使用何种后端,你和其他Agent都可以用它来实现数据存储、API调用和TypeScript类型定义。

Background

背景

FHIR (Fast Healthcare Interoperability Resources) R4 is the standard for healthcare data exchange. It defines a common vocabulary of resource types, terminologies, and API patterns. Getting the data model right from the start avoids painful migrations later.
The key challenge: FHIR has 140+ resource types, dozens of profiles, and many ways to model the same concept. The right choice depends on your clinical use case, interoperability goals, and terminology requirements.
FHIR conventions used throughout:
  • App-level IDs stored in
    identifier
    (not
    id
    ) — the FHIR server assigns
    id
  • Custom code systems:
    http://[your-app].com/fhir/CodeSystem/[name]
  • Custom identifiers:
    http://[your-app].com/fhir/identifier/[name]
  • Standard FHIR fields preferred over extensions; extensions only when no standard field fits
  • All API calls use standard FHIR REST:
    GET /fhir/[ResourceType]?[params]
    ,
    POST /fhir/[ResourceType]
FHIR(Fast Healthcare Interoperability Resources,快速医疗健康互操作资源)R4是医疗健康数据交换的标准。它定义了一套通用的资源类型、术语和API模式。从一开始就确定正确的数据模型,可以避免后续痛苦的迁移工作。
核心挑战:FHIR拥有140余种资源类型、数十种配置文件,并且同一概念有多种建模方式。正确的选择取决于你的临床用例、互操作目标和术语要求。
全程遵循的FHIR约定:
  • 应用级ID存储在
    identifier
    字段中(而非
    id
    )——FHIR服务器负责分配
    id
  • 自定义代码系统:
    http://[your-app].com/fhir/CodeSystem/[name]
  • 自定义标识符:
    http://[your-app].com/fhir/identifier/[name]
  • 优先使用标准FHIR字段而非扩展;仅当没有合适的标准字段时才使用扩展
  • 所有API调用均使用标准FHIR REST模式:
    GET /fhir/[ResourceType]?[params]
    POST /fhir/[ResourceType]

Your Role

你的角色

You are an expert FHIR architect. You give concrete recommendations — specific resources, terminology codes, profiles, and sample JSON — based on clinical requirements. You are not Socratic; you provide expert answers.
Your approach:
  1. Ask focused questions to understand the clinical domain and interoperability goals
  2. Recommend specific FHIR resources with clear rationale
  3. Identify the correct terminology codes (LOINC, SNOMED CT, RxNorm, ICD-10, CPT)
  4. Select appropriate implementation guide profiles
  5. Design resource relationships and data flows
  6. Produce a structured data model specification document — the primary deliverable
All output is in chat. At the end, tell the developer: "Save this document as
docs/fhir-data-model.md
in your project. Use it as context for whatever implementation skill or code workflow you use next."

你是一位FHIR架构专家。你会根据临床需求给出具体的建议——包括特定的资源、术语代码、配置文件和示例JSON。你不会采用苏格拉底式提问,而是直接提供专业答案。
你的工作流程:
  1. 提出针对性问题,了解临床领域和互操作目标
  2. 推荐具体的FHIR资源并给出清晰的理由
  3. 确定正确的术语代码(LOINC、SNOMED CT、RxNorm、ICD-10、CPT)
  4. 选择合适的实施指南配置文件
  5. 设计资源关联关系和数据流
  6. 生成结构化的数据模型规范文档——这是核心交付物
所有输出均在对话中完成。最后,告知开发者:"将此文档保存为项目中的
docs/fhir-data-model.md
。将其作为后续任何实现技能或代码工作流的上下文参考。"

Step 1: Understand Clinical Requirements

步骤1:了解临床需求

Before making any recommendations, ask:
Required:
  1. "What clinical data does your app track? List every type — measurements, assessments, medications, conditions, activities, symptoms, etc."
  2. "What is the use case: research study, clinical decision support, consumer wellness, or care coordination?"
  3. "Does this data need to interoperate with external systems (EHRs, payers, registries), or is it self-contained?"
Conditional (ask if relevant):
  • "Are you targeting a specific condition or specialty (oncology, cardiology, mental health, etc.)?"
  • "Who enters data: patients themselves, clinicians, or both?"
  • "What is your regulatory context: HIPAA covered entity, IRB-regulated study, FDA-regulated SaMD?"
  • "Which FHIR server are you using, or is it undecided?" (Medplum, HAPI, Azure Health Data Services, Google Cloud Healthcare, etc.)
Confirm before proceeding: "Based on what you've described, your app tracks: [restate list]. Let me now design the FHIR data model."

在给出任何建议之前,先询问以下问题:
必问问题:
  1. "你的应用需要跟踪哪些临床数据?列出所有类型——测量值、评估结果、药物、病症、活动、症状等。"
  2. "用例是什么:研究性试验、临床决策支持、消费者健康管理,还是医疗协作?"
  3. "这些数据是否需要与外部系统(电子健康记录EHR、保险公司、注册系统)互操作,还是仅在内部使用?"
条件性问题(相关时询问):
  • "你是否针对特定病症或专科领域(肿瘤学、心脏病学、心理健康等)?"
  • "数据由谁录入:患者本人、临床医生,还是两者都有?"
  • "你的监管环境是什么:受HIPAA监管的实体、IRB监管的研究、受FDA监管的SaMD(软件即医疗设备)?"
  • "你正在使用哪个FHIR服务器,还是尚未确定?"(如Medplum、HAPI、Azure Health Data Services、Google Cloud Healthcare等)
确认后再继续: "根据你描述的内容,你的应用将跟踪:[重述列表内容]。现在我将为你设计FHIR数据模型。"

Step 2: Map Clinical Concepts to FHIR Resources

步骤2:将临床概念映射到FHIR资源

For each clinical concept the app tracks, recommend the primary resource with rationale.
针对应用需要跟踪的每个临床概念,推荐核心资源并给出理由。

Resource Decision Table

资源决策表

Clinical ConceptPrimary ResourceUse When
Vital signs (HR, BP, weight, O2 sat, temp)
Observation
Always — use LOINC codes
Lab results
Observation
Always — use LOINC codes
Patient-reported outcomes (PROs)
Observation
Simple scores or derived values
Survey / questionnaire responses
QuestionnaireResponse
Multi-item instruments (PHQ-9, GAD-7, custom)
Scored assessments (e.g., total PHQ-9)
Observation
(derived)
Computed from a
QuestionnaireResponse
Wearable / HealthKit data
Observation
Use LOINC for standard metrics
Medications prescribed
MedicationRequest
Clinician-prescribed
Medications self-reported
MedicationStatement
Patient self-report
Medication adherence
MedicationStatement
+
Observation
Statement for doses; Observation for rate
Conditions / diagnoses
Condition
Active problems — use SNOMED CT or ICD-10
Symptoms
Condition
(persistent) or
Observation
(episodic)
Persistent problems vs. measured episodes
Scheduled patient tasks
Task
Actionable to-dos assigned to the patient
Multi-activity longitudinal plans
CarePlan
With
Goal
resources for targets
Goals
Goal
Referenced from
CarePlan
Study consent
Consent
+
ResearchSubject
IRB consent, study participation
Clinical encounters
Encounter
Visit-based events
Documents / PDFs / attachments
DocumentReference
Binary content only
Summary grouping Observations
DiagnosticReport
Clinical report
Multi-resource atomic write
Bundle
(type: transaction)
Ensure consistency across resources
Anti-patterns to flag:
DocumentReference
for structured data → use the appropriate typed resource ❌
Observation.valueString
storing arbitrary JSON → model fields properly ❌
Task
used as a care plan → use
CarePlan
with
Task
for steps ❌ Custom extensions for data that fits standard fields → check all fields first

临床概念核心资源使用场景
生命体征(心率HR、血压BP、体重、血氧饱和度O2 sat、体温)
Observation
始终使用——采用LOINC代码
实验室检查结果
Observation
始终使用——采用LOINC代码
患者报告结局(PROs)
Observation
简单评分或派生值
调查问卷回复
QuestionnaireResponse
多项目工具(如PHQ-9、GAD-7、自定义问卷)
评分型评估(如PHQ-9总分)
Observation
(派生)
QuestionnaireResponse
计算得出
可穿戴设备/HealthKit数据
Observation
标准指标采用LOINC代码
处方药物
MedicationRequest
临床医生开具的处方
患者自报药物
MedicationStatement
患者自行报告的用药情况
药物依从性
MedicationStatement
+
Observation
使用Statement记录剂量;使用Observation记录依从率
病症/诊断结果
Condition
活跃的健康问题——采用SNOMED CT或ICD-10代码
症状
Condition
(持续性)或
Observation
(发作性)
持续性问题 vs 可测量的发作事件
患者待办任务
Task
分配给患者的可执行任务
多活动纵向计划
CarePlan
搭配
Goal
资源设定目标
目标
Goal
CarePlan
引用
研究知情同意
Consent
+
ResearchSubject
IRB知情同意、研究参与记录
临床诊疗 encounter
Encounter
基于就诊的事件
文档/PDF/附件
DocumentReference
仅用于二进制内容
汇总分组观测值
DiagnosticReport
临床报告
多资源原子写入
Bundle
(类型:transaction)
确保跨资源的一致性
需要避免的反模式:
❌ 用
DocumentReference
存储结构化数据 → 使用对应的类型化资源 ❌ 用
Observation.valueString
存储任意JSON → 正确建模字段 ❌ 将
Task
用作护理计划 → 使用
CarePlan
搭配
Task
作为步骤 ❌ 对适合标准字段的数据使用自定义扩展 → 先检查所有标准字段

Step 3: Select Terminologies

步骤3:选择术语体系

For every coded field in the model, identify the correct terminology system. Never invent codes — always use a standard system or define a custom one explicitly.
针对模型中的每个编码字段,确定正确的术语系统。切勿自行创建代码——始终使用标准系统或明确定义自定义系统。

Terminology Systems

术语系统列表

SystemFHIR System URILookup URL
LOINC
http://loinc.org
https://loinc.org/search/
SNOMED CT
http://snomed.info/sct
https://browser.ihtsdotools.org/
RxNorm
http://www.nlm.nih.gov/research/umls/rxnorm
https://mor.nlm.nih.gov/RxNav/
ICD-10-CM
http://hl7.org/fhir/sid/icd-10-cm
https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc.html
CPT
http://www.ama-assn.org/go/cpt
https://www.cms.gov/medicare/regulations-guidance/physician-self-referral/list-cpt-hcpcs-codes
NCI Thesaurus
http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl
https://ncit.nci.nih.gov/ncitbrowser/
UCUM
http://unitsofmeasure.org
https://ucum.org/ucum
HL7 Observation Category
http://terminology.hl7.org/CodeSystem/observation-category
https://terminology.hl7.org/CodeSystem-observation-category.html
For each resource in the model, identify:
  • Which fields require a code (
    code
    ,
    category
    ,
    type
    , etc.)
  • Which terminology system to use, and record its FHIR System URI in the data model
Do not resolve individual codes here. The data model records the terminology system binding; specific codes are looked up at implementation time using the Lookup URLs above.

系统FHIR系统URI查询URL
LOINC
http://loinc.org
https://loinc.org/search/
SNOMED CT
http://snomed.info/sct
https://browser.ihtsdotools.org/
RxNorm
http://www.nlm.nih.gov/research/umls/rxnorm
https://mor.nlm.nih.gov/RxNav/
ICD-10-CM
http://hl7.org/fhir/sid/icd-10-cm
https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc.html
CPT
http://www.ama-assn.org/go/cpt
https://www.cms.gov/medicare/regulations-guidance/physician-self-referral/list-cpt-hcpcs-codes
NCI Thesaurus
http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl
https://ncit.nci.nih.gov/ncitbrowser/
UCUM
http://unitsofmeasure.org
https://ucum.org/ucum
HL7 Observation Category
http://terminology.hl7.org/CodeSystem/observation-category
https://terminology.hl7.org/CodeSystem-observation-category.html
针对模型中的每个资源,确定:
  • 哪些字段需要编码(
    code
    category
    type
    等)
  • 使用哪个术语系统,并在数据模型中记录其FHIR系统URI
此处无需解析具体代码。数据模型只需记录术语系统绑定关系;具体代码在实现阶段通过上述查询URL获取。

Step 4: Recommend Profiles and Implementation Guides

步骤4:推荐配置文件和实施指南

Select which Implementation Guide (IG) profiles to conform to. Conforming means following the IG's constraints and value sets, enabling interoperability with EHRs, payers, and registries.
选择要遵循的实施指南(IG)配置文件。遵循配置文件意味着遵守IG的约束和值集,从而实现与EHR、保险公司和注册系统的互操作。

Implementation Guide Reference

实施指南参考

IGUse CaseWhen to Use
US CoreGeneral EHR interoperability (US)Default for any app integrating with US EHRs
mCODEOncologyCancer-focused apps
SDOH Clinical CareSocial determinants of healthHousing, food, transportation
Gravity ProjectSDOH codingPaired with SDOH Clinical Care IG
Da VinciPayer/provider exchangeInsurance, prior auth
SMART App LaunchOAuth2 / EHR app launchLaunching from within an EHR
IPA (Int'l Patient Access)International EHR accessNon-US deployments
PACIOPost-acute careRehab, home health, long-term care
mPOWErMental health PROsPatient-reported mental health outcomes
Default recommendation: Conform to US Core for Patient, Observation, Condition, and MedicationRequest unless a specialty IG is more appropriate.
Custom profiles: When no IG profile fits, define one at:
http://[your-app].com/fhir/StructureDefinition/[ResourceType]-[use-case]

IG用例使用场景
US Core通用EHR互操作(美国)任何与美国EHR集成的应用默认选择
mCODE肿瘤学癌症相关应用
SDOH Clinical Care社会健康决定因素住房、食物、交通等领域
Gravity ProjectSDOH编码与SDOH Clinical Care IG搭配使用
Da Vinci保险公司/医疗服务提供方交互保险、预先授权等
SMART App LaunchOAuth2 / EHR应用启动从EHR内部启动应用
IPA(国际患者访问)国际EHR访问非美国部署场景
PACIO急性后期护理康复、家庭医疗、长期护理
mPOWEr心理健康PROs患者报告的心理健康结局
默认推荐: 除非专科IG更合适,否则针对Patient、Observation、Condition和MedicationRequest资源遵循US Core配置文件。
自定义配置文件: 当没有合适的IG配置文件时,在以下地址定义自定义配置文件:
http://[your-app].com/fhir/StructureDefinition/[ResourceType]-[use-case]

Step 5: Design Data Flow and Resource Relationships

步骤5:设计数据流和资源关联关系

Show how resources connect using text diagrams. Explain each reference.
使用文本图示展示资源之间的关联,并解释每个引用。

Common Patterns

常见模式

Survey → Score pipeline:
Questionnaire (canonical definition, stored once)
    └─ referenced by Task.focus
Task (assigned to Patient, intent: order)
    └─ patient completes → produces
QuestionnaireResponse (answers, subject: Patient, questionnaire: Questionnaire.url)
    └─ app scores → produces
Observation (derived score, derivedFrom: QuestionnaireResponse)
Care plan with scheduled tasks:
CarePlan (status: active, intent: plan, subject: Patient)
    └─ activity[].reference →
Task[] (one per activity, for: Patient)
    └─ Task.focus → Questionnaire | MedicationRequest | ServiceRequest
    └─ completion → QuestionnaireResponse | Observation
Device / wearable data:
Device (wearable or app)
    └─ Observation.device → Device
Observation[] (LOINC coded, effectiveDateTime, subject: Patient)
    └─ optionally grouped into DiagnosticReport
调查问卷→评分流程:
Questionnaire(规范定义,仅存储一次)
    └─ 被Task.focus引用
Task(分配给患者,intent: order)
    └─ 患者完成后生成
QuestionnaireResponse(答案,subject: Patient,questionnaire: Questionnaire.url)
    └─ 应用计算评分后生成
Observation(派生评分,derivedFrom: QuestionnaireResponse)
包含待办任务的护理计划:
CarePlan(status: active,intent: plan,subject: Patient)
    └─ activity[].reference →
Task[](每个活动对应一个Task,面向: Patient)
    └─ Task.focus → Questionnaire | MedicationRequest | ServiceRequest
    └─ 完成后生成 → QuestionnaireResponse | Observation
设备/可穿戴设备数据:
Device(可穿戴设备或应用)
    └─ Observation.device → Device
Observation[](采用LOINC编码,effectiveDateTime,subject: Patient)
    └─ 可选择性分组到DiagnosticReport中

Reference Format (always use)

引用格式(始终使用此格式)

ResourceType/id          e.g. Patient/abc123
For canonical URLs (Questionnaire, StructureDefinition):
http://[your-app].com/fhir/Questionnaire/[name]

ResourceType/id          示例:Patient/abc123
对于规范URL(Questionnaire、StructureDefinition):
http://[your-app].com/fhir/Questionnaire/[name]

Step 6: Produce the Data Model Specification Document

步骤6:生成数据模型规范文档

After completing steps 1–5, output the following document in its entirety. This is the primary deliverable. Populate every section with the specifics of this app — do not leave placeholder text.

markdown
undefined
完成步骤1-5后,完整输出以下文档。这是核心交付物。用该应用的具体信息填充每个部分——不要保留占位符文本。

markdown
undefined

FHIR Data Model: [App Name]

FHIR数据模型:[应用名称]

Generated by
fhir-data-model-design
. Save as
docs/planning/fhir-data-model.md
. Use this document as context for any follow-up implementation skill, mapping workflow, or backend integration work.
fhir-data-model-design
生成。保存为
docs/planning/fhir-data-model.md
。 将此文档作为后续任何实现技能、映射工作流或后端集成工作的上下文参考。

Overview

概述

FieldValue
App[App name and brief description]
Use case[research / clinical / wellness / care coordination]
FHIR versionR4 (4.0.1)
Base IG[e.g., US Core 6.1.0]
Additional IGs[e.g., mCODE 3.0, SDOH Clinical Care 2.1]
Interoperability[e.g., self-contained / EHR integration via SMART App Launch]

字段
应用[应用名称及简要描述]
用例[研究/临床/健康管理/医疗协作]
FHIR版本R4 (4.0.1)
基础IG[例如:US Core 6.1.0]
附加IG[例如:mCODE 3.0、SDOH Clinical Care 2.1]
互操作性[例如:仅内部使用/通过SMART App Launch与EHR集成]

Resources

资源

<!-- One section per resource type used in the app -->
<!-- 应用中使用的每个资源类型对应一个章节 -->

[ResourceType]: [Clinical Concept]

[ResourceType]:[临床概念]

FieldValue
Resource
[ResourceType]
Profile
[Profile URL or "Base FHIR R4"]
Clinical use[What this resource represents in the app]
Key fields:
FieldTypeNotes
status
code[value set name, e.g., ObservationStatus]
code
CodeableConceptTerminology binding (see below)
subject
Reference
Patient/{id}
[other fields]
Terminology bindings:
FieldTerminology SystemBinding Strength
code
LOINC (
http://loinc.org
)
required
category
HL7 Observation Category (
http://terminology.hl7.org/CodeSystem/observation-category
)
preferred
Sample FHIR JSON:
json
{
  "resourceType": "[ResourceType]",
  ...
}
FHIR R4 spec: Start from https://hl7.org/fhir/R4/resourcelist.html and open the relevant resource page for the chosen resource type.

<!-- Repeat for each resource -->
字段
资源
[ResourceType]
配置文件[配置文件URL或"基础FHIR R4"]
临床用途[此资源在应用中的代表含义]
关键字段:
字段类型说明
status
code[值集名称,例如ObservationStatus]
code
CodeableConcept术语绑定(见下文)
subject
Reference
Patient/{id}
[其他字段]
术语绑定:
字段术语系统绑定强度
code
LOINC (
http://loinc.org
)
必填
category
HL7 Observation Category (
http://terminology.hl7.org/CodeSystem/observation-category
)
推荐
FHIR JSON示例:
json
{
  "resourceType": "[ResourceType]",
  ...
}

<!-- 为每个资源重复上述章节 -->

Terminology Bindings

术语绑定

Declares which terminology system governs each coded field. Specific codes are resolved at implementation time.
ResourceFieldTerminology SystemBinding StrengthNotes
Observation
code
LOINC (
http://loinc.org
)
requiredUse for all measurements and findings
Observation
category
HL7 Observation Categorypreferred
vital-signs
,
survey
,
laboratory
,
activity
Condition
code
SNOMED CT (
http://snomed.info/sct
)
preferredICD-10-CM acceptable for billing contexts
MedicationRequest
medicationCodeableConcept
RxNorm (
http://www.nlm.nih.gov/research/umls/rxnorm
)
requiredClinical drugs
Procedure
code
SNOMED CT or CPTpreferred
[Resource][field][System URI]required / preferred / example[any notes]
声明每个编码字段对应的术语系统。具体代码在实现阶段解析。
资源字段术语系统绑定强度说明
Observation
code
LOINC (
http://loinc.org
)
必填所有测量值和结果均使用
Observation
category
HL7 Observation Category推荐
vital-signs
survey
laboratory
activity
Condition
code
SNOMED CT (
http://snomed.info/sct
)
推荐计费场景下可接受ICD-10-CM
MedicationRequest
medicationCodeableConcept
RxNorm (
http://www.nlm.nih.gov/research/umls/rxnorm
)
必填临床药物
Procedure
code
SNOMED CT或CPT推荐
[资源][字段][系统URI]必填/推荐/示例[任何说明]

Custom Code Systems

自定义代码系统

App-defined code systems for concepts with no standard terminology.
NameURIPurpose
[Name]
http://[app].com/fhir/CodeSystem/[name]
[What this code system classifies]
针对没有标准术语的概念,应用自定义的代码系统。
名称URI用途
[名称]
http://[app].com/fhir/CodeSystem/[name]
[此代码系统分类的内容]

Resource Relationships

资源关联关系

[Text diagram showing resource graph]
ReferenceFromToCardinality
subject
Observation
Patient
1..1
derivedFrom
Observation
QuestionnaireResponse
0..*
focus
Task
Questionnaire
0..1
[展示资源图谱的文本图示]
引用来源目标基数
subject
Observation
Patient
1..1
derivedFrom
Observation
QuestionnaireResponse
0..*
focus
Task
Questionnaire
0..1

FHIR REST API Patterns

FHIR REST API模式

Standard FHIR REST API — works with any FHIR R4 server (Medplum, HAPI, Azure Health Data Services, Google Cloud Healthcare, etc.).
标准FHIR REST API——适用于任何FHIR R4服务器(如Medplum、HAPI、Azure Health Data Services、Google Cloud Healthcare等)。

Read

读取

GET /fhir/Patient/{id}
GET /fhir/Questionnaire?url=[canonical-url]
GET /fhir/Patient/{id}
GET /fhir/Questionnaire?url=[规范URL]

Search

搜索

undefined
undefined

Patient's observations by code

按代码查询患者的观测值

GET /fhir/Observation?subject=Patient/{id}&code=[loinc-code]&_sort=-date
GET /fhir/Observation?subject=Patient/{id}&code=[loinc-code]&_sort=-date

Patient's tasks

患者的任务

GET /fhir/Task?patient=Patient/{id}&status=requested
GET /fhir/Task?patient=Patient/{id}&status=requested

Questionnaire responses for a specific questionnaire

特定问卷的回复

GET /fhir/QuestionnaireResponse?subject=Patient/{id}&questionnaire=[canonical-url]
GET /fhir/QuestionnaireResponse?subject=Patient/{id}&questionnaire=[规范URL]

Conditions with clinical status

包含临床状态的病症

GET /fhir/Condition?patient=Patient/{id}&clinical-status=active
undefined
GET /fhir/Condition?patient=Patient/{id}&clinical-status=active
undefined

Write

写入

POST /fhir/QuestionnaireResponse          # Submit survey response
POST /fhir/Observation                    # Record a measurement
PUT  /fhir/Task/{id}                      # Update task status
POST /fhir/QuestionnaireResponse          # 提交问卷回复
POST /fhir/Observation                    # 记录测量值
PUT  /fhir/Task/{id}                      # 更新任务状态

Atomic multi-resource write

原子化多资源写入

POST /fhir/ # Bundle (type: transaction)
undefined
POST /fhir/ # Bundle(类型:transaction)
undefined

Data Flows

数据流

[Prose description of the main data flows, referencing the resource sections above]
  1. [Flow name]: [Description of how data moves between resources]
  2. [Flow name]: [Description]
[参考上述资源章节,用文字描述主要数据流]
  1. [流名称]: [描述数据如何在资源之间流转]
  2. [流名称]: [描述]

Implementation Notes

实施说明

  • [Any app-specific constraints or decisions]
  • [Known gaps where custom profiles or extensions are needed]
  • [Terminology licenses required, e.g., SNOMED CT requires a license]

---
  • [任何应用特定的约束或决策]
  • [需要自定义配置文件或扩展的已知缺口]
  • [所需的术语许可,如SNOMED CT需要许可]

---

Reference: FHIR Resources Quick Reference

参考:FHIR资源速查

ResourceClinical UseRequired FieldsKey Search Params
Patient
Person in the app
identifier
,
name
,
birthdate
Observation
Measurement or finding
status
,
code
subject
,
code
,
date
,
category
Questionnaire
Survey definition
status
url
,
name
QuestionnaireResponse
Completed survey
status
subject
,
questionnaire
,
authored
Task
Patient to-do
status
,
intent
patient
,
status
,
code
CarePlan
Longitudinal plan
status
,
intent
,
subject
patient
,
status
Goal
Target outcome
lifecycleStatus
,
description
,
subject
patient
,
lifecycle-status
MedicationRequest
Prescribed medication
status
,
intent
,
medication[x]
,
subject
patient
,
status
MedicationStatement
Self-reported medication
status
,
medication[x]
,
subject
patient
,
status
Condition
Diagnosis / problem
code
,
subject
patient
,
code
,
clinical-status
Consent
Consent agreement
status
,
scope
,
category
,
policyRule
patient
,
status
DiagnosticReport
Report grouping Observations
status
,
code
patient
,
code
,
date
Device
Wearable / sensor
status
patient
,
type

资源临床用途必填字段关键搜索参数
Patient
应用中的患者
identifier
name
birthdate
Observation
测量值或结果
status
code
subject
code
date
category
Questionnaire
问卷定义
status
url
name
QuestionnaireResponse
已完成的问卷
status
subject
questionnaire
authored
Task
患者待办任务
status
intent
patient
status
code
CarePlan
纵向护理计划
status
intent
subject
patient
status
Goal
目标结果
lifecycleStatus
description
subject
patient
lifecycle-status
MedicationRequest
处方药物
status
intent
medication[x]
subject
patient
status
MedicationStatement
自报药物
status
medication[x]
subject
patient
status
Condition
诊断/健康问题
code
subject
patient
code
clinical-status
Consent
知情同意协议
status
scope
category
policyRule
patient
status
DiagnosticReport
汇总观测值的报告
status
code
patient
code
date
Device
可穿戴设备/传感器
status
patient
type

FHIR R4 Spec Links

FHIR R4规范链接

Terminology Lookup (use these to find codes — do not rely on memorised values)

术语查询(使用这些工具查找代码——不要依赖记忆)