臺灣健保預檢規則實作指引
0.0.1 - CI Build

臺灣健保預檢規則實作指引, published by Example Publisher. This guide is not an authorized publication; it is the continuous build for version 0.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/TWNHIFHIR/cql/ and changes regularly. See the Directory of published versions

Library: CRCBevacizumabRule1

Official URL: https://nhicore.nhi.gov.tw/cql/Library/CRCBevacizumabRule1 Version: 1.0.0
Active as of 2025-10-30 Computable Name: CRCBevacizumabRule1
Title: 大腸直腸癌_Bevacizumab給付規定(轉移性大腸或直腸癌患者的第一線治療)
Id: CRCBevacizumabRule1
Version: 1.0.0
Url: https://nhicore.nhi.gov.tw/cql/Library/CRCBevacizumabRule1
Publisher: National Health Insurance Administration, Taiwan
Description: 此規則用於檢核轉移性大腸或直腸癌患者於第一線治療使用 Bevacizumab 之給付條件。
Content: text/cql
//大腸直腸癌_Bevacizumab給付規定(轉移性大腸或直腸癌患者的第一線治療)
library CRCBevacizumabRule1 version '1.0.0'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1' called FHIRHelpers
include CRCCodeConcept version '1.0.0' called CodeConcept
include Reusable version '1.0.0' called Reusable

context Patient

//主要規定一:初次使用條件
define "規則1-1=Bevacizumab與FOLFIRI併用":
  (exists ([MedicationRequest] MROrder1
    where MROrder1.intent = 'order'
      and exists (MROrder1.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01BC02)
      and Reusable."HasValidTiming"(MROrder1))
  and exists ([MedicationRequest] MROrder2
    where MROrder2.intent = 'order'
      and exists (MROrder2.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01CE02)
      and Reusable."HasValidTiming"(MROrder2))
  and exists ([MedicationRequest] MRPlan
    where MRPlan.intent = 'plan'
      and exists (MRPlan.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01FG01)))
  and Reusable."醫令類別為1"

define "規則1-2=Bevacizumab與FOLFOX併用":
  (exists ([MedicationRequest] MROrder1
    where MROrder1.intent = 'order'
      and exists (MROrder1.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01BC02)
      and Reusable."HasValidTiming"(MROrder1))
  and exists ([MedicationRequest] MROrder2
    where MROrder2.intent = 'order'
      and exists (MROrder2.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01XA03)
      and Reusable."HasValidTiming"(MROrder2))
  and exists ([MedicationRequest] MRPlan
    where MRPlan.intent = 'plan'
      and exists (MRPlan.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01FG01)))
  and Reusable."醫令類別為1"

define "規則1-3=Bevacizumab與5-FU/leucovorin併用":
  (exists ([MedicationRequest] MROrder1
    where MROrder1.intent = 'order'
      and exists (MROrder1.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01BC02)
      and Reusable."HasValidTiming"(MROrder1))
  and exists ([MedicationRequest] MROrder2
    where MROrder2.intent = 'order'
      and exists (MROrder2.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.V03AF03)
      and Reusable."HasValidTiming"(MROrder2))
  and exists ([MedicationRequest] MRPlan
    where MRPlan.intent = 'plan'
      and exists (MRPlan.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01FG01)))
  and Reusable."醫令類別為1"

define "規則1=化學療法合併使用":
  "規則1-1=Bevacizumab與FOLFIRI併用"
    or "規則1-2=Bevacizumab與FOLFOX併用"
    or "規則1-3=Bevacizumab與5-FU/leucovorin併用"

define "規則2-1=ICD-10使用C18、C19、C20、C21":
  exists ([Claim] C
    where exists (C.diagnosis D
      where exists (D.diagnosis.coding Cdg
        where (Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/icd-10-cm-2023-tw'
          or Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/icd-10-cm-2014-tw')
          and Cdg.code in CodeConcept.ICDCRC)))

define "規則2-2=三個月內有影像檢查報告":
  exists ([DiagnosticReport] O
    where exists (O.code.coding Cdg
      where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/icd-10-pcs-2023-tw'
        and Cdg.code in CodeConcept.ImageReportCode)
      and O.effective is not null
      and FHIRHelpers.ToDateTime(O.effective) >= Today() - 90 days
      and FHIRHelpers.ToDateTime(O.effective) <= Today())

define "規則2-3=三個月內有檢查報告":
  exists ([DiagnosticReport] O2
    where exists (O2.code.coding Cdg
      where Cdg.system = 'http://loinc.org'
        and Cdg.code in { '65755-1' })
      and O2.effective is not null
      and FHIRHelpers.ToDateTime(O2.effective) >= Today() - 90 days
      and FHIRHelpers.ToDateTime(O2.effective) <= Today())

define "規則2-4=癌症分期分數或結果為M>=1":
  Count([Observation] O
    where exists (O.code.coding Cdg
      where Cdg.code = '399390009'
        and Cdg.system = 'http://snomed.info/sct')
      and O.value is not null
      and O.value is FHIR.string
      and Matches((O.value as FHIR.string).value, '.*M[1-9].*')) > 0

define "規則2-5=用藥線別為第一線":
  exists ([Claim] C
    where exists (C.item I
      where exists (I.modifier M
        where exists (M.coding Cdg
          where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-line-of-therapy'
            and Cdg.code = '1'))))

define "規則2=轉移性直腸結腸癌病患之第一線治療":
  "規則2-1=ICD-10使用C18、C19、C20、C21"
    and ("規則2-2=三個月內有影像檢查報告" or "規則2-3=三個月內有檢查報告")
    and "規則2-4=癌症分期分數或結果為M>=1"
    and "規則2-5=用藥線別為第一線"

define "主要規定一":
  "規則1=化學療法合併使用"
    and "規則2=轉移性直腸結腸癌病患之第一線治療"
    and Reusable."續用註記為1"

//主要規定二:續用條件-治療持續給付
define "規則1=再次申請必須提出客觀證據":
  exists ([MedicationRequest] MRPlan
    where MRPlan.intent = 'plan'
      and exists (MRPlan.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01FG01)
      and exists ([DiagnosticReport] Report
        where exists (Report.code.coding Cdg
          where Cdg.code in CodeConcept.ImageReportCode)
          and Report.effective is not null
          and FHIRHelpers.ToDateTime(Report.effective) >= Today() - 90 days
          and FHIRHelpers.ToDateTime(Report.effective) <= Today()))
  and Reusable."醫令類別為1"
  and Reusable."續用註記為2"

//主要規定三:藥品使用規則
define "規則1=每次申請事前審查之療程以18週為限":
  Reusable."醫令類別為1"
    and exists ([MedicationRequest] MRPlan
      where MRPlan.intent = 'plan'
        and exists (MRPlan.medication.coding Cdg
          where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
            and Cdg.code in CodeConcept.L01FG01)
        and days between start of (MRPlan.dosageInstruction[0].timing.repeat.bounds as Period)
          and end of (MRPlan.dosageInstruction[0].timing.repeat.bounds as Period) <= 126)

define "規則2=使用總療程以36週為上限":
  Reusable."醫令類別為1"
    and (Sum([MedicationRequest] MRTotal
      where (MRTotal.intent = 'plan' or MRTotal.intent = 'order')
        and (MRTotal.status is null or MRTotal.status in { 'active', 'completed', 'on-hold' })
        and exists MRTotal.dosageInstruction
        and MRTotal.dosageInstruction[0].timing.repeat.bounds is Period
        and (start of (MRTotal.dosageInstruction[0].timing.repeat.bounds as Period)) is not null
        and (end of (MRTotal.dosageInstruction[0].timing.repeat.bounds as Period)) is not null
      return days between start of (MRTotal.dosageInstruction[0].timing.repeat.bounds as Period)
        and end of (MRTotal.dosageInstruction[0].timing.repeat.bounds as Period)) <= 252)

define "規則3-1=未使用cetuximab、panitumumab藥品":
  not exists ([MedicationRequest] M
    where exists (M.medication.coding Cdg
      where Cdg.code in CodeConcept.L01FE01 or Cdg.code in CodeConcept.L01FE02)
      and Reusable."HasValidTiming"(M))

define "規則3-2=本藥品未與cetuximab、panitumumab併用":
  exists ([MedicationRequest] MRmed
    where MRmed.intent = 'plan'
      and exists (MRmed.medication.coding Cdg
        where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
          and Cdg.code in CodeConcept.L01FG01)
      and exists MRmed.dosageInstruction
      and MRmed.dosageInstruction[0].timing.repeat.bounds is Period
      and (start of (MRmed.dosageInstruction[0].timing.repeat.bounds as Period)) is not null
      and (end of (MRmed.dosageInstruction[0].timing.repeat.bounds as Period)) is not null
      and not exists ([MedicationRequest] M
        where M.intent = 'plan'
          and exists (M.medication.coding Cdg
            where Cdg.system = 'https://nhicore.nhi.gov.tw/pas/CodeSystem/nhi-medication'
              and (Cdg.code in CodeConcept.L01FE01 or Cdg.code in CodeConcept.L01FE02))
          and exists M.dosageInstruction
          and M.dosageInstruction[0].timing.repeat.bounds is Period
          and (start of (M.dosageInstruction[0].timing.repeat.bounds as Period)) is not null
          and (end of (M.dosageInstruction[0].timing.repeat.bounds as Period)) is not null
          and (start of (M.dosageInstruction[0].timing.repeat.bounds as Period)) <= 
            (end of (MRmed.dosageInstruction[0].timing.repeat.bounds as Period))
          and (end of (M.dosageInstruction[0].timing.repeat.bounds as Period)) >= 
            (start of (MRmed.dosageInstruction[0].timing.repeat.bounds as Period))))

define "規則3=本藥品不得與cetuximab, panitumumab併用":
  "規則3-1=未使用cetuximab、panitumumab藥品"
    or "規則3-2=本藥品未與cetuximab、panitumumab併用"

define "主要規定三":
  "規則1=每次申請事前審查之療程以18週為限"
    and "規則2=使用總療程以36週為上限"
    and "規則3=本藥品不得與cetuximab, panitumumab併用"

//審核結果
define "MainRule1_Pass":
  if ("主要規定一") then true else false

define "MainRule2_Pass":
  if ("規則1=再次申請必須提出客觀證據" and Reusable."續用註記為2") then true else false

define "MainRule3_Pass":
  if ("主要規定三") then true else false

define "大腸直腸癌Bevacizumab申請結果":
  if ("MainRule1_Pass" or "MainRule2_Pass") and "MainRule3_Pass"
  then case
    when "MainRule1_Pass" then '第一線治療初次使用之用藥申請 - 通過'
    when "MainRule2_Pass" then '第一線治療續用之用藥申請 - 通過'
    else '申請未通過'
  end
  else '申請未通過'

define "申請檢核結果":
  if ("大腸直腸癌Bevacizumab申請結果" = '第一線治療初次使用之用藥申請 - 通過'
    or "大腸直腸癌Bevacizumab申請結果" = '第一線治療續用之用藥申請 - 通過')
  then '通過:所有檢核項目均符合申請條件'
  else '不通過:存在不符合申請條件的項目'

define "申請審核報告":
  '\n=== Bevacizumab(一線治療) 申請審核報告 ===\n' +
  '\n【檢核結果】\n' +
  '主要規定一(初次使用):' + case when "MainRule1_Pass" then '通過' else '未通過' end + '\n' +
  case when Reusable."續用註記為1" then '● 符合:續用註記為初次使用(1)' 
    else '▲ 不符合:續用註記為初次使用(1)' end + '\n' +
  case when ("規則1=化學療法合併使用") 
    then '● 符合:Bevacizumab與化學療法合併使用' 
    else '▲ 不符合:Bevacizumab與化學療法合併使用' end + '\n' +
  case when "規則2=轉移性直腸結腸癌病患之第一線治療" 
    then '● 符合:作為轉移性大腸或直腸癌患者的第一線治療' 
    else '▲ 不符合:作為轉移性大腸或直腸癌患者的第一線治療' end + '\n' +
  '\n主要規定二(續用條件):' + case when "MainRule2_Pass" then '通過' else '未通過' end + '\n' +
  case when Reusable."續用註記為2" then '● 符合:續用註記為續用(2)' 
    else '▲ 不符合:續用註記為續用(2)' end + '\n' +
  case when "規則1=再次申請必須提出客觀證據" 
    then '● 符合:提出客觀證據證實無惡化' 
    else '▲ 不符合:提出客觀證據證實無惡化' end + '\n' +
  '\n主要規定三(藥品使用規則):' + case when "MainRule3_Pass" then '通過' else '未通過' end + '\n' +
  case when "規則1=每次申請事前審查之療程以18週為限" 
    then '● 符合:每次申請療程≤18週' 
    else '▲ 不符合:每次申請療程≤18週' end + '\n' +
  case when "規則2=使用總療程以36週為上限" 
    then '● 符合:使用總療程≤36週' 
    else '▲ 不符合:使用總療程≤36週' end + '\n' +
  case when "規則3=本藥品不得與cetuximab, panitumumab併用" 
    then '● 符合:未與cetuximab/panitumumab併用' 
    else '▲ 不符合:未與cetuximab/panitumumab併用' end + '\n' +
  '\n【申請結果】\n' + "大腸直腸癌Bevacizumab申請結果" + '\n' +
  '\n【最終審核結果】\n' + "申請檢核結果" + '\n' +
  '\n====================\n'