Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

fhir-data-model-designfhir 数据模型设计

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

1,469

周安装

60

GitHub Stars

11

下载量

470
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fhir-data-model-design(fhir 数据模型设计)
来源仓库:https://github.com/stanfordspezi/spezivibe
仓库路径:skills/fhir-data-model-design
安装命令:
npx skills add https://github.com/stanfordspezi/spezivibe --skill fhir-data-model-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/stanfordspezi/spezivibe --skill fhir-data-model-design

简介

辅助数据整理、表格处理、CSV/Excel 分析和指标计算,适合数据清洗和统计口径生成。

  • 适用于数据清洗、汇总、异常发现和分析结果转换场景。
  • 支持字段清洗、数据汇总、异常识别和统计说明生成。
  • 安装命令:npx skills add https://github.com/stanfordspezi/spezivibe --skill fhir-data-model-design。
  • 涉及敏感数据时需先确认权限和脱敏边界。

SKILL.md

FHIR Data Model Designer

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.

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]

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."*


Step 1: Understand Clinical Requirements

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."


Step 2: Map Clinical Concepts to FHIR Resources

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)ObservationAlways — use LOINC codes
Lab resultsObservationAlways — use LOINC codes
Patient-reported outcomes (PROs)ObservationSimple scores or derived values
Survey / questionnaire responsesQuestionnaireResponseMulti-item instruments (PHQ-9, GAD-7, custom)
Scored assessments (e.g., total PHQ-9)Observation (derived)Computed from a QuestionnaireResponse
Wearable / HealthKit dataObservationUse LOINC for standard metrics
Medications prescribedMedicationRequestClinician-prescribed
Medications self-reportedMedicationStatementPatient self-report
Medication adherenceMedicationStatement + ObservationStatement for doses; Observation for rate
Conditions / diagnosesConditionActive problems — use SNOMED CT or ICD-10
SymptomsCondition (persistent) or Observation (episodic)Persistent problems vs. measured episodes
Scheduled patient tasksTaskActionable to-dos assigned to the patient
Multi-activity longitudinal plansCarePlanWith Goal resources for targets
GoalsGoalReferenced from CarePlan
Study consentConsent + ResearchSubjectIRB consent, study participation
Clinical encountersEncounterVisit-based events
Documents / PDFs / attachmentsDocumentReferenceBinary content only
Summary grouping ObservationsDiagnosticReportClinical report
Multi-resource atomic writeBundle (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


Step 3: Select Terminologies

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
LOINChttp://loinc.orghttps://loinc.org/search/
SNOMED CThttp://snomed.info/scthttps://browser.ihtsdotools.org/
RxNormhttp://www.nlm.nih.gov/research/umls/rxnormhttps://mor.nlm.nih.gov/RxNav/
ICD-10-CMhttp://hl7.org/fhir/sid/icd-10-cmhttps://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc.html
CPThttp://www.ama-assn.org/go/cpthttps://www.cms.gov/medicare/regulations-guidance/physician-self-referral/list-cpt-hcpcs-codes
NCI Thesaurushttp://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owlhttps://ncit.nci.nih.gov/ncitbrowser/
UCUMhttp://unitsofmeasure.orghttps://ucum.org/ucum
HL7 Observation Categoryhttp://terminology.hl7.org/CodeSystem/observation-categoryhttps://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.


Step 4: Recommend Profiles and Implementation Guides

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.

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]

Step 5: Design Data Flow and Resource Relationships

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

Reference Format (always use)

ResourceType/id          e.g. Patient/abc123

For canonical URLs (Questionnaire, StructureDefinition):

http://[your-app].com/fhir/Questionnaire/[name]

Step 6: Produce the Data Model Specification Document

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.


# FHIR Data Model: [App Name]

> 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.

## Overview

| Field | Value |
|-------|-------|
| App | [App name and brief description] |
| Use case | [research / clinical / wellness / care coordination] |
| FHIR version | R4 (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] |

---

## Resources

<!-- One section per resource type used in the app -->

### [ResourceType]: [Clinical Concept]

| Field | Value |
|-------|-------|
| Resource | `[ResourceType]` |
| Profile | `[Profile URL or "Base FHIR R4"]` |
| Clinical use | [What this resource represents in the app] |

**Key fields:**

| Field | Type | Notes |
|-------|------|-------|
| `status` | code | [value set name, e.g., ObservationStatus] |
| `code` | CodeableConcept | Terminology binding (see below) |
| `subject` | Reference | `Patient/{id}` |
| [other fields] | | |

**Terminology bindings:**

| Field | Terminology System | Binding Strength |
|-------|-------------------|-----------------|
| `code` | LOINC (`http://loinc.org`) | required |
| `category` | HL7 Observation Category (`http://terminology.hl7.org/CodeSystem/observation-category`) | preferred |

**Sample FHIR JSON:**

{ "resourceType": "[ResourceType]", ... }


**FHIR R4 spec:** Start from [https://hl7.org/fhir/R4/resourcelist.html](https://hl7.org/fhir/R4/resourcelist.html) and open the relevant resource page for the chosen resource type.

---

## Terminology Bindings

Declares which terminology system governs each coded field. Specific codes are resolved at implementation time.

| Resource | Field | Terminology System | Binding Strength | Notes |
| --- | --- | --- | --- | --- |
| `Observation` | `code` | LOINC (`http://loinc.org`) | required | Use for all measurements and findings |
| `Observation` | `category` | HL7 Observation Category | preferred | `vital-signs`, `survey`, `laboratory`, `activity` |
| `Condition` | `code` | SNOMED CT (`http://snomed.info/sct`) | preferred | ICD-10-CM acceptable for billing contexts |
| `MedicationRequest` | `medicationCodeableConcept` | RxNorm (`http://www.nlm.nih.gov/research/umls/rxnorm`) | required | Clinical drugs |
| `Procedure` | `code` | SNOMED CT or CPT | preferred |  |
| [Resource] | [field] | [System URI] | required / preferred / example | [any notes] |

## Custom Code Systems

App-defined code systems for concepts with no standard terminology.

| Name | URI | Purpose |
| --- | --- | --- |
| [Name] | `http://[app].com/fhir/CodeSystem/[name]` | [What this code system classifies] |

## Resource Relationships

[Text diagram showing resource graph]


| Reference | From | To | Cardinality |
| --- | --- | --- | --- |
| `subject` | `Observation` | `Patient` | 1..1 |
| `derivedFrom` | `Observation` | `QuestionnaireResponse` | 0..* |
| `focus` | `Task` | `Questionnaire` | 0..1 |

## FHIR REST API Patterns

Standard FHIR REST API — works with any FHIR R4 server (Medplum, HAPI, Azure Health Data Services, Google Cloud Healthcare, etc.).

### Read

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


### Search

Patient's observations by code

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

Patient's tasks

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

Questionnaire responses for a specific questionnaire

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

Conditions with clinical status

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


### Write

POST /fhir/QuestionnaireResponse # Submit survey response POST /fhir/Observation # Record a measurement PUT /fhir/Task/{id} # Update task status

Atomic multi-resource write

POST /fhir/ # Bundle (type: transaction)


## 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]

## 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]

Reference: FHIR Resources Quick Reference

ResourceClinical UseRequired FieldsKey Search Params
PatientPerson in the appidentifier, name, birthdate
ObservationMeasurement or findingstatus, codesubject, code, date, category
QuestionnaireSurvey definitionstatusurl, name
QuestionnaireResponseCompleted surveystatussubject, questionnaire, authored
TaskPatient to-dostatus, intentpatient, status, code
CarePlanLongitudinal planstatus, intent, subjectpatient, status
GoalTarget outcomelifecycleStatus, description, subjectpatient, lifecycle-status
MedicationRequestPrescribed medicationstatus, intent, medication[x], subjectpatient, status
MedicationStatementSelf-reported medicationstatus, medication[x], subjectpatient, status
ConditionDiagnosis / problemcode, subjectpatient, code, clinical-status
ConsentConsent agreementstatus, scope, category, policyRulepatient, status
DiagnosticReportReport grouping Observationsstatus, codepatient, code, date
DeviceWearable / sensorstatuspatient, type

FHIR R4 Spec Links

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.95%
按下载量换算174

Claude

31.25%
按下载量换算147

Cursor

17.55%
按下载量换算82

Gemini CLI

9.64%
按下载量换算45

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills