fhir-hl7-validator
医療データの国際標準であるFHIRやHL7メッセージ、CDA文書の形式が仕様に準拠しているかを検証するSkill。
📜 元の英語説明(参考)
This skill should be used when the user asks to "validate FHIR resources", "check HL7 messages", "validate healthcare data format", "parse FHIR", "HL7 v2 messages", "FHIR R5 validation", "CDA documents", "healthcare data interchange", "FHIR resource schema", "HL7 specifications", or mentions FHIR validation, HL7 message parsing, CDA validation, healthcare data format compliance, or Fast Healthcare Interoperability Resources standards.
🇯🇵 日本人クリエイター向け解説
医療データの国際標準であるFHIRやHL7メッセージ、CDA文書の形式が仕様に準拠しているかを検証するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fhir-hl7-validator.zip https://jpskill.com/download/6147.zip && unzip -o fhir-hl7-validator.zip && rm fhir-hl7-validator.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6147.zip -OutFile "$d\fhir-hl7-validator.zip"; Expand-Archive "$d\fhir-hl7-validator.zip" -DestinationPath $d -Force; ri "$d\fhir-hl7-validator.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
fhir-hl7-validator.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
fhir-hl7-validatorフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
FHIR & HL7 バリデーター
AI エージェント向けの医療データ形式検証スキルです。FHIR R5 リソース、HL7 v2 メッセージ、および CDA 臨床文書を検証します。HL7 標準への医療データ交換の準拠を保証し、スキーマ違反、必須フィールドの欠落、および相互運用性の問題を特定します。
機能
- FHIR 検証 - FHIR R5 リソースを公式スキーマに対して検証します。
- HL7 メッセージ解析 - HL7 v2.x メッセージ (ADT, ORU, OBX, RXO) を解析し、検証します。
- CDA 文書検証 - 臨床文書アーキテクチャ (CDA) R2 文書を検証します。
- スキーマ準拠 - FHIR 仕様および UK Core に対してリソースをチェックします。
- データ型検証 - FHIR データ型 (Identifier, CodeableConcept, Reference など) を検証します。
- 参照解決 - 内部および外部参照を検証します。
- カーディナリティチェック - 必須フィールドとオプションフィールドの準拠を保証します。
- 用語検証 - 値セットとコーディングシステム (SNOMED CT, LOINC, ICD-10) をチェックします。
- 相互運用性分析 - 実装ガイドへの準拠を特定します。
- エラー報告 - 修正を伴う詳細な検証エラーレポートを生成します。
使用方法
/fhir-hl7-validator [command] [target] [options]
コマンド
validate-fhir <file>- FHIR JSON/XML リソースを検証します。validate-hl7 <file>- HL7 v2 メッセージを検証します。validate-cda <file>- CDA 臨床文書を検証します。parse-fhir <file>- FHIR リソース構造を解析して表示します。parse-hl7 <file>- HL7 セグメントを解析して表示します。check-references <file>- すべてのリソース参照を検証します。check-terminology <file>- コーディングシステムと値セットを検証します。bulk-validate <directory>- 複数のファイルを一括検証します。report <output-format>- 検証レポートを生成します (JSON, markdown, HTML)。
オプション
--version <ver>- FHIR バージョン (デフォルト: R5; 4.0, 3.0 も可)--variant <name>- 実装ガイド (例: uk-core, us-core)--strict- 必須サポート制約を強制します。--terminology-check- コーディングシステムを検証します (オンライン検索を有効にします)。--output <file>- レポートをファイルに書き込みます。--format <type>- 出力形式: json, markdown, html, xml
ワークフロー
呼び出された際は、以下のワークフローに従います。
ステップ 1: 医療データ型を特定する
ユーザーに以下を指定するよう求めます。
- データ形式 (FHIR, HL7 v2, CDA)
- FHIR バージョンまたは HL7 ダイアレクト
- 実装ガイド/プロファイル (該当する場合)
- データソース (EHR, 検査システム, 画像システム)
ステップ 2: 構造を検証する
以下をチェックします。
- JSON/XML の整形式性
- 必須要素の存在
- データ型の適合性
- カーディナリティの準拠 (最小/最大出現回数)
- パターンおよび正規表現の検証
ステップ 3: 意味的検証
以下を検証します。
- コードシステムへの所属 (SNOMED CT, LOINC, ICD-10 など)
- 参照の一貫性 (ローカル vs. 外部)
- 識別子のユニーク性と形式
- 日付/時刻形式の正確性 (ISO 8601)
- 数量単位の有効性
ステップ 4: 相互運用性チェック
以下への準拠を保証します。
- FHIR 実装ガイド
- US Core または UK Core プロファイル
- HL7 メッセージ仕様
- 臨床データ交換標準
ステップ 5: レポートを生成する
以下を提供します。
- 行番号付きの検証エラーリスト
- 重大度レベル (エラー、警告、情報)
- 修正ガイダンス
- 関連する標準への参照
FHIR リソースの例
Patient リソース
{
"resourceType": "Patient",
"id": "example",
"identifier": [
{
"system": "http://example.org/medical-record",
"value": "12345"
}
],
"name": [
{
"use": "official",
"given": ["Jane"],
"family": "Doe"
}
],
"birthDate": "1990-01-15",
"address": [
{
"use": "home",
"line": ["123 Main St"],
"city": "Springfield",
"state": "IL",
"postalCode": "62701"
}
]
}
Observation リソース
{
"resourceType": "Observation",
"id": "example",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "39156-5",
"display": "BMI"
}
]
},
"subject": {
"reference": "Patient/example"
},
"valueQuantity": {
"value": 24.5,
"unit": "kg/m2",
"system": "http://unitsofmeasure.org",
"code": "kg/m2"
}
}
HL7 v2 セグメントの例
ADT メッセージ (患者入院)
MSH|^~\&|SendingApp|SendingFac|ReceivingApp|ReceivingFac|202502071350||ADT^A01|123456|P|2.5
PID^^^12345||JaneDoe||19900115|F|||123 Main St^^Springfield^IL^62701|||||||S
PV1||I|ICU^FL2^BED01|||||||||||||||||||||||||||
一般的な検証エラー
| エラー | 原因 | 解決策 |
|---|---|---|
| 必須要素の欠落 | cardinality: 1..1 とマークされた要素が存在しない |
必須要素を追加する |
| 無効なデータ型 | 値が指定された型と一致しない | 正しい型に変換する (例: 日付を YYYY-MM-DD に) |
| 不明なコードシステム | コードが指定された値セットにない | 公式のコードシステム (SNOMED CT, LOINC) からコードを使用する |
| 壊れた参照 | 参照ターゲットが存在しない | 参照パスと ID を確認する |
| 無効な識別子形式 | ID 形式がパターンと一致しない | システム固有の識別子形式に従う |
標準と実装ガイド
- FHIR R5 (http://hl7.org/fhir/R5/)
- HL7 v2.5.1 (http://www.hl7.org/)
- CDA R2 (https://www.hl7.org/implement/standards/cdar2/)
- US Core (http://www.hl7.org/fhir/us/core/)
- UK Core (https://digital.nhs.uk/developer/api-catalogue/fhir-uk-core)
- SNOMED CT (https://www.snomed.org/)
- LOINC (https://loinc.org/)
- ICD-10 (https://www.cdc.gov/nchs/icd/icd10cm.htm)
参考文献
- Fast Healthcare Interoperability Resources (FHIR) - R5 仕様
- HL7 Version 2.5.1 - 医療データ交換の標準
- Clinical Document Architecture R2 - CDA 仕様
- NIST SP 800-66 Rev. 2 - HIPAA セキュリティ実装ガイダンス
- HL7 FHIR Implementation Guides
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
FHIR & HL7 Validator
Healthcare data format validation skill for AI agents. Validates FHIR R5 resources, HL7 v2 messages, and CDA clinical documents. Ensures healthcare data interchange compliance with HL7 standards and identifies schema violations, missing required fields, and interoperability issues.
Capabilities
- FHIR Validation - Validate FHIR R5 resources against official schemas
- HL7 Message Parsing - Parse and validate HL7 v2.x messages (ADT, ORU, OBX, RXO)
- CDA Document Validation - Validate Clinical Document Architecture (CDA) R2 documents
- Schema Compliance - Check resources against FHIR specification and UK Core
- Data Type Validation - Verify FHIR data types (Identifier, CodeableConcept, Reference, etc.)
- Reference Resolution - Validate internal and external references
- Cardinality Checking - Ensure required vs. optional field compliance
- Terminology Validation - Check value sets and coding systems (SNOMED CT, LOINC, ICD-10)
- Interoperability Analysis - Identify implementation guide adherence
- Error Reporting - Generate detailed validation error reports with remediation
Usage
/fhir-hl7-validator [command] [target] [options]
Commands
validate-fhir <file>- Validate FHIR JSON/XML resourcevalidate-hl7 <file>- Validate HL7 v2 messagevalidate-cda <file>- Validate CDA clinical documentparse-fhir <file>- Parse and display FHIR resource structureparse-hl7 <file>- Parse and display HL7 segmentscheck-references <file>- Validate all resource referencescheck-terminology <file>- Validate coding systems and value setsbulk-validate <directory>- Validate multiple filesreport <output-format>- Generate validation report (JSON, markdown, HTML)
Options
--version <ver>- FHIR version (default: R5; also 4.0, 3.0)--variant <name>- Implementation guide (e.g., uk-core, us-core)--strict- Enforce must-support constraints--terminology-check- Validate coding systems (enables online lookup)--output <file>- Write report to file--format <type>- Output format: json, markdown, html, xml
Workflow
Follow this workflow when invoked:
Step 1: Identify Healthcare Data Type
Ask user to specify:
- Data format (FHIR, HL7 v2, CDA)
- FHIR version or HL7 dialect
- Implementation guide/profile (if applicable)
- Data source (EHR, lab system, imaging system)
Step 2: Validate Structure
Check:
- JSON/XML well-formedness
- Required elements present
- Data type conformance
- Cardinality compliance (min/max occurrences)
- Pattern and regex validation
Step 3: Semantic Validation
Verify:
- Code system membership (SNOMED CT, LOINC, ICD-10, etc.)
- Reference consistency (local vs. external)
- Identifier uniqueness and format
- Date/time format accuracy (ISO 8601)
- Quantity unit validity
Step 4: Interoperability Check
Ensure compliance with:
- FHIR implementation guides
- US Core or UK Core profiles
- HL7 message specifications
- Clinical data interchange standards
Step 5: Generate Report
Provide:
- List of validation errors with line numbers
- Severity level (error, warning, info)
- Remediation guidance
- Reference to relevant standards
FHIR Resource Examples
Patient Resource
{
"resourceType": "Patient",
"id": "example",
"identifier": [
{
"system": "http://example.org/medical-record",
"value": "12345"
}
],
"name": [
{
"use": "official",
"given": ["Jane"],
"family": "Doe"
}
],
"birthDate": "1990-01-15",
"address": [
{
"use": "home",
"line": ["123 Main St"],
"city": "Springfield",
"state": "IL",
"postalCode": "62701"
}
]
}
Observation Resource
{
"resourceType": "Observation",
"id": "example",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "39156-5",
"display": "BMI"
}
]
},
"subject": {
"reference": "Patient/example"
},
"valueQuantity": {
"value": 24.5,
"unit": "kg/m2",
"system": "http://unitsofmeasure.org",
"code": "kg/m2"
}
}
HL7 v2 Segment Examples
ADT Message (Patient Admission)
MSH|^~\&|SendingApp|SendingFac|ReceivingApp|ReceivingFac|202502071350||ADT^A01|123456|P|2.5
PID^^^12345||JaneDoe||19900115|F|||123 Main St^^Springfield^IL^62701|||||||S
PV1||I|ICU^FL2^BED01|||||||||||||||||||||||||||
Common Validation Errors
| Error | Cause | Solution |
|---|---|---|
| Missing required element | Element marked cardinality: 1..1 not present |
Add the required element |
| Invalid data type | Value doesn't match specified type | Convert to correct type (e.g., date to YYYY-MM-DD) |
| Unknown code system | Code not in specified value set | Use code from official code system (SNOMED CT, LOINC) |
| Broken reference | Reference target doesn't exist | Verify reference path and ID |
| Invalid identifier format | ID format doesn't match pattern | Follow system-specific identifier format |
Standards & Implementation Guides
- FHIR R5 (http://hl7.org/fhir/R5/)
- HL7 v2.5.1 (http://www.hl7.org/)
- CDA R2 (https://www.hl7.org/implement/standards/cdar2/)
- US Core (http://www.hl7.org/fhir/us/core/)
- UK Core (https://digital.nhs.uk/developer/api-catalogue/fhir-uk-core)
- SNOMED CT (https://www.snomed.org/)
- LOINC (https://loinc.org/)
- ICD-10 (https://www.cdc.gov/nchs/icd/icd10cm.htm)
References
- Fast Healthcare Interoperability Resources (FHIR) - R5 Specification
- HL7 Version 2.5.1 - Standard for Healthcare Data Exchange
- Clinical Document Architecture R2 - CDA Specification
- NIST SP 800-66 Rev. 2 - HIPAA Security Implementation Guidance
- HL7 FHIR Implementation Guides