臺灣健保預檢規則實作指引
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: Sacituzumab govitecan給付規定-BC Sacituzumab Govitecan Rule

Official URL: https://nhicore.nhi.gov.tw/cql/Library/BCSacituzumabGovitecanRule Version: 1.0.0
Draft as of 2026-11-06 Computable Name: BCSacituzumabGovitecanRule

此 Library 為乳癌患者於申請使用 Sacituzumab Govitecan 之給付檢核條件。

Metadata
Title Sacituzumab govitecan給付規定-BC Sacituzumab Govitecan Rule
Version 1.0.0
Status Draft
Description

此 Library 為乳癌患者於申請使用 Sacituzumab Govitecan 之給付檢核條件。

Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency Description: Library CodeConcept
Resource: https://nhicore.nhi.gov.tw/cql/Library/BCCodeConcept|1.0.0
Canonical URL: https://nhicore.nhi.gov.tw/cql/Library/BCCodeConcept|1.0.0
Dependency Description: Library Reusable
Resource: https://nhicore.nhi.gov.tw/cql/Library/BCReusable|1.0.0
Canonical URL: https://nhicore.nhi.gov.tw/cql/Library/BCReusable|1.0.0
Library Content
CQL Content
//乳癌_Sacituzumab govitecan給付規定
library BCSacituzumabGovitecanRule version '1.0.0'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1' called FHIRHelpers

include BCCodeConcept version '1.0.0' called CodeConcept

include BCReusable version '1.0.0' called Reusable

context Patient


// 本次事前審查申請品項紀錄:事前審查申請藥品的預定處方紀錄
// MedicationRequest(intent=plan),依申請藥品代碼篩選,取預定起始日最新的一筆
define "本次事前審查申請品項紀錄":
  Reusable."LatestMedicationPlan"(CodeConcept.L01FX17)

// 本次事前審查申請品項預定起始日期:事前審查申請品項的預定處方起始日期
// MedicationRequest(intent=plan).dosageInstruction[0].timing.repeat.boundsPeriod.start
define "本次事前審查申請品項預定起始日期":
  Reusable."GetStartTime"("本次事前審查申請品項紀錄")

// 本次事前審查申請日期(Claim.created),報告三個月內判斷及年齡計算的基準日
define "本次事前審查申請日期":
  Reusable."本次事前審查申請日期"

define "年齡計算使用本次事前審查申請日期為判斷基準":
  date from "本次事前審查申請日期"

define "申請日時病人年齡歲數":
  Reusable."PatientAgeInYearsAt"("年齡計算使用本次事前審查申請日期為判斷基準")

define "是否滿18歲":
  Reusable."IsPatientAdultAt"("年齡計算使用本次事前審查申請日期為判斷基準")



//============================================
// 主要規定一:初次使用條件
//============================================

/*規則1*/

//1規則1:適用於治療先前已接受兩次以上全身性治療無效(其中一次需為治療晚期疾病)
define "1規則1=適用於治療先前已接受兩次以上全身性治療無效":
    exists (
        [Claim] C
        where exists (
            C.diagnosis D
            where exists (
                D.type.text T
                where Matches(T.value, '(?i).*(待諮詢醫師\\+).*')
            )
        )
    )


//1規則2:無法切除的局部晚期或轉移性的三陰性乳癌成年病人

define "ICD代碼檢核_布林值": Reusable."ICD-10使用C50"

define "醫令類別為1_布林值":Reusable."醫令類別為1"

//1規則2-1
define "1規則2-1=無法切除的局部晚期或轉移性的乳癌成年病人":
  "是否滿18歲"

//1規則2-2
define "1規則2-2=病摘應敘明無法切除":
    exists (
        [Claim] C
        where exists (
            C.diagnosis D
            where exists (
                D.type.text T
                where Matches(T.value, '(?i).*(無法切除\\+).*')
            )
        )
    )


//1規則2-3
define "1規則2-3=癌症分期分數或結果為M>=1":
  Reusable."癌症分期分數或結果為M>=1"


//1規則2-4
define "檢查報告-1規則2-4/2規則1=ER陰性":
  Reusable."HasRecentDiagnosticReportResult"(CodeConcept.MolecularER, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)

define "1規則2-4/2規則1=ER陰性":
  Reusable."HasRecentTestObservationResult"(CodeConcept.MolecularER, { 'NEG' }, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)
  or Reusable."HasRecentGeneInfoComponentResult"(CodeConcept.MolecularER, { 'NEG' }, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)
  or "檢查報告-1規則2-4/2規則1=ER陰性"

//1規則2-5
define "檢查報告-1規則2-5/2規則1=PR陰性":
  Reusable."HasRecentDiagnosticReportResult"(CodeConcept.MolecularPR, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)

define "1規則2-5/2規則1=PR陰性":
  Reusable."HasRecentTestObservationResult"(CodeConcept.MolecularPR, { 'NEG' }, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)
  or Reusable."HasRecentGeneInfoComponentResult"(CodeConcept.MolecularPR, { 'NEG' }, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)
  or "檢查報告-1規則2-5/2規則1=PR陰性"


//1規則2-6
define "1規則2-6/2規則1=檢驗檢查-HER2陰性":
  Reusable."HasRecentTestObservationResult"(CodeConcept.HER2, { 'NEG' }, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)

define "1規則2-6/2規則1=基因檢測-HER2陰性":
  Reusable."HasRecentGeneInfoComponentResult"(CodeConcept.HER2, { 'NEG' }, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)

define "檢查報告-1規則2-6/2規則1=HER2陰性":
  Reusable."HasRecentDiagnosticReportResult"(CodeConcept.HER2, '(?i).*(陰性|negative).*', "本次事前審查申請日期", 90)

define "1規則2-6/2規則1=HER2陰性":
  "1規則2-6/2規則1=檢驗檢查-HER2陰性" or "1規則2-6/2規則1=基因檢測-HER2陰性"
  or "檢查報告-1規則2-6/2規則1=HER2陰性"


define "1規則2=無法切除的局部晚期或轉移性的三陰性乳癌成年病人":
"ICD代碼檢核_布林值" and "醫令類別為1_布林值"
and "1規則2-1=無法切除的局部晚期或轉移性的乳癌成年病人"
and "1規則2-2=病摘應敘明無法切除"
and "1規則2-3=癌症分期分數或結果為M>=1"
and "1規則2-4/2規則1=ER陰性"
and "1規則2-5/2規則1=PR陰性"
and "1規則2-6/2規則1=HER2陰性"


//1規則3:病人身體狀況良好(ECOG <= 1)
define "1規則3=病人身體狀況良好(ECOG≦1)":
  exists (
    [Observation] OBs
    where exists (
      OBs.category C
      where exists (
        C.coding Cdg
        where Cdg in CodeConcept.NHIPASSupportingInfoType
        and Cdg.code = 'patientAssessment'
      )
    )
    and exists (
      OBs.code.coding Cdg
      where Cdg in CodeConcept.LOINC
      and Cdg.code = '89247-1'
    )
    and Reusable."GetNumericValue"(OBs.value) is not null
    and Reusable."GetNumericValue"(OBs.value) <= 1
  )


//1規則4:須使用過taxane類藥物至少1個療程
define "1規則4=須使用過taxane類藥物至少1個療程":
  // 先前使用過 taxane (L01CD01 或 L01CD02),須在申請之前使用
  (
    Reusable."HasPriorMedicationUse"(CodeConcept.L01FX17, CodeConcept.L01CD02)
    or Reusable."HasPriorMedicationUse"(CodeConcept.L01FX17, CodeConcept.L01CD01)
  )
  and Reusable."醫令類別為1"


//1規則5:先前未接受過trastuzumab deruxtecan治療
define "1規則2-2=先前未接受過trastuzumab deruxtecan治療":
  not exists (
    [MedicationRequest] MR
    where (MR.intent = 'plan' or MR.intent = 'order')
    and Reusable."HasMedicationCode"(MR, CodeConcept.L01FD04)
    and Reusable."HasValidTiming"(MR)
  )


//主要規定一
define "主要規定一":
"1規則1=適用於治療先前已接受兩次以上全身性治療無效"
and "1規則2=無法切除的局部晚期或轉移性的三陰性乳癌成年病人"
and "1規則3=病人身體狀況良好(ECOG≦1)"
and "1規則4=須使用過taxane類藥物至少1個療程"
and "1規則2-2=先前未接受過trastuzumab deruxtecan治療"



//============================================
// 主要規定二:續用條件-治療持續給付
//============================================

/*規則1*/
define "2規則1=再次申請必須提出客觀證據(如:影像學)證實無惡化,才可繼續使用":
  exists (
    [MedicationRequest] MRPlan
     where MRPlan.intent = 'plan'
     and Reusable."HasMedicationCode"(MRPlan, CodeConcept.L01FX17)
  and exists (
    [DiagnosticReport] Report
     where Reusable."IsImageReport"(Report)
      and Reusable."IsReportWithinDaysBefore"(Report, "本次事前審查申請日期", 90)
      )
      
    )
  and Reusable."醫令類別為1"

define "主要規定二":
  Reusable."續用申請"
  and Reusable."醫令類別為1"
  and "本次事前審查申請品項紀錄" is not null
  and "2規則1=再次申請必須提出客觀證據(如:影像學)證實無惡化,才可繼續使用"


//============================================
// 主要規定三:藥品使用規則
//============================================

/*規則1*/

//規則1:每次申請之療程以3個月為限
define "藥品規則1=每次申請之療程以3個月為限":
  Reusable."HasMedicationPlanDurationWithin"(CodeConcept.L01FX17, 84)


//規則2:Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付,不得互換
define "藥品規則2=Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付":
  not (
    Reusable."HasMedicationUse"(CodeConcept.L01FX17)
    and Reusable."HasMedicationUse"(CodeConcept.L01FD04)
  )


// 主要規定三
define "主要規定三":
"藥品規則1=每次申請之療程以3個月為限" and "藥品規則2=Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付"


//============================================
// 檢核結果用:必要資料存在判斷
//============================================

define "主要疾病ICD診斷資料存在":
  exists (
    [Claim] C
      where exists (
        C.diagnosis D
          where D.sequence = 1
            and exists (
              D.diagnosis.coding Cdg
                where (
                  Cdg in CodeConcept.ICD10CM2023
                  or Cdg in CodeConcept.ICD10CM2014
                )
            )
      )
  )

define "癌症分期資料存在":
  exists (
    [Observation] O
    where exists (
      O.code.coding Cdg
      where Cdg.code = '399390009'
        and Cdg in CodeConcept.SNOMED
    )
    and O.value is not null
  )

define "HER2檢測資料存在":
  Reusable."HasMarkerData"(CodeConcept.HER2)

define "ER檢測資料存在":
  Reusable."HasMarkerData"(CodeConcept.MolecularER)

define "PR檢測資料存在":
  Reusable."HasMarkerData"(CodeConcept.MolecularPR)


//============================================
// 列出「符合」項目判斷式
//============================================

define function "符合項目"():
  // 主要規定一:初次使用條件
  (if Reusable."初次申請" and (
    "1規則1=適用於治療先前已接受兩次以上全身性治療無效" or 
    "1規則2=無法切除的局部晚期或轉移性的三陰性乳癌成年病人" or 
    "1規則3=病人身體狀況良好(ECOG≦1)" or 
    "1規則4=須使用過taxane類藥物至少1個療程" or 
    "1規則2-2=先前未接受過trastuzumab deruxtecan治療"
  )
    then '<主要規定一:初次使用條件>\n' +
         (if "1規則1=適用於治療先前已接受兩次以上全身性治療無效" 
           then '● 1規則1-條件1:先前已接受兩次以上全身性治療無效(其中一次需為治療晚期疾病)\n' else '') +
         (if "ICD代碼檢核_布林值" 
           then '● 1規則1-條件2-0:ICD代碼為C50\n' else '') +
         (if "1規則2-1=無法切除的局部晚期或轉移性的乳癌成年病人" 
           then '● 1規則1-條件2-1:成年患者(≥18歲)\n' else '') +
         (if "1規則2-2=病摘應敘明無法切除" 
           then '● 1規則1-條件2-2:病摘敘明無法切除\n' else '') +
         (if "1規則2-3=癌症分期分數或結果為M>=1" 
           then '● 1規則1-條件2-3:癌症分期分數或結果為M≥1(轉移性)\n' else '') +
         (if "1規則2-4/2規則1=ER陰性" 
           then '● 1規則1-條件2-4:ER陰性(3個月內檢測)\n' else '') +
         (if "1規則2-5/2規則1=PR陰性" 
           then '● 1規則1-條件2-5:PR陰性(3個月內檢測)\n' else '') +
         (if "1規則2-6/2規則1=HER2陰性" 
           then '● 1規則1-條件2-6:HER2陰性(3個月內檢測)\n' else '') +
         (if "1規則3=病人身體狀況良好(ECOG≦1)" 
           then '● 1規則1-條件3:病人身體狀況良好(ECOG≤1)\n' else '') +
         (if "1規則4=須使用過taxane類藥物至少1個療程" 
           then '● 1規則1-條件4:已使用過taxane類藥物至少1個療程\n' else '') +
         (if "1規則2-2=先前未接受過trastuzumab deruxtecan治療" 
           then '● 1規則1-條件5:先前未接受過trastuzumab deruxtecan治療\n' else '') +
         '\n'
    else '') +
  
  // 主要規定二:續用條件
  (if Reusable."續用申請" and "2規則1=再次申請必須提出客觀證據(如:影像學)證實無惡化,才可繼續使用"
    then '<主要規定二:續用條件-治療持續給付>\n' +
         '● 2規則1:已檢附客觀證據(如:影像學)證實無惡化\n' +
         '\n'
    else '') +
  
  // 主要規定三:藥品使用規則
  (if "藥品規則1=每次申請之療程以3個月為限" or "藥品規則2=Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付"
    then '<主要規定三:藥品使用規則>\n' +
         (if "藥品規則1=每次申請之療程以3個月為限"
           then '● 3規則1:每次申請之療程≤3個月(84天)(參考資訊)\n' else '') +
         (if "藥品規則2=Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付"
           then '● 3規則2:Sacituzumab govitecan和trastuzumab deruxtecan僅得擇一給付(參考資訊)\n' else '')
    else '')

//============================================
// 列出「不符合」項目判斷式 - 條件或代碼不符合
//============================================

define function "不符合項目_條件或代碼不符合"():
  // 主要規定一:初次使用條件 - 條件或代碼不符合
  (if Reusable."初次申請" and (
    "主要疾病ICD診斷資料存在" and not "ICD代碼檢核_布林值" or 
    not "1規則2-1=無法切除的局部晚期或轉移性的乳癌成年病人" or 
    "癌症分期資料存在" and not "1規則2-3=癌症分期分數或結果為M>=1" or
    not "1規則2-2=先前未接受過trastuzumab deruxtecan治療"
  )
    then '<主要規定一:初次使用條件>\n' +
         (if "主要疾病ICD診斷資料存在" and not "ICD代碼檢核_布林值" 
           then '▲ 1規則1-條件2-0:主要疾病之ICD代碼未使用C50\n' else '') +
         (if not "1規則2-1=無法切除的局部晚期或轉移性的乳癌成年病人" 
           then '▲ 1規則1-條件2-1:非成年患者(<18歲)\n' else '') +
         (if "癌症分期資料存在" and not "1規則2-3=癌症分期分數或結果為M>=1" 
           then '▲ 1規則1-條件2-3:癌症分期分數或結果不為M≥1(非轉移性)\n' else '') +
         (if not "1規則2-2=先前未接受過trastuzumab deruxtecan治療" 
           then '▲ 1規則1-條件5:先前已接受過trastuzumab deruxtecan治療\n' else '') +
         '\n'
    else '') +
  
  // 主要規定三:藥品使用規則 - 條件或代碼不符合
  (if not "藥品規則1=每次申請之療程以3個月為限" or not "藥品規則2=Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付"
    then '<主要規定三:藥品使用規則>\n' +
         (if not "藥品規則1=每次申請之療程以3個月為限"
           then '▲ 3規則1:每次申請之療程超過3個月(84天)(參考資訊)\n' else '') +
         (if not "藥品規則2=Sacituzumab govitecan和trastuzumab deruxtecan僅能擇一給付"
           then '▲ 3規則2:同時使用Sacituzumab govitecan和trastuzumab deruxtecan(參考資訊)\n' else '')
    else '')

//============================================
// 列出「不符合」項目判斷式 - 必要資料未填寫
//============================================

define function "不符合項目_必要資料未填寫"():
  (if Reusable."申請類型未知"
    then '▲ 申請類型:未提供可判定初次使用或續用之申請註記\n\n'
    else '') +
  // 主要規定一:初次使用條件 - 必要資料未填寫
  (if Reusable."初次申請" and (
    not "1規則1=適用於治療先前已接受兩次以上全身性治療無效" or 
    not "1規則2-2=病摘應敘明無法切除" or 
    not "ER檢測資料存在" or 
    not "PR檢測資料存在" or 
    not "HER2檢測資料存在" or 
    not "1規則3=病人身體狀況良好(ECOG≦1)" or 
    not "1規則4=須使用過taxane類藥物至少1個療程"
  )
    then '<主要規定一:初次使用條件>\n' +
         (if not "1規則1=適用於治療先前已接受兩次以上全身性治療無效" 
           then '▲ 1規則1-條件1:未提供先前已接受兩次以上全身性治療無效之證明\n' else '') +
         (if not "1規則2-2=病摘應敘明無法切除" 
           then '▲ 1規則1-條件2-2:病摘未敘明無法切除\n' else '') +
         (if not ("1規則2-4/2規則1=ER陰性" and "1規則2-5/2規則1=PR陰性" and "1規則2-6/2規則1=HER2陰性") 
           then '▲ 1規則1-條件2-4/2-5/2-6:未符合三陰性乳癌條件或檢測資料非3個月內\n' +
                (if not "ER檢測資料存在"
                  then '  - ER非陰性或未提供3個月內ER檢測資料\n' else '') +
                (if not "PR檢測資料存在"
                  then '  - PR非陰性或未提供3個月內PR檢測資料\n' else '') +
                (if not "HER2檢測資料存在"
                  then '  - HER2非陰性或未提供3個月內HER2檢測資料\n' else '')
           else '') +
         (if not "1規則3=病人身體狀況良好(ECOG≦1)" 
           then '▲ 1規則1-條件3:未提供ECOG評估資料\n' else '') +
         (if not "1規則4=須使用過taxane類藥物至少1個療程" 
           then '▲ 1規則1-條件4:未提供使用過taxane類藥物之紀錄\n' else '') +
         '\n'
    else '') +
  
  // 主要規定二:續用條件 - 必要資料未填寫
  (if Reusable."續用申請" and not "2規則1=再次申請必須提出客觀證據(如:影像學)證實無惡化,才可繼續使用"
    then '<主要規定二:續用條件-治療持續給付>\n' +
         '▲ 2規則1:未提供客觀證據(如:影像學)資料\n' +
         '\n'
    else '')

//============================================
// 審核結果
//============================================

define "乳癌Sacituzumab_govitecan申請結果_布林":
  case
    when Reusable."初次申請" then (
      "1規則1=適用於治療先前已接受兩次以上全身性治療無效" and
      "1規則2=無法切除的局部晚期或轉移性的三陰性乳癌成年病人" and
      "1規則3=病人身體狀況良好(ECOG≦1)" and
      "1規則4=須使用過taxane類藥物至少1個療程" and
      "1規則2-2=先前未接受過trastuzumab deruxtecan治療"
    )
    when Reusable."續用申請" then (
      "2規則1=再次申請必須提出客觀證據(如:影像學)證實無惡化,才可繼續使用"
    )
    else false
  end

define "乳癌Sacituzumab_govitecan申請之CQL檢核結果":
  if Reusable."初次申請" and "乳癌Sacituzumab_govitecan申請結果_布林"
  then '✓通過:初次使用-乳癌 Sacituzumab govitecan 用藥申請'

  else if Reusable."續用申請" and "乳癌Sacituzumab_govitecan申請結果_布林"
  then '✓通過:續用-乳癌 Sacituzumab govitecan 用藥申請'
  
  else if Reusable."初次申請"
  then '✖不通過:初次使用-乳癌 Sacituzumab govitecan 用藥申請'
  
  else if Reusable."續用申請"
  then '✖不通過:續用-乳癌 Sacituzumab govitecan 用藥申請'
  
  else '✖不通過:無法判斷申請類型-乳癌 Sacituzumab govitecan 用藥申請'

//============================================
// 報告總結
//============================================

define "報告總結":
  '\n=== 無法切除的局部晚期或轉移性三陰性乳癌之Sacituzumab govitecan 申請審核報告 ===\n' +
  '\n※ 備註:標示為「參考資訊」之檢核項目,係供審核參酌使用,不作為最終【申請結果】判定之依據。\n' +
  '\n【申請類型】' + Reusable."申請類型" + '\n' +
  '\n【年齡檢核】' +
  '申請日時病人年齡歲數:' +
  Coalesce(ToString("申請日時病人年齡歲數"), '無法計算') + '\n' +
  '\n【●符合項目】\n' +
  (if "符合項目"() = '' then '無\n' else "符合項目"()) +
  '\n【▲不符合項目 - 必要資料未填寫】\n' +
  (if "不符合項目_必要資料未填寫"() = '' then '無\n' else "不符合項目_必要資料未填寫"()) +
  '\n【▲不符合項目 - 條件或代碼不符合】\n' +
  (if "不符合項目_條件或代碼不符合"() = '' then '無\n' else "不符合項目_條件或代碼不符合"()) +
  '\n【申請結果】\n' +
  "乳癌Sacituzumab_govitecan申請之CQL檢核結果" +
  '\n===============================================\n'
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.3-cibuild of the sample-content-ig Liquid templates