BCTalazoparibRule1
type: Library
node role: treeRoot
id:
  v: BCTalazoparibRule1
text:
  status:
    v: extensions
  div:
    v: Metadata Title Talazoparib給付規定-Talazoparib Rule1 Version 1.0.0 Status Draft Description 此 Library 為乳癌患者於申請使用 Talazoparib 之給付檢核條件。 Type logic-library from http://terminology.hl7.org/CodeSystem/library-type Parameters Parameter None Library Content CQL Content //乳癌_Talazoparib給付規定 library BCTalazoparibRule1 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 //============================================ // 主要規定一：初次使用條件 //============================================ /*規則1*/ define "ICD代碼檢核_布林值": Reusable."ICD-10使用C50" define "醫令類別為1_布林值":Reusable."醫令類別為1" //條件1:局部晚期或轉移性三陰性乳癌 //條件1-1 define "條件1-1=3個月內影像報告": Reusable."HasRecentImageReport"("本次申請起始日期", 90) //條件1-2 define "條件1-2=癌症分期分數或結果為M≠0": Reusable."癌症分期分數或結果為M≠0" //條件1-3(檢查報告) define "條件1-3=3個月內有檢查報告": Reusable."HasRecentMolecularReport"("本次申請起始日期", 90) //條件1-4 define "條件1-4=Talazoparib申請": exists ( [MedicationRequest] MRPlan where MRPlan.intent = 'plan' and exists ( MRPlan.medication.coding Cdg where Cdg in CodeConcept.NHIMedication and Cdg.code in CodeConcept.L01XK04 ) ) define "規則1-1=局部晚期或轉移性三陰性乳癌": "ICD代碼檢核_布林值" and "醫令類別為1_布林值" and "條件1-4=Talazoparib申請" and "條件1-2=癌症分期分數或結果為M≠0" and ("條件1-1=3個月內影像報告" or "條件1-3=3個月內有檢查報告") define "年齡計算用申請日期": date from "本次申請起始日期" define "申請日時病人年齡歲數": if Patient.birthDate is null or "年齡計算用申請日期" is null then null else difference in years between FHIRHelpers.ToDate(Patient.birthDate) and "年齡計算用申請日期" define "是否滿18歲": if "申請日時病人年齡歲數" is null then false else "申請日時病人年齡歲數" >= 18 //條件2:18歲以上 define "規則1-2=18歲以上": Patient.birthDate is not null and "是否滿18歲" //條件3 //條件3-1:曾接受前導性化療 define "條件3-1=曾接受前導性化療": Reusable."醫令類別為1" // 先前使用過前導性化療，須在申請之前使用 and Reusable."HasPriorMedicationUse"(CodeConcept.L01XK04, CodeConcept."前導性化療") //條件3-2:曾接受術後輔助性化療 define "條件3-2=曾接受術後輔助性化療": Reusable."醫令類別為1" // 先前使用過術後輔助性化療，須在申請之前使用 and Reusable…
url:
  v: https://nhicore.nhi.gov.tw/cql/Library/BCTalazoparibRule1
  l: BCTalazoparibRule1
version:
  v: 1.0.0
name:
  v: BCTalazoparibRule1
title:
  v: Talazoparib給付規定-Talazoparib Rule1
status:
  v: draft
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
      l: library-type
    code:
      v: logic-library
date:
  v: 2026-04-12
description:
  v: 此 Library 為乳癌患者於申請使用 Talazoparib 之給付檢核條件。
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json