02 · 資源對照

2.1 總覽

左欄是規格物件(29 份 S/N 規格的 物件.欄位)與 icu-vue 原型的 store 實體,右欄是本 API 採用的 FHIR R4 資源。

規格物件 原型實體 FHIR 資源 權威
patient, patient_identifier patients[] Patient HIS
encounter, encounter_location patients[].encounter Encounter + Location HIS
icu_episode patients[].episode EpisodeOfCare EMR
coverage Coverage HIS
related_person RelatedPerson HIS/EMR
practitioner actors{} Practitioner + PractitionerRole HIS
care_assignment confirmed{} CareTeamProvenance(確認) EMR
condition goals[].diagnosis Condition 混合
care_plan careFocuses[] CarePlan EMR
goals[] Goal EMR
medication_request orders[kind=medication] MedicationRequest EMR ⇄ HIS
medication_administration executions[](藥品) MedicationAdministration EMR
service_request orders[kind=service] ServiceRequest EMR ⇄ HIS
procedure, procedure_performer executions[](照護/處置) Procedure EMR
specimen Specimen HIS
diagnostic_report reports[] DiagnosticReportObservation(逐項) HIS
observation, observation_component observations[] Observation EMR/設備
infusion_check infusionChecks[] Observation(速率觀察) EMR
result_review reports[].seen/processed Provenance EMR
execution_review executions[].review Provenance EMR
composition, composition_section notes[] Composition EMR
composition_reference notes[].references Composition.section.entryProvenance.entity EMR
clinical_task tasks[] Task EMR
handover_version handovers[] Composition(SBAR) EMR
handover_receipt receipts[] Provenance(接收) EMR
communications[] Communication EMR
consultations[] ServiceRequest(照會)+ Composition(回覆) EMR
consent ConsentComposition EMR
signature Provenance.signature EMR
audit_event audit[] AuditEvent EMR
referral_out ServiceRequest(轉診)+ Composition EMR(later-work)
nutrition_order NutritionOrder EMR(later-work)
allergy_intolerance patients[].allergy AllergyIntolerance HIS
outbound_request 非 FHIR,整合層私有(見 06 EMR
order_execution_link executions[].order/version 原生 Reference,不另建資源

order_execution_link 在 FHIR 不需要獨立資源:MedicationAdministration.requestProcedure.basedOn 就是這條連結,版本鎖定靠帶版本的 reference(MedicationRequest/xxx/_history/2)。


2.2 病人、就醫與照護關係

Patient(唯讀)

規格欄位 FHIR 元素 取得
patient.his_pid identifier[use=usual] H
patient_identifier.ma_nguoi_benh identifier[type=MR] H
patient_identifier.so_dinh_danh_ca_nhan_cccd_nguoi_benh identifier[type=NI] H
patient.ho_va_ten_nguoi_benh name[0].text H
patient.ngay_sinh_nguoi_benh birthDate H
patient.gioi_tinh_nguoi_benh gender H
patient.dan_toc_nguoi_benh extension[ethnicity](本地) H
patient.dia_chi_nguoi_benh address[0] H
patient.his_synced_at meta.extension[hisSyncedAt](本地) C
view.age_at_view 不落地,檢視時計算 C

view.age_at_view 標註「出生日期於檢視時點計算;不落地」——API 不回傳年齡欄位,由客戶端從 birthDate 算。

Encounter / Location(唯讀)

規格欄位 FHIR 元素 TDL
encounter.encounter_number identifier
encounter.thoi_diem_vao_vien period.start
encounter.thoi_diem_ra_vien period.end
encounter.ly_do_vao_vien reasonCode.text
encounter_location.khoa_dieu_tri location[].locationLocation(type=dept) TDL.0032
encounter_location.buong_benh Location(type=room) TDL.0345
encounter_location.giuong_benh Location(type=bed) TDL.0002
encounter_location.thoi_diem_vao_khoa_dieu_tri location[].period.start TDL.0031
encounter_location.thoi_diem_chuyen_khoa 新增一筆 location[],前筆 period.end TDL.0034

床位由 HIS 主導,EMR 唯讀顯示——原型的病人總覽已經這樣標註。

EpisodeOfCare(ICU 照護段)

icu_episode.idEpisodeOfCarestatus=activetype=ICUpatientmanagingOrganizationperiod。ICU 照護段與 Encounter 是多對一:一次住院可能有多段 ICU。原型的 ICU-A 就是這個。

CareTeam(本班照護名單)

原型的「確認照護名單」對應 care_assignment.confirmed_at(取得=M)。

CareTeam
  status        : active
  subject       : Patient/…
  encounter     : Encounter/…
  participant[] : { member: PractitionerRole/…, role: 主責醫師|主護|照會醫師, period }
  extension[assignmentSource] : "示範院方預先分派"

「確認」這個動作本身記在 Provenanceactivity = …/provenance-activity#roster-confirmtarget = CareTeam/…),而不是 CareTeam 上的一個時間欄位。理由:同一份名單可以被不同班別、不同人各自確認一次,每次都要留人與時間。

照會醫師不進 CareTeam 照會關係由 ServiceRequest(category=consultation) 的 performer 表達;照會醫師能看到病人資料,但不是照護團隊成員,也不能開立醫囑(見 04 BR-AUTH-003)。


2.3 藥物醫囑

MedicationRequest

規格欄位 FHIR 元素 取得 TDL
medication_request.medication_code medicationCodeableConcept.coding[system=his-medication] M TDL.0452
medication_request.ten_thuoc medicationCodeableConcept.text P
medication_request.dose_value dosageInstruction[0].doseAndRate[0].doseQuantity P TDL.0400
medication_request.route dosageInstruction[0].route M TDL.0401
medication_request.frequency dosageInstruction[0].timing.repeat M
medication_request.cach_dung_thuoc dosageInstruction[0].text M TDL.1049
medication_request.rate_value dosageInstruction[0].doseAndRate[0].rateQuantity M TDL.0399
medication_request.period_start dispenseRequest.validityPeriod.start P
medication_request.period_end dispenseRequest.validityPeriod.end P
medication_request.prescriber_id requesterPractitionerRole H
medication_request.order_set_id extension[orderSet] M
medication_request.status 04 三軸狀態 P
病程來源 supportingInformationComposition/…/_history/n P

三個必須人工選、不可推定的欄位(規格原文):

API 對這三欄一律要求 coding.systemcoding.code 齊全,只給 text 會被拒(BR-MED-001)。

MedicationAdministration(eMAR 給藥執行)

規格欄位 FHIR 元素 取得
medication_administration.start_time effectiveDateTime P
medication_administration.status status P
medication_administration.actual_dose dosage.dose M
medication_administration.performer_id performer[0].actor H
medication_administration.not_done_reason statusReasonnote M
medication_administration.rate_value dosage.rateQuantity P
order_execution_link.order_version request → 帶版本的 Reference P
劑次 identifier[system=…/occurrence-id] C
五對核對 extension[verificationChecklist](本地,見 2.11) M

status 對應:

原型 FHIR MedicationAdministration.status
done completed
held on-holdstatusReason
notDone not-donestatusReason(必填)
無紀錄 不建立資源

「實際劑量」預填自醫囑但必須由執行者確認——API 不會因為 dosage.dose 等於醫囑值就跳過驗證,BR-MED-004 要求差異時填 note


2.4 檢驗、檢查與照護醫令

ServiceRequest

規格欄位 FHIR 元素 取得 TDL
service_request.ma_chi_dinh_dich_vu identifier[system=…/order-number] H TDL.1156
service_request.service_code code.coding[system=his-service] P
service_request.dich_vu_can_lam_sang code.text M TDL.1162
service_request.so_luong_dich_vu_can_lam_sang quantityInteger M TDL.1163
service_request.muc_do_uu_tien_chi_dinh priority M TDL.1157
service_request.nhom_xet_nghiem_duoc_chi_dinh category M TDL.1167
service_request.nhom_phan_chi_dinh extension[orderPart] M TDL.1161
service_request.khoa_phong_chi_dinh requester.extension[department] H TDL.1159
service_request.requester_id requester H
service_request.requested_time authoredOn P
檢體類型 specimenSpecimen.type M TDL.1165
採檢部位 bodySite M TDL.1166

priority 值域衝突(Q-05)。 規格原文:「修改 priority 無值域;建立 severity 為 1 正常/2 急/3 特急;不能直接互換」。因此:

Procedure(照護與處置執行)

N07 照護空間 的規格物件就是 procedure。照護醫令(原型的 kind=care)以 ServiceRequest 開立、以 Procedure 記錄執行:

Procedure
  status      : completed | not-done | on-hold
  basedOn     : ServiceRequest/…(帶版本)
  subject     : Patient/…
  encounter   : Encounter/…
  performedDateTime
  performer[] : { actor: PractitionerRole/… }
  statusReason: 未執行/延遲原因

procedure_performer.phau_thuat_vien_thu_thuat_vienbac_si_gay_me_vo_camProcedure.performer[].function 區分術者與麻醉。手術紀錄在 Phase 1 為唯讀接收,EMR 不提供編修(原型的手術紀錄分頁已如此)。


2.5 檢驗檢查結果與判讀

DiagnosticReport + Observation(皆為 HIS 唯讀)

一份報告拆成兩層:

DiagnosticReport (status=final)
  ├─ identifier      : HIS order_number
  ├─ basedOn         : ServiceRequest/…
  ├─ specimen        : Specimen/…
  ├─ issued          : TDL 結果時點
  ├─ conclusion      : 文字結論
  └─ result[]        : → Observation(每個檢驗指標一筆)

Observation (status=final)
  ├─ code            : 指標字典【Q-02 未定】
  ├─ valueQuantity   : 數值 + 單位 (TDL.1258)
  ├─ interpretation  : 來源旗標。無旗標則省略
  └─ derivedFrom / partOf : DiagnosticReport

每個指標必須是獨立 Observation,不可塞進 DiagnosticReport.conclusion 的文字。 原型的趨勢圖需要逐指標時間序列,只有這種結構撐得住。

Specimen 欄位齊備(TDL.1246–1254:檢體編號、採檢人員/時間、接收人員/時間、種類、品質),全部為 H,唯讀落地。

已閱與判讀 → Provenance

result_review.seen_at / processed_at 是 M(醫護手動),但 DiagnosticReport 是 HIS 唯讀資源。因此不改報告,改記 Provenance

動作 Provenance.activity 附帶
記錄已閱 v3-DataOperation#READ agent.whorecorded
判讀/處理 …/provenance-activity#clinical-review extension[reviewNote] 存處理紀錄文字;agent.type = verifier

「已閱」是真正的讀取動作,用 HL7 標準碼 http://terminology.hl7.org/CodeSystem/v3-DataOperation#READ

「判讀」「核對」「交班接收」「名單確認」是臨床業務動作,不是資料操作——v3-DataOperation 沒有對應碼(該系統只有 OPERATECREATEREADUPDATEDELETEAPPENDMODIFYSTATUS 等),因此改用本地 CodeSystem(見 2.12),不硬套語義不符的標準碼。

已閱、判讀、工作結案是三件獨立的事(原型原文:「某一項已回/已處理不清除其他待回」)。結案由 Task 表達,且 BR-TASK-002 要求來源報告必須已回報且已有判讀紀錄才能結案。


2.6 生理量測

Observation(一般項目)

項目 LOINC TDL 單位
心率 8867-4 /min
體溫 8310-5 Cel
呼吸頻率 9279-1 /min
SpO₂(脈搏血氧) 59408-5 %
體重 29463-7 kg
意識 【待確認】 TDL.0362
入量/出量 【Q-03 未定】 mL

Observation.code 一律帶兩個 coding:LOINC(若已確認)+ 院內/TDL 碼。未確認 LOINC 的項目只帶院內碼,不硬湊。

血壓(component 結構)

規格的 observation_component.value_num 對應 TDL.0094/TDL.0095,是同一次量測的兩個子項——這正是 FHIR 的 component 模式:

Observation
  code      : 85354-9 (Blood pressure panel)
  effectiveDateTime : 一次量測時間(兩子項共用)
  component[0] : code 8480-6 (Systolic)  + valueQuantity mmHg  + coding TDL.0094
  component[1] : code 8462-4 (Diastolic) + valueQuantity mmHg  + coding TDL.0095

不可拆成兩筆獨立 Observation,否則收縮/舒張壓會在時間軸上失去配對。原型的 store.dispatch('measureBP') 已經強制兩子項同時填寫,API 沿用(BR-OBS-002)。

輸注速率觀察

infusion_checkObservation

Observation
  code       : 輸注流速(TDL.0399)
  valueQuantity : 速率 + 單位(mL/h…)
  partOf     : MedicationAdministration/…
  note       : 觀察與差異說明(必填)
  extension[notCountedAsIntake] : true

原型明訂「輸注觀察不計為實際 I/O;無幫浦綁定、自動讀值或治療門檻」。notCountedAsIntake 擴充讓下游彙總不會誤把它算進入量。設備來源(取得=D)時填 Observation.device


2.7 病歷文件

所有病歷型文件都是 Composition

文件 Composition.type 畫面
Admission Note LOINC 34117-2 S07
Progress Note(SOAP) LOINC 11506-3 S08
Discharge Summary LOINC 18842-5 S20
會診/照會回覆 LOINC 11488-4 S15
護理紀錄 【待確認】本地碼 N04/N09
SBAR 交班 【Q-04 未定】本地碼 N06
同意書 form_definition.form_code 本地碼 S16

Progress Note 的 SOAP

Composition
  status   : preliminary(草稿)| final(已簽)| amended(更正後)
  type     : 11506-3
  date     : 病程時間 TDL.0347
  author   : PractitionerRole/…
  section[0] : { code: S, text.div }
  section[1] : { code: O, text.div, entry[] → Observation/DiagnosticReport }
  section[2] : { code: A, text.div, entry[] → Condition }
  section[3] : { code: P, text.div }

composition_section.content(TDL.0348 病情進展)→ section.text.divcomposition_reference.source_versionsection.entry必須是帶版本的 Reference,這樣「引用當時看到的數值」不會被後來的更正改掉。

版本與更正

規格欄位 FHIR
composition.replaces_id / supersedes_id relatesTo[code=replaces].targetReference
composition.doc_status status
composition.version meta.versionId + 顯示用 extension[clinicalVersion]
composition.is_signed_off 存在 Provenance.signature 即為已簽
composition.is_complete Task(S18 病歷完善)的 status=completed

更正流程見 01 §1.4

出院準備衛教

原型把衛教內容放在 Progress Note 的「出院準備」分頁(sections.educationAudience/educationContent/educationTeachBack)。對映為 Composition.section[code=discharge-education] 的三個子欄位,並以 extension[educationTemplate] 記錄所用的衛教組套 id(EDU-SET-*)——組套來源必須保留,這樣才看得出哪些字是模板、哪些是醫師改寫的。


2.8 臨床工作與交班

Task

規格欄位 FHIR
clinical_task.status status
工作內容 description
來源單據 focusDiagnosticReport / ServiceRequest / Composition
負責人 ownerPractitionerRole
完成證據 output[0].valueString
承接/轉移歷程 Task.note[]Provenance

狀態對映:

原型 FHIR Task.status
open requested
accepted accepted
waiting on-hold
done completed

交班(SBAR)

交班版本 = Composition,接收 = Provenance

Composition (SBAR 交班)
  status    : final
  type      : 【Q-04】
  author    : 交出者
  extension[handoverReceiver] : 接班者 PractitionerRole
  relatesTo[replaces]         : 前一版(若為更正)
  section[]                   : S / B / A / R
  section[tasks].entry[]      : → Task(交出當下的未結工作快照)

Provenance (接收)
  target   : Composition/…(該版本)
  activity : …/provenance-activity#handover-receive
  agent    : 接班者
  recorded : 接收時間

接收的副作用是 Task.owner 轉移,這由伺服器在同一個 transaction 內完成(BR-HO-004)。


2.9 照會與必要溝通

照會

階段 資源
醫師發出照會 ServiceRequestcategory=consultationperformer = 受照會醫師、reasonCode.text = 照會原因與問題)
受照會醫師的待辦 Taskfocus → 該 ServiceRequest,owner = 受照會醫師)
照會回覆 Compositiontype=11488-4relatesTo[code=appends]ServiceRequest.supportingInfo 反向連結)

規格 S15 的物件列的是 composition / clinical_task,本設計加上 ServiceRequest 讓「請求」有獨立生命週期(狀態 activecompleted),與待辦分離。

必要溝通

Communicationcategory(家屬溝通/同意拒絕討論/藥事會診聯繫)、recipientRelatedPersonpayload[0].contentStringsender

這不是實際發送。 Communication.status 一律 completed(表示「已記錄這次溝通發生過」),API 不觸發任何通知。


2.10 同意書與電子簽章

S16 有 110 個欄位,consent 物件本身有 11 個。結構:

Provenance
  target    : Composition/…(被簽的那一版)
  recorded  : signature.signed_time
  agent     : { who: PractitionerRole/… , type: signer_role }
  signature : {
      type       : 1.2.840.10065.1.12.1.1 (Author's Signature)
      when       : 簽署時間
      who        : 簽署人
      targetFormat : application/fhir+json
      sigFormat  : application/jose | application/pkcs7-signature
      data       : base64(signature_blob)
  }

signature.signature_hash 與驗證服務輸出屬於取得=C,由伺服器產生與驗證,客戶端不可送。


2.11 本地擴充清單

全部掛在 http://icu.emr.local/StructureDefinition/ 下。

擴充 適用 型別 用途
verificationChecklist MedicationAdministration complex(5×boolean + checkedBy 五對人工核對,BR-MED-003
hisTransmissionStatus MedicationRequest, ServiceRequest code notSentsentacceptedrejectedunknown
hisTransmissionEvent 同上 complex(requestIdsentAtrespondedAtmessage 送出對帳
notCountedAsIntake Observation boolean 輸注觀察不列入 I/O
reviewOutcome Provenance code(revieweddifference 醫師核對護理執行的結論
reviewNote Provenance string 核對依據/判讀處理紀錄
handoverReceiver Composition Reference(PractitionerRole) 交班對象
educationTemplate Composition.section Identifier 衛教組套來源
copyTrace Composition complex(fromcopiedAtchangedSections[] 前一日病程複製軌跡
orderSet MedicationRequest, ServiceRequest Identifier 套組來源
assignmentSource CareTeam string 分派來源說明
catalogSnapshot MedicationRequest, ServiceRequest complex 開立當下的目錄品項快照(含 catalogVersionsourceSHA256
doseSafetyDisplay MedicationRequest code(insufficientover 劑量安全畫面示例的選擇結果,非臨床判定

catalogSnapshot 很重要:原型的 clinical.snapshot() 會連 catalogVersion 與來源檔 sha256 一起存下。目錄之後改版時,已開立的醫囑仍看得到當初的品項內容——這是稽核可辯護性的基礎。

copyTrace 對應原型的「快速複製前一日病程」:記錄複製來源與哪些 SOAP 段落被改過,因為「複製不視為已核對」。


2.12 編碼系統

系統 URI 說明
HIS 藥品碼 http://icu.emr.local/CodeSystem/his-medication TDL.0452;來自 B 目錄 medication
HIS 服務碼 http://icu.emr.local/CodeSystem/his-service TDL.1156;B 目錄 service
給藥途徑 http://icu.emr.local/CodeSystem/his-route TDL.0401;B 目錄 route
計量單位 http://icu.emr.local/CodeSystem/his-unit B 目錄 unit;與 UCUM 對照未完成
TDL 資料字典 http://icu.emr.local/CodeSystem/tdl 規格的 TDL.xxxx
溯源動作 http://icu.emr.local/CodeSystem/provenance-activity clinical-review(判讀/核對)、handover-receive(交班接收)、roster-confirm(名單確認)、sign(簽署)。標準 v3-DataOperation 無對應語義
API 錯誤碼 http://icu.emr.local/CodeSystem/api-error 05 §5.2
ICD-10 http://hl7.org/fhir/sid/icd-10 B 目錄 icd,15,994 筆
LOINC http://loinc.org 僅用於已確認的生命徵象與文件類型

B 目錄品項的中文譯名未核定。 coding.display 一律填來源原文(越文/英文),中文譯名放 coding.extension[reviewTranslation],避免未核定譯名被當成正式名稱往下游傳。

停用品項(active=false)不得用於新開立,但既有醫囑仍要能讀回——BR-CAT-001