| CMS645FHIRBoneDensityPCADTherapy |
| 1.0.000 |
| CMS645FHIRBoneDensityPCADTherapy |
| Oregon Urology |
CMS645FHIRBoneDensityPCADTherapy
|
|
http://terminology.hl7.org/CodeSystem/library-type#logic-library
|
Type: Patient
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
|
Type: Encounter
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type, period, status, status.value
Code Filter(s):
Path: type
ValueSet: Office Visit
|
Type: MedicationRequest
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: Androgen Deprivation Therapy for Urology Care
|
Type: MedicationRequest
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest
Must Support Elements: medication.reference.value
|
Type: Medication
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication
Must Support Elements: id.value, code
|
Type: Condition
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Prostate Cancer
|
Type: Condition
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: Prostate Cancer
|
Type: ServiceRequest
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
Must Support Elements: code, authoredOn, authoredOn.value, status, status.value, intent, intent.value
Code Filter(s):
Path: code
Code(s):
SNOMED CT: 456381000124102 (Injection of leuprolide acetate for twelve month period (regime/therapy))
|
Type: ServiceRequest
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
Must Support Elements: code, authoredOn, authoredOn.value, status, status.value, intent, intent.value
Code Filter(s):
Path: code
ValueSet: DEXA Bone Density for Urology Care
|
Type: Observation
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result
Must Support Elements: code, effective, status, status.value
Code Filter(s):
Path: code
ValueSet: DEXA Bone Density for Urology Care
|
Type: ServiceRequest
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicenotrequested
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: DEXA Bone Density for Urology Care
|
Type: Observation
Profile(s):
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationcancelled
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: DEXA Bone Density for Urology Care
|
| Name |
Use |
Card. |
Type |
Documentation |
| Measurement Period |
In |
0..1 |
Period |
|
| Patient |
Out |
0..1 |
Resource |
|
| Has Qualifying Encounter |
Out |
0..1 |
boolean |
|
| Androgen Deprivation Therapy for Urology Care Medication Active Start Dates |
Out |
0..* |
dateTime |
|
| Androgen Deprivation Therapy for Urology Care Medication Order Start Dates |
Out |
0..* |
dateTime |
|
| Prostate Cancer Diagnosis |
Out |
0..* |
Resource |
|
| First ADT in 3 Months Before to 9 Months After Start of Measurement Period |
Out |
0..1 |
dateTime |
|
| Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period |
Out |
0..* |
Resource |
|
| Initial Population |
Out |
0..1 |
boolean |
|
| Denominator |
Out |
0..1 |
boolean |
|
| Has Baseline DEXA Scan Two Years Prior to the Start of or Less than Three Months After the Start of ADT |
Out |
0..1 |
boolean |
|
| Numerator |
Out |
0..1 |
boolean |
|
| No Bone Density Scan Ordered Due to Patient Refusal |
Out |
0..* |
Resource |
|
| No Bone Density Scan Performed Due to Patient Refusal |
Out |
0..* |
Resource |
|
| Denominator Exception |
Out |
0..1 |
boolean |
|
| SDE Ethnicity |
Out |
0..1 |
Resource |
|
| SDE Payer |
Out |
0..* |
Resource |
|
| SDE Race |
Out |
0..1 |
Resource |
|
| SDE Sex |
Out |
0..1 |
Coding |
|
|
library CMS645FHIRBoneDensityPCADTherapy version '1.0.000'
using QICore version '6.0.0'
include FHIRHelpers version '4.4.000' called FHIRHelpers
include SupplementalDataElements version '5.1.000' called SDE
include QICoreCommon version '4.0.000' called QICoreCommon
codesystem "SNOMEDCT": 'http://snomed.info/sct'
valueset "Androgen Deprivation Therapy for Urology Care": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.352'
valueset "DEXA Bone Density for Urology Care": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.359'
valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
valueset "Patient Declined": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1582'
valueset "Prostate Cancer": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319'
code "Injection of leuprolide acetate for twelve month period (regime/therapy)": '456381000124102' from "SNOMEDCT" display 'Injection of leuprolide acetate for twelve month period (regime/therapy)'
parameter "Measurement Period" Interval<DateTime>
default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)
context Patient
define "Initial Population":
"Has Qualifying Encounter"
and exists "Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period"
define "Denominator":
"Initial Population"
define "Numerator":
"Has Baseline DEXA Scan Two Years Prior to the Start of or Less than Three Months After the Start of ADT"
define "Denominator Exception":
exists ( "No Bone Density Scan Ordered Due to Patient Refusal" )
or exists ( "No Bone Density Scan Performed Due to Patient Refusal" )
define "SDE Ethnicity":
SDE."SDE Ethnicity"
define "SDE Payer":
SDE."SDE Payer"
define "SDE Race":
SDE."SDE Race"
define "SDE Sex":
SDE."SDE Sex"
define "Has Baseline DEXA Scan Two Years Prior to the Start of or Less than Three Months After the Start of ADT":
exists ( ( [ServiceRequest: "DEXA Bone Density for Urology Care"] DEXAOrdered
with "Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period" OrderTwelveMonthsADT
such that DEXAOrdered.authoredOn 3 months or less on or after day of OrderTwelveMonthsADT.authoredOn
or DEXAOrdered.authoredOn 2 years or less before day of OrderTwelveMonthsADT.authoredOn
where DEXAOrdered.status in { 'active', 'completed' }
and DEXAOrdered.intent = 'order'
)
union ( [ObservationClinicalResult: "DEXA Bone Density for Urology Care"] DEXAPerformed
with "Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period" OrderTwelveMonthsADT
such that DEXAPerformed.effective.toInterval ( ) 3 months or less on or after day of OrderTwelveMonthsADT.authoredOn
or DEXAPerformed.effective.toInterval ( ) 2 years or less before day of OrderTwelveMonthsADT.authoredOn
where DEXAPerformed.status in { 'final', 'amended', 'corrected' }
)
)
define "No Bone Density Scan Ordered Due to Patient Refusal":
[ServiceNotRequested: "DEXA Bone Density for Urology Care"] DEXANotOrdered
with "Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period" OrderTwelveMonthsADT
such that DEXANotOrdered.authoredOn 3 months or less on or after day of OrderTwelveMonthsADT.authoredOn
and DEXANotOrdered.reasonRefused in "Patient Declined"
define "No Bone Density Scan Performed Due to Patient Refusal":
[ObservationCancelled: "DEXA Bone Density for Urology Care"] DEXANotPerformed
with "Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period" OrderTwelveMonthsADT
such that DEXANotPerformed.issued 3 months or less on or after day of OrderTwelveMonthsADT.authoredOn
and DEXANotPerformed.notDoneReason in "Patient Declined"
define "First ADT in 3 Months Before to 9 Months After Start of Measurement Period":
First(("Androgen Deprivation Therapy for Urology Care Medication Active Start Dates"
union "Androgen Deprivation Therapy for Urology Care Medication Order Start Dates") ADTDateTime
with "Prostate Cancer Diagnosis" ProstateCancer
such that ADTDateTime during day of ProstateCancer.prevalenceInterval()
and ADTDateTime during day of Interval[start of "Measurement Period" - 3 months, start of "Measurement Period" + 9 months]
sort ascending
)
define "Order for 12 Months of ADT in 3 Months Before to 9 Months After Start of Measurement Period":
[ServiceRequest: "Injection of leuprolide acetate for twelve month period (regime/therapy)"] OrderTwelveMonthADT
with "First ADT in 3 Months Before to 9 Months After Start of Measurement Period" FirstADTMP
such that OrderTwelveMonthADT.authoredOn on or after day of FirstADTMP
and OrderTwelveMonthADT.authoredOn during day of Interval[start of "Measurement Period" - 3 months, start of "Measurement Period" + 9 months]
and OrderTwelveMonthADT.status in { 'active', 'completed' }
and OrderTwelveMonthADT.intent = 'order'
define "Androgen Deprivation Therapy for Urology Care Medication Active Start Dates":
[MedicationRequest: "Androgen Deprivation Therapy for Urology Care"] ADTActive
let firstMedicationPeriod: First((collapse(ADTActive.dosageInstruction.timing.repeat.bounds DoseTime
return DoseTime.toInterval()
)) DrugPeriods
sort by start of $this
),
//get the very first event as interval
firstMedicationEvent: First((ADTActive.dosageInstruction.timing dosageTiming
//returns first event for the specific dosageTiming
return First(dosageTiming.event dosageTimingEvents
sort ascending
)) firstEvents
sort ascending
),
medicationDateTime: Min({ firstMedicationEvent, start of firstMedicationPeriod,
end of firstMedicationPeriod }
)
where ADTActive.status in { 'active', 'completed' }
and ADTActive.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
return medicationDateTime
define "Androgen Deprivation Therapy for Urology Care Medication Order Start Dates":
[MedicationRequest: "Androgen Deprivation Therapy for Urology Care"] ADTOrder
let firstMedicationPeriod: First((collapse(ADTOrder.dosageInstruction.timing.repeat.bounds DoseTime
return DoseTime.toInterval()
)) DrugPeriods
sort by start of $this
),
medicationDateTime: Min({ ADTOrder.authoredOn, start of firstMedicationPeriod,
end of firstMedicationPeriod }
)
where ADTOrder.status in { 'active', 'completed' }
and ADTOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
return medicationDateTime
define "Has Qualifying Encounter":
exists ( ["Encounter": "Office Visit"] OfficeVisit
where OfficeVisit.period during day of "Measurement Period"
and OfficeVisit.status = 'finished'
)
define "Prostate Cancer Diagnosis":
( [ConditionProblemsHealthConcerns: "Prostate Cancer"]
union [ConditionEncounterDiagnosis: "Prostate Cancer"] ) ProstateCancer
where ProstateCancer.prevalenceInterval ( ) overlaps day of "Measurement Period"
and ProstateCancer.isVerified ( )
/*
@description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
*/
define fluent function isVerified(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):
condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon."confirmed"
or condition.verificationStatus ~ QICoreCommon."unconfirmed"
or condition.verificationStatus ~ QICoreCommon."provisional"
or condition.verificationStatus ~ QICoreCommon."differential"
)
|
Encoded data
|
Encoded data
|
Description: Library FHIRHelpers
Resource: FHIRHelpers version: 4.4.000
Canonical URL: https://madie.cms.gov/Library/FHIRHelpers|4.4.000
|
Description: Library SDE
Resource: SupplementalDataElements version: 5.1.000
Canonical URL: https://madie.cms.gov/Library/SupplementalDataElements|5.1.000
|
Description: Library QICoreCommon
Resource: QICoreCommon version: 4.0.000
Canonical URL: https://madie.cms.gov/Library/QICoreCommon|4.0.000
|
Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
|
Description: Value set Androgen Deprivation Therapy for Urology Care
Resource: Androgen Deprivation Therapy for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.352
|
Description: Value set DEXA Bone Density for Urology Care
Resource: DEXA Bone Density for Urology Care
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.359
|
Description: Value set Office Visit
Resource: Office Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
|
Description: Value set Patient Declined
Resource: Patient Declined
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1582
|
Description: Value set Prostate Cancer
Resource: Prostate Cancer
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319
|