PCEnzalutamideRule1
type: Library
node role: treeRoot
resource.id:
  value: PCEnzalutamideRule1
domain resource.text:
  narrative.status:
    value: extensions
  narrative.div: Metadata Title Enzalutamide給付規定-高風險非轉移性去勢抗性前列腺癌(high risk nmCRPC) Version 1.0.0 Status Draft Description 此 Library 為攝護腺癌_Enzalutamide給付規定-高風險非轉移性去勢抗性前列腺癌(high risk nmCRPC)之給付檢核條件。 Type logic-library from http://terminology.hl7.org/CodeSystem/library-type Dependency Description: Library CodeConcept Resource: https://nhicore.nhi.gov.tw/cql/Library/PCCodeConcept|1.0.0 Canonical URL: https://nhicore.nhi.gov.tw/cql/Library/PCCodeConcept|1.0.0 Dependency Description: Library Reusable Resource: https://nhicore.nhi.gov.tw/cql/Library/PCReusable|1.0.0 Canonical URL: https://nhicore.nhi.gov.tw/cql/Library/PCReusable|1.0.0 Library Content CQL Content //攝護腺癌_Enzalutamide給付規定-高風險非轉移性去勢抗性前列腺癌(high risk nmCRPC) library PCEnzalutamideRule1 version '1.0.0' using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' called FHIRHelpers include PCCodeConcept version '1.0.0' called CodeConcept include PCReusable version '1.0.0' called Reusable context Patient //============================================ // 申請紀錄 //============================================ define "本次申請紀錄": Reusable."LatestMedicationPlan"(CodeConcept."L02BB04") define "本次申請起始日期": FHIRHelpers.ToDateTime(("本次申請紀錄".dosageInstruction[0].timing.repeat.bounds as Period).start) define "本次申請終止日期": FHIRHelpers.ToDateTime(("本次申請紀錄".dosageInstruction[0].timing.repeat.bounds as Period).end) define "ICD-C61": Reusable."主要疾病之ICD-10使用C61" define "M=0": Reusable."癌症分期分數或結果為M=0" define "3個月內有影像檢查報告": Reusable."HasRecentImageReport"("本次申請起始日期", 90) //============================================ // 主要規定一：初次使用條件 //============================================ /*規則1*/ //條件1 define "簡要病摘-非轉移性": exists ( [Claim] C where exists ( C.diagnosis D where exists ( D.type.text T where Matches(T.value, '(?i).*非轉移性去勢抗性前列腺癌(high risk nmCRPC).*') ) ) ) define "睪固酮達去勢標準": exists ( [Observation] OBs where exists ( OBs.code.coding Cdg where Cdg in CodeConcept.LOINC and Cdg.code in CodeConcept."TestosteroneCode" ) and exists ( OBs.referenceRange RR where…
library.url:
  value: https://nhicore.nhi.gov.tw/cql/Library/PCEnzalutamideRule1
library.version:
  value: 1.0.0
library.name:
  value: PCEnzalutamideRule1
library.title:
  value: Enzalutamide給付規定-高風險非轉移性去勢抗性前列腺癌(high risk nmCRPC)
library.status:
  value: draft
library.type:
  codeable concept.coding:
    index: 0
    coding.system:
      value: http://terminology.hl7.org/CodeSystem/library-type
    coding.code:
      value: logic-library
library.date:
  value: 2026-08-21
library.description:
  value: 此 Library 為攝護腺癌_Enzalutamide給付規定-高風險非轉移性去勢抗性前列腺癌(high risk nmCRPC)之給付檢核條件。
library.related artifact:
  index: 0
  related artifact.type:
    value: depends-on
  related artifact.display:
    value: Library CodeConcept
  related artifact.resource:
    value: https://nhicore.nhi.gov.tw/cql/Library/PCCodeConcept|1.0.0
    link: 1.0
    link: .0
library.related artifact:
  index: 1
  related artifact.type:
    value: depends-on
  related artifact.display:
    value: Library Reusable
  related artifact.resource:
    value: https://nhicore.nhi.gov.tw/cql/Library/PCReusable|1.0.0
    link: 1.0
    link: .0
library.parameter:
  index: 0
  parameter definition.name:
    value: Patient
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: Patient
library.parameter:
  index: 1
  parameter definition.name:
    value: 本次申請紀錄
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: MedicationRequest
library.parameter:
  index: 2
  parameter definition.name:
    value: 本次申請起始日期
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: dateTime
library.parameter:
  index: 3
  parameter definition.name:
    value: 本次申請終止日期
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: dateTime
library.parameter:
  index: 4
  parameter definition.name:
    value: ICD-C61
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 5
  parameter definition.name:
    value: M=0
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 6
  parameter definition.name:
    value: 3個月內有影像檢查報告
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 7
  parameter definition.name:
    value: 簡要病摘-非轉移性
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 8
  parameter definition.name:
    value: 睪固酮達去勢標準
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 9
  parameter definition.name:
    value: 1規則1-1
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 10
  parameter definition.name:
    value: 1規則1-2
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 11
  parameter definition.name:
    value: 1規則1
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0
  parameter definition.max:
    value: 1
  parameter definition.type:
    value: boolean
library.parameter:
  index: 12
  parameter definition.name:
    value: 1規則2-3
  parameter definition.use:
    value: out
  parameter definition.min:
    value: 0

value: 1

value: boolean

index: 13
parameter definition.name:
  value: 1規則2-4-1
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 14
parameter definition.name:
  value: mCRPC藥物代碼
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: *
parameter definition.type:
  value: string

index: 15
parameter definition.name:
  value: 1規則2-4-2
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 16
parameter definition.name:
  value: 1規則2-4
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 17
parameter definition.name:
  value: 1規則2-5
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 18
parameter definition.name:
  value: 1規則2-6
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 19
parameter definition.name:
  value: 1規則2
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 20
parameter definition.name:
  value: 1規則3
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 21
parameter definition.name:
  value: 1規則4
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 22
parameter definition.name:
  value: 1規則5-9
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 23
parameter definition.name:
  value: 1規則5-10
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 24
parameter definition.name:
  value: 1規則5-11
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 25
parameter definition.name:
  value: 1規則5
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 26
parameter definition.name:
  value: 主要規定一
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 27
parameter definition.name:
  value: 2規則1-1
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 28
parameter definition.name:
  value: 2規則1-2
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 29
parameter definition.name:
  value: 2規則1
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 30
parameter definition.name:
  value: 主要規定二
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 31
parameter definition.name:
  value: 化療前曾使用Enzalutamide
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 32
parameter definition.name:
  value: 3規則1-1
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 33
parameter definition.name:
  value: 3規則2-2-1
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 34
parameter definition.name:
  value: 3規則2-2-2
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 35
parameter definition.name:
  value: 3規則2-2
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 36
parameter definition.name:
  value: useSdate
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: dateTime

index: 37
parameter definition.name:
  value: useEdate
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: dateTime

index: 38
parameter definition.name:
  value: 3規則3-3
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 39
parameter definition.name:
  value: 主要規定三
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 40
parameter definition.name:
  value: Enzalutamide申請資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 41
parameter definition.name:
  value: 療程期間資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 42
parameter definition.name:
  value: 攝護腺癌ICD診斷資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 43
parameter definition.name:
  value: 簡要病摘資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 44
parameter definition.name:
  value: 癌症分期資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 45
parameter definition.name:
  value: 睪固酮檢驗資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 46
parameter definition.name:
  value: 分子檢查報告資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 47
parameter definition.name:
  value: 影像檢查報告資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 48
parameter definition.name:
  value: 手術去勢處置資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 49
parameter definition.name:
  value: 去勢用藥處方資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 50
parameter definition.name:
  value: ECOG資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 51
parameter definition.name:
  value: PSA檢驗資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 52
parameter definition.name:
  value: 化療藥物處方資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 53
parameter definition.name:
  value: 不得併用藥物處方資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 54
parameter definition.name:
  value: V10XX03處方資料存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 55
parameter definition.name:
  value: 必要資料皆存在
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 56
parameter definition.name:
  value: 攝護腺癌Enzalutamide申請結果_布林
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: boolean

index: 57
parameter definition.name:
  value: 攝護腺癌Enzalutamide申請結果
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: string

index: 58
parameter definition.name:
  value: 報告總結
parameter definition.use:
  value: out
parameter definition.min:
  value: 0
parameter definition.max:
  value: 1
parameter definition.type:
  value: string

index: 0
data requirement.type:
  value: Claim
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Claim
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Claim

index: 1
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 2
data requirement.type:
  value: DiagnosticReport
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/DiagnosticReport
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/DiagnosticReport

index: 3
data requirement.type:
  value: Procedure
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Procedure
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Procedure

index: 4
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 5
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 6
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 7
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 8
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 9
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 10
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 11
data requirement.type:
  value: Claim
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Claim
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Claim

index: 12
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 13
data requirement.type:
  value: Claim
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Claim
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Claim

index: 14
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 15
data requirement.type:
  value: DiagnosticReport
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/DiagnosticReport
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/DiagnosticReport

index: 16
data requirement.type:
  value: DiagnosticReport
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/DiagnosticReport
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/DiagnosticReport

index: 17
data requirement.type:
  value: Procedure
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Procedure
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Procedure

index: 18
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 19
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 20
data requirement.type:
  value: Observation
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/Observation
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/Observation

index: 21
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 22
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 23
data requirement.type:
  value: MedicationRequest
data requirement.profile:
  value: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  index: 0
  link: http://hl7.org/fhir/StructureDefinition/MedicationRequest

index: 0
attachment.content type:
  value: text/cql

index: 1
attachment.content type:
  value: application/elm+xml

index: 2
attachment.content type:
  value: application/elm+json