Health Care Data Standards
HL7 FHIR R4 · OMOP Common Data Model · ICD-10 · สปสช. Data Dictionary
patient_fhir_demo.jsonDOB vs วันเกิด vs birthDate→ ETL ทุกคู่ = O(n²) งานซ้ำซ้อน และแปลผิดได้
| Layer | Standard | หน้าที่ | ตัวอย่าง |
|---|---|---|---|
| Terminology | ICD-10 · SNOMED CT · LOINC · RxNorm | ให้รหัส concept | E11.9 = T2DM |
| Message/Exchange | HL7 v2 · CDA · FHIR | ส่งข้อมูลระหว่างระบบ | FHIR REST + JSON |
| Research model | OMOP CDM v5.4 | schema กลางเพื่อ analytics | person/condition_occurrence |
| Claims (ไทย) | สปสช. 43 แฟ้ม | เบิกจ่ายสิทธิประโยชน์ | CHA, DCH, ORFS… |
| E11 | Type 2 diabetes mellitus |
| I10 | Essential hypertension |
| I48 | Atrial fibrillation |
| J45 | Asthma |
| Z00 | General health exam |
Fast Healthcare Interoperability Resources (R4) — modular resources + REST API
GET /Patient?gender=female&birthdate=ge1970 → JSON Bundle of matching Patients
Bundle
├─ resourceType: "Bundle"
├─ id, type: "collection"
└─ entry[]
├─ fullUrl: urn:uuid:…
└─ resource: {resourceType:
"Patient", id, name[],
gender, birthDate}
PySynthea (wk12) ส่งออกเป็น FHIR R4 bundles — อ่านด้วย skill เดียวกัน
{ "resourceType": "Bundle",
"id": "bundle-amms302-demo",
"entry": [
{ "fullUrl": "urn:uuid:10313763",
"resource": {
"resourceType": "Patient",
"id": "10313763",
"name": [{"family":"รักดี",
"given":["สมชาย"]}],
"gender": "male",
"birthDate": "1975-05-12"}}]}
# flatten ทั้ง bundle pd.json_normalize(bundle, record_path=['entry']) # columns: # resource.resourceType # resource.id # resource.name[].family … # resource.gender, birthDate # dot-path ตาม spec df['resource.birthDate']
| FHIR Resource | field | → | OMOP table.field |
|---|---|---|---|
| Patient.id | — | → | person.person_id |
| Patient.gender | male/female | → | person.gender_concept_id (8507/8532) |
| Patient.birthDate | YYYY-MM-DD | → | person.year_of_birth/month/day |
| Condition.code | ICD-10/SNOMED coding | → | condition_occurrence.condition_concept_id |
| Encounter.period | start/end | → | visit_occurrence.visit_start/end_date |
CHA = รับรองสิทธิ (HN, CID hash, สิทธิ)DCH/ODX/ORF = opd dx/drug/referralวาด ER diagram จาก dictionary ของ 2–3 แฟ้มที่เลือก → เสนอ dashboard/insight — ใช้ skill: ERD(wk07) + SQL(wk5–7) + standards(wk11)
ดร.วิชิต สมบัติ — wichit.s@ubu.ac.th
คาบหน้า: BigQuery/DuckDB + PySynthea generation