# Multi-provider Patient Encounter Level Example - eCQM QICore Content Implementation Guide v2023.0.0

* [**Table of Contents**](toc.md)
* [**Artifacts Summary**](artifacts.md)
* **Multi-provider Patient Encounter Level Example**

## Measure: Multi-provider Patient Encounter Level Example (Experimental) 

| | |
| :--- | :--- |
| *Official URL*:http://ecqi.healthit.gov/ecqms/Measure/MPPEncounterLevel | *Version*:0.8.000 |
| Draft as of 2023-10-27 | *Computable Name*:MPPEncounterLevel |
| **Usage:**Program: EH/CAH | |

 
Example measure supporting testing of the multi-provider patient scenario for encounter-based measures 

 
To support testing of approaches to multi-provider patient scenarios with an encounter-based measure 

* **Logic Definitions:**: **Id: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: MPPEncounterLevel
* **Logic Definitions:**: **Download cql: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: [MPPEncounterLevel.cql](Library-MPPEncounterLevel.cql)
* **Logic Definitions:**: **Version: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: 0.8.000
* **Logic Definitions:**: **Url: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: [Multi-provider Patient Encounter Level Example](Measure-MPPEncounterLevel.md)
* **Logic Definitions:**: **Effective Period: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: 2024-01-01 ..2024-12-31
* **Logic Definitions:**: **Status: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: draft
* **Logic Definitions:**: **Experimental: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: true
* **Logic Definitions:**: **Date: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: 2023-10-27 08:12:32+0000
* **Logic Definitions:**: **Name: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: MPPEncounterLevel
* **Logic Definitions:**: **Description: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: Example measure supporting testing of the multi-provider patient scenario for encounter-based measures
* **Logic Definitions:**: **Purpose: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: To support testing of approaches to multi-provider patient scenarios with an encounter-based measure
* **Logic Definitions:**: **Libraries: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: 
| |
| :--- |
| [MPPEncounterLevel](Library-MPPEncounterLevel.md) |

* **Logic Definitions:**: **Related Artifact Dependencies: **
  * * **Group**: 64403d17d4d7050edabb0562
  * **Scoring**: **Group scoring:** proportion 

* **Library Name**: MPPEncounterLevel
  * **Name**: Non Elective Inpatient Encounter
* **Library Name**: 
  * **Name**: ````define "Non Elective Inpatient Encounter": ["Encounter": "Nonelective Inpatient Encounter"] NonElectiveEncounter where NonElectiveEncounter.period ends during day of "Measurement Period"````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: All Stroke Encounter
* **Library Name**: 
  * **Name**: ````define "All Stroke Encounter": "Non Elective Inpatient Encounter" NonElectiveEncounter let ConditionCode: NonElectiveEncounter.principalDiagnosis().code where ( ConditionCode in "Hemorrhagic Stroke" or ConditionCode in "Ischemic Stroke" )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Encounter with Principal Diagnosis and Age
* **Library Name**: 
  * **Name**: ````define "Encounter with Principal Diagnosis and Age": "All Stroke Encounter" AllStrokeEncounter where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: MPPEncounterLevel
  * **Name**: Initial Population
* **Library Name**: 
  * **Name**: ````define "Initial Population": "Encounter with Principal Diagnosis and Age" Encounter where Encounter.isAttributable()````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: CQMCommon
  * **Name**: principalDiagnosis
* **Library Name**: 
  * **Name**: ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter */ define fluent function principalDiagnosis(Encounter Encounter ): singleton from ((Encounter.diagnosis D where D.rank = 1) PD return singleton from ([Condition] C where C.id = PD.condition.reference.getId()) )````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: QICoreCommon
  * **Name**: getId
* **Library Name**: 
  * **Name**: ````/* @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI). @comment: This function can be used to determine the logical id of a given resource. It can be used in a single-server environment to trace references. However, this function does not attempt to resolve or distinguish the base of the given url, and so cannot be used safely in multi-server environments. */ define fluent function getId(uri String): Last(Split(uri, '/'))````
* **Library Name**: **Library Name**
  * **Name**: **Name**
* **Library Name**: AttributionModel
  * **Name**: isAttributable
* **Library Name**: 
  * **Name**: ````define fluent function isAttributable(encounter Encounter): encounter.period during "Measurement Period" and "Provider" is not null implies encounter.serviceProvider.reference.endsWith("Provider")````: * [FHIRHelpers](Library-FHIRHelpers.md) version: 4.3.000
* [CQMCommon](Library-CQMCommon.md) version: 1.4.000
* [QICoreCommon](Library-QICoreCommon.md) version: 1.5.000
* [AttributionModel](Library-AttributionModel.md) version: 0.1.0
* [Non-Elective Inpatient Encounter](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.424/expansion)
* [Hemorrhagic Stroke](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.212/expansion)
* [Ischemic Stroke](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.247/expansion)




## Resource Content

```json
{
  "resourceType" : "Measure",
  "id" : "MPPEncounterLevel",
  "meta" : {
    "profile" : ["http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"]
  },
  "contained" : [{
    "resourceType" : "Library",
    "id" : "effective-data-requirements",
    "extension" : [{
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "MPPEncounterLevel"
      },
      {
        "url" : "name",
        "valueString" : "Non Elective Inpatient Encounter"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Non Elective Inpatient Encounter\":\n  [\"Encounter\": \"Nonelective Inpatient Encounter\"] NonElectiveEncounter\n        where NonElectiveEncounter.period ends during day of \"Measurement Period\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 0
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "MPPEncounterLevel"
      },
      {
        "url" : "name",
        "valueString" : "All Stroke Encounter"
      },
      {
        "url" : "statement",
        "valueString" : "define \"All Stroke Encounter\":\n  \"Non Elective Inpatient Encounter\" NonElectiveEncounter\n  let ConditionCode: NonElectiveEncounter.principalDiagnosis().code\n    where ( ConditionCode in \"Hemorrhagic Stroke\"\n       or   ConditionCode in \"Ischemic Stroke\" )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 1
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "MPPEncounterLevel"
      },
      {
        "url" : "name",
        "valueString" : "Encounter with Principal Diagnosis and Age"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter with Principal Diagnosis and Age\":\n  \"All Stroke Encounter\" AllStrokeEncounter\n    where AgeInYearsAt(date from start of AllStrokeEncounter.period ) >= 18"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 2
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "MPPEncounterLevel"
      },
      {
        "url" : "name",
        "valueString" : "Initial Population"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Initial Population\":\n  \"Encounter with Principal Diagnosis and Age\" Encounter\n    where Encounter.isAttributable()"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 3
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "principalDiagnosis"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the condition that is specified as the principal diagnosis for the encounter\n*/\ndefine fluent function principalDiagnosis(Encounter Encounter ):\n\tsingleton from ((Encounter.diagnosis D where D.rank = 1) PD\n      return singleton from ([Condition] C where C.id = PD.condition.reference.getId())\n\t)"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 4
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "QICoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "getId"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).\n@comment: This function can be used to determine the logical id of a given resource. It can be used in\na single-server environment to trace references. However, this function does not attempt to resolve\nor distinguish the base of the given url, and so cannot be used safely in multi-server environments.\n*/\ndefine fluent function getId(uri String):\n  Last(Split(uri, '/'))"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 5
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "AttributionModel"
      },
      {
        "url" : "name",
        "valueString" : "isAttributable"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function isAttributable(encounter Encounter):\n  encounter.period during \"Measurement Period\"\n    and \"Provider\" is not null implies encounter.serviceProvider.reference.endsWith(\"Provider\")"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 6
      }],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    }],
    "status" : "active",
    "type" : {
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/library-type",
        "code" : "module-definition"
      }]
    },
    "relatedArtifact" : [{
      "type" : "depends-on",
      "display" : "Library FHIRHelpers",
      "resource" : "http://ecqi.healthit.gov/ecqms/Library/FHIRHelpers|4.3.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library CQMCommon",
      "resource" : "http://ecqi.healthit.gov/ecqms/Library/CQMCommon|1.4.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library QICoreCommon",
      "resource" : "http://ecqi.healthit.gov/ecqms/Library/QICoreCommon|1.5.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library AM",
      "resource" : "http://ecqi.healthit.gov/ecqms/Library/AttributionModel|0.1.0"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Nonelective Inpatient Encounter",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Hemorrhagic Stroke",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Ischemic Stroke",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247"
    }],
    "parameter" : [{
      "name" : "Measurement Period",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "type" : "Period"
    },
    {
      "name" : "Provider",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "type" : "string"
    },
    {
      "name" : "Initial Population",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Resource"
    }],
    "dataRequirement" : [{
      "type" : "Encounter",
      "profile" : ["http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"],
      "mustSupport" : ["type",
      "period",
      "rank",
      "rank.value",
      "condition",
      "condition.reference",
      "condition.reference.value"],
      "codeFilter" : [{
        "path" : "type",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"
      }],
      "dateFilter" : [{
        "path" : "period",
        "valuePeriod" : {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
            "valueExpression" : {
              "language" : "text/cql-identifier",
              "expression" : "Measurement Period"
            }
          }]
        }
      }]
    },
    {
      "type" : "Condition",
      "profile" : ["http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"],
      "mustSupport" : ["id", "id.value"]
    },
    {
      "type" : "Patient",
      "profile" : ["http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"]
    }]
  }],
  "extension" : [{
    "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
    "valueReference" : {
      "reference" : "Device/cqf-tooling"
    }
  },
  {
    "id" : "effective-data-requirements",
    "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements",
    "valueReference" : {
      "reference" : "#effective-data-requirements"
    }
  }],
  "url" : "http://ecqi.healthit.gov/ecqms/Measure/MPPEncounterLevel",
  "version" : "0.8.000",
  "name" : "MPPEncounterLevel",
  "title" : "Multi-provider Patient Encounter Level Example",
  "status" : "draft",
  "experimental" : true,
  "date" : "2023-10-27T08:12:32+00:00",
  "description" : "Example measure supporting testing of the multi-provider patient scenario for encounter-based measures",
  "useContext" : [{
    "code" : {
      "system" : "http://terminology.hl7.org/CodeSystem/usage-context-type",
      "code" : "program"
    },
    "valueCodeableConcept" : {
      "coding" : [{
        "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/quality-programs",
        "code" : "eh-cah",
        "display" : "EH/CAH"
      }]
    }
  }],
  "purpose" : "To support testing of approaches to multi-provider patient scenarios with an encounter-based measure",
  "effectivePeriod" : {
    "start" : "2024-01-01",
    "end" : "2024-12-31"
  },
  "library" : ["http://ecqi.healthit.gov/ecqms/Library/MPPEncounterLevel"],
  "group" : [{
    "id" : "64403d17d4d7050edabb0562",
    "extension" : [{
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
      "valueCodeableConcept" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
          "code" : "proportion",
          "display" : "Proportion"
        }]
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
      "valueCode" : "Encounter"
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
      "valueCodeableConcept" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
          "code" : "process",
          "display" : "Process"
        }]
      }
    }],
    "population" : [{
      "id" : "937BAF2A-D36A-4EE5-B2B2-762A0FE04502",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "initial-population",
          "display" : "Initial Population"
        }]
      },
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Initial Population"
      }
    },
    {
      "id" : "302C1DCC-7FE6-41EF-A94E-FDAE24B7BB1B",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "denominator",
          "display" : "Denominator"
        }]
      },
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Denominator"
      }
    },
    {
      "id" : "99961E3A-EFC4-4858-A3EE-F7F1D5B222FB",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "numerator",
          "display" : "Numerator"
        }]
      },
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Numerator"
      }
    }]
  }]
}

```
