{
  "calculate_sdes": null,
  "calculation_method": "PATIENT",
  "cms_id": "CMS723v0",
  "component": false,
  "component_hqmf_set_ids": [

  ],
  "composite": false,
  "composite_hqmf_set_id": null,
  "cql_libraries": [
    {
      "cql": "library AnticoagulationTherapyforAtrialFibrillationFlutter version '0.0.009'\n\nusing QDM version '5.0.2'\n\ninclude MATGlobalCommonFunctions version '1.0.000' called global\n\nvalueset \"ONC Administrative Sex\": 'urn:oid:2.16.840.1.113762.1.4.1' \n\nvalueset \"Race\": 'urn:oid:2.16.840.1.114222.4.11.836' \n\nvalueset \"Ethnicity\": 'urn:oid:2.16.840.1.114222.4.11.837' \n\nvalueset \"Payer\": 'urn:oid:2.16.840.1.114222.4.11.3591' \n\nvalueset \"Anticoagulant Therapy\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.200' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Atrial Fibrillation/Flutter\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.202' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Medical Reason\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.473' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Patient Refusal\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.93' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Atrial Ablation\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.203' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Non-Elective Inpatient Encounter\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.424' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Comfort Measures\": 'urn:oid:1.3.6.1.4.1.33895.1.3.0.45' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Patient Expired\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.309' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Left Against Medical Advice\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.308' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Discharged to Health Care Facility for Hospice Care\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.207' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Discharge To Acute Care Facility\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.87' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Discharged to Home for Hospice Care\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.209' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Hemorrhagic Stroke\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.212' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nvalueset \"Ischemic Stroke\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.247' version 'urn:hl7:profile:Most%20Recent%20Code%20System%20Versions%20in%20VSAC' \n\nparameter \"Measurement Period\" Interval<DateTime>\n\ncontext Patient\n\ndefine \"SDE Ethnicity\": [\"Patient Characteristic Ethnicity\": \"Ethnicity\"]\n\ndefine \"SDE Payer\": [\"Patient Characteristic Payer\": \"Payer\"]\n\ndefine \"SDE Race\": [\"Patient Characteristic Race\": \"Race\"]\n\ndefine \"SDE Sex\": [\"Patient Characteristic Sex\": \"ONC Administrative Sex\"]\n\ndefine \"Initial Population\": \"Encounter with Principal Diagnosis and Age\"\n\ndefine \"Encounter with Atrial Ablation Procedure\": \"Encounter with Principle Diagnosis of Ischemic Stroke\" NonElectiveEncounter\n    with [\"Procedure, Performed\": \"Atrial Ablation\"] AtrialAblation\n    such that AtrialAblation.relevantPeriod starts before start of NonElectiveEncounter.relevantPeriod\n\ndefine \"Current Diagnosis Atrial FibrillationFlutter\": \"Encounter with Principle Diagnosis of Ischemic Stroke\" NonElectiveEncounter\nwhere NonElectiveEncounter.diagnosis in \"Atrial Fibrillation/Flutter\"\n\ndefine \"Encounter with Principle Diagnosis of Ischemic Stroke\": \"Encounter with Principal Diagnosis and Age\" NonElectiveEncounter\r\nwhere NonElectiveEncounter.principalDiagnosis in \"Ischemic Stroke\"\n\ndefine \"Non Elective Inpatient Encounter\": [\"Encounter, Performed\": \"Non-Elective Inpatient Encounter\"] NonElectiveEncounter\r\n    where NonElectiveEncounter.lengthOfStay <= 120 days \r\n      and NonElectiveEncounter.relevantPeriod ends during \"Measurement Period\"\n\ndefine \"Denominator\": \"Encounter with Atrial Ablation Procedure\"\nunion\n\"History of Atrial FibrillationFlutter\"\nunion\n\"Current Diagnosis Atrial FibrillationFlutter\"\n\ndefine \"Anticoagulant Therapy at Discharge\": [\"Medication, Discharge\": \"Anticoagulant Therapy\"] Anticoagulant\n\ndefine \"Numerator\": \"Denominator\" NonElectiveEncounter\n    with \"Anticoagulant Therapy at Discharge\" Anticoagulant\n        such that Anticoagulant.authorDatetime during NonElectiveEncounter.relevantPeriod\n\ndefine \"Anticoagulant Not Given at Discharge\": [\"Medication, Not Discharged\": \"Anticoagulant Therapy\"] Anticoagulant\n    where Anticoagulant.negationRationale in \"Medical Reason\"\n    or Anticoagulant.negationRationale in \"Patient Refusal\"\n\ndefine \"Denominator Exceptions\": \"Denominator\" NonElectiveEncounter\n    with \"Anticoagulant Not Given at Discharge\" Anticoagulant\n        such that Anticoagulant.authorDatetime during NonElectiveEncounter.relevantPeriod\n\ndefine \"Intervention Comfort Measures\": [\"Intervention, Order\": \"Comfort Measures\"]\n    union [\"Intervention, Performed\": \"Comfort Measures\"]\n\ndefine \"History of Atrial FibrillationFlutter\": \"Encounter with Principle Diagnosis of Ischemic Stroke\" NonElectiveEncounter\n    with [\"Diagnosis\": \"Atrial Fibrillation/Flutter\"] AtrialFibrillationFlutter\n    such that AtrialFibrillationFlutter.prevalencePeriod starts on or before end of NonElectiveEncounter.relevantPeriod\n\ndefine \"Encounter with Principal Diagnosis and Age\": \"Non Elective Inpatient Encounter\" NonElectiveEncounter\r\n with [\"Patient Characteristic Birthdate\"] P\r\n        such that global.\"CalendarAgeInYearsAt\"(P.birthDatetime, start of NonElectiveEncounter.relevantPeriod) >= 18\r\nwhere (NonElectiveEncounter.principalDiagnosis in \"Hemorrhagic Stroke\"\r\nor NonElectiveEncounter.principalDiagnosis in \"Ischemic Stroke\")\n\n/*testing hospitalization function with comfort measures*/\ndefine \"Comfort Measures during Hospitalization\": \"Denominator\" NonElectiveEncounter\n    with \"Intervention Comfort Measures\" ComfortMeasure\n        such that Coalesce(start of ComfortMeasure.relevantPeriod, ComfortMeasure.authorDatetime) during global.\"Hospitalization\"(NonElectiveEncounter)\n\ndefine \"Denominator Exclusions1\": distinct ((\r\n\"Denominator\" Encounter\r\n\twhere Encounter.dischargeDisposition in \"Discharge To Acute Care Facility\"\r\n\tor Encounter.dischargeDisposition in \"Left Against Medical Advice\"\r\n\tor Encounter.dischargeDisposition in \"Patient Expired\"\r\n\tor Encounter.dischargeDisposition in \"Discharged to Home for Hospice Care\"\r\n\tor Encounter.dischargeDisposition in \"Discharged to Health Care Facility for Hospice Care\"\r\n    )\r\nunion \"Comfort Measures during Hospitalization\"\r\n)\n\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "AnticoagulationTherapyforAtrialFibrillationFlutter",
            "version": "0.0.009"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_0_1_draft",
                "version": "5.0.2"
              }
            ]
          },
          "includes": {
            "def": [
              {
                "localId": "2",
                "localIdentifier": "global",
                "path": "MATGlobalCommonFunctions",
                "version": "1.0.000"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "23",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "22",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "21",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "3",
                "name": "ONC Administrative Sex",
                "id": "2.16.840.1.113762.1.4.1",
                "accessLevel": "Public"
              },
              {
                "localId": "4",
                "name": "Race",
                "id": "2.16.840.1.114222.4.11.836",
                "accessLevel": "Public"
              },
              {
                "localId": "5",
                "name": "Ethnicity",
                "id": "2.16.840.1.114222.4.11.837",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "name": "Payer",
                "id": "2.16.840.1.114222.4.11.3591",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "name": "Anticoagulant Therapy",
                "id": "2.16.840.1.113883.3.117.1.7.1.200",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "8",
                "name": "Atrial Fibrillation/Flutter",
                "id": "2.16.840.1.113883.3.117.1.7.1.202",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "9",
                "name": "Medical Reason",
                "id": "2.16.840.1.113883.3.117.1.7.1.473",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "10",
                "name": "Patient Refusal",
                "id": "2.16.840.1.113883.3.117.1.7.1.93",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "11",
                "name": "Atrial Ablation",
                "id": "2.16.840.1.113883.3.117.1.7.1.203",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "12",
                "name": "Non-Elective Inpatient Encounter",
                "id": "2.16.840.1.113883.3.117.1.7.1.424",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "13",
                "name": "Comfort Measures",
                "id": "1.3.6.1.4.1.33895.1.3.0.45",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "14",
                "name": "Patient Expired",
                "id": "2.16.840.1.113883.3.117.1.7.1.309",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "15",
                "name": "Left Against Medical Advice",
                "id": "2.16.840.1.113883.3.117.1.7.1.308",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "16",
                "name": "Discharged to Health Care Facility for Hospice Care",
                "id": "2.16.840.1.113883.3.117.1.7.1.207",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "17",
                "name": "Discharge To Acute Care Facility",
                "id": "2.16.840.1.113883.3.117.1.7.1.87",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "18",
                "name": "Discharged to Home for Hospice Care",
                "id": "2.16.840.1.113883.3.117.1.7.1.209",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "19",
                "name": "Hemorrhagic Stroke",
                "id": "2.16.840.1.113883.3.117.1.7.1.212",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              },
              {
                "localId": "20",
                "name": "Ischemic Stroke",
                "id": "2.16.840.1.113883.3.117.1.7.1.247",
                "version": null,
                "accessLevel": "Public",
                "profile": "Most Recent Code System Versions in VSAC"
              }
            ]
          },
          "statements": {
            "def": [
              {
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "25",
                "name": "SDE Ethnicity",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "25",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Ethnicity\"",
                            ": "
                          ]
                        },
                        {
                          "r": "24",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Ethnicity\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Ethnicity\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "24",
                  "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PatientCharacteristicEthnicity",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Ethnicity",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "27",
                "name": "SDE Payer",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "27",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Payer\"",
                            ": "
                          ]
                        },
                        {
                          "r": "26",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Payer\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Payer\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "26",
                  "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PatientCharacteristicPayer",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Payer",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "29",
                "name": "SDE Race",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "29",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Race\"",
                            ": "
                          ]
                        },
                        {
                          "r": "28",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Race\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Race\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "28",
                  "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PatientCharacteristicRace",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Race",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "31",
                "name": "SDE Sex",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "31",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Sex\"",
                            ": "
                          ]
                        },
                        {
                          "r": "30",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Sex\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"ONC Administrative Sex\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "30",
                  "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PatientCharacteristicSex",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "ONC Administrative Sex",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "44",
                "name": "Non Elective Inpatient Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "44",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Non Elective Inpatient Encounter\"",
                            ": "
                          ]
                        },
                        {
                          "r": "43",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "33",
                                  "s": [
                                    {
                                      "r": "32",
                                      "s": [
                                        {
                                          "r": "32",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Encounter, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Non-Elective Inpatient Encounter\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\r\n    "
                              ]
                            },
                            {
                              "r": "42",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "42",
                                  "s": [
                                    {
                                      "r": "37",
                                      "s": [
                                        {
                                          "r": "35",
                                          "s": [
                                            {
                                              "r": "34",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "35",
                                              "s": [
                                                {
                                                  "value": [
                                                    "lengthOfStay"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "<=",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "36",
                                          "s": [
                                            {
                                              "value": [
                                                "120 ",
                                                "days"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " \r\n      and "
                                      ]
                                    },
                                    {
                                      "r": "41",
                                      "s": [
                                        {
                                          "r": "39",
                                          "s": [
                                            {
                                              "r": "38",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "39",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "ends during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "40",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "43",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "33",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "32",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveEncounterPerformed",
                        "templateId": "PositiveEncounterPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Non-Elective Inpatient Encounter",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "42",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "37",
                        "type": "LessOrEqual",
                        "operand": [
                          {
                            "localId": "35",
                            "path": "lengthOfStay",
                            "scope": "NonElectiveEncounter",
                            "type": "Property"
                          },
                          {
                            "localId": "36",
                            "value": 120,
                            "unit": "days",
                            "type": "Quantity"
                          }
                        ]
                      },
                      {
                        "localId": "41",
                        "type": "In",
                        "operand": [
                          {
                            "type": "End",
                            "operand": {
                              "localId": "39",
                              "path": "relevantPeriod",
                              "scope": "NonElectiveEncounter",
                              "type": "Property"
                            }
                          },
                          {
                            "localId": "40",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "69",
                "name": "Encounter with Principal Diagnosis and Age",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "69",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Encounter with Principal Diagnosis and Age\"",
                            ": "
                          ]
                        },
                        {
                          "r": "68",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "46",
                                  "s": [
                                    {
                                      "r": "45",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Non Elective Inpatient Encounter\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\r\n "
                              ]
                            },
                            {
                              "r": "58",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "48",
                                  "s": [
                                    {
                                      "r": "47",
                                      "s": [
                                        {
                                          "r": "47",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Patient Characteristic Birthdate\"",
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "P"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\r\n        such that "
                                  ]
                                },
                                {
                                  "r": "57",
                                  "s": [
                                    {
                                      "r": "55",
                                      "s": [
                                        {
                                          "r": "49",
                                          "s": [
                                            {
                                              "value": [
                                                "global"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "55",
                                          "s": [
                                            {
                                              "value": [
                                                "\"CalendarAgeInYearsAt\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "51",
                                              "s": [
                                                {
                                                  "r": "50",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "P"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "51",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "birthDatetime"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ", "
                                              ]
                                            },
                                            {
                                              "r": "54",
                                              "s": [
                                                {
                                                  "value": [
                                                    "start of "
                                                  ]
                                                },
                                                {
                                                  "r": "53",
                                                  "s": [
                                                    {
                                                      "r": "52",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "NonElectiveEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "53",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        ">=",
                                        " ",
                                        "18"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\r\n"
                              ]
                            },
                            {
                              "r": "67",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "67",
                                  "s": [
                                    {
                                      "value": [
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "67",
                                      "s": [
                                        {
                                          "r": "62",
                                          "s": [
                                            {
                                              "r": "60",
                                              "s": [
                                                {
                                                  "r": "59",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "NonElectiveEncounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "60",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "principalDiagnosis"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " in "
                                              ]
                                            },
                                            {
                                              "r": "61",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Hemorrhagic Stroke\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\r\nor "
                                          ]
                                        },
                                        {
                                          "r": "66",
                                          "s": [
                                            {
                                              "r": "64",
                                              "s": [
                                                {
                                                  "r": "63",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "NonElectiveEncounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "64",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "principalDiagnosis"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " in "
                                              ]
                                            },
                                            {
                                              "r": "65",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Ischemic Stroke\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "68",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "46",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "45",
                        "name": "Non Elective Inpatient Encounter",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "58",
                      "alias": "P",
                      "type": "With",
                      "expression": {
                        "localId": "47",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PatientCharacteristicBirthdate",
                        "type": "Retrieve"
                      },
                      "suchThat": {
                        "localId": "57",
                        "type": "GreaterOrEqual",
                        "operand": [
                          {
                            "localId": "55",
                            "name": "CalendarAgeInYearsAt",
                            "libraryName": "global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "51",
                                "path": "birthDatetime",
                                "scope": "P",
                                "type": "Property"
                              },
                              {
                                "localId": "54",
                                "type": "Start",
                                "operand": {
                                  "localId": "53",
                                  "path": "relevantPeriod",
                                  "scope": "NonElectiveEncounter",
                                  "type": "Property"
                                }
                              }
                            ]
                          },
                          {
                            "localId": "56",
                            "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                            "value": "18",
                            "type": "Literal"
                          }
                        ]
                      }
                    }
                  ],
                  "where": {
                    "localId": "67",
                    "type": "Or",
                    "operand": [
                      {
                        "localId": "62",
                        "type": "InValueSet",
                        "code": {
                          "localId": "60",
                          "path": "principalDiagnosis",
                          "scope": "NonElectiveEncounter",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "61",
                          "name": "Hemorrhagic Stroke"
                        }
                      },
                      {
                        "localId": "66",
                        "type": "InValueSet",
                        "code": {
                          "localId": "64",
                          "path": "principalDiagnosis",
                          "scope": "NonElectiveEncounter",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "65",
                          "name": "Ischemic Stroke"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "71",
                "name": "Initial Population",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "71",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Initial Population\"",
                            ": "
                          ]
                        },
                        {
                          "r": "70",
                          "s": [
                            {
                              "value": [
                                "\"Encounter with Principal Diagnosis and Age\""
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "70",
                  "name": "Encounter with Principal Diagnosis and Age",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "79",
                "name": "Encounter with Principle Diagnosis of Ischemic Stroke",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "79",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Encounter with Principle Diagnosis of Ischemic Stroke\"",
                            ": "
                          ]
                        },
                        {
                          "r": "78",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "73",
                                  "s": [
                                    {
                                      "r": "72",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Encounter with Principal Diagnosis and Age\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\r\n"
                              ]
                            },
                            {
                              "r": "77",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "77",
                                  "s": [
                                    {
                                      "r": "75",
                                      "s": [
                                        {
                                          "r": "74",
                                          "s": [
                                            {
                                              "value": [
                                                "NonElectiveEncounter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "75",
                                          "s": [
                                            {
                                              "value": [
                                                "principalDiagnosis"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " in "
                                      ]
                                    },
                                    {
                                      "r": "76",
                                      "s": [
                                        {
                                          "value": [
                                            "\"Ischemic Stroke\""
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "78",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "73",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "72",
                        "name": "Encounter with Principal Diagnosis and Age",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "77",
                    "type": "InValueSet",
                    "code": {
                      "localId": "75",
                      "path": "principalDiagnosis",
                      "scope": "NonElectiveEncounter",
                      "type": "Property"
                    },
                    "valueset": {
                      "localId": "76",
                      "name": "Ischemic Stroke"
                    }
                  }
                }
              },
              {
                "localId": "92",
                "name": "Encounter with Atrial Ablation Procedure",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "92",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Encounter with Atrial Ablation Procedure\"",
                            ": "
                          ]
                        },
                        {
                          "r": "91",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "81",
                                  "s": [
                                    {
                                      "r": "80",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Encounter with Principle Diagnosis of Ischemic Stroke\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    "
                              ]
                            },
                            {
                              "r": "90",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "83",
                                  "s": [
                                    {
                                      "r": "82",
                                      "s": [
                                        {
                                          "r": "82",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Procedure, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Atrial Ablation\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "AtrialAblation"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n    such that "
                                  ]
                                },
                                {
                                  "r": "89",
                                  "s": [
                                    {
                                      "r": "85",
                                      "s": [
                                        {
                                          "r": "84",
                                          "s": [
                                            {
                                              "value": [
                                                "AtrialAblation"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "85",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "starts before",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "88",
                                      "s": [
                                        {
                                          "value": [
                                            "start of "
                                          ]
                                        },
                                        {
                                          "r": "87",
                                          "s": [
                                            {
                                              "r": "86",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "87",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "91",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "81",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "80",
                        "name": "Encounter with Principle Diagnosis of Ischemic Stroke",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "90",
                      "alias": "AtrialAblation",
                      "type": "With",
                      "expression": {
                        "localId": "82",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveProcedurePerformed",
                        "templateId": "PositiveProcedurePerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Atrial Ablation",
                          "type": "ValueSetRef"
                        }
                      },
                      "suchThat": {
                        "localId": "89",
                        "type": "Before",
                        "operand": [
                          {
                            "type": "Start",
                            "operand": {
                              "localId": "85",
                              "path": "relevantPeriod",
                              "scope": "AtrialAblation",
                              "type": "Property"
                            }
                          },
                          {
                            "localId": "88",
                            "type": "Start",
                            "operand": {
                              "localId": "87",
                              "path": "relevantPeriod",
                              "scope": "NonElectiveEncounter",
                              "type": "Property"
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "100",
                "name": "Current Diagnosis Atrial FibrillationFlutter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "100",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Current Diagnosis Atrial FibrillationFlutter\"",
                            ": "
                          ]
                        },
                        {
                          "r": "99",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "94",
                                  "s": [
                                    {
                                      "r": "93",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Encounter with Principle Diagnosis of Ischemic Stroke\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n"
                              ]
                            },
                            {
                              "r": "98",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "98",
                                  "s": [
                                    {
                                      "r": "96",
                                      "s": [
                                        {
                                          "r": "95",
                                          "s": [
                                            {
                                              "value": [
                                                "NonElectiveEncounter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "96",
                                          "s": [
                                            {
                                              "value": [
                                                "diagnosis"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " in "
                                      ]
                                    },
                                    {
                                      "r": "97",
                                      "s": [
                                        {
                                          "value": [
                                            "\"Atrial Fibrillation/Flutter\""
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "99",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "94",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "93",
                        "name": "Encounter with Principle Diagnosis of Ischemic Stroke",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "98",
                    "type": "InValueSet",
                    "code": {
                      "localId": "96",
                      "path": "diagnosis",
                      "scope": "NonElectiveEncounter",
                      "type": "Property"
                    },
                    "valueset": {
                      "localId": "97",
                      "name": "Atrial Fibrillation/Flutter"
                    }
                  }
                }
              },
              {
                "localId": "114",
                "name": "History of Atrial FibrillationFlutter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "114",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"History of Atrial FibrillationFlutter\"",
                            ": "
                          ]
                        },
                        {
                          "r": "113",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "103",
                                  "s": [
                                    {
                                      "r": "102",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Encounter with Principle Diagnosis of Ischemic Stroke\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    "
                              ]
                            },
                            {
                              "r": "112",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "105",
                                  "s": [
                                    {
                                      "r": "104",
                                      "s": [
                                        {
                                          "r": "104",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Diagnosis\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Atrial Fibrillation/Flutter\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "AtrialFibrillationFlutter"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n    such that "
                                  ]
                                },
                                {
                                  "r": "111",
                                  "s": [
                                    {
                                      "r": "107",
                                      "s": [
                                        {
                                          "r": "106",
                                          "s": [
                                            {
                                              "value": [
                                                "AtrialFibrillationFlutter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "107",
                                          "s": [
                                            {
                                              "value": [
                                                "prevalencePeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "starts on or before",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "110",
                                      "s": [
                                        {
                                          "value": [
                                            "end of "
                                          ]
                                        },
                                        {
                                          "r": "109",
                                          "s": [
                                            {
                                              "r": "108",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "109",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "113",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "103",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "102",
                        "name": "Encounter with Principle Diagnosis of Ischemic Stroke",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "112",
                      "alias": "AtrialFibrillationFlutter",
                      "type": "With",
                      "expression": {
                        "localId": "104",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}Diagnosis",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Atrial Fibrillation/Flutter",
                          "type": "ValueSetRef"
                        }
                      },
                      "suchThat": {
                        "localId": "111",
                        "type": "SameOrBefore",
                        "operand": [
                          {
                            "type": "Start",
                            "operand": {
                              "localId": "107",
                              "path": "prevalencePeriod",
                              "scope": "AtrialFibrillationFlutter",
                              "type": "Property"
                            }
                          },
                          {
                            "localId": "110",
                            "type": "End",
                            "operand": {
                              "localId": "109",
                              "path": "relevantPeriod",
                              "scope": "NonElectiveEncounter",
                              "type": "Property"
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "119",
                "name": "Denominator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "119",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator\"",
                            ": "
                          ]
                        },
                        {
                          "r": "118",
                          "s": [
                            {
                              "r": "116",
                              "s": [
                                {
                                  "r": "101",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Encounter with Atrial Ablation Procedure\""
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\nunion\n"
                                  ]
                                },
                                {
                                  "r": "115",
                                  "s": [
                                    {
                                      "value": [
                                        "\"History of Atrial FibrillationFlutter\""
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\nunion\n"
                              ]
                            },
                            {
                              "r": "117",
                              "s": [
                                {
                                  "value": [
                                    "\"Current Diagnosis Atrial FibrillationFlutter\""
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "118",
                  "type": "Union",
                  "operand": [
                    {
                      "localId": "116",
                      "type": "Union",
                      "operand": [
                        {
                          "localId": "101",
                          "name": "Encounter with Atrial Ablation Procedure",
                          "type": "ExpressionRef"
                        },
                        {
                          "localId": "115",
                          "name": "History of Atrial FibrillationFlutter",
                          "type": "ExpressionRef"
                        }
                      ]
                    },
                    {
                      "localId": "117",
                      "name": "Current Diagnosis Atrial FibrillationFlutter",
                      "type": "ExpressionRef"
                    }
                  ]
                }
              },
              {
                "localId": "123",
                "name": "Anticoagulant Therapy at Discharge",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "123",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Anticoagulant Therapy at Discharge\"",
                            ": "
                          ]
                        },
                        {
                          "r": "122",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "121",
                                  "s": [
                                    {
                                      "r": "120",
                                      "s": [
                                        {
                                          "r": "120",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Medication, Discharge\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Anticoagulant Therapy\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Anticoagulant"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "122",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "121",
                      "alias": "Anticoagulant",
                      "expression": {
                        "localId": "120",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveMedicationDischarge",
                        "templateId": "PositiveMedicationDischarge",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Anticoagulant Therapy",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ]
                }
              },
              {
                "localId": "135",
                "name": "Numerator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "135",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Numerator\"",
                            ": "
                          ]
                        },
                        {
                          "r": "134",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "125",
                                  "s": [
                                    {
                                      "r": "124",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Denominator\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    "
                              ]
                            },
                            {
                              "r": "133",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "127",
                                  "s": [
                                    {
                                      "r": "126",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Anticoagulant Therapy at Discharge\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Anticoagulant"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n        such that "
                                  ]
                                },
                                {
                                  "r": "132",
                                  "s": [
                                    {
                                      "r": "129",
                                      "s": [
                                        {
                                          "r": "128",
                                          "s": [
                                            {
                                              "value": [
                                                "Anticoagulant"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "129",
                                          "s": [
                                            {
                                              "value": [
                                                "authorDatetime"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "during",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "131",
                                      "s": [
                                        {
                                          "r": "130",
                                          "s": [
                                            {
                                              "value": [
                                                "NonElectiveEncounter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "131",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "134",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "125",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "124",
                        "name": "Denominator",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "133",
                      "alias": "Anticoagulant",
                      "type": "With",
                      "expression": {
                        "localId": "126",
                        "name": "Anticoagulant Therapy at Discharge",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "132",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "129",
                            "path": "authorDatetime",
                            "scope": "Anticoagulant",
                            "type": "Property"
                          },
                          {
                            "localId": "131",
                            "path": "relevantPeriod",
                            "scope": "NonElectiveEncounter",
                            "type": "Property"
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "148",
                "name": "Anticoagulant Not Given at Discharge",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "148",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Anticoagulant Not Given at Discharge\"",
                            ": "
                          ]
                        },
                        {
                          "r": "147",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "137",
                                  "s": [
                                    {
                                      "r": "136",
                                      "s": [
                                        {
                                          "r": "136",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Medication, Not Discharged\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Anticoagulant Therapy\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Anticoagulant"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    "
                              ]
                            },
                            {
                              "r": "146",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "146",
                                  "s": [
                                    {
                                      "r": "141",
                                      "s": [
                                        {
                                          "r": "139",
                                          "s": [
                                            {
                                              "r": "138",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Anticoagulant"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "139",
                                              "s": [
                                                {
                                                  "value": [
                                                    "negationRationale"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "140",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Medical Reason\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n    or "
                                      ]
                                    },
                                    {
                                      "r": "145",
                                      "s": [
                                        {
                                          "r": "143",
                                          "s": [
                                            {
                                              "r": "142",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Anticoagulant"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "143",
                                              "s": [
                                                {
                                                  "value": [
                                                    "negationRationale"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "144",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Patient Refusal\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "147",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "137",
                      "alias": "Anticoagulant",
                      "expression": {
                        "localId": "136",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}NegativeMedicationDischarge",
                        "templateId": "NegativeMedicationDischarge",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Anticoagulant Therapy",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "146",
                    "type": "Or",
                    "operand": [
                      {
                        "localId": "141",
                        "type": "InValueSet",
                        "code": {
                          "localId": "139",
                          "path": "negationRationale",
                          "scope": "Anticoagulant",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "140",
                          "name": "Medical Reason"
                        }
                      },
                      {
                        "localId": "145",
                        "type": "InValueSet",
                        "code": {
                          "localId": "143",
                          "path": "negationRationale",
                          "scope": "Anticoagulant",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "144",
                          "name": "Patient Refusal"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "160",
                "name": "Denominator Exceptions",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "160",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exceptions\"",
                            ": "
                          ]
                        },
                        {
                          "r": "159",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "150",
                                  "s": [
                                    {
                                      "r": "149",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Denominator\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    "
                              ]
                            },
                            {
                              "r": "158",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "152",
                                  "s": [
                                    {
                                      "r": "151",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Anticoagulant Not Given at Discharge\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Anticoagulant"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n        such that "
                                  ]
                                },
                                {
                                  "r": "157",
                                  "s": [
                                    {
                                      "r": "154",
                                      "s": [
                                        {
                                          "r": "153",
                                          "s": [
                                            {
                                              "value": [
                                                "Anticoagulant"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "154",
                                          "s": [
                                            {
                                              "value": [
                                                "authorDatetime"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "during",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "156",
                                      "s": [
                                        {
                                          "r": "155",
                                          "s": [
                                            {
                                              "value": [
                                                "NonElectiveEncounter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "156",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "159",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "150",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "149",
                        "name": "Denominator",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "158",
                      "alias": "Anticoagulant",
                      "type": "With",
                      "expression": {
                        "localId": "151",
                        "name": "Anticoagulant Not Given at Discharge",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "157",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "154",
                            "path": "authorDatetime",
                            "scope": "Anticoagulant",
                            "type": "Property"
                          },
                          {
                            "localId": "156",
                            "path": "relevantPeriod",
                            "scope": "NonElectiveEncounter",
                            "type": "Property"
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "164",
                "name": "Intervention Comfort Measures",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "164",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Intervention Comfort Measures\"",
                            ": "
                          ]
                        },
                        {
                          "r": "163",
                          "s": [
                            {
                              "r": "161",
                              "s": [
                                {
                                  "value": [
                                    "[",
                                    "\"Intervention, Order\"",
                                    ": "
                                  ]
                                },
                                {
                                  "s": [
                                    {
                                      "value": [
                                        "\"Comfort Measures\""
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "]"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    union "
                              ]
                            },
                            {
                              "r": "162",
                              "s": [
                                {
                                  "value": [
                                    "[",
                                    "\"Intervention, Performed\"",
                                    ": "
                                  ]
                                },
                                {
                                  "s": [
                                    {
                                      "value": [
                                        "\"Comfort Measures\""
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "]"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "163",
                  "type": "Union",
                  "operand": [
                    {
                      "type": "As",
                      "operand": {
                        "localId": "161",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveInterventionOrder",
                        "templateId": "PositiveInterventionOrder",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Comfort Measures",
                          "type": "ValueSetRef"
                        }
                      },
                      "asTypeSpecifier": {
                        "type": "ListTypeSpecifier",
                        "elementType": {
                          "type": [
                            {
                              "name": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveInterventionPerformed",
                              "type": "NamedTypeSpecifier"
                            },
                            {
                              "name": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveInterventionOrder",
                              "type": "NamedTypeSpecifier"
                            }
                          ]
                        }
                      }
                    },
                    {
                      "type": "As",
                      "operand": {
                        "localId": "162",
                        "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveInterventionPerformed",
                        "templateId": "PositiveInterventionPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Comfort Measures",
                          "type": "ValueSetRef"
                        }
                      },
                      "asTypeSpecifier": {
                        "type": "ListTypeSpecifier",
                        "elementType": {
                          "type": [
                            {
                              "name": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveInterventionPerformed",
                              "type": "NamedTypeSpecifier"
                            },
                            {
                              "name": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveInterventionOrder",
                              "type": "NamedTypeSpecifier"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              },
              {
                "localId": "181",
                "name": "Comfort Measures during Hospitalization",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "181",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Comfort Measures during Hospitalization\"",
                            ": "
                          ]
                        },
                        {
                          "r": "180",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "166",
                                  "s": [
                                    {
                                      "r": "165",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Denominator\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n    "
                              ]
                            },
                            {
                              "r": "179",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "168",
                                  "s": [
                                    {
                                      "r": "167",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Intervention Comfort Measures\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "ComfortMeasure"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n        such that "
                                  ]
                                },
                                {
                                  "r": "178",
                                  "s": [
                                    {
                                      "r": "174",
                                      "s": [
                                        {
                                          "value": [
                                            "Coalesce",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "171",
                                          "s": [
                                            {
                                              "value": [
                                                "start of "
                                              ]
                                            },
                                            {
                                              "r": "170",
                                              "s": [
                                                {
                                                  "r": "169",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "ComfortMeasure"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "170",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "relevantPeriod"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ", "
                                          ]
                                        },
                                        {
                                          "r": "173",
                                          "s": [
                                            {
                                              "r": "172",
                                              "s": [
                                                {
                                                  "value": [
                                                    "ComfortMeasure"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "173",
                                              "s": [
                                                {
                                                  "value": [
                                                    "authorDatetime"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ")"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "during",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "177",
                                      "s": [
                                        {
                                          "r": "175",
                                          "s": [
                                            {
                                              "value": [
                                                "global"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "177",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Hospitalization\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "176",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "180",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "166",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "165",
                        "name": "Denominator",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "179",
                      "alias": "ComfortMeasure",
                      "type": "With",
                      "expression": {
                        "localId": "167",
                        "name": "Intervention Comfort Measures",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "178",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "174",
                            "type": "Coalesce",
                            "operand": [
                              {
                                "localId": "171",
                                "type": "Start",
                                "operand": {
                                  "localId": "170",
                                  "path": "relevantPeriod",
                                  "scope": "ComfortMeasure",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "173",
                                "path": "authorDatetime",
                                "scope": "ComfortMeasure",
                                "type": "Property"
                              }
                            ]
                          },
                          {
                            "localId": "177",
                            "name": "Hospitalization",
                            "libraryName": "global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "176",
                                "name": "NonElectiveEncounter",
                                "type": "AliasRef"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "212",
                "name": "Denominator Exclusions1",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "212",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exclusions1\"",
                            ": "
                          ]
                        },
                        {
                          "r": "211",
                          "s": [
                            {
                              "value": [
                                "distinct",
                                " ("
                              ]
                            },
                            {
                              "r": "210",
                              "s": [
                                {
                                  "r": "208",
                                  "s": [
                                    {
                                      "value": [
                                        "(\r\n"
                                      ]
                                    },
                                    {
                                      "r": "208",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "r": "183",
                                              "s": [
                                                {
                                                  "r": "182",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Denominator\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\r\n\t"
                                          ]
                                        },
                                        {
                                          "r": "207",
                                          "s": [
                                            {
                                              "value": [
                                                "where "
                                              ]
                                            },
                                            {
                                              "r": "207",
                                              "s": [
                                                {
                                                  "r": "202",
                                                  "s": [
                                                    {
                                                      "r": "197",
                                                      "s": [
                                                        {
                                                          "r": "192",
                                                          "s": [
                                                            {
                                                              "r": "187",
                                                              "s": [
                                                                {
                                                                  "r": "185",
                                                                  "s": [
                                                                    {
                                                                      "r": "184",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "Encounter"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "185",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "dischargeDisposition"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " in "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "186",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Discharge To Acute Care Facility\""
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "\r\n\tor "
                                                              ]
                                                            },
                                                            {
                                                              "r": "191",
                                                              "s": [
                                                                {
                                                                  "r": "189",
                                                                  "s": [
                                                                    {
                                                                      "r": "188",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "Encounter"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "189",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "dischargeDisposition"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " in "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "190",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Left Against Medical Advice\""
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\r\n\tor "
                                                          ]
                                                        },
                                                        {
                                                          "r": "196",
                                                          "s": [
                                                            {
                                                              "r": "194",
                                                              "s": [
                                                                {
                                                                  "r": "193",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "Encounter"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "194",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "dischargeDisposition"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " in "
                                                              ]
                                                            },
                                                            {
                                                              "r": "195",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Patient Expired\""
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\r\n\tor "
                                                      ]
                                                    },
                                                    {
                                                      "r": "201",
                                                      "s": [
                                                        {
                                                          "r": "199",
                                                          "s": [
                                                            {
                                                              "r": "198",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "Encounter"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "199",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "dischargeDisposition"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " in "
                                                          ]
                                                        },
                                                        {
                                                          "r": "200",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Discharged to Home for Hospice Care\""
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\r\n\tor "
                                                  ]
                                                },
                                                {
                                                  "r": "206",
                                                  "s": [
                                                    {
                                                      "r": "204",
                                                      "s": [
                                                        {
                                                          "r": "203",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Encounter"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "204",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "dischargeDisposition"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " in "
                                                      ]
                                                    },
                                                    {
                                                      "r": "205",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Discharged to Health Care Facility for Hospice Care\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\r\n    )"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\r\nunion "
                                  ]
                                },
                                {
                                  "r": "209",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Comfort Measures during Hospitalization\""
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\r\n)"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "211",
                  "type": "Distinct",
                  "operand": {
                    "localId": "210",
                    "type": "Union",
                    "operand": [
                      {
                        "localId": "208",
                        "type": "Query",
                        "source": [
                          {
                            "localId": "183",
                            "alias": "Encounter",
                            "expression": {
                              "localId": "182",
                              "name": "Denominator",
                              "type": "ExpressionRef"
                            }
                          }
                        ],
                        "relationship": [

                        ],
                        "where": {
                          "localId": "207",
                          "type": "Or",
                          "operand": [
                            {
                              "localId": "202",
                              "type": "Or",
                              "operand": [
                                {
                                  "localId": "197",
                                  "type": "Or",
                                  "operand": [
                                    {
                                      "localId": "192",
                                      "type": "Or",
                                      "operand": [
                                        {
                                          "localId": "187",
                                          "type": "InValueSet",
                                          "code": {
                                            "localId": "185",
                                            "path": "dischargeDisposition",
                                            "scope": "Encounter",
                                            "type": "Property"
                                          },
                                          "valueset": {
                                            "localId": "186",
                                            "name": "Discharge To Acute Care Facility"
                                          }
                                        },
                                        {
                                          "localId": "191",
                                          "type": "InValueSet",
                                          "code": {
                                            "localId": "189",
                                            "path": "dischargeDisposition",
                                            "scope": "Encounter",
                                            "type": "Property"
                                          },
                                          "valueset": {
                                            "localId": "190",
                                            "name": "Left Against Medical Advice"
                                          }
                                        }
                                      ]
                                    },
                                    {
                                      "localId": "196",
                                      "type": "InValueSet",
                                      "code": {
                                        "localId": "194",
                                        "path": "dischargeDisposition",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      },
                                      "valueset": {
                                        "localId": "195",
                                        "name": "Patient Expired"
                                      }
                                    }
                                  ]
                                },
                                {
                                  "localId": "201",
                                  "type": "InValueSet",
                                  "code": {
                                    "localId": "199",
                                    "path": "dischargeDisposition",
                                    "scope": "Encounter",
                                    "type": "Property"
                                  },
                                  "valueset": {
                                    "localId": "200",
                                    "name": "Discharged to Home for Hospice Care"
                                  }
                                }
                              ]
                            },
                            {
                              "localId": "206",
                              "type": "InValueSet",
                              "code": {
                                "localId": "204",
                                "path": "dischargeDisposition",
                                "scope": "Encounter",
                                "type": "Property"
                              },
                              "valueset": {
                                "localId": "205",
                                "name": "Discharged to Health Care Facility for Hospice Care"
                              }
                            }
                          ]
                        }
                      },
                      {
                        "localId": "209",
                        "name": "Comfort Measures during Hospitalization",
                        "type": "ExpressionRef"
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Ethnicity\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Ethnicity\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Ethnicity\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": " ]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "24"
                  }
                ],
                "ref_id": "25"
              }
            ],
            "define_name": "SDE Ethnicity"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"SDE Payer\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Payer\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Payer\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": " ]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "26"
                  }
                ],
                "ref_id": "27"
              }
            ],
            "define_name": "SDE Payer"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"SDE Race\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Race\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Race\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": " ]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "28"
                  }
                ],
                "ref_id": "29"
              }
            ],
            "define_name": "SDE Race"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"SDE Sex\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Sex\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"ONC Administrative Sex\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": " ]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "30"
                  }
                ],
                "ref_id": "31"
              }
            ],
            "define_name": "SDE Sex"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Non Elective Inpatient Encounter\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Encounter, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Non-Elective Inpatient Encounter\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "32"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "32"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "33"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "&#13;\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "34"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "lengthOfStay"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "35"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "35"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " &lt;= "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "120 days"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Quantity",
                                    "ref_id": "36"
                                  }
                                ],
                                "node_type": "LessOrEqual",
                                "ref_id": "37"
                              },
                              {
                                "children": [
                                  {
                                    "text": " &#13;\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "38"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "39"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "39"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " ends during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "40"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "41"
                              }
                            ],
                            "ref_id": "42"
                          }
                        ],
                        "ref_id": "42"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "43"
                  }
                ],
                "ref_id": "44"
              }
            ],
            "define_name": "Non Elective Inpatient Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Encounter with Principal Diagnosis and Age\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Non Elective Inpatient Encounter\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "45"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "46"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "&#13;\n "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Patient Characteristic Birthdate\"]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "47"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "47"
                              },
                              {
                                "children": [
                                  {
                                    "text": " P"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "48"
                          },
                          {
                            "children": [
                              {
                                "text": "&#13;\n        such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "global"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "49"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"CalendarAgeInYearsAt\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": " P"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "50"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "birthDatetime"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "51"
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "51"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " , "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "start of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "NonElectiveEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "52"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "53"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "53"
                                          }
                                        ],
                                        "node_type": "Start",
                                        "ref_id": "54"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "55"
                                  }
                                ],
                                "node_type": "FunctionRef",
                                "ref_id": "55"
                              },
                              {
                                "children": [
                                  {
                                    "text": " &gt;= 18"
                                  }
                                ]
                              }
                            ],
                            "node_type": "GreaterOrEqual",
                            "ref_id": "57"
                          }
                        ],
                        "ref_id": "58"
                      },
                      {
                        "children": [
                          {
                            "text": " &#13;\n"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": " NonElectiveEncounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "59"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "principalDiagnosis"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "60"
                                          }
                                        ],
                                        "ref_id": "60"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " in "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Hemorrhagic Stroke\""
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "61"
                                      }
                                    ],
                                    "node_type": "InValueSet",
                                    "ref_id": "62"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " &#13;\nor "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "NonElectiveEncounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "63"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "principalDiagnosis"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "64"
                                          }
                                        ],
                                        "ref_id": "64"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " in "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Ischemic Stroke\""
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "65"
                                      }
                                    ],
                                    "node_type": "InValueSet",
                                    "ref_id": "66"
                                  }
                                ],
                                "ref_id": "67"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "67"
                          }
                        ],
                        "ref_id": "67"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "68"
                  }
                ],
                "ref_id": "69"
              }
            ],
            "define_name": "Encounter with Principal Diagnosis and Age"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Initial Population\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter with Principal Diagnosis and Age\""
                          }
                        ]
                      }
                    ],
                    "node_type": "ExpressionRef",
                    "ref_id": "70"
                  }
                ],
                "ref_id": "71"
              }
            ],
            "define_name": "Initial Population"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Encounter with Principle Diagnosis of Ischemic Stroke\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Encounter with Principal Diagnosis and Age\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "72"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "73"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": " &#13;\n"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "NonElectiveEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "74"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "principalDiagnosis"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "75"
                                  }
                                ],
                                "ref_id": "75"
                              },
                              {
                                "children": [
                                  {
                                    "text": " in "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Ischemic Stroke\""
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "76"
                              }
                            ],
                            "ref_id": "77"
                          }
                        ],
                        "ref_id": "77"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "78"
                  }
                ],
                "ref_id": "79"
              }
            ],
            "define_name": "Encounter with Principle Diagnosis of Ischemic Stroke"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Encounter with Atrial Ablation Procedure\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Encounter with Principle Diagnosis of Ischemic Stroke\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "80"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "81"
                          }
                        ]
                      },
                      {
                        "children": [

                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Procedure, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Atrial Ablation\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "82"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "82"
                              },
                              {
                                "children": [
                                  {
                                    "text": " AtrialAblation"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "83"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "AtrialAblation"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "84"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "85"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "85"
                              },
                              {
                                "children": [
                                  {
                                    "text": " starts before "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "start of "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "86"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "87"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "87"
                                  }
                                ],
                                "node_type": "Start",
                                "ref_id": "88"
                              }
                            ],
                            "node_type": "Before",
                            "ref_id": "89"
                          }
                        ],
                        "ref_id": "90"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "91"
                  }
                ],
                "ref_id": "92"
              }
            ],
            "define_name": "Encounter with Atrial Ablation Procedure"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Current Diagnosis Atrial FibrillationFlutter\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Encounter with Principle Diagnosis of Ischemic Stroke\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "93"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "94"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "NonElectiveEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "95"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "diagnosis"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "96"
                                  }
                                ],
                                "ref_id": "96"
                              },
                              {
                                "children": [
                                  {
                                    "text": " in "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Atrial Fibrillation/Flutter\""
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "97"
                              }
                            ],
                            "ref_id": "98"
                          }
                        ],
                        "ref_id": "98"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "99"
                  }
                ],
                "ref_id": "100"
              }
            ],
            "define_name": "Current Diagnosis Atrial FibrillationFlutter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"History of Atrial FibrillationFlutter\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Encounter with Principle Diagnosis of Ischemic Stroke\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "102"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "103"
                          }
                        ]
                      },
                      {
                        "children": [

                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Diagnosis\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Atrial Fibrillation/Flutter\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "104"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "104"
                              },
                              {
                                "children": [
                                  {
                                    "text": " AtrialFibrillationFlutter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "105"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "AtrialFibrillationFlutter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "106"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "prevalencePeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "107"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "107"
                              },
                              {
                                "children": [
                                  {
                                    "text": " starts on or before "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "end of "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "108"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "109"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "109"
                                  }
                                ],
                                "node_type": "End",
                                "ref_id": "110"
                              }
                            ],
                            "node_type": "SameOrBefore",
                            "ref_id": "111"
                          }
                        ],
                        "ref_id": "112"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "113"
                  }
                ],
                "ref_id": "114"
              }
            ],
            "define_name": "History of Atrial FibrillationFlutter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Denominator\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Encounter with Atrial Ablation Procedure\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "101"
                          },
                          {
                            "children": [
                              {
                                "text": "\nunion\n"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"History of Atrial FibrillationFlutter\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "115"
                          }
                        ],
                        "node_type": "Union",
                        "ref_id": "116"
                      },
                      {
                        "children": [
                          {
                            "text": "\nunion\n"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Current Diagnosis Atrial FibrillationFlutter\""
                              }
                            ]
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "117"
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "118"
                  }
                ],
                "ref_id": "119"
              }
            ],
            "define_name": "Denominator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Anticoagulant Therapy at Discharge\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Medication, Discharge\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Anticoagulant Therapy\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "120"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "120"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Anticoagulant"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "121"
                          }
                        ]
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "122"
                  }
                ],
                "ref_id": "123"
              }
            ],
            "define_name": "Anticoagulant Therapy at Discharge"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Numerator\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Denominator\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "124"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "125"
                          }
                        ]
                      },
                      {
                        "children": [

                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Anticoagulant Therapy at Discharge\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "126"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Anticoagulant"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "127"
                          },
                          {
                            "children": [
                              {
                                "text": "\n        such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Anticoagulant"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "128"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "authorDatetime"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "129"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "129"
                              },
                              {
                                "children": [
                                  {
                                    "text": " during "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "NonElectiveEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "130"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "131"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "131"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "132"
                          }
                        ],
                        "ref_id": "133"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "134"
                  }
                ],
                "ref_id": "135"
              }
            ],
            "define_name": "Numerator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Anticoagulant Not Given at Discharge\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Medication, Not Discharged\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Anticoagulant Therapy\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "136"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "136"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Anticoagulant"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "137"
                          }
                        ]
                      },
                      {
                        "children": [

                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Anticoagulant"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "138"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "negationRationale"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "139"
                                      }
                                    ],
                                    "ref_id": "139"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Medical Reason\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "140"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "141"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n    or "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Anticoagulant"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "142"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "negationRationale"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "143"
                                      }
                                    ],
                                    "ref_id": "143"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Patient Refusal\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "144"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "145"
                              }
                            ],
                            "ref_id": "146"
                          }
                        ],
                        "ref_id": "146"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "147"
                  }
                ],
                "ref_id": "148"
              }
            ],
            "define_name": "Anticoagulant Not Given at Discharge"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Denominator Exceptions\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Denominator\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "149"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "150"
                          }
                        ]
                      },
                      {
                        "children": [

                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Anticoagulant Not Given at Discharge\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "151"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Anticoagulant"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "152"
                          },
                          {
                            "children": [
                              {
                                "text": "\n        such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Anticoagulant"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "153"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "authorDatetime"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "154"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "154"
                              },
                              {
                                "children": [
                                  {
                                    "text": " during "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "NonElectiveEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "155"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "156"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "156"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "157"
                          }
                        ],
                        "ref_id": "158"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "159"
                  }
                ],
                "ref_id": "160"
              }
            ],
            "define_name": "Denominator Exceptions"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Intervention Comfort Measures\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "[\"Intervention, Order\": "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Comfort Measures\""
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": " ]"
                              }
                            ]
                          }
                        ],
                        "node_type": "Retrieve",
                        "ref_id": "161"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    union "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "[\"Intervention, Performed\": "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Comfort Measures\""
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": " ]"
                              }
                            ]
                          }
                        ],
                        "node_type": "Retrieve",
                        "ref_id": "162"
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "163"
                  }
                ],
                "ref_id": "164"
              }
            ],
            "define_name": "Intervention Comfort Measures"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Comfort Measures during Hospitalization\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Denominator\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "165"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "166"
                          }
                        ]
                      },
                      {
                        "children": [

                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Intervention Comfort Measures\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "167"
                              },
                              {
                                "children": [
                                  {
                                    "text": " ComfortMeasure"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "168"
                          },
                          {
                            "children": [
                              {
                                "text": "\n        such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Coalesce("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": " start of "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "ComfortMeasure"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "169"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "relevantPeriod"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "170"
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "170"
                                      }
                                    ],
                                    "node_type": "Start",
                                    "ref_id": "171"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " , "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "ComfortMeasure"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "172"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "authorDatetime"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "173"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "173"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Coalesce",
                                "ref_id": "174"
                              },
                              {
                                "children": [
                                  {
                                    "text": " during "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "global"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "175"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Hospitalization\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": " NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "176"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "177"
                                  }
                                ],
                                "node_type": "FunctionRef",
                                "ref_id": "177"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "178"
                          }
                        ],
                        "ref_id": "179"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "180"
                  }
                ],
                "ref_id": "181"
              }
            ],
            "define_name": "Comfort Measures during Hospitalization"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define \"Denominator Exclusions1\": "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "distinct ("
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": " (&#13;\n"
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Denominator\""
                                                      }
                                                    ]
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ExpressionRef",
                                            "ref_id": "182"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "183"
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&#13;\n\t"
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "where "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "Encounter"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "184"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "dischargeDisposition"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "185"
                                                              }
                                                            ],
                                                            "ref_id": "185"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " in "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Discharge To Acute Care Facility\""
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "186"
                                                          }
                                                        ],
                                                        "node_type": "InValueSet",
                                                        "ref_id": "187"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "&#13;\n\tor "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "Encounter"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "188"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "dischargeDisposition"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "189"
                                                              }
                                                            ],
                                                            "ref_id": "189"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " in "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Left Against Medical Advice\""
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "190"
                                                          }
                                                        ],
                                                        "node_type": "InValueSet",
                                                        "ref_id": "191"
                                                      }
                                                    ],
                                                    "node_type": "Or",
                                                    "ref_id": "192"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "&#13;\n\tor "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "Encounter"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "193"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "dischargeDisposition"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "194"
                                                          }
                                                        ],
                                                        "ref_id": "194"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " in "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Patient Expired\""
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "195"
                                                      }
                                                    ],
                                                    "node_type": "InValueSet",
                                                    "ref_id": "196"
                                                  }
                                                ],
                                                "node_type": "Or",
                                                "ref_id": "197"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "&#13;\n\tor "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "Encounter"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "198"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "dischargeDisposition"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "199"
                                                      }
                                                    ],
                                                    "ref_id": "199"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " in "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Discharged to Home for Hospice Care\""
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "200"
                                                  }
                                                ],
                                                "node_type": "InValueSet",
                                                "ref_id": "201"
                                              }
                                            ],
                                            "node_type": "Or",
                                            "ref_id": "202"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "&#13;\n\tor "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Encounter"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "203"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "dischargeDisposition"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "204"
                                                  }
                                                ],
                                                "ref_id": "204"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " in "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Discharged to Health Care Facility for Hospice Care\""
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "205"
                                              }
                                            ],
                                            "node_type": "InValueSet",
                                            "ref_id": "206"
                                          }
                                        ],
                                        "ref_id": "207"
                                      }
                                    ],
                                    "ref_id": "207"
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "208"
                              },
                              {
                                "children": [
                                  {
                                    "text": "&#13;\n    )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Query",
                            "ref_id": "208"
                          },
                          {
                            "children": [
                              {
                                "text": " &#13;\nunion "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Comfort Measures during Hospitalization\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "209"
                          }
                        ],
                        "node_type": "Union",
                        "ref_id": "210"
                      },
                      {
                        "children": [
                          {
                            "text": " &#13;\n)"
                          }
                        ]
                      }
                    ],
                    "node_type": "Distinct",
                    "ref_id": "211"
                  }
                ],
                "ref_id": "212"
              }
            ],
            "define_name": "Denominator Exclusions1"
          }
        ],
        "identifier": {
          "id": "AnticoagulationTherapyforAtrialFibrillationFlutter",
          "version": "0.0.009"
        }
      },
      "is_main_library": true,
      "is_top_level": true,
      "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
      "library_version": "0.0.009",
      "statement_dependencies": [
        {
          "statement_name": "Patient"
        },
        {
          "statement_name": "SDE Ethnicity"
        },
        {
          "statement_name": "SDE Payer"
        },
        {
          "statement_name": "SDE Race"
        },
        {
          "statement_name": "SDE Sex"
        },
        {
          "statement_name": "Non Elective Inpatient Encounter"
        },
        {
          "statement_name": "Encounter with Principal Diagnosis and Age",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Non Elective Inpatient Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "CalendarAgeInYearsAt"
            }
          ]
        },
        {
          "statement_name": "Initial Population",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Encounter with Principal Diagnosis and Age"
            }
          ]
        },
        {
          "statement_name": "Encounter with Principle Diagnosis of Ischemic Stroke",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Encounter with Principal Diagnosis and Age"
            }
          ]
        },
        {
          "statement_name": "Encounter with Atrial Ablation Procedure",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Encounter with Principle Diagnosis of Ischemic Stroke"
            }
          ]
        },
        {
          "statement_name": "Current Diagnosis Atrial FibrillationFlutter",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Encounter with Principle Diagnosis of Ischemic Stroke"
            }
          ]
        },
        {
          "statement_name": "History of Atrial FibrillationFlutter",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Encounter with Principle Diagnosis of Ischemic Stroke"
            }
          ]
        },
        {
          "statement_name": "Denominator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Encounter with Atrial Ablation Procedure"
            },
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "History of Atrial FibrillationFlutter"
            },
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Current Diagnosis Atrial FibrillationFlutter"
            }
          ]
        },
        {
          "statement_name": "Anticoagulant Therapy at Discharge"
        },
        {
          "statement_name": "Numerator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Denominator"
            },
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Anticoagulant Therapy at Discharge"
            }
          ]
        },
        {
          "statement_name": "Anticoagulant Not Given at Discharge"
        },
        {
          "statement_name": "Denominator Exceptions",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Denominator"
            },
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Anticoagulant Not Given at Discharge"
            }
          ]
        },
        {
          "statement_name": "Intervention Comfort Measures"
        },
        {
          "statement_name": "Comfort Measures during Hospitalization",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Denominator"
            },
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Intervention Comfort Measures"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization"
            }
          ]
        },
        {
          "statement_name": "Denominator Exclusions1",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Denominator"
            },
            {
              "hqmf_id": null,
              "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
              "statement_name": "Comfort Measures during Hospitalization"
            }
          ]
        }
      ]
    },
    {
      "cql": "library MATGlobalCommonFunctions version '1.0.000'\n\nusing QDM version '5.0.2'\n\ncodesystem \"LOINC:2.46\": 'urn:oid:2.16.840.1.113883.6.1' version 'urn:hl7:version:2.46'\n\ncodesystem \"SNOMEDCT:2016-03\": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2016-03'\n\nvalueset \"Emergency Department Visit\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.292' \n\ncode \"Birthdate\": '21112-8' from \"LOINC:2.46\" display 'Birth date'\n\ncode \"Dead\": '419099009' from \"SNOMEDCT:2016-03\" display 'Dead'\n\nparameter \"Measurement Period\" Interval<DateTime>\n\ncontext Patient\n\n/*ToDate takes a given DateTime value and returns a DateTime with the time components \"zeroed\", and the timezone of the input value. For example,\ngiven the DateTime @2012-01-01T06:30:00.0Z, this function will return\n@2012-01-01T00:00:00.0Z.*/\ndefine function \"ToDate\"(DateTime DateTime ): DateTime(year from DateTime, month from DateTime, day from DateTime, 0, 0, 0, 0, timezone from DateTime)\n\n/*CalendarAgeInYearsAt calculates the calendar age (meaning the age without\nconsidering time components) in years.*/\ndefine function \"CalendarAgeInYearsAt\"(BirthDateTime DateTime, AsOf DateTime ): years between ToDate(BirthDateTime) and ToDate(AsOf)\n\n/*CalendarAgeInMonthsAt calculates the calendar age (meaning the age without considering time components) in months.*/\ndefine function \"CalendarAgeInMonthsAt\"(BirthDateTime DateTime, AsOf DateTime ): months between ToDate(BirthDateTime) and ToDate(AsOf)\n\n/*CalendarAgeInDaysAt calculates the calendar age (meaning the age without\nconsidering time components) in days.*/\ndefine function \"CalendarAgeInDaysAt\"(BirthDateTime DateTime, AsOf DateTime ): days between ToDate(BirthDateTime) and ToDate(AsOf)\n\n/*CalendarAgeInYears calculates the calendar age (meaning the age without\nconsidering time components) in years as of today.*/\ndefine function \"CalendarAgeInYears\"(BirthDateTime DateTime ): CalendarAgeInYearsAt(BirthDateTime, Today())\n\n/*CalendarAgeInMonths calculates the calendar age (meaning the age without\nconsidering time components) in months as of today.*/\ndefine function \"CalendarAgeInMonths\"(BirthDateTime DateTime ): CalendarAgeInMonthsAt(BirthDateTime, Today())\n\n/*CalendarAgeInDays calculates the calendar age (meaning the age without\nconsidering time components) in days as of today.*/\ndefine function \"CalendarAgeInDays\"(BirthDateTime DateTime ): CalendarAgeInDaysAt(BirthDateTime, Today())\n\n/*TotalLengthOfStay calculates the difference in calendar days between the\nstart and end of the given stay interval.*/\ndefine function \"TotalLengthOfStay\"(Stay Interval<DateTime> ): difference in days between start of Stay and end of Stay\n\n/*Hospitalization returns the total interval for admission to discharge for\nthe given encounter, or for the admission of any immediately prior emergency \ndepartment visit to the discharge of the given encounter.*/\ndefine function \"Hospitalization\"(Encounter \"Encounter, Performed\" ): (\r\n    singleton from (\r\n      [\"Encounter, Performed\": \"Emergency Department Visit\"] EDVisit\r\n        where EDVisit.relevantPeriod ends 1 hour or less on or before start of Encounter.relevantPeriod\r\n    )\r\n  ) X\r\n    return if X is null then Encounter.relevantPeriod\r\n      else Interval[start of X.relevantPeriod, end of Encounter.relevantPeriod]\n\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "MATGlobalCommonFunctions",
            "version": "1.0.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_0_1_draft",
                "version": "5.0.2"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "11",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "10",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "9",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "codeSystems": {
            "def": [
              {
                "localId": "2",
                "name": "LOINC:2.46",
                "id": "2.16.840.1.113883.6.1",
                "version": "urn:hl7:version:2.46",
                "accessLevel": "Public"
              },
              {
                "localId": "3",
                "name": "SNOMEDCT:2016-03",
                "id": "2.16.840.1.113883.6.96",
                "version": "urn:hl7:version:2016-03",
                "accessLevel": "Public"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "4",
                "name": "Emergency Department Visit",
                "id": "2.16.840.1.113883.3.117.1.7.1.292",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "6",
                "name": "Birthdate",
                "id": "21112-8",
                "display": "Birth date",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "5",
                  "name": "LOINC:2.46"
                }
              },
              {
                "localId": "8",
                "name": "Dead",
                "id": "419099009",
                "display": "Dead",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "7",
                  "name": "SNOMEDCT:2016-03"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "26",
                "name": "ToDate",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "26",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"ToDate\"",
                            "(",
                            "DateTime",
                            " "
                          ]
                        },
                        {
                          "r": "12",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "25",
                          "s": [
                            {
                              "r": "25",
                              "s": [
                                {
                                  "value": [
                                    "DateTime",
                                    "("
                                  ]
                                },
                                {
                                  "r": "14",
                                  "s": [
                                    {
                                      "value": [
                                        "year from "
                                      ]
                                    },
                                    {
                                      "r": "13",
                                      "s": [
                                        {
                                          "value": [
                                            "DateTime"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "16",
                                  "s": [
                                    {
                                      "value": [
                                        "month from "
                                      ]
                                    },
                                    {
                                      "r": "15",
                                      "s": [
                                        {
                                          "value": [
                                            "DateTime"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "18",
                                  "s": [
                                    {
                                      "value": [
                                        "day from "
                                      ]
                                    },
                                    {
                                      "r": "17",
                                      "s": [
                                        {
                                          "value": [
                                            "DateTime"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", ",
                                    "0",
                                    ", ",
                                    "0",
                                    ", ",
                                    "0",
                                    ", ",
                                    "0",
                                    ", "
                                  ]
                                },
                                {
                                  "r": "24",
                                  "s": [
                                    {
                                      "value": [
                                        "timezone from "
                                      ]
                                    },
                                    {
                                      "r": "23",
                                      "s": [
                                        {
                                          "value": [
                                            "DateTime"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "25",
                  "type": "DateTime",
                  "year": {
                    "localId": "14",
                    "precision": "Year",
                    "type": "DateTimeComponentFrom",
                    "operand": {
                      "localId": "13",
                      "name": "DateTime",
                      "type": "OperandRef"
                    }
                  },
                  "month": {
                    "localId": "16",
                    "precision": "Month",
                    "type": "DateTimeComponentFrom",
                    "operand": {
                      "localId": "15",
                      "name": "DateTime",
                      "type": "OperandRef"
                    }
                  },
                  "day": {
                    "localId": "18",
                    "precision": "Day",
                    "type": "DateTimeComponentFrom",
                    "operand": {
                      "localId": "17",
                      "name": "DateTime",
                      "type": "OperandRef"
                    }
                  },
                  "hour": {
                    "localId": "19",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "minute": {
                    "localId": "20",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "second": {
                    "localId": "21",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "millisecond": {
                    "localId": "22",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "timezoneOffset": {
                    "localId": "24",
                    "type": "TimezoneFrom",
                    "operand": {
                      "localId": "23",
                      "name": "DateTime",
                      "type": "OperandRef"
                    }
                  }
                },
                "operand": [
                  {
                    "name": "DateTime",
                    "operandTypeSpecifier": {
                      "localId": "12",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "34",
                "name": "CalendarAgeInYearsAt",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "34",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInYearsAt\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "27",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            ", ",
                            "AsOf",
                            " "
                          ]
                        },
                        {
                          "r": "28",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "33",
                          "s": [
                            {
                              "r": "33",
                              "s": [
                                {
                                  "value": [
                                    "years between "
                                  ]
                                },
                                {
                                  "r": "30",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "29",
                                      "s": [
                                        {
                                          "value": [
                                            "BirthDateTime"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    " and "
                                  ]
                                },
                                {
                                  "r": "32",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "31",
                                      "s": [
                                        {
                                          "value": [
                                            "AsOf"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "33",
                  "precision": "Year",
                  "type": "DurationBetween",
                  "operand": [
                    {
                      "localId": "30",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "29",
                          "name": "BirthDateTime",
                          "type": "OperandRef"
                        }
                      ]
                    },
                    {
                      "localId": "32",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "31",
                          "name": "AsOf",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "27",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  },
                  {
                    "name": "AsOf",
                    "operandTypeSpecifier": {
                      "localId": "28",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "42",
                "name": "CalendarAgeInMonthsAt",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "42",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInMonthsAt\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "35",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            ", ",
                            "AsOf",
                            " "
                          ]
                        },
                        {
                          "r": "36",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "41",
                          "s": [
                            {
                              "r": "41",
                              "s": [
                                {
                                  "value": [
                                    "months between "
                                  ]
                                },
                                {
                                  "r": "38",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "37",
                                      "s": [
                                        {
                                          "value": [
                                            "BirthDateTime"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    " and "
                                  ]
                                },
                                {
                                  "r": "40",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "39",
                                      "s": [
                                        {
                                          "value": [
                                            "AsOf"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "41",
                  "precision": "Month",
                  "type": "DurationBetween",
                  "operand": [
                    {
                      "localId": "38",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "37",
                          "name": "BirthDateTime",
                          "type": "OperandRef"
                        }
                      ]
                    },
                    {
                      "localId": "40",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "39",
                          "name": "AsOf",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "35",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  },
                  {
                    "name": "AsOf",
                    "operandTypeSpecifier": {
                      "localId": "36",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "50",
                "name": "CalendarAgeInDaysAt",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "50",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInDaysAt\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "43",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            ", ",
                            "AsOf",
                            " "
                          ]
                        },
                        {
                          "r": "44",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "49",
                          "s": [
                            {
                              "r": "49",
                              "s": [
                                {
                                  "value": [
                                    "days between "
                                  ]
                                },
                                {
                                  "r": "46",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "45",
                                      "s": [
                                        {
                                          "value": [
                                            "BirthDateTime"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    " and "
                                  ]
                                },
                                {
                                  "r": "48",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "47",
                                      "s": [
                                        {
                                          "value": [
                                            "AsOf"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "49",
                  "precision": "Day",
                  "type": "DurationBetween",
                  "operand": [
                    {
                      "localId": "46",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "45",
                          "name": "BirthDateTime",
                          "type": "OperandRef"
                        }
                      ]
                    },
                    {
                      "localId": "48",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "47",
                          "name": "AsOf",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "43",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  },
                  {
                    "name": "AsOf",
                    "operandTypeSpecifier": {
                      "localId": "44",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "55",
                "name": "CalendarAgeInYears",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "55",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInYears\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "51",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "54",
                          "s": [
                            {
                              "r": "54",
                              "s": [
                                {
                                  "value": [
                                    "CalendarAgeInYearsAt",
                                    "("
                                  ]
                                },
                                {
                                  "r": "52",
                                  "s": [
                                    {
                                      "value": [
                                        "BirthDateTime"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "53",
                                  "s": [
                                    {
                                      "value": [
                                        "Today",
                                        "()"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "54",
                  "name": "CalendarAgeInYearsAt",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "52",
                      "name": "BirthDateTime",
                      "type": "OperandRef"
                    },
                    {
                      "localId": "53",
                      "type": "Today"
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "51",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "60",
                "name": "CalendarAgeInMonths",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "60",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInMonths\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "56",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "59",
                          "s": [
                            {
                              "r": "59",
                              "s": [
                                {
                                  "value": [
                                    "CalendarAgeInMonthsAt",
                                    "("
                                  ]
                                },
                                {
                                  "r": "57",
                                  "s": [
                                    {
                                      "value": [
                                        "BirthDateTime"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "58",
                                  "s": [
                                    {
                                      "value": [
                                        "Today",
                                        "()"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "59",
                  "name": "CalendarAgeInMonthsAt",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "57",
                      "name": "BirthDateTime",
                      "type": "OperandRef"
                    },
                    {
                      "localId": "58",
                      "type": "Today"
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "56",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "65",
                "name": "CalendarAgeInDays",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "65",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInDays\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "61",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "64",
                          "s": [
                            {
                              "r": "64",
                              "s": [
                                {
                                  "value": [
                                    "CalendarAgeInDaysAt",
                                    "("
                                  ]
                                },
                                {
                                  "r": "62",
                                  "s": [
                                    {
                                      "value": [
                                        "BirthDateTime"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "63",
                                  "s": [
                                    {
                                      "value": [
                                        "Today",
                                        "()"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "64",
                  "name": "CalendarAgeInDaysAt",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "62",
                      "name": "BirthDateTime",
                      "type": "OperandRef"
                    },
                    {
                      "localId": "63",
                      "type": "Today"
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "61",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "73",
                "name": "TotalLengthOfStay",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "73",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"TotalLengthOfStay\"",
                            "(",
                            "Stay",
                            " "
                          ]
                        },
                        {
                          "r": "67",
                          "s": [
                            {
                              "value": [
                                "Interval<"
                              ]
                            },
                            {
                              "r": "66",
                              "s": [
                                {
                                  "value": [
                                    "DateTime"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ">"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "72",
                          "s": [
                            {
                              "r": "72",
                              "s": [
                                {
                                  "value": [
                                    "difference in days between "
                                  ]
                                },
                                {
                                  "r": "69",
                                  "s": [
                                    {
                                      "value": [
                                        "start of "
                                      ]
                                    },
                                    {
                                      "r": "68",
                                      "s": [
                                        {
                                          "value": [
                                            "Stay"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    " and "
                                  ]
                                },
                                {
                                  "r": "71",
                                  "s": [
                                    {
                                      "value": [
                                        "end of "
                                      ]
                                    },
                                    {
                                      "r": "70",
                                      "s": [
                                        {
                                          "value": [
                                            "Stay"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "72",
                  "precision": "Day",
                  "type": "DifferenceBetween",
                  "operand": [
                    {
                      "localId": "69",
                      "type": "Start",
                      "operand": {
                        "localId": "68",
                        "name": "Stay",
                        "type": "OperandRef"
                      }
                    },
                    {
                      "localId": "71",
                      "type": "End",
                      "operand": {
                        "localId": "70",
                        "name": "Stay",
                        "type": "OperandRef"
                      }
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "Stay",
                    "operandTypeSpecifier": {
                      "localId": "67",
                      "type": "IntervalTypeSpecifier",
                      "pointType": {
                        "localId": "66",
                        "name": "{urn:hl7-org:elm-types:r1}DateTime",
                        "type": "NamedTypeSpecifier"
                      }
                    }
                  }
                ]
              },
              {
                "localId": "101",
                "name": "Hospitalization",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "101",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospitalization\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "74",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ): "
                          ]
                        },
                        {
                          "r": "100",
                          "s": [
                            {
                              "r": "100",
                              "s": [
                                {
                                  "s": [
                                    {
                                      "r": "86",
                                      "s": [
                                        {
                                          "r": "85",
                                          "s": [
                                            {
                                              "value": [
                                                "(\r\n    "
                                              ]
                                            },
                                            {
                                              "r": "85",
                                              "s": [
                                                {
                                                  "value": [
                                                    "singleton from "
                                                  ]
                                                },
                                                {
                                                  "r": "84",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "(\r\n      "
                                                      ]
                                                    },
                                                    {
                                                      "r": "84",
                                                      "s": [
                                                        {
                                                          "s": [
                                                            {
                                                              "r": "76",
                                                              "s": [
                                                                {
                                                                  "r": "75",
                                                                  "s": [
                                                                    {
                                                                      "r": "75",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Encounter, Performed\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Emergency Department Visit\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "EDVisit"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\r\n        "
                                                          ]
                                                        },
                                                        {
                                                          "r": "83",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "where "
                                                              ]
                                                            },
                                                            {
                                                              "r": "83",
                                                              "s": [
                                                                {
                                                                  "r": "78",
                                                                  "s": [
                                                                    {
                                                                      "r": "77",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "EDVisit"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "78",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "relevantPeriod"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "83",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "ends "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "82",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "1 ",
                                                                            "hour"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        " or less on or before"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "81",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "80",
                                                                      "s": [
                                                                        {
                                                                          "r": "79",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "80",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\r\n    )"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\r\n  )"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "X"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\r\n    "
                                  ]
                                },
                                {
                                  "r": "99",
                                  "s": [
                                    {
                                      "value": [
                                        "return "
                                      ]
                                    },
                                    {
                                      "r": "98",
                                      "s": [
                                        {
                                          "value": [
                                            "if "
                                          ]
                                        },
                                        {
                                          "r": "88",
                                          "s": [
                                            {
                                              "r": "87",
                                              "s": [
                                                {
                                                  "value": [
                                                    "X"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " is null"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " then "
                                          ]
                                        },
                                        {
                                          "r": "90",
                                          "s": [
                                            {
                                              "r": "89",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "90",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\r\n      else "
                                          ]
                                        },
                                        {
                                          "r": "97",
                                          "s": [
                                            {
                                              "value": [
                                                "Interval["
                                              ]
                                            },
                                            {
                                              "r": "93",
                                              "s": [
                                                {
                                                  "value": [
                                                    "start of "
                                                  ]
                                                },
                                                {
                                                  "r": "92",
                                                  "s": [
                                                    {
                                                      "r": "91",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "X"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "92",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ", "
                                              ]
                                            },
                                            {
                                              "r": "96",
                                              "s": [
                                                {
                                                  "value": [
                                                    "end of "
                                                  ]
                                                },
                                                {
                                                  "r": "95",
                                                  "s": [
                                                    {
                                                      "r": "94",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Encounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "95",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "100",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "86",
                      "alias": "X",
                      "expression": {
                        "localId": "85",
                        "type": "SingletonFrom",
                        "operand": {
                          "localId": "84",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "76",
                              "alias": "EDVisit",
                              "expression": {
                                "localId": "75",
                                "dataType": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveEncounterPerformed",
                                "templateId": "PositiveEncounterPerformed",
                                "codeProperty": "code",
                                "type": "Retrieve",
                                "codes": {
                                  "name": "Emergency Department Visit",
                                  "type": "ValueSetRef"
                                }
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "83",
                            "type": "In",
                            "operand": [
                              {
                                "type": "End",
                                "operand": {
                                  "localId": "78",
                                  "path": "relevantPeriod",
                                  "scope": "EDVisit",
                                  "type": "Property"
                                }
                              },
                              {
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "81",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "80",
                                        "path": "relevantPeriod",
                                        "type": "Property",
                                        "source": {
                                          "localId": "79",
                                          "name": "Encounter",
                                          "type": "OperandRef"
                                        }
                                      }
                                    },
                                    {
                                      "localId": "82",
                                      "value": 1,
                                      "unit": "hour",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "81",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "80",
                                    "path": "relevantPeriod",
                                    "type": "Property",
                                    "source": {
                                      "localId": "79",
                                      "name": "Encounter",
                                      "type": "OperandRef"
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "return": {
                    "localId": "99",
                    "expression": {
                      "localId": "98",
                      "type": "If",
                      "condition": {
                        "asType": "{urn:hl7-org:elm-types:r1}Boolean",
                        "type": "As",
                        "operand": {
                          "localId": "88",
                          "type": "IsNull",
                          "operand": {
                            "localId": "87",
                            "name": "X",
                            "type": "AliasRef"
                          }
                        },
                        "asTypeSpecifier": {
                          "name": "{urn:hl7-org:elm-types:r1}Boolean",
                          "type": "NamedTypeSpecifier"
                        }
                      },
                      "then": {
                        "localId": "90",
                        "path": "relevantPeriod",
                        "type": "Property",
                        "source": {
                          "localId": "89",
                          "name": "Encounter",
                          "type": "OperandRef"
                        }
                      },
                      "else": {
                        "localId": "97",
                        "lowClosed": true,
                        "highClosed": true,
                        "type": "Interval",
                        "low": {
                          "localId": "93",
                          "type": "Start",
                          "operand": {
                            "localId": "92",
                            "path": "relevantPeriod",
                            "scope": "X",
                            "type": "Property"
                          }
                        },
                        "high": {
                          "localId": "96",
                          "type": "End",
                          "operand": {
                            "localId": "95",
                            "path": "relevantPeriod",
                            "type": "Property",
                            "source": {
                              "localId": "94",
                              "name": "Encounter",
                              "type": "OperandRef"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "74",
                      "name": "{urn:healthit-gov:qdm:v5_0_1_draft}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"ToDate\"(DateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "12"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "DateTime("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": " year from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "DateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "13"
                              }
                            ],
                            "ref_id": "14"
                          },
                          {
                            "children": [
                              {
                                "text": " , "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "month from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "DateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "15"
                              }
                            ],
                            "ref_id": "16"
                          },
                          {
                            "children": [
                              {
                                "text": " , "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "day from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "DateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "17"
                              }
                            ],
                            "ref_id": "18"
                          },
                          {
                            "children": [
                              {
                                "text": " , 0, 0, 0, 0, "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "timezone from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "DateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "23"
                              }
                            ],
                            "ref_id": "24"
                          },
                          {
                            "children": [
                              {
                                "text": " )"
                              }
                            ]
                          }
                        ],
                        "node_type": "DateTime",
                        "ref_id": "25"
                      }
                    ],
                    "node_type": "DateTime",
                    "ref_id": "25"
                  }
                ],
                "ref_id": "26"
              }
            ],
            "define_name": "ToDate"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"CalendarAgeInYearsAt\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "27"
                  },
                  {
                    "children": [
                      {
                        "text": " , AsOf "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "28"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "years between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": " BirthDateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "29"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "30"
                          },
                          {
                            "children": [
                              {
                                "text": " and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": " AsOf"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "31"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "32"
                          }
                        ],
                        "node_type": "DurationBetween",
                        "ref_id": "33"
                      }
                    ],
                    "node_type": "DurationBetween",
                    "ref_id": "33"
                  }
                ],
                "ref_id": "34"
              }
            ],
            "define_name": "CalendarAgeInYearsAt"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"CalendarAgeInMonthsAt\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "35"
                  },
                  {
                    "children": [
                      {
                        "text": " , AsOf "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "36"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "months between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": " BirthDateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "37"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "38"
                          },
                          {
                            "children": [
                              {
                                "text": " and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": " AsOf"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "39"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "40"
                          }
                        ],
                        "node_type": "DurationBetween",
                        "ref_id": "41"
                      }
                    ],
                    "node_type": "DurationBetween",
                    "ref_id": "41"
                  }
                ],
                "ref_id": "42"
              }
            ],
            "define_name": "CalendarAgeInMonthsAt"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"CalendarAgeInDaysAt\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "43"
                  },
                  {
                    "children": [
                      {
                        "text": " , AsOf "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "44"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "days between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": " BirthDateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "45"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "46"
                          },
                          {
                            "children": [
                              {
                                "text": " and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": " AsOf"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "47"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "48"
                          }
                        ],
                        "node_type": "DurationBetween",
                        "ref_id": "49"
                      }
                    ],
                    "node_type": "DurationBetween",
                    "ref_id": "49"
                  }
                ],
                "ref_id": "50"
              }
            ],
            "define_name": "CalendarAgeInDaysAt"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"CalendarAgeInYears\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "51"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "CalendarAgeInYearsAt("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": " BirthDateTime"
                                  }
                                ]
                              }
                            ],
                            "node_type": "OperandRef",
                            "ref_id": "52"
                          },
                          {
                            "children": [
                              {
                                "text": " , "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "Today()"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Today",
                            "ref_id": "53"
                          },
                          {
                            "children": [
                              {
                                "text": " )"
                              }
                            ]
                          }
                        ],
                        "node_type": "FunctionRef",
                        "ref_id": "54"
                      }
                    ],
                    "node_type": "FunctionRef",
                    "ref_id": "54"
                  }
                ],
                "ref_id": "55"
              }
            ],
            "define_name": "CalendarAgeInYears"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"CalendarAgeInMonths\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "56"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "CalendarAgeInMonthsAt("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": " BirthDateTime"
                                  }
                                ]
                              }
                            ],
                            "node_type": "OperandRef",
                            "ref_id": "57"
                          },
                          {
                            "children": [
                              {
                                "text": " , "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "Today()"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Today",
                            "ref_id": "58"
                          },
                          {
                            "children": [
                              {
                                "text": " )"
                              }
                            ]
                          }
                        ],
                        "node_type": "FunctionRef",
                        "ref_id": "59"
                      }
                    ],
                    "node_type": "FunctionRef",
                    "ref_id": "59"
                  }
                ],
                "ref_id": "60"
              }
            ],
            "define_name": "CalendarAgeInMonths"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"CalendarAgeInDays\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "61"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "CalendarAgeInDaysAt("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": " BirthDateTime"
                                  }
                                ]
                              }
                            ],
                            "node_type": "OperandRef",
                            "ref_id": "62"
                          },
                          {
                            "children": [
                              {
                                "text": " , "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "Today()"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Today",
                            "ref_id": "63"
                          },
                          {
                            "children": [
                              {
                                "text": " )"
                              }
                            ]
                          }
                        ],
                        "node_type": "FunctionRef",
                        "ref_id": "64"
                      }
                    ],
                    "node_type": "FunctionRef",
                    "ref_id": "64"
                  }
                ],
                "ref_id": "65"
              }
            ],
            "define_name": "CalendarAgeInDays"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"TotalLengthOfStay\"(Stay "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "Interval&lt;"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": " DateTime"
                              }
                            ]
                          }
                        ],
                        "ref_id": "66"
                      },
                      {
                        "children": [
                          {
                            "text": " &gt;"
                          }
                        ]
                      }
                    ],
                    "ref_id": "67"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "difference in days between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "start of "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Stay"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "68"
                              }
                            ],
                            "node_type": "Start",
                            "ref_id": "69"
                          },
                          {
                            "children": [
                              {
                                "text": " and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "end of "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Stay"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "70"
                              }
                            ],
                            "node_type": "End",
                            "ref_id": "71"
                          }
                        ],
                        "node_type": "DifferenceBetween",
                        "ref_id": "72"
                      }
                    ],
                    "node_type": "DifferenceBetween",
                    "ref_id": "72"
                  }
                ],
                "ref_id": "73"
              }
            ],
            "define_name": "TotalLengthOfStay"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": " define function \"Hospitalization\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "74"
                  },
                  {
                    "children": [
                      {
                        "text": " ): "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "(&#13;\n    "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "singleton from "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "(&#13;\n      "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Encounter, Performed\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Emergency Department Visit\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": " ]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "75"
                                                              }
                                                            ],
                                                            "node_type": "Retrieve",
                                                            "ref_id": "75"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " EDVisit"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "76"
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "&#13;\n        "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "where "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "EDVisit"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "77"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "relevantPeriod"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "78"
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "78"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "ends "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "1 hour"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Quantity",
                                                                "ref_id": "82"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": " or less on or before"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "83"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "79"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "80"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "80"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "81"
                                                          }
                                                        ],
                                                        "ref_id": "83"
                                                      }
                                                    ],
                                                    "ref_id": "83"
                                                  }
                                                ],
                                                "node_type": "Query",
                                                "ref_id": "84"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "&#13;\n    )"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "84"
                                          }
                                        ],
                                        "node_type": "SingletonFrom",
                                        "ref_id": "85"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "&#13;\n  )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "SingletonFrom",
                                    "ref_id": "85"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " X"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "86"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "&#13;\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "return "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "if "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "X"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "87"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " is null"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "IsNull",
                                    "ref_id": "88"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " then "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "89"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "90"
                                      }
                                    ],
                                    "ref_id": "90"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&#13;\n      else "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Interval["
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": " start of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "X"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "91"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "92"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "92"
                                          }
                                        ],
                                        "ref_id": "93"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " , "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "end of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Encounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "94"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "95"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "95"
                                          }
                                        ],
                                        "ref_id": "96"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ]"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "97"
                                  }
                                ],
                                "node_type": "If",
                                "ref_id": "98"
                              }
                            ],
                            "ref_id": "99"
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "100"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "100"
                  }
                ],
                "ref_id": "101"
              }
            ],
            "define_name": "Hospitalization"
          }
        ],
        "identifier": {
          "id": "MATGlobalCommonFunctions",
          "version": "1.0.000"
        }
      },
      "is_main_library": false,
      "is_top_level": true,
      "library_name": "MATGlobalCommonFunctions",
      "library_version": "1.0.000",
      "statement_dependencies": [
        {
          "statement_name": "CalendarAgeInYearsAt",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "ToDate"
            }
          ]
        },
        {
          "statement_name": "ToDate"
        },
        {
          "statement_name": "Hospitalization"
        }
      ]
    }
  ],
  "created_at": null,
  "description": "Ischemic stroke patients with atrial fibrillation/flutter who are prescribed or continuing to take anticoagulation therapy at hospital discharge",
  "hqmf_id": "40280582-5C27-8179-015C-319B52CF0120",
  "hqmf_set_id": "9DD5F699-F535-48BB-8140-306C656A587E",
  "hqmf_version_number": "0",
  "main_cql_library": "AnticoagulationTherapyforAtrialFibrillationFlutter",
  "measure_attributes": [
    {
      "code": "OTH",
      "value": "723",
      "name": "eMeasure Identifier (Measure Authoring Tool)",
      "code_obj": {
        "type": "CD",
        "null_flavor": "OTH",
        "original_text": "eMeasure Identifier (Measure Authoring Tool)"
      },
      "value_obj": {
        "type": "ED",
        "value": "723",
        "media_type": "text/plain"
      }
    },
    {
      "code": "OTH",
      "value": "Not Applicable",
      "name": "NQF Number",
      "code_obj": {
        "type": "CD",
        "null_flavor": "OTH",
        "original_text": "NQF Number"
      },
      "value_obj": {
        "type": "ED",
        "value": "Not Applicable",
        "media_type": "text/plain"
      }
    },
    {
      "code": "COPY",
      "value": "Measure specifications are in the Public Domain.\n\nLOINC(R) is a registered trademark of the Regenstrief Institute.\n\nThis material contains SNOMED Clinical Terms(R) (SNOMED CT(C)) copyright 2004-2016 International Health Terminology Standards Development Organization. All rights reserved.",
      "name": "Copyright",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "COPY",
        "title": "Copyright"
      },
      "value_obj": {
        "type": "ED",
        "value": "Measure specifications are in the Public Domain.\n\nLOINC(R) is a registered trademark of the Regenstrief Institute.\n\nThis material contains SNOMED Clinical Terms(R) (SNOMED CT(C)) copyright 2004-2016 International Health Terminology Standards Development Organization. All rights reserved.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DISC",
      "value": "These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.",
      "name": "Disclaimer",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DISC",
        "title": "Disclaimer"
      },
      "value_obj": {
        "type": "ED",
        "value": "These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "MSRSCORE",
      "name": "Measure Scoring",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRSCORE",
        "title": "Measure Scoring"
      },
      "value_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.1.11.20367",
        "code": "PROPOR",
        "title": "Proportion"
      }
    },
    {
      "code": "MSRTYPE",
      "name": "Measure Type",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRTYPE",
        "title": "Measure Type"
      },
      "value_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.1.11.20368",
        "code": "PROCESS",
        "title": "PROCESS"
      }
    },
    {
      "code": "STRAT",
      "value": "None",
      "name": "Stratification",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "STRAT",
        "title": "Stratification"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "MSRADJ",
      "value": "None",
      "name": "Risk Adjustment",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRADJ",
        "title": "Risk Adjustment"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "MSRAGG",
      "value": "None",
      "name": "Rate Aggregation",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRAGG",
        "title": "Rate Aggregation"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "RAT",
      "value": "Nonvalvular atrial fibrillation (NVAF) is a common arrhythmia and an important risk factor for stroke. It is one of several conditions and lifestyle factors that have been identified as risk factors for stroke. It has been estimated that over 2 million adults in the United States have NVAF. While the median age of patients with atrial fibrillation is 75 years, the incidence increases with advancing age. For example, The Framingham Heart Study noted a dramatic increase in stroke risk associated with atrial fibrillation with advancing age, from 1.5% for those 50 to 59 years of age to 23.5% for those 80 to 89 years of age. Furthermore, a prior stroke or transient ischemic attack (TIA) are among a limited number of predictors of high stroke risk within the population of patients with atrial fibrillation. Therefore, much emphasis has been placed on identifying methods for preventing recurrent ischemic stroke as well as preventing first stroke. Prevention strategies focus on the modifiable risk factors such as hypertension, smoking, and atrial fibrillation. Analysis of five placebo-controlled clinical trials investigating the efficacy of warfarin in the primary prevention of thromboembolic stroke, found the relative risk of thromboembolic stroke was reduced by 68% for atrial fibrillation patients treated with warfarin. The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk-atrial fibrillation patients with TIA or prior stroke.",
      "name": "Rationale",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "RAT",
        "title": "Rationale"
      },
      "value_obj": {
        "type": "ED",
        "value": "Nonvalvular atrial fibrillation (NVAF) is a common arrhythmia and an important risk factor for stroke. It is one of several conditions and lifestyle factors that have been identified as risk factors for stroke. It has been estimated that over 2 million adults in the United States have NVAF. While the median age of patients with atrial fibrillation is 75 years, the incidence increases with advancing age. For example, The Framingham Heart Study noted a dramatic increase in stroke risk associated with atrial fibrillation with advancing age, from 1.5% for those 50 to 59 years of age to 23.5% for those 80 to 89 years of age. Furthermore, a prior stroke or transient ischemic attack (TIA) are among a limited number of predictors of high stroke risk within the population of patients with atrial fibrillation. Therefore, much emphasis has been placed on identifying methods for preventing recurrent ischemic stroke as well as preventing first stroke. Prevention strategies focus on the modifiable risk factors such as hypertension, smoking, and atrial fibrillation. Analysis of five placebo-controlled clinical trials investigating the efficacy of warfarin in the primary prevention of thromboembolic stroke, found the relative risk of thromboembolic stroke was reduced by 68% for atrial fibrillation patients treated with warfarin. The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk-atrial fibrillation patients with TIA or prior stroke.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "CRS",
      "value": "The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk atrial fibrillation patients with TIA or prior stroke",
      "name": "Clinical Recommendation Statement",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "CRS",
        "title": "Clinical Recommendation Statement"
      },
      "value_obj": {
        "type": "ED",
        "value": "The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk atrial fibrillation patients with TIA or prior stroke",
        "media_type": "text/plain"
      }
    },
    {
      "code": "IDUR",
      "value": "Improvement noted as an increase in rate",
      "name": "Improvement Notation",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "IDUR",
        "title": "Improvement Notation"
      },
      "value_obj": {
        "type": "ED",
        "value": "Improvement noted as an increase in rate",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Kernan, W.N., B. Ovbiagele, H. R. Black, D. M. Bravata, M. I. Chimowitz, M. D. Ezekowitz, M. C. Fang, M. Fisher, K. L. Furie, D. V. Heck, S. C. Johnston, S. E. Kasner, S. J. Kittner, P. H. Mitchell, M. W. Rich, D. Richardson, L. H. Schwamm, J. A. Wilson. \"Guidelines for the Prevention of Stroke in Patients with Stroke and Transient Ischemic Attack: A Guideline for Healthcare Professionals from the American Heart Association/American Stroke Association.\" [in eng.]  Stroke 45, no. 7 (May 2014): 2160-223.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Kernan, W.N., B. Ovbiagele, H. R. Black, D. M. Bravata, M. I. Chimowitz, M. D. Ezekowitz, M. C. Fang, M. Fisher, K. L. Furie, D. V. Heck, S. C. Johnston, S. E. Kasner, S. J. Kittner, P. H. Mitchell, M. W. Rich, D. Richardson, L. H. Schwamm, J. A. Wilson. \"Guidelines for the Prevention of Stroke in Patients with Stroke and Transient Ischemic Attack: A Guideline for Healthcare Professionals from the American Heart Association/American Stroke Association.\" [in eng.]  Stroke 45, no. 7 (May 2014): 2160-223.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Goldstein, L. B., R. Adams, M. J. Alberts, L. J. Appel, L. M. Brass, C. D. Bushnell, A. Culebras, et al. \"Primary Prevention of Ischemic Stroke: A Guideline from the American Heart Association/American Stroke Association Stroke Council: Cosponsored by the Atherosclerotic Peripheral Vascular Disease Interdisciplinary Working Group; Cardiovascular Nursing Council; Clinical Cardiology Council; Nutrition, Physical Activity, and Metabolism Council; and the Quality of Care and Outcomes Research Interdisciplinary Working Group: The American Academy of Neurology Affirms the Value of This Guideline.\" [In eng]. Stroke 37, no. 6 (Jun 2006): 1583-633.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Goldstein, L. B., R. Adams, M. J. Alberts, L. J. Appel, L. M. Brass, C. D. Bushnell, A. Culebras, et al. \"Primary Prevention of Ischemic Stroke: A Guideline from the American Heart Association/American Stroke Association Stroke Council: Cosponsored by the Atherosclerotic Peripheral Vascular Disease Interdisciplinary Working Group; Cardiovascular Nursing Council; Clinical Cardiology Council; Nutrition, Physical Activity, and Metabolism Council; and the Quality of Care and Outcomes Research Interdisciplinary Working Group: The American Academy of Neurology Affirms the Value of This Guideline.\" [In eng]. Stroke 37, no. 6 (Jun 2006): 1583-633.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Jauch, E. C., J. L. Saver, H. P. Adams, Jr., A. Bruno, J. J. Connors, B. M. Demaerschalk, P. Khatri, et al. \"Guidelines for the Early Management of Patients with Acute Ischemic Stroke: A Guideline for Healthcare Professionals from the American Heart Association/American Stroke Association.\" [In Eng]. Stroke (Jan 31 2013).",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Jauch, E. C., J. L. Saver, H. P. Adams, Jr., A. Bruno, J. J. Connors, B. M. Demaerschalk, P. Khatri, et al. \"Guidelines for the Early Management of Patients with Acute Ischemic Stroke: A Guideline for Healthcare Professionals from the American Heart Association/American Stroke Association.\" [In Eng]. Stroke (Jan 31 2013).",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Saxena, R., and P. J. Koudstaal. \"Anticoagulants for Preventing Stroke in Patients with Nonrheumatic Atrial Fibrillation and a History of Stroke or Transient Ischemic Attack (Review).\" Cochrane Database Syst Rev, no. 4 (2011): CD000185.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Saxena, R., and P. J. Koudstaal. \"Anticoagulants for Preventing Stroke in Patients with Nonrheumatic Atrial Fibrillation and a History of Stroke or Transient Ischemic Attack (Review).\" Cochrane Database Syst Rev, no. 4 (2011): CD000185.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Wann, L. S., A. B. Curtis, K. A. Ellenbogen, N. A. Estes, 3rd, M. D. Ezekowitz, W. M. Jackman, C. T. January, et al. \"2011 Accf/Aha/Hrs Focused Update on the Management of Patients with Atrial Fibrillation (Update on Dabigatran): A Report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines.\" [In eng]. J Am Coll Cardiol 57, no. 11 (Mar 15 2011): 1330-7.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Wann, L. S., A. B. Curtis, K. A. Ellenbogen, N. A. Estes, 3rd, M. D. Ezekowitz, W. M. Jackman, C. T. January, et al. \"2011 Accf/Aha/Hrs Focused Update on the Management of Patients with Atrial Fibrillation (Update on Dabigatran): A Report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines.\" [In eng]. J Am Coll Cardiol 57, no. 11 (Mar 15 2011): 1330-7.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DEF",
      "value": "None",
      "name": "Definition",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DEF",
        "title": "Definition"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "GUIDE",
      "value": "The \"Non-elective Inpatient Encounter\" value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the \"Inpatient encounter\" value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.\n\nThe \"Medication, Discharge\" datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.",
      "name": "Guidance",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "GUIDE",
        "title": "Guidance"
      },
      "value_obj": {
        "type": "ED",
        "value": "The \"Non-elective Inpatient Encounter\" value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the \"Inpatient encounter\" value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.\n\nThe \"Medication, Discharge\" datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "TRANF",
      "value": "TBD",
      "name": "Transmission Format",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "TRANF",
        "title": "Transmission Format"
      },
      "value_obj": {
        "type": "ED",
        "value": "TBD",
        "media_type": "text/plain"
      }
    },
    {
      "code": "IPOP",
      "value": "Patients age 18 and older discharged from inpatient care (non-elective admissions) with a principal diagnosis of ischemic or hemorrhagic stroke and a length of stay less than or equal to 120 days that ends during measurement period",
      "name": "Initial Population",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "IPOP",
        "title": "Initial Population"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients age 18 and older discharged from inpatient care (non-elective admissions) with a principal diagnosis of ischemic or hemorrhagic stroke and a length of stay less than or equal to 120 days that ends during measurement period",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENOM",
      "value": "Patients with a principal diagnosis of ischemic stroke, and a history of atrial ablation, or current or history of atrial fibrillation/flutter",
      "name": "Denominator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DENOM",
        "title": "Denominator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients with a principal diagnosis of ischemic stroke, and a history of atrial ablation, or current or history of atrial fibrillation/flutter",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEX",
      "value": "*Patients with comfort measures documented\n*Patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations\n*Patients discharged to another hospital\n*Patients who left against medical advice\n*Patients who expired\n*Patients discharged to home for hospice care\n*Patients discharged to a health care facility for hospice care",
      "name": "Denominator Exclusions",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DENEX",
        "title": "Denominator Exclusions"
      },
      "value_obj": {
        "type": "ED",
        "value": "*Patients with comfort measures documented\n*Patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations\n*Patients discharged to another hospital\n*Patients who left against medical advice\n*Patients who expired\n*Patients discharged to home for hospice care\n*Patients discharged to a health care facility for hospice care",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMER",
      "value": "Patients prescribed or continuing to take anticoagulation therapy at hospital discharge",
      "name": "Numerator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "NUMER",
        "title": "Numerator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients prescribed or continuing to take anticoagulation therapy at hospital discharge",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMEX",
      "value": "Not Applicable",
      "name": "Numerator Exclusions",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "NUMEX",
        "title": "Numerator Exclusions"
      },
      "value_obj": {
        "type": "ED",
        "value": "Not Applicable",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEXCEP",
      "value": "Patients with a documented reason for not prescribing anticoagulation therapy at discharge",
      "name": "Denominator Exceptions",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DENEXCEP",
        "title": "Denominator Exceptions"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients with a documented reason for not prescribing anticoagulation therapy at discharge",
        "media_type": "text/plain"
      }
    },
    {
      "code": "SDE",
      "value": "For every patient evaluated by this measure also identify payer, race, ethnicity and sex",
      "name": "Supplemental Data Elements",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "SDE",
        "title": "Supplemental Data Elements"
      },
      "value_obj": {
        "type": "ED",
        "value": "For every patient evaluated by this measure also identify payer, race, ethnicity and sex",
        "media_type": "text/plain"
      }
    }
  ],
  "measure_period": {
    "type": "IVL_TS",
    "low": {
      "type": "TS",
      "value": "201201010000",
      "inclusive?": true,
      "derived?": false
    },
    "high": {
      "type": "TS",
      "value": "201212312359",
      "inclusive?": true,
      "derived?": false
    },
    "width": {
      "type": "PQ",
      "unit": "a",
      "value": "1",
      "inclusive?": true,
      "derived?": false
    }
  },
  "measure_scoring": "PROPORTION",
  "population_criteria": {
    "IPP": {
      "conjunction?": true,
      "type": "IPP",
      "hqmf_id": "01B24ECE-AFD8-455A-8BD6-5A25E8140E29",
      "preconditions": [
        {
          "id": 2,
          "preconditions": [
            {
              "id": 1,
              "reference": "AnticoagulationTherapyforAtrialFibrillationFlutter__Initial_Population__F2F9D317_51D2_42B7_8136_481CF3D0D938"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENOM": {
      "conjunction?": true,
      "type": "DENOM",
      "hqmf_id": "6D2B4FB4-927B-4A06-AABD-5A8292456B13",
      "preconditions": [
        {
          "id": 4,
          "preconditions": [
            {
              "id": 3,
              "reference": "AnticoagulationTherapyforAtrialFibrillationFlutter__Denominator__F2F9D317_51D2_42B7_8136_481CF3D0D938"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "NUMER": {
      "conjunction?": true,
      "type": "NUMER",
      "hqmf_id": "6BB70950-043A-42EC-BE2F-220B07DD032B",
      "preconditions": [
        {
          "id": 6,
          "preconditions": [
            {
              "id": 5,
              "reference": "AnticoagulationTherapyforAtrialFibrillationFlutter__Numerator__F2F9D317_51D2_42B7_8136_481CF3D0D938"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENEXCEP": {
      "conjunction?": true,
      "type": "DENEXCEP",
      "hqmf_id": "FBEF99C5-E341-4787-A5BF-7CE998479227",
      "preconditions": [
        {
          "id": 8,
          "preconditions": [
            {
              "id": 7,
              "reference": "AnticoagulationTherapyforAtrialFibrillationFlutter__Denominator_Exceptions__F2F9D317_51D2_42B7_8136_481CF3D0D938"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    },
    "DENEX": {
      "conjunction?": true,
      "type": "DENEX",
      "hqmf_id": "E07B6982-75C9-4FB1-804D-1B1B58C368BD",
      "preconditions": [
        {
          "id": 10,
          "preconditions": [
            {
              "id": 9,
              "reference": "AnticoagulationTherapyforAtrialFibrillationFlutter__Denominator_Exclusions1__F2F9D317_51D2_42B7_8136_481CF3D0D938"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    }
  },
  "population_sets": [
    {
      "population_set_id": "PopulationCriteria1",
      "populations": {
        "DENEX": {
          "hqmf_id": "E07B6982-75C9-4FB1-804D-1B1B58C368BD",
          "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
          "statement_name": "Denominator Exclusions1"
        },
        "DENEXCEP": {
          "hqmf_id": "FBEF99C5-E341-4787-A5BF-7CE998479227",
          "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
          "statement_name": "Denominator Exceptions"
        },
        "DENOM": {
          "hqmf_id": "6D2B4FB4-927B-4A06-AABD-5A8292456B13",
          "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
          "statement_name": "Denominator"
        },
        "IPP": {
          "hqmf_id": "01B24ECE-AFD8-455A-8BD6-5A25E8140E29",
          "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
          "statement_name": "Initial Population"
        },
        "NUMER": {
          "hqmf_id": "6BB70950-043A-42EC-BE2F-220B07DD032B",
          "library_name": "AnticoagulationTherapyforAtrialFibrillationFlutter",
          "statement_name": "Numerator"
        },
        "_type": "CQM::ProportionPopulationMap"
      },
      "title": "Population Criteria Section"
    }
  ],
  "source_data_criteria": [
    {
      "codeListId": "2.16.840.1.114222.4.11.3591",
      "dataElementCodes": [

      ],
      "description": "Patient Characteristic Payer: Payer",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.58",
      "id": "5d289cdb31fe5f8b990524a7",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "payer",
      "qdmTitle": "Patient Characteristic Payer",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::PatientCharacteristicPayer"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.203",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Procedure, Performed: AtrialAblation",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.67",
      "id": "5d289cdb31fe5f8b990524a8",
      "incisionDatetime": null,
      "method": null,
      "negationRationale": null,
      "performer": null,
      "priority": null,
      "qdmCategory": "procedure",
      "qdmStatus": "performed",
      "qdmTitle": "Procedure, Performed",
      "qdmVersion": "5.5",
      "rank": null,
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "status": null,
      "_type": "QDM::ProcedurePerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "1.3.6.1.4.1.33895.1.3.0.45",
      "dataElementCodes": [

      ],
      "description": "Intervention, Order: ComfortMeasures",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.35",
      "id": "5d289cdb31fe5f8b990524a9",
      "negationRationale": null,
      "qdmCategory": "intervention",
      "qdmStatus": "order",
      "qdmTitle": "Intervention, Order",
      "qdmVersion": "5.5",
      "reason": null,
      "requester": null,
      "_type": "QDM::InterventionOrder"
    },
    {
      "authorDatetime": null,
      "codeListId": "1.3.6.1.4.1.33895.1.3.0.45",
      "dataElementCodes": [

      ],
      "description": "Intervention, Performed: ComfortMeasures",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.36",
      "id": "5d289cdb31fe5f8b990524aa",
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "intervention",
      "qdmStatus": "performed",
      "qdmTitle": "Intervention, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "status": null,
      "_type": "QDM::InterventionPerformed"
    },
    {
      "codeListId": "2.16.840.1.114222.4.11.837",
      "dataElementCodes": [

      ],
      "description": "Patient Characteristic Ethnicity: Ethnicity",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.56",
      "id": "5d289cdb31fe5f8b990524ab",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "ethnicity",
      "qdmTitle": "Patient Characteristic Ethnicity",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicEthnicity"
    },
    {
      "codeListId": "2.16.840.1.113762.1.4.1",
      "dataElementCodes": [

      ],
      "description": "Patient Characteristic Sex: ONCAdministrativeSex",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.55",
      "id": "5d289cdb31fe5f8b990524ac",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "gender",
      "qdmTitle": "Patient Characteristic Sex",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicSex"
    },
    {
      "admissionSource": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.424",
      "dataElementCodes": [

      ],
      "description": "Encounter, Performed: Non-ElectiveInpatientEncounter",
      "diagnoses": null,
      "dischargeDisposition": null,
      "facilityLocations": [

      ],
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.5",
      "id": "5d289cdb31fe5f8b990524ad",
      "lengthOfStay": null,
      "negationRationale": null,
      "participant": null,
      "priority": null,
      "qdmCategory": "encounter",
      "qdmStatus": "performed",
      "qdmTitle": "Encounter, Performed",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::EncounterPerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.200",
      "dataElementCodes": [

      ],
      "daysSupplied": null,
      "description": "Medication, Not Discharged: AnticoagulantTherapy",
      "dosage": null,
      "frequency": null,
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.48",
      "id": "5d289cdb31fe5f8b990524ae",
      "negationRationale": null,
      "prescriber": null,
      "qdmCategory": "medication",
      "qdmStatus": "discharge",
      "qdmTitle": "Medication, Discharge",
      "qdmVersion": "5.5",
      "recorder": null,
      "refills": null,
      "route": null,
      "supply": null,
      "_type": "QDM::MedicationDischarge"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.200",
      "dataElementCodes": [

      ],
      "daysSupplied": null,
      "description": "Medication, Discharge: AnticoagulantTherapy",
      "dosage": null,
      "frequency": null,
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.48",
      "id": "5d289cdb31fe5f8b990524af",
      "negationRationale": null,
      "prescriber": null,
      "qdmCategory": "medication",
      "qdmStatus": "discharge",
      "qdmTitle": "Medication, Discharge",
      "qdmVersion": "5.5",
      "recorder": null,
      "refills": null,
      "route": null,
      "supply": null,
      "_type": "QDM::MedicationDischarge"
    },
    {
      "codeListId": "2.16.840.1.114222.4.11.836",
      "dataElementCodes": [

      ],
      "description": "Patient Characteristic Race: Race",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.59",
      "id": "5d289cdb31fe5f8b990524b0",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "race",
      "qdmTitle": "Patient Characteristic Race",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicRace"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.202",
      "dataElementCodes": [

      ],
      "description": "Diagnosis: AtrialFibrillation/Flutter",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.110",
      "id": "5d289cdb31fe5f8b990524b1",
      "prevalencePeriod": null,
      "qdmCategory": "condition",
      "qdmTitle": "Diagnosis",
      "qdmVersion": "5.5",
      "qrdaOid": "2.16.840.1.113883.10.20.24.3.135",
      "recorder": null,
      "severity": null,
      "_type": "QDM::Diagnosis"
    },
    {
      "admissionSource": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.292",
      "dataElementCodes": [

      ],
      "description": "Encounter, Performed: EmergencyDepartmentVisit",
      "diagnoses": null,
      "dischargeDisposition": null,
      "facilityLocations": [

      ],
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.5",
      "id": "5d289cdb31fe5f8b990524b2",
      "lengthOfStay": null,
      "negationRationale": null,
      "participant": null,
      "priority": null,
      "qdmCategory": "encounter",
      "qdmStatus": "performed",
      "qdmTitle": "Encounter, Performed",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::EncounterPerformed"
    }
  ],
  "title": "Anticoagulation Therapy for Atrial Fibrillation/Flutter",
  "updated_at": null,
  "value_set_ids": [
    "5d289cdb31fe5f8b9905249c",
    "5d289cdb31fe5f8b9905249d",
    "5d289cdb31fe5f8b9905249e",
    "5d289cdb31fe5f8b9905249f",
    "5d289cdb31fe5f8b990524a0",
    "5d289cdb31fe5f8b990524a1",
    "5d289cdb31fe5f8b990524a2",
    "5d289cdb31fe5f8b990524a3",
    "5d289cdb31fe5f8b990524a4",
    "5d289cdb31fe5f8b990524a5",
    "5d289cdb31fe5f8b990524a6"
  ]
}