BCAbemaciclibRule1
type: Library
node role: treeRoot
id:
  v: BCAbemaciclibRule1
text:
  status:
    v: extensions
  div:
    v: Metadata Title Abemaciclib給付規定-Abemaciclib Rule1 Version 1.0.0 Status Draft Description 此 Library 為乳癌藥事前審查使用之代碼集。 Type logic-library from http://terminology.hl7.org/CodeSystem/library-type Parameters Parameter None Library Content CQL Content //乳癌_Abemaciclib給付規定 library BCAbemaciclibRule1 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 //============================================ // 申請類型判斷 //============================================ define "初次申請": "申請類型" = '初次使用' define "續用申請": "申請類型" = '續用' define "申請類型未知": "申請類型" = '無法判斷申請類型' define "申請類型": case when Reusable."續用註記為1" then '初次使用' when Reusable."續用註記為2" then '續用' else '無法判斷申請類型' end //============================================ // 主要規定一：初次使用條件 //============================================ /*規則1*/ define "ICD代碼檢核_布林值": Reusable."ICD-10使用C50" //條件1:Abemaciclib併用內分泌療法(tamoxifen或芳香環酶抑制劑) define "條件1=Abemaciclib併用內分泌療法(tamoxifen或芳香環酶抑制劑)": ( // Abemaciclib 申請 exists ( [MedicationRequest] MRPlan where MRPlan.intent = 'plan' and exists ( MRPlan.medication.coding Cdg where Cdg in CodeConcept.NHIMedication and Cdg.code in CodeConcept.L01EF03 ) ) and // 併用以下任一內分泌療法 exists ( [MedicationRequest] MROrder1 where MROrder1.intent = 'order' and exists ( MROrder1.medication.coding Cdg where Cdg in CodeConcept.NHIMedication and Cdg.code in CodeConcept."內分泌療法藥物(tamoxifen或芳香環酶抑制劑)" ) and Reusable."HasValidTiming"(MROrder1) ) and Reusable."醫令類別為1" ) //條件2:作為荷爾蒙受體(HR)陽性(ER或PR>30%) //條件2-1 ER define "條件2-1=作為荷爾蒙受體(HR)陽性(ER>30%)": exists ( [Observation] OBs where exists ( OBs.category C where exists ( C.coding Cdg where Cdg in CodeConcept.NHIPASSupportingInfoType and Cdg.code = 'tests' ) ) and exists ( OBs.code.coding Cdg where Cdg in CodeConcept.LOINC and Cdg.code in CodeConcept.ER ) and OBs.value is Quantity and (OBs.value as Quantity).value > 30 and (OBs.val…
url:
  v: https://nhicore.nhi.gov.tw/cql/Library/BCAbemaciclibRule1
  l: BCAbemaciclibRule1
version:
  v: 1.0.0
name:
  v: BCAbemaciclibRule1
title:
  v: Abemaciclib給付規定-Abemaciclib 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-03-11
description:
  v: 此 Library 為乳癌藥事前審查使用之代碼集。
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json