BCTrastuzumabRule2
type: Library
node role: treeRoot
id:
  v: BCTrastuzumabRule2
text:
  status:
    v: extensions
  div:
    v: Metadata Title Trastuzumab（早期乳癌）給付規定-Trastuzumab Rule2 Version 1.0.0 Status Draft Description 此 Library 為乳癌（早期乳癌）患者於申請使用 Trastuzumab 之給付檢核條件。 Type logic-library from http://terminology.hl7.org/CodeSystem/library-type Parameters Parameter None Library Content CQL Content //早期乳癌_Trastuzumab給付規定 library BCTrastuzumabRule2 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 "手術日期(opdate)": Max( flatten( [Claim] C return ( C.procedure Proc where Proc.date is not null return FHIRHelpers.ToDateTime(Proc.date) ) ) ) define "手術(或其他處置)項目": exists ( [Claim] C where exists ( C.procedure Proc where exists ( ((Proc.procedure as FHIR.CodeableConcept).coding) Cdg where Cdg is not null and (Cdg.code in CodeConcept."ICD10PCS2023Image" or Cdg.code in CodeConcept."ICD10PCS2014Image") and Cdg.code in CodeConcept."ProcedureCodes" ) ) ) //條件1:外科手術前後、化學療法(術前輔助治療或輔助治療)治療後 //條件1-1-1 define "條件1-1-1=病摘描述本藥品使用在外科手術前": exists ( [Claim] C where exists ( C.diagnosis D where exists ( D.type.text T where Matches(T.value, '(?i).*本藥品使用在外科手術前.*') ) ) ) //條件1-1-2 define "條件1-1-2=外科手術後": exists ( [MedicationRequest] MR where MR.intent = 'plan' and Reusable."HasValidTiming"(MR) and exists ( MR.medication.coding Cdg where Cdg in CodeConcept.NHIMedication and Cdg.code in CodeConcept.L01FD01 ) and Reusable."醫令類別為1" and MR.dosageInstruction[0].timing.repeat.bounds is Period and (start of (MR.dosageInstruction[0].timing.repeat.bounds as Period)) is not null and (start of (MR.dosageInstruction[0].timing.repeat.bounds as Period)) > "手術日期(opdate)" and "手術(或其他處置)項目" ) //條件1-2 define "條件1-2=化學療法(術前輔助治療或輔助治療)治療後": Reusable."HasPriorMedicationUse"(CodeConcept.L01FD01, CodeConcept."併用化學治療法") and Reusable."醫令類別為1" define "條件1-1=…
url:
  v: https://nhicore.nhi.gov.tw/cql/Library/BCTrastuzumabRule2
  l: BCTrastuzumabRule2
version:
  v: 1.0.0
name:
  v: BCTrastuzumabRule2
title:
  v: Trastuzumab（早期乳癌）給付規定-Trastuzumab Rule2
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 為乳癌（早期乳癌）患者於申請使用 Trastuzumab 之給付檢核條件。
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json