Token导航 LogoToken导航TokenDH.com
研究检索需要联网githubverified来源可访问clear审计通过

fhir-developer-skillFIR 开发人员技能

Agent Skill

fhir-developer-skill 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,424

周安装

233

GitHub Stars

210

下载量

1,901
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:fhir-developer-skill(FIR 开发人员技能)
来源仓库:https://github.com/anthropics/healthcare
仓库路径:skills/fhir-developer-skill
安装命令:
npx skills add https://github.com/anthropics/healthcare --skill fhir-developer-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/anthropics/healthcare --skill fhir-developer-skill

简介

fhir-developer-skill 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景进行信息定位的场景。
  • 通过关键词搜索和来源线索筛选目标信息。
  • 安装命令:npx skills add https://github.com/anthropics/healthcare --skill fhir-developer-skill。
  • 建议确认权限范围和维护状态后再使用。

SKILL.md

FHIR Developer Skill

Quick Reference

HTTP Status Codes

CodeWhen to Use
200 OKSuccessful read, update, or search
201 CreatedSuccessful create (include Location header)
204 No ContentSuccessful delete
400 Bad RequestMalformed JSON, wrong resourceType
401 UnauthorizedMissing, expired, revoked, or malformed token (RFC 6750)
403 ForbiddenValid token but insufficient scopes
404 Not FoundResource doesn't exist
412 Precondition FailedIf-Match ETag mismatch (NOT 400!)
422 Unprocessable EntityMissing required fields, invalid enum values, business rule violations

Required Fields by Resource (FHIR R4)

ResourceRequired FieldsEverything Else
Patient*(none)*All optional
Observationstatus, codeOptional
Encounterstatus, classOptional (including subject, period)
ConditionsubjectOptional (including code, clinicalStatus)
MedicationRequeststatus, intent, medication[x], subjectOptional
Medication*(none)*All optional
BundletypeOptional

Required vs Optional Fields (CRITICAL)

Only validate fields with cardinality starting with "1" as required.

CardinalityRequired?
0..1, 0..*NO
1..1, 1..*YES

Common mistake: Making subject or period required on Encounter. They are 0..1 (optional).


Value Sets (Enum Values)

Invalid enum values must return 422 Unprocessable Entity.

Patient.gender

male | female | other | unknown

Observation.status

registered | preliminary | final | amended | corrected | cancelled | entered-in-error | unknown

Encounter.status

planned | arrived | triaged | in-progress | onleave | finished | cancelled | entered-in-error | unknown

Encounter.class (Common Codes)

CodeDisplayUse
AMBambulatoryOutpatient visits
IMPinpatient encounterHospital admissions
EMERemergencyEmergency department
VRvirtualTelehealth

Condition.clinicalStatus

active | recurrence | relapse | inactive | remission | resolved

Condition.verificationStatus

unconfirmed | provisional | differential | confirmed | refuted | entered-in-error

MedicationRequest.status

active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown

MedicationRequest.intent

proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option

Bundle.type

document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection


Validation Pattern

Python/FastAPI:

from fastapi import FastAPI
from fastapi.responses import JSONResponse

app = FastAPI()

def operation_outcome(severity: str, code: str, diagnostics: str):
    return {
        "resourceType": "OperationOutcome",
        "issue": [{"severity": severity, "code": code, "diagnostics": diagnostics}]
    }

VALID_OBS_STATUS = {"registered", "preliminary", "final", "amended",
                    "corrected", "cancelled", "entered-in-error", "unknown"}

@app.post("/Observation", status_code=201)
async def create_observation(data: dict):
    if not data.get("status"):
        return JSONResponse(status_code=422, content=operation_outcome(
            "error", "required", "Observation.status is required"
        ), media_type="application/fhir+json")

    if data["status"] not in VALID_OBS_STATUS:
        return JSONResponse(status_code=422, content=operation_outcome(
            "error", "value", f"Invalid status '{data['status']}'"
        ), media_type="application/fhir+json")
    # ... create resource

TypeScript/Express:

const VALID_OBS_STATUS = new Set(['registered', 'preliminary', 'final', 'amended',
  'corrected', 'cancelled', 'entered-in-error', 'unknown']);

app.post('/Observation', (req, res) => {
  if (!req.body.status) {
    return res.status(422).contentType('application/fhir+json')
      .json(operationOutcome('error', 'required', 'Observation.status is required'));
  }
  if (!VALID_OBS_STATUS.has(req.body.status)) {
    return res.status(422).contentType('application/fhir+json')
      .json(operationOutcome('error', 'value', `Invalid status '${req.body.status}'`));
  }
  // ... create resource
});

Pydantic v2 Models (use Literal, not const=True):

from typing import Literal
from pydantic import BaseModel

class Patient(BaseModel):
    resourceType: Literal["Patient"] = "Patient"
    id: str | None = None
    gender: Literal["male", "female", "other", "unknown"] | None = None

Coding Systems (URLs)

SystemURL
LOINChttp://loinc.org
SNOMED CThttp://snomed.info/sct
RxNormhttp://www.nlm.nih.gov/research/umls/rxnorm
ICD-10http://hl7.org/fhir/sid/icd-10
v3-ActCodehttp://terminology.hl7.org/CodeSystem/v3-ActCode
Observation Categoryhttp://terminology.hl7.org/CodeSystem/observation-category
Condition Clinicalhttp://terminology.hl7.org/CodeSystem/condition-clinical
Condition Ver Statushttp://terminology.hl7.org/CodeSystem/condition-ver-status

Common LOINC Codes (Vital Signs)

CodeDescription
8867-4Heart rate
8480-6Systolic blood pressure
8462-4Diastolic blood pressure
8310-5Body temperature
2708-6Oxygen saturation (SpO2)

Data Type Patterns

Coding (direct) vs CodeableConcept (wrapped)

Coding - Used by Encounter.class:

{"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", "code": "AMB"}

CodeableConcept - Used by Observation.code, Condition.code:

{"coding": [{"system": "http://loinc.org", "code": "8480-6"}], "text": "Systolic BP"}

Reference

{"reference": "Patient/123", "display": "John Smith"}

Identifier

{"system": "http://hospital.example.org/mrn", "value": "12345"}

Common Mistakes

MistakeCorrect Approach
Making subject or period required on EncounterBoth are 0..1 (optional). Only status and class are required
Using CodeableConcept for Encounter.classclass uses Coding directly: {"system": "...", "code": "AMB"}
Returning 400 for ETag mismatchUse 412 Precondition Failed for If-Match failures
Returning 400 for invalid enum valuesUse 422 Unprocessable Entity for validation errors
Forgetting Content-Type headerAlways set Content-Type: application/fhir+json
Missing Location header on createReturn Location: /Patient/{id} with 201 Created

Resource Structures

For complete JSON examples of all resources, see references/resource-examples.md.

Quick reference for error responses:

{
  "resourceType": "OperationOutcome",
  "issue": [{"severity": "error", "code": "not-found", "diagnostics": "Patient/123 not found"}]
}

RESTful Endpoints

POST   /[ResourceType]              # Create (returns 201 + Location header)
GET    /[ResourceType]/[id]         # Read
PUT    /[ResourceType]/[id]         # Update
DELETE /[ResourceType]/[id]         # Delete (returns 204)
GET    /[ResourceType]?param=value  # Search (returns Bundle)
GET    /metadata                    # CapabilityStatement
POST   /                            # Bundle transaction/batch

Conditional Operations

If-Match (optimistic locking):

  • Client sends: If-Match: W/"1"
  • Mismatch returns 412 Precondition Failed

If-None-Exist (conditional create):

  • Client sends: If-None-Exist: identifier=http://mrn|12345
  • Match exists: return existing (200)
  • No match: create new (201)

Reference Files

For detailed guidance, see:

  • Resource Examples: Complete JSON structures for Patient, Observation, Encounter, Condition, MedicationRequest, OperationOutcome, CapabilityStatement
  • SMART on FHIR Authorization: OAuth flows, scope syntax (v1/v2), backend services, scope enforcement
  • Pagination: Search result pagination, _count/_offset parameters, link relations
  • Bundle Operations: Transaction vs batch semantics, atomicity, processing order

Implementation Checklist

  1. Set Content-Type: application/fhir+json on all responses
  2. Return meta.versionId and meta.lastUpdated on resources
  3. Return Location header on create: /Patient/{id}
  4. Return ETag header: W/"{versionId}"
  5. Use OperationOutcome for all error responses
  6. Validate required fields → 422 for missing
  7. Validate enum values → 422 for invalid
  8. Search returns Bundle with type: "searchset"

Quick Start Script

To scaffold a new FHIR API project with correct Pydantic v2 patterns:

python scripts/setup_fhir_project.py my_fhir_api

Creates a FastAPI project with correct models, OperationOutcome helpers, and Patient CRUD endpoints.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

28.35%
按下载量换算539

OpenCode

23.52%
按下载量换算447

Codex

18.04%
按下载量换算343

Gemini CLI

13.6%
按下载量换算259

Antigravity

8.48%
按下载量换算161

Cursor

4.03%
按下载量换算77

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills