1. 導入ガイドとは何ですか?
実装ガイド (IG) は、ルール、プロファイル、拡張機能、値セット、特定の使用例の例のコレクションです。ベトナムの IG は、ベトナムの基準に従って医療データを表現する方法を定義します。
| IG成分 | 説明 | たとえば、VN |
|---|---|---|
| プロフィール | 基本リソースのバインド | VN-Core-Patient (必須 CCCD) |
| 拡張機能 | データ要素を追加する | 健康保険番号、ベトナム人の民族 |
| 値セット | 有効なコードセット | ベトナムの民族リスト、ICD-10 ベトナム |
| コードシステム | コード体系 | 都道府県・市区町村コード、医療機関コード |
| 例 | サンプル例 | CCCDおよび健康保険に加入しているサンプル患者 |
| 能力に関する声明 | サーバー要件 | 最低限必要なサポートは何ですか? |
2. FSH — FHIR 略記法
FSH は、JSON/XML よりも何倍も簡潔な FHIR プロファイルを作成するのに役立つドメイン固有の言語です。
# Cài đặt SUSHI (FSH compiler)
npm install -g fsh-sushi
# Tạo IG project mới
sushi init
プロジェクトの構造
vn-core-ig/
├── sushi-config.yaml
├── input/
│ ├── fsh/
│ │ ├── profiles/
│ │ │ ├── VNCorePatient.fsh
│ │ │ ├── VNCoreOrganization.fsh
│ │ │ └── VNCoreEncounter.fsh
│ │ ├── extensions/
│ │ │ ├── BHYTExtension.fsh
│ │ │ └── EthnicityExtension.fsh
│ │ ├── valuesets/
│ │ │ ├── VNEthnicityVS.fsh
│ │ │ └── VNProvinceVS.fsh
│ │ ├── codesystems/
│ │ │ ├── VNEthnicityCS.fsh
│ │ │ └── VNProvinceCS.fsh
│ │ └── examples/
│ │ └── PatientExample.fsh
│ └── pagecontent/
│ └── index.md
└── ig.ini
寿司設定.yaml
id: vn.core
canonical: http://fhir.vn/ImplementationGuide/vn-core
name: VNCoreIG
title: Vietnam Core Implementation Guide
status: draft
version: 0.1.0
fhirVersion: 5.0.0
copyrightYear: 2025+
releaseLabel: ci-build
publisher:
name: Vietnam FHIR Community
url: https://fhir.vn
jurisdiction: urn:iso:std:iso:3166#VN "Vietnam"
dependencies:
hl7.fhir.r5.core: 5.0.0
3. VN-コア患者プロファイル
// input/fsh/profiles/VNCorePatient.fsh
Profile: VNCorePatient
Parent: Patient
Id: vn-core-patient
Title: "VN Core Patient"
Description: "Profile Patient cho hệ thống y tế Việt Nam"
// Bắt buộc có ít nhất 1 identifier (CCCD hoặc BHYT)
* identifier 1..* MS
* identifier ^slicing.discriminator.type = #pattern
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
// Slice: CCCD
* identifier contains cccd 0..1 MS
* identifier[cccd].system = "http://fhir.vn/sid/cccd" (exactly)
* identifier[cccd].value 1..1
* identifier[cccd].value ^short = "Số Căn cước Công dân (12 số)"
// Slice: BHYT
* identifier contains bhyt 0..1 MS
* identifier[bhyt].system = "http://fhir.vn/sid/bhyt" (exactly)
* identifier[bhyt].value 1..1
* identifier[bhyt].value ^short = "Số thẻ Bảo hiểm Y tế"
// Họ tên bắt buộc
* name 1..* MS
* name.family 1..1 MS
* name.given 1..* MS
* name.text 1..1 MS
// Giới tính, ngày sinh bắt buộc
* gender 1..1 MS
* birthDate 1..1 MS
// Địa chỉ
* address MS
* address.city MS
* address.district MS
* address.state MS
* address.line MS
// Extensions
* extension contains
VNEthnicityExtension named ethnicity 0..1 MS and
VNBHYTExtension named bhytInfo 0..1 MS
4. ベトナム向け拡張機能
内線:健康保険情報
// input/fsh/extensions/BHYTExtension.fsh
Extension: VNBHYTExtension
Id: vn-bhyt-extension
Title: "VN BHYT Extension"
Description: "Thông tin bảo hiểm y tế Việt Nam"
Context: Patient
* extension contains
soThe 1..1 MS and
noiDangKy 1..1 MS and
ngayHieuLuc 1..1 MS and
ngayHetHan 0..1 MS and
mucHuong 1..1 MS
* extension[soThe].value[x] only string
* extension[soThe] ^short = "Số thẻ BHYT (15 ký tự)"
* extension[noiDangKy].value[x] only Reference(Organization)
* extension[noiDangKy] ^short = "Nơi đăng ký KCB ban đầu"
* extension[ngayHieuLuc].value[x] only date
* extension[ngayHieuLuc] ^short = "Ngày bắt đầu hiệu lực"
* extension[ngayHetHan].value[x] only date
* extension[ngayHetHan] ^short = "Ngày hết hạn"
* extension[mucHuong].value[x] only integer
* extension[mucHuong] ^short = "Mức hưởng BHYT (%)"
拡張子: 民族
// input/fsh/extensions/EthnicityExtension.fsh
Extension: VNEthnicityExtension
Id: vn-ethnicity-extension
Title: "VN Ethnicity Extension"
Description: "Dân tộc theo danh mục 54 dân tộc Việt Nam"
Context: Patient
* value[x] only CodeableConcept
* valueCodeableConcept from VNEthnicityVS (required)
5. コードシステムと値セット
// input/fsh/codesystems/VNEthnicityCS.fsh
CodeSystem: VNEthnicityCS
Id: vn-ethnicity-cs
Title: "VN Ethnicity CodeSystem"
Description: "Danh mục 54 dân tộc Việt Nam (theo TCTK)"
* ^caseSensitive = true
* #01 "Kinh"
* #02 "Tày"
* #03 "Thái"
* #04 "Mường"
* #05 "Khmer"
* #06 "Hoa"
* #07 "Nùng"
* #08 "Hmông"
* #09 "Dao"
* #10 "Gia Rai"
// ... thêm 44 dân tộc còn lại
// input/fsh/valuesets/VNEthnicityVS.fsh
ValueSet: VNEthnicityVS
Id: vn-ethnicity-vs
Title: "VN Ethnicity ValueSet"
Description: "ValueSet cho 54 dân tộc Việt Nam"
* include codes from system VNEthnicityCS
// input/fsh/codesystems/VNProvinceCS.fsh
CodeSystem: VNProvinceCS
Id: vn-province-cs
Title: "VN Province CodeSystem"
Description: "63 tỉnh/thành phố Việt Nam"
* ^caseSensitive = true
* #01 "Hà Nội"
* #79 "TP. Hồ Chí Minh"
* #48 "Đà Nẵng"
* #31 "Hải Phòng"
* #92 "Cần Thơ"
// ... thêm các tỉnh/thành còn lại
6. 例
// input/fsh/examples/PatientExample.fsh
Instance: VNPatientExample01
InstanceOf: VNCorePatient
Title: "Ví dụ: Bệnh nhân Nguyễn Văn A"
Description: "Ví dụ Patient tuân thủ VN-Core-Patient profile"
Usage: #example
* identifier[cccd].system = "http://fhir.vn/sid/cccd"
* identifier[cccd].value = "001234567890"
* identifier[bhyt].system = "http://fhir.vn/sid/bhyt"
* identifier[bhyt].value = "DN4012345678901"
* name[0].family = "Nguyễn"
* name[0].given[0] = "Văn"
* name[0].given[1] = "A"
* name[0].text = "Nguyễn Văn A"
* gender = #male
* birthDate = "1990-05-15"
* address[0].line[0] = "123 Nguyễn Huệ, Phường Bến Nghé"
* address[0].district = "Quận 1"
* address[0].city = "TP. Hồ Chí Minh"
* address[0].state = "79"
* address[0].country = "VN"
* extension[ethnicity].valueCodeableConcept = VNEthnicityCS#01 "Kinh"
* extension[bhytInfo].extension[soThe].valueString = "DN4012345678901"
* extension[bhytInfo].extension[noiDangKy].valueReference = Reference(Organization/org-bvdk-001)
* extension[bhytInfo].extension[ngayHieuLuc].valueDate = "2025-01-01"
* extension[bhytInfo].extension[ngayHetHan].valueDate = "2025-12-31"
* extension[bhytInfo].extension[mucHuong].valueInteger = 80
7. IG の構築と公開
# Compile FSH → FHIR JSON
sushi .
# Output:
# fsh-generated/
# resources/
# StructureDefinition-vn-core-patient.json
# StructureDefinition-vn-bhyt-extension.json
# CodeSystem-vn-ethnicity-cs.json
# ValueSet-vn-ethnicity-vs.json
# Patient-VNPatientExample01.json
# Chạy IG Publisher (cần Java 17+)
./_genonce.sh
# Hoặc dùng Docker
docker run --rm -v $(pwd):/ig \
hl7fhir/ig-publisher-base:latest \
java -jar /app/publisher.jar \
-ig /ig/ig.ini
IG でリソースを検証する
# Validate một resource
java -jar validator_cli.jar \
patient-example.json \
-ig vn-core-ig/output \
-profile http://fhir.vn/StructureDefinition/vn-core-patient
# Kết quả:
# Information: All OK (0 errors, 0 warnings)
8. 高度な IG — 不変条件と制約
// Thêm invariant cho CCCD (12 số)
Invariant: vn-cccd-format
Description: "Số CCCD phải có đúng 12 chữ số"
Expression: "value.matches('^[0-9]{12}$')"
Severity: #error
* identifier[cccd].value obeys vn-cccd-format
// Thêm invariant cho BHYT (15 ký tự)
Invariant: vn-bhyt-format
Description: "Số thẻ BHYT phải có đúng 15 ký tự"
Expression: "value.matches('^[A-Z]{2}[0-9]{13}$')"
Severity: #error
* identifier[bhyt].value obeys vn-bhyt-format
9. まとめ
実装ガイド — 特定のユースケース向けのルール、プロファイル、拡張機能のセット
FSH (FHIR 略記法) — プロフィールの記述言語が簡潔で読みやすい
VN-コア患者 — プロフィール 患者には ID カード、健康保険、氏名、性別、生年月日が必要です
拡張機能 — 健康保険情報 (カード番号、登録場所、給付レベル)、ベトナム人の民族
コードシステム/値セット — 54の民族グループ、63の省/都市、医療施設コード
SUSHI + IG パブリッシャー — FSH → JSON → HTML IG のパイプラインを構築