{
  "calculate_sdes": null,
  "calculation_method": "EPISODE_OF_CARE",
  "cms_id": "CMS105v7",
  "component": false,
  "component_hqmf_set_ids": [

  ],
  "composite": false,
  "composite_hqmf_set_id": null,
  "cql_libraries": [
    {
      "cql": "library DischargedonStatinMedication version '7.1.000'\r\n\r\nusing QDM version '5.3'\r\n\r\ninclude MATGlobalCommonFunctions version '2.0.000' called Global\r\ninclude TJC_Overall version '1.4.000' called TJC\r\n\r\nvalueset \"ONC Administrative Sex\": 'urn:oid:2.16.840.1.113762.1.4.1'\r\nvalueset \"Race\": 'urn:oid:2.16.840.1.114222.4.11.836'\r\nvalueset \"Ethnicity\": 'urn:oid:2.16.840.1.114222.4.11.837'\r\nvalueset \"Payer\": 'urn:oid:2.16.840.1.114222.4.11.3591'\r\nvalueset \"LDL-c\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.215'\r\nvalueset \"Medical Reason\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.473'\r\nvalueset \"Patient Refusal\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.93'\r\nvalueset \"Statin Allergen\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.423'\r\nvalueset \"Statin Grouper\": 'urn:oid:2.16.840.1.113762.1.4.1110.19'\r\n\r\ncontext Patient\r\n\r\ndefine \"SDE Ethnicity\":\r\n\t[\"Patient Characteristic Ethnicity\": \"Ethnicity\"]\r\n\r\ndefine \"SDE Payer\":\r\n\t[\"Patient Characteristic Payer\": \"Payer\"]\r\n\r\ndefine \"SDE Race\":\r\n\t[\"Patient Characteristic Race\": \"Race\"]\r\n\r\ndefine \"SDE Sex\":\r\n\t[\"Patient Characteristic Sex\": \"ONC Administrative Sex\"]\r\n\r\ndefine \"Statin Allergy\":\r\n\t[\"Allergy/Intolerance\": \"Statin Allergen\"]\r\n\r\ndefine \"Statin at Discharge\":\r\n\t[\"Medication, Discharge\": \"Statin Grouper\"]\r\n\r\ndefine \"Statin Not Given at Discharge\":\r\n\t[\"Medication, Not Discharged\": \"Statin Grouper\"] NoStatinDischarge\r\n\t\twhere NoStatinDischarge.negationRationale in \"Medical Reason\"\r\n\t\t\tor NoStatinDischarge.negationRationale in \"Patient Refusal\"\r\n\r\ndefine \"Denominator\":\r\n\tTJC.\"Ischemic Stroke Encounter\"\r\n\r\ndefine \"Initial Population\":\r\n\tTJC.\"Encounter with Principal Diagnosis and Age\"\r\n\r\ndefine \"Numerator\":\r\n\tTJC.\"Ischemic Stroke Encounter\" IschemicStrokeEncounter\r\n\t\twith \"Statin at Discharge\" DischargeStatin\r\n\t\t\tsuch that DischargeStatin.authorDatetime during IschemicStrokeEncounter.relevantPeriod\r\n\r\ndefine \"Encounter with Max LDL less than 70 mg per dL\":\r\n\tTJC.\"Ischemic Stroke Encounter\" IschemicStrokeEncounter\r\n\t\twhere Max([\"Laboratory Test, Performed\": \"LDL-c\"] Ldl\r\n\t\t\t\twhere Ldl.resultDatetime during Interval[Global.\"ToDate\"(start of IschemicStrokeEncounter.relevantPeriod - 30 days), end of IschemicStrokeEncounter.relevantPeriod]\r\n\t\t\t\treturn Ldl.result as Quantity\r\n\t\t)< 70 'mg/dL'\r\n\r\ndefine \"Denominator Exclusions\":\r\n\tTJC.\"Ischemic Stroke Encounters with Discharge Status\"\r\n\t\tunion TJC.\"Comfort Measures during Hospitalization\"\r\n\r\ndefine \"Denominator Exceptions\":\r\n\t( TJC.\"Ischemic Stroke Encounter\" IschemicStrokeEncounter\r\n\t\t\twith \"Statin Not Given at Discharge\" NoDischargeStatin\r\n\t\t\t\tsuch that NoDischargeStatin.authorDatetime during IschemicStrokeEncounter.relevantPeriod\r\n\t)\r\n\t\tunion ( TJC.\"Ischemic Stroke Encounter\" IschemicStrokeEncounter\r\n\t\t\t\twith \"Statin Allergy\" StatinAllergy\r\n\t\t\t\t\tsuch that StatinAllergy.prevalencePeriod starts on or before end of IschemicStrokeEncounter.relevantPeriod\r\n\t\t)\r\n\t\tunion \"Encounter with Max LDL less than 70 mg per dL\"\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "DischargedonStatinMedication",
            "version": "7.1.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "locator": "3:1-3:23",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_3",
                "version": "5.3"
              }
            ]
          },
          "includes": {
            "def": [
              {
                "localId": "2",
                "locator": "5:1-5:64",
                "localIdentifier": "Global",
                "path": "MATGlobalCommonFunctions",
                "version": "2.0.000"
              },
              {
                "localId": "3",
                "locator": "7:1-7:48",
                "localIdentifier": "TJC",
                "path": "TJC_Overall",
                "version": "1.4.000"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "4",
                "locator": "10:1-10:68",
                "name": "ONC Administrative Sex",
                "id": "2.16.840.1.113762.1.4.1",
                "accessLevel": "Public"
              },
              {
                "localId": "5",
                "locator": "11:1-11:53",
                "name": "Race",
                "id": "2.16.840.1.114222.4.11.836",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "locator": "12:1-12:58",
                "name": "Ethnicity",
                "id": "2.16.840.1.114222.4.11.837",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "13:1-13:55",
                "name": "Payer",
                "id": "2.16.840.1.114222.4.11.3591",
                "accessLevel": "Public"
              },
              {
                "localId": "8",
                "locator": "14:1-14:61",
                "name": "LDL-c",
                "id": "2.16.840.1.113883.3.117.1.7.1.215",
                "accessLevel": "Public"
              },
              {
                "localId": "9",
                "locator": "15:1-15:70",
                "name": "Medical Reason",
                "id": "2.16.840.1.113883.3.117.1.7.1.473",
                "accessLevel": "Public"
              },
              {
                "localId": "10",
                "locator": "16:1-16:70",
                "name": "Patient Refusal",
                "id": "2.16.840.1.113883.3.117.1.7.1.93",
                "accessLevel": "Public"
              },
              {
                "localId": "11",
                "locator": "17:1-17:71",
                "name": "Statin Allergen",
                "id": "2.16.840.1.113883.3.117.1.7.1.423",
                "accessLevel": "Public"
              },
              {
                "localId": "12",
                "locator": "18:1-18:66",
                "name": "Statin Grouper",
                "id": "2.16.840.1.113762.1.4.1110.19",
                "accessLevel": "Public"
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "22:1-22:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "22:1-22:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "14",
                "locator": "24:1-25:50",
                "name": "SDE Ethnicity",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "14",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Ethnicity\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "13",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Ethnicity\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Ethnicity\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "13",
                  "locator": "25:2-25:50",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicEthnicity",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Ethnicity",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "16",
                "locator": "27:1-28:42",
                "name": "SDE Payer",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "16",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Payer\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "15",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Payer\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Payer\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "15",
                  "locator": "28:2-28:42",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicPayer",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Payer",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "18",
                "locator": "30:1-31:40",
                "name": "SDE Race",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "18",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Race\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "17",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Race\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Race\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "17",
                  "locator": "31:2-31:40",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicRace",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Race",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "20",
                "locator": "33:1-34:57",
                "name": "SDE Sex",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "20",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Sex\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "19",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Sex\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"ONC Administrative Sex\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "19",
                  "locator": "34:2-34:57",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicSex",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "ONC Administrative Sex",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "22",
                "locator": "36:1-37:43",
                "name": "Statin Allergy",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "22",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Statin Allergy\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "21",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Allergy/Intolerance\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Statin Allergen\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "21",
                  "locator": "37:2-37:43",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}AllergyIntolerance",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Statin Allergen",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "24",
                "locator": "39:1-40:44",
                "name": "Statin at Discharge",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "24",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Statin at Discharge\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "23",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Medication, Discharge\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Statin Grouper\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "23",
                  "locator": "40:2-40:44",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveMedicationDischarge",
                  "templateId": "PositiveMedicationDischarge",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Statin Grouper",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "37",
                "locator": "42:1-45:62",
                "name": "Statin Not Given at Discharge",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "37",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Statin Not Given at Discharge\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "36",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "26",
                                  "s": [
                                    {
                                      "r": "25",
                                      "s": [
                                        {
                                          "r": "25",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Medication, Not Discharged\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Statin Grouper\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NoStatinDischarge"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "35",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "35",
                                  "s": [
                                    {
                                      "r": "30",
                                      "s": [
                                        {
                                          "r": "28",
                                          "s": [
                                            {
                                              "r": "27",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NoStatinDischarge"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "28",
                                              "s": [
                                                {
                                                  "value": [
                                                    "negationRationale"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "29",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Medical Reason\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tor "
                                      ]
                                    },
                                    {
                                      "r": "34",
                                      "s": [
                                        {
                                          "r": "32",
                                          "s": [
                                            {
                                              "r": "31",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NoStatinDischarge"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "32",
                                              "s": [
                                                {
                                                  "value": [
                                                    "negationRationale"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "33",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Patient Refusal\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "36",
                  "locator": "43:2-45:62",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "26",
                      "locator": "43:2-43:67",
                      "alias": "NoStatinDischarge",
                      "expression": {
                        "localId": "25",
                        "locator": "43:2-43:49",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}NegativeMedicationDischarge",
                        "templateId": "NegativeMedicationDischarge",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Statin Grouper",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "35",
                    "locator": "44:3-45:62",
                    "type": "Or",
                    "operand": [
                      {
                        "localId": "30",
                        "locator": "44:9-44:63",
                        "type": "InValueSet",
                        "code": {
                          "localId": "28",
                          "locator": "44:9-44:43",
                          "path": "negationRationale",
                          "scope": "NoStatinDischarge",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "29",
                          "locator": "44:48-44:63",
                          "name": "Medical Reason"
                        }
                      },
                      {
                        "localId": "34",
                        "locator": "45:7-45:62",
                        "type": "InValueSet",
                        "code": {
                          "localId": "32",
                          "locator": "45:7-45:41",
                          "path": "negationRationale",
                          "scope": "NoStatinDischarge",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "33",
                          "locator": "45:46-45:62",
                          "name": "Patient Refusal"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "40",
                "locator": "47:1-48:32",
                "name": "Denominator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "40",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "39",
                          "s": [
                            {
                              "r": "38",
                              "s": [
                                {
                                  "value": [
                                    "TJC"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "."
                              ]
                            },
                            {
                              "r": "39",
                              "s": [
                                {
                                  "value": [
                                    "\"Ischemic Stroke Encounter\""
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "39",
                  "locator": "48:2-48:32",
                  "name": "Ischemic Stroke Encounter",
                  "libraryName": "TJC",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "43",
                "locator": "50:1-51:49",
                "name": "Initial Population",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "43",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Initial Population\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "42",
                          "s": [
                            {
                              "r": "41",
                              "s": [
                                {
                                  "value": [
                                    "TJC"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "."
                              ]
                            },
                            {
                              "r": "42",
                              "s": [
                                {
                                  "value": [
                                    "\"Encounter with Principal Diagnosis and Age\""
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "42",
                  "locator": "51:2-51:49",
                  "name": "Encounter with Principal Diagnosis and Age",
                  "libraryName": "TJC",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "55",
                "locator": "53:1-56:89",
                "name": "Numerator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "55",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Numerator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "54",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "45",
                                  "s": [
                                    {
                                      "r": "44",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "TJC",
                                                ".",
                                                "\"Ischemic Stroke Encounter\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "IschemicStrokeEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "53",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "47",
                                  "s": [
                                    {
                                      "r": "46",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Statin at Discharge\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "DischargeStatin"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "52",
                                  "s": [
                                    {
                                      "r": "49",
                                      "s": [
                                        {
                                          "r": "48",
                                          "s": [
                                            {
                                              "value": [
                                                "DischargeStatin"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "49",
                                          "s": [
                                            {
                                              "value": [
                                                "authorDatetime"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "during",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "51",
                                      "s": [
                                        {
                                          "r": "50",
                                          "s": [
                                            {
                                              "value": [
                                                "IschemicStrokeEncounter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "51",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "54",
                  "locator": "54:2-56:89",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "45",
                      "locator": "54:2-54:56",
                      "alias": "IschemicStrokeEncounter",
                      "expression": {
                        "localId": "44",
                        "locator": "54:2-54:32",
                        "name": "Ischemic Stroke Encounter",
                        "libraryName": "TJC",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "53",
                      "locator": "55:3-56:89",
                      "alias": "DischargeStatin",
                      "type": "With",
                      "expression": {
                        "localId": "46",
                        "locator": "55:8-55:28",
                        "name": "Statin at Discharge",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "52",
                        "locator": "56:14-56:89",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "49",
                            "locator": "56:14-56:43",
                            "path": "authorDatetime",
                            "scope": "DischargeStatin",
                            "type": "Property"
                          },
                          {
                            "localId": "51",
                            "locator": "56:52-56:89",
                            "path": "relevantPeriod",
                            "scope": "IschemicStrokeEncounter",
                            "type": "Property"
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "84",
                "locator": "58:1-63:15",
                "name": "Encounter with Max LDL less than 70 mg per dL",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "84",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Encounter with Max LDL less than 70 mg per dL\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "83",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "57",
                                  "s": [
                                    {
                                      "r": "56",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "TJC",
                                                ".",
                                                "\"Ischemic Stroke Encounter\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "IschemicStrokeEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "82",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "82",
                                  "s": [
                                    {
                                      "r": "80",
                                      "s": [
                                        {
                                          "value": [
                                            "Max",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "79",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "59",
                                                  "s": [
                                                    {
                                                      "r": "58",
                                                      "s": [
                                                        {
                                                          "r": "58",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "[",
                                                                "\"Laboratory Test, Performed\"",
                                                                ": "
                                                              ]
                                                            },
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"LDL-c\""
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "Ldl"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "73",
                                              "s": [
                                                {
                                                  "value": [
                                                    "where "
                                                  ]
                                                },
                                                {
                                                  "r": "73",
                                                  "s": [
                                                    {
                                                      "r": "61",
                                                      "s": [
                                                        {
                                                          "r": "60",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Ldl"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "61",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "resultDatetime"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "during",
                                                        " "
                                                      ]
                                                    },
                                                    {
                                                      "r": "72",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Interval["
                                                          ]
                                                        },
                                                        {
                                                          "r": "68",
                                                          "s": [
                                                            {
                                                              "r": "62",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "Global"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "68",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"ToDate\"",
                                                                    "("
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "67",
                                                                  "s": [
                                                                    {
                                                                      "r": "65",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "start of "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "64",
                                                                          "s": [
                                                                            {
                                                                              "r": "63",
                                                                              "s": [
                                                                                {
                                                                                  "value": [
                                                                                    "IschemicStrokeEncounter"
                                                                                  ]
                                                                                }
                                                                              ]
                                                                            },
                                                                            {
                                                                              "value": [
                                                                                "."
                                                                              ]
                                                                            },
                                                                            {
                                                                              "r": "64",
                                                                              "s": [
                                                                                {
                                                                                  "value": [
                                                                                    "relevantPeriod"
                                                                                  ]
                                                                                }
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        " - "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "66",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "30 ",
                                                                            "days"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    ")"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            ", "
                                                          ]
                                                        },
                                                        {
                                                          "r": "71",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "end of "
                                                              ]
                                                            },
                                                            {
                                                              "r": "70",
                                                              "s": [
                                                                {
                                                                  "r": "69",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "IschemicStrokeEncounter"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "70",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "relevantPeriod"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "78",
                                              "s": [
                                                {
                                                  "value": [
                                                    "return "
                                                  ]
                                                },
                                                {
                                                  "r": "77",
                                                  "s": [
                                                    {
                                                      "r": "75",
                                                      "s": [
                                                        {
                                                          "r": "74",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Ldl"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "75",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "result"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " as "
                                                      ]
                                                    },
                                                    {
                                                      "r": "76",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Quantity"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t)"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "<",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "81",
                                      "s": [
                                        {
                                          "value": [
                                            "70 ",
                                            "'mg/dL'"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "83",
                  "locator": "59:2-63:15",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "57",
                      "locator": "59:2-59:56",
                      "alias": "IschemicStrokeEncounter",
                      "expression": {
                        "localId": "56",
                        "locator": "59:2-59:32",
                        "name": "Ischemic Stroke Encounter",
                        "libraryName": "TJC",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "82",
                    "locator": "60:3-63:15",
                    "type": "Less",
                    "operand": [
                      {
                        "localId": "80",
                        "locator": "60:9-63:3",
                        "type": "Max",
                        "source": {
                          "localId": "79",
                          "locator": "60:13-62:33",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "59",
                              "locator": "60:13-60:55",
                              "alias": "Ldl",
                              "expression": {
                                "localId": "58",
                                "locator": "60:13-60:51",
                                "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                                "templateId": "PositiveLaboratoryTestPerformed",
                                "codeProperty": "code",
                                "type": "Retrieve",
                                "codes": {
                                  "name": "LDL-c",
                                  "type": "ValueSetRef"
                                }
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "73",
                            "locator": "61:5-61:167",
                            "type": "In",
                            "operand": [
                              {
                                "localId": "61",
                                "locator": "61:11-61:28",
                                "path": "resultDatetime",
                                "scope": "Ldl",
                                "type": "Property"
                              },
                              {
                                "localId": "72",
                                "locator": "61:37-61:167",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "localId": "68",
                                  "locator": "61:46-61:119",
                                  "name": "ToDate",
                                  "libraryName": "Global",
                                  "type": "FunctionRef",
                                  "operand": [
                                    {
                                      "localId": "67",
                                      "locator": "61:62-61:118",
                                      "type": "Subtract",
                                      "operand": [
                                        {
                                          "localId": "65",
                                          "locator": "61:62-61:108",
                                          "type": "Start",
                                          "operand": {
                                            "localId": "64",
                                            "locator": "61:71-61:108",
                                            "path": "relevantPeriod",
                                            "scope": "IschemicStrokeEncounter",
                                            "type": "Property"
                                          }
                                        },
                                        {
                                          "localId": "66",
                                          "locator": "61:112-61:118",
                                          "value": 30,
                                          "unit": "days",
                                          "type": "Quantity"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "71",
                                  "locator": "61:122-61:166",
                                  "type": "End",
                                  "operand": {
                                    "localId": "70",
                                    "locator": "61:129-61:166",
                                    "path": "relevantPeriod",
                                    "scope": "IschemicStrokeEncounter",
                                    "type": "Property"
                                  }
                                }
                              }
                            ]
                          },
                          "return": {
                            "localId": "78",
                            "locator": "62:5-62:33",
                            "expression": {
                              "localId": "77",
                              "locator": "62:12-62:33",
                              "strict": false,
                              "type": "As",
                              "operand": {
                                "localId": "75",
                                "locator": "62:12-62:21",
                                "path": "result",
                                "scope": "Ldl",
                                "type": "Property"
                              },
                              "asTypeSpecifier": {
                                "localId": "76",
                                "locator": "62:26-62:33",
                                "name": "{urn:hl7-org:elm-types:r1}Quantity",
                                "type": "NamedTypeSpecifier"
                              }
                            }
                          }
                        }
                      },
                      {
                        "localId": "81",
                        "locator": "63:6-63:15",
                        "value": 70,
                        "unit": "mg/dL",
                        "type": "Quantity"
                      }
                    ]
                  }
                }
              },
              {
                "localId": "90",
                "locator": "65:1-67:53",
                "name": "Denominator Exclusions",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "90",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exclusions\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "89",
                          "s": [
                            {
                              "r": "86",
                              "s": [
                                {
                                  "r": "85",
                                  "s": [
                                    {
                                      "value": [
                                        "TJC"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "."
                                  ]
                                },
                                {
                                  "r": "86",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Ischemic Stroke Encounters with Discharge Status\""
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tunion "
                              ]
                            },
                            {
                              "r": "88",
                              "s": [
                                {
                                  "r": "87",
                                  "s": [
                                    {
                                      "value": [
                                        "TJC"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "."
                                  ]
                                },
                                {
                                  "r": "88",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Comfort Measures during Hospitalization\""
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "89",
                  "locator": "66:2-67:53",
                  "type": "Union",
                  "operand": [
                    {
                      "localId": "86",
                      "locator": "66:2-66:55",
                      "name": "Ischemic Stroke Encounters with Discharge Status",
                      "libraryName": "TJC",
                      "type": "ExpressionRef"
                    },
                    {
                      "localId": "88",
                      "locator": "67:9-67:53",
                      "name": "Comfort Measures during Hospitalization",
                      "libraryName": "TJC",
                      "type": "ExpressionRef"
                    }
                  ]
                }
              },
              {
                "localId": "117",
                "locator": "69:1-78:55",
                "name": "Denominator Exceptions",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "117",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exceptions\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "116",
                          "s": [
                            {
                              "r": "114",
                              "s": [
                                {
                                  "r": "101",
                                  "s": [
                                    {
                                      "value": [
                                        "( "
                                      ]
                                    },
                                    {
                                      "r": "101",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "r": "92",
                                              "s": [
                                                {
                                                  "r": "91",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "TJC",
                                                            ".",
                                                            "\"Ischemic Stroke Encounter\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "IschemicStrokeEncounter"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t\t"
                                          ]
                                        },
                                        {
                                          "r": "100",
                                          "s": [
                                            {
                                              "value": [
                                                "with "
                                              ]
                                            },
                                            {
                                              "r": "94",
                                              "s": [
                                                {
                                                  "r": "93",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Statin Not Given at Discharge\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "NoDischargeStatin"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\tsuch that "
                                              ]
                                            },
                                            {
                                              "r": "99",
                                              "s": [
                                                {
                                                  "r": "96",
                                                  "s": [
                                                    {
                                                      "r": "95",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "NoDischargeStatin"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "96",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "authorDatetime"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "during",
                                                    " "
                                                  ]
                                                },
                                                {
                                                  "r": "98",
                                                  "s": [
                                                    {
                                                      "r": "97",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "IschemicStrokeEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "98",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t)"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\tunion "
                                  ]
                                },
                                {
                                  "r": "113",
                                  "s": [
                                    {
                                      "value": [
                                        "( "
                                      ]
                                    },
                                    {
                                      "r": "113",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "r": "103",
                                              "s": [
                                                {
                                                  "r": "102",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "TJC",
                                                            ".",
                                                            "\"Ischemic Stroke Encounter\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "IschemicStrokeEncounter"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t\t\t"
                                          ]
                                        },
                                        {
                                          "r": "112",
                                          "s": [
                                            {
                                              "value": [
                                                "with "
                                              ]
                                            },
                                            {
                                              "r": "105",
                                              "s": [
                                                {
                                                  "r": "104",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Statin Allergy\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "StatinAllergy"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t\tsuch that "
                                              ]
                                            },
                                            {
                                              "r": "111",
                                              "s": [
                                                {
                                                  "r": "107",
                                                  "s": [
                                                    {
                                                      "r": "106",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "StatinAllergy"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "107",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "prevalencePeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "starts on or before",
                                                    " "
                                                  ]
                                                },
                                                {
                                                  "r": "110",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "end of "
                                                      ]
                                                    },
                                                    {
                                                      "r": "109",
                                                      "s": [
                                                        {
                                                          "r": "108",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "IschemicStrokeEncounter"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "109",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "relevantPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t)"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tunion "
                              ]
                            },
                            {
                              "r": "115",
                              "s": [
                                {
                                  "value": [
                                    "\"Encounter with Max LDL less than 70 mg per dL\""
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "116",
                  "locator": "70:2-78:55",
                  "type": "Union",
                  "operand": [
                    {
                      "localId": "114",
                      "locator": "70:2-77:3",
                      "type": "Union",
                      "operand": [
                        {
                          "localId": "101",
                          "locator": "70:2-73:2",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "92",
                              "locator": "70:4-70:58",
                              "alias": "IschemicStrokeEncounter",
                              "expression": {
                                "localId": "91",
                                "locator": "70:4-70:34",
                                "name": "Ischemic Stroke Encounter",
                                "libraryName": "TJC",
                                "type": "ExpressionRef"
                              }
                            }
                          ],
                          "relationship": [
                            {
                              "localId": "100",
                              "locator": "71:4-72:92",
                              "alias": "NoDischargeStatin",
                              "type": "With",
                              "expression": {
                                "localId": "93",
                                "locator": "71:9-71:39",
                                "name": "Statin Not Given at Discharge",
                                "type": "ExpressionRef"
                              },
                              "suchThat": {
                                "localId": "99",
                                "locator": "72:15-72:92",
                                "type": "In",
                                "operand": [
                                  {
                                    "localId": "96",
                                    "locator": "72:15-72:46",
                                    "path": "authorDatetime",
                                    "scope": "NoDischargeStatin",
                                    "type": "Property"
                                  },
                                  {
                                    "localId": "98",
                                    "locator": "72:55-72:92",
                                    "path": "relevantPeriod",
                                    "scope": "IschemicStrokeEncounter",
                                    "type": "Property"
                                  }
                                ]
                              }
                            }
                          ]
                        },
                        {
                          "localId": "113",
                          "locator": "74:9-77:3",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "103",
                              "locator": "74:11-74:65",
                              "alias": "IschemicStrokeEncounter",
                              "expression": {
                                "localId": "102",
                                "locator": "74:11-74:41",
                                "name": "Ischemic Stroke Encounter",
                                "libraryName": "TJC",
                                "type": "ExpressionRef"
                              }
                            }
                          ],
                          "relationship": [
                            {
                              "localId": "112",
                              "locator": "75:5-76:111",
                              "alias": "StatinAllergy",
                              "type": "With",
                              "expression": {
                                "localId": "104",
                                "locator": "75:10-75:25",
                                "name": "Statin Allergy",
                                "type": "ExpressionRef"
                              },
                              "suchThat": {
                                "localId": "111",
                                "locator": "76:16-76:111",
                                "type": "SameOrBefore",
                                "operand": [
                                  {
                                    "locator": "76:47-76:52",
                                    "type": "Start",
                                    "operand": {
                                      "localId": "107",
                                      "locator": "76:16-76:45",
                                      "path": "prevalencePeriod",
                                      "scope": "StatinAllergy",
                                      "type": "Property"
                                    }
                                  },
                                  {
                                    "localId": "110",
                                    "locator": "76:67-76:111",
                                    "type": "End",
                                    "operand": {
                                      "localId": "109",
                                      "locator": "76:74-76:111",
                                      "path": "relevantPeriod",
                                      "scope": "IschemicStrokeEncounter",
                                      "type": "Property"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "localId": "115",
                      "locator": "78:9-78:55",
                      "name": "Encounter with Max LDL less than 70 mg per dL",
                      "type": "ExpressionRef"
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Ethnicity\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Ethnicity\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Ethnicity\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "13"
                  }
                ],
                "ref_id": "14"
              }
            ],
            "define_name": "SDE Ethnicity"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Payer\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Payer\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Payer\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "15"
                  }
                ],
                "ref_id": "16"
              }
            ],
            "define_name": "SDE Payer"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Race\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Race\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Race\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "17"
                  }
                ],
                "ref_id": "18"
              }
            ],
            "define_name": "SDE Race"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Sex\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Sex\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"ONC Administrative Sex\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "19"
                  }
                ],
                "ref_id": "20"
              }
            ],
            "define_name": "SDE Sex"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Statin Allergy\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Allergy/Intolerance\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Statin Allergen\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "21"
                  }
                ],
                "ref_id": "22"
              }
            ],
            "define_name": "Statin Allergy"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Statin at Discharge\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Medication, Discharge\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Statin Grouper\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "23"
                  }
                ],
                "ref_id": "24"
              }
            ],
            "define_name": "Statin at Discharge"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Statin Not Given at Discharge\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Medication, Not Discharged\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Statin Grouper\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "25"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "25"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NoStatinDischarge"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "26"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NoStatinDischarge"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "27"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "negationRationale"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "28"
                                      }
                                    ],
                                    "ref_id": "28"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Medical Reason\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "29"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "30"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      or "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NoStatinDischarge"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "31"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "negationRationale"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "32"
                                      }
                                    ],
                                    "ref_id": "32"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Patient Refusal\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "33"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "34"
                              }
                            ],
                            "ref_id": "35"
                          }
                        ],
                        "ref_id": "35"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "36"
                  }
                ],
                "ref_id": "37"
              }
            ],
            "define_name": "Statin Not Given at Discharge"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "TJC"
                              }
                            ]
                          }
                        ],
                        "ref_id": "38"
                      },
                      {
                        "children": [
                          {
                            "text": "."
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Ischemic Stroke Encounter\""
                              }
                            ]
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "39"
                      }
                    ],
                    "node_type": "ExpressionRef",
                    "ref_id": "39"
                  }
                ],
                "ref_id": "40"
              }
            ],
            "define_name": "Denominator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Initial Population\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "TJC"
                              }
                            ]
                          }
                        ],
                        "ref_id": "41"
                      },
                      {
                        "children": [
                          {
                            "text": "."
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Encounter with Principal Diagnosis and Age\""
                              }
                            ]
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "42"
                      }
                    ],
                    "node_type": "ExpressionRef",
                    "ref_id": "42"
                  }
                ],
                "ref_id": "43"
              }
            ],
            "define_name": "Initial Population"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Numerator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "TJC.\"Ischemic Stroke Encounter\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "44"
                              },
                              {
                                "children": [
                                  {
                                    "text": " IschemicStrokeEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "45"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Statin at Discharge\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "46"
                              },
                              {
                                "children": [
                                  {
                                    "text": " DischargeStatin"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "47"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "DischargeStatin"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "48"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "authorDatetime"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "49"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "49"
                              },
                              {
                                "children": [
                                  {
                                    "text": " during "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "IschemicStrokeEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "50"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "51"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "51"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "52"
                          }
                        ],
                        "ref_id": "53"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "54"
                  }
                ],
                "ref_id": "55"
              }
            ],
            "define_name": "Numerator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Encounter with Max LDL less than 70 mg per dL\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "TJC.\"Ischemic Stroke Encounter\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "56"
                              },
                              {
                                "children": [
                                  {
                                    "text": " IschemicStrokeEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "57"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Max("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "[\"Laboratory Test, Performed\": "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"LDL-c\""
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Retrieve",
                                                    "ref_id": "58"
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "58"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " Ldl"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "59"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "where "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Ldl"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "60"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "resultDatetime"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "61"
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "61"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " during "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Interval["
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "Global"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "62"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"ToDate\"("
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "start of "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "children": [
                                                                              {
                                                                                "text": "IschemicStrokeEncounter"
                                                                              }
                                                                            ]
                                                                          }
                                                                        ],
                                                                        "ref_id": "63"
                                                                      },
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "."
                                                                          }
                                                                        ]
                                                                      },
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "children": [
                                                                              {
                                                                                "text": "relevantPeriod"
                                                                              }
                                                                            ]
                                                                          }
                                                                        ],
                                                                        "node_type": "Property",
                                                                        "ref_id": "64"
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "64"
                                                                  }
                                                                ],
                                                                "node_type": "Start",
                                                                "ref_id": "65"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": " - "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "30 days"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Quantity",
                                                                "ref_id": "66"
                                                              }
                                                            ],
                                                            "node_type": "Subtract",
                                                            "ref_id": "67"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": ")"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "68"
                                                      }
                                                    ],
                                                    "ref_id": "68"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": ", "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "end of "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "IschemicStrokeEncounter"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "69"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "relevantPeriod"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "70"
                                                          }
                                                        ],
                                                        "node_type": "Property",
                                                        "ref_id": "70"
                                                      }
                                                    ],
                                                    "ref_id": "71"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Interval",
                                                "ref_id": "72"
                                              }
                                            ],
                                            "ref_id": "73"
                                          }
                                        ],
                                        "ref_id": "73"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "return "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Ldl"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "74"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "result"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "75"
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "75"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " as "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Quantity"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "76"
                                              }
                                            ],
                                            "node_type": "As",
                                            "ref_id": "77"
                                          }
                                        ],
                                        "ref_id": "78"
                                      }
                                    ],
                                    "ref_id": "79"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n    )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Max",
                                "ref_id": "80"
                              },
                              {
                                "children": [
                                  {
                                    "text": "&lt; "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "70 'mg/dL'"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Quantity",
                                "ref_id": "81"
                              }
                            ],
                            "ref_id": "82"
                          }
                        ],
                        "ref_id": "82"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "83"
                  }
                ],
                "ref_id": "84"
              }
            ],
            "define_name": "Encounter with Max LDL less than 70 mg per dL"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator Exclusions\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "TJC"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "85"
                          },
                          {
                            "children": [
                              {
                                "text": "."
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Ischemic Stroke Encounters with Discharge Status\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "86"
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "86"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    union "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "TJC"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "87"
                          },
                          {
                            "children": [
                              {
                                "text": "."
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Comfort Measures during Hospitalization\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "88"
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "88"
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "89"
                  }
                ],
                "ref_id": "90"
              }
            ],
            "define_name": "Denominator Exclusions"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator Exceptions\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "( "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "TJC.\"Ischemic Stroke Encounter\""
                                                      }
                                                    ]
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ExpressionRef",
                                            "ref_id": "91"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " IschemicStrokeEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "92"
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n      "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "with "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Statin Not Given at Discharge\""
                                                      }
                                                    ]
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ExpressionRef",
                                            "ref_id": "93"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " NoDischargeStatin"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "94"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        such that "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "NoDischargeStatin"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "95"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "authorDatetime"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "96"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "96"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " during "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "IschemicStrokeEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "97"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "98"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "98"
                                          }
                                        ],
                                        "node_type": "In",
                                        "ref_id": "99"
                                      }
                                    ],
                                    "ref_id": "100"
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "101"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n  )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Query",
                            "ref_id": "101"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    union "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "( "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "TJC.\"Ischemic Stroke Encounter\""
                                                      }
                                                    ]
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ExpressionRef",
                                            "ref_id": "102"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " IschemicStrokeEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "103"
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n        "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "with "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Statin Allergy\""
                                                      }
                                                    ]
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ExpressionRef",
                                            "ref_id": "104"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " StatinAllergy"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "105"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n          such that "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "StatinAllergy"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "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": "IschemicStrokeEncounter"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "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"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n    )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Query",
                            "ref_id": "113"
                          }
                        ],
                        "node_type": "Union",
                        "ref_id": "114"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    union "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Encounter with Max LDL less than 70 mg per dL\""
                              }
                            ]
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "115"
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "116"
                  }
                ],
                "ref_id": "117"
              }
            ],
            "define_name": "Denominator Exceptions"
          }
        ],
        "identifier": {
          "id": "DischargedonStatinMedication",
          "version": "7.1.000"
        }
      },
      "is_main_library": true,
      "is_top_level": true,
      "library_name": "DischargedonStatinMedication",
      "library_version": "7.1.000",
      "statement_dependencies": [
        {
          "statement_name": "Patient"
        },
        {
          "statement_name": "SDE Ethnicity"
        },
        {
          "statement_name": "SDE Payer"
        },
        {
          "statement_name": "SDE Race"
        },
        {
          "statement_name": "SDE Sex"
        },
        {
          "statement_name": "Statin Allergy"
        },
        {
          "statement_name": "Statin at Discharge"
        },
        {
          "statement_name": "Statin Not Given at Discharge"
        },
        {
          "statement_name": "Denominator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            }
          ]
        },
        {
          "statement_name": "Initial Population",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Encounter with Principal Diagnosis and Age"
            }
          ]
        },
        {
          "statement_name": "Numerator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "DischargedonStatinMedication",
              "statement_name": "Statin at Discharge"
            }
          ]
        },
        {
          "statement_name": "Encounter with Max LDL less than 70 mg per dL",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "ToDate"
            }
          ]
        },
        {
          "statement_name": "Denominator Exclusions",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounters with Discharge Status"
            },
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Comfort Measures during Hospitalization"
            }
          ]
        },
        {
          "statement_name": "Denominator Exceptions",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "DischargedonStatinMedication",
              "statement_name": "Statin Not Given at Discharge"
            },
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "DischargedonStatinMedication",
              "statement_name": "Statin Allergy"
            },
            {
              "hqmf_id": null,
              "library_name": "DischargedonStatinMedication",
              "statement_name": "Encounter with Max LDL less than 70 mg per dL"
            }
          ]
        }
      ]
    },
    {
      "cql": "library TJC_Overall version '1.4.000'\r\n\r\nusing QDM version '5.3'\r\n\r\ninclude MATGlobalCommonFunctions version '2.0.000' called Global\r\n\r\ncodesystem \"LOINC:2.46\": 'urn:oid:2.16.840.1.113883.6.1' version 'urn:hl7:version:2.46'\r\ncodesystem \"SNOMEDCT:2016-03\": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2016-03'\r\n\r\nvalueset \"Encounter Inpatient\": 'urn:oid:2.16.840.1.113883.3.666.5.307'\r\nvalueset \"Non-Elective Inpatient Encounter\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.424'\r\nvalueset \"Ischemic Stroke\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.247'\r\nvalueset \"Hemorrhagic Stroke\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.212'\r\nvalueset \"Comfort Measures\": 'urn:oid:1.3.6.1.4.1.33895.1.3.0.45'\r\nvalueset \"Emergency Department Visit\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.292'\r\nvalueset \"Left Against Medical Advice\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.308'\r\nvalueset \"Discharged to Health Care Facility for Hospice Care\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.207'\r\nvalueset \"Patient Expired\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.309'\r\nvalueset \"Discharge To Acute Care Facility\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.87'\r\nvalueset \"Discharged to Home for Hospice Care\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.209'\r\n\r\ncode \"Birthdate\": '21112-8' from \"LOINC:2.46\" display 'Birth date'\r\ncode \"Dead\": '419099009' from \"SNOMEDCT:2016-03\" display 'Dead'\r\n\r\nparameter \"Measurement Period\" Interval<DateTime>\r\n\r\ncontext Patient\r\n\r\ndefine \"Intervention Comfort Measures\":\r\n\t[\"Intervention, Order\": \"Comfort Measures\"]\r\n\t\tunion [\"Intervention, Performed\": \"Comfort Measures\"]\r\n\r\ndefine \"All Stroke Encounter\":\r\n\t\"Non Elective Inpatient Encounter\" NonElectiveEncounter\r\n\t\twhere NonElectiveEncounter.principalDiagnosis in \"Hemorrhagic Stroke\"\r\n\t\t\tor NonElectiveEncounter.principalDiagnosis in \"Ischemic Stroke\"\r\n\r\ndefine \"Ischemic Stroke Encounter\":\r\n\t\"Encounter with Principal Diagnosis and Age\" EncounterWithAge\r\n\t\twhere EncounterWithAge.principalDiagnosis in \"Ischemic Stroke\"\r\n\r\ndefine \"Ischemic Stroke Encounters with Discharge Status\":\r\n\t( ( \"Ischemic Stroke Encounter\" IschemicStrokeEncounter\r\n\t\t\t\twhere IschemicStrokeEncounter.dischargeDisposition in \"Discharge To Acute Care Facility\"\r\n\t\t\t\t\tor IschemicStrokeEncounter.dischargeDisposition in \"Left Against Medical Advice\"\r\n\t\t\t\t\tor IschemicStrokeEncounter.dischargeDisposition in \"Patient Expired\"\r\n\t\t\t\t\tor IschemicStrokeEncounter.dischargeDisposition in \"Discharged to Home for Hospice Care\"\r\n\t\t\t\t\tor IschemicStrokeEncounter.dischargeDisposition in \"Discharged to Health Care Facility for Hospice Care\"\r\n\t\t)\r\n\t)\r\n\r\ndefine \"Comfort Measures during Hospitalization\":\r\n\t\"Ischemic Stroke Encounter\" IschemicStrokeEncounter\r\n\t\twith \"Intervention Comfort Measures\" ComfortMeasure\r\n\t\t\tsuch that Coalesce(start of ComfortMeasure.relevantPeriod, ComfortMeasure.authorDatetime)during Global.\"Hospitalization\"(IschemicStrokeEncounter)\r\n\r\ndefine \"Encounter with Principal Diagnosis and Age\":\r\n\t\"All Stroke Encounter\" AllStrokeEncounter\r\n\t\twith [\"Patient Characteristic Birthdate\"] BirthDate\r\n\t\t\tsuch that Global.\"CalendarAgeInYearsAt\"(BirthDate.birthDatetime, start of AllStrokeEncounter.relevantPeriod)>= 18\r\n\r\ndefine \"Non Elective Inpatient Encounter\":\r\n\t[\"Encounter, Performed\": \"Non-Elective Inpatient Encounter\"] NonElectiveEncounter\r\n\t\twhere Global.\"LengthInDays\"(NonElectiveEncounter.relevantPeriod)<= 120\r\n\t\t\tand NonElectiveEncounter.relevantPeriod ends during \"Measurement Period\"\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "TJC_Overall",
            "version": "1.4.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "locator": "3:1-3:23",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_3",
                "version": "5.3"
              }
            ]
          },
          "includes": {
            "def": [
              {
                "localId": "2",
                "locator": "5:1-5:64",
                "localIdentifier": "Global",
                "path": "MATGlobalCommonFunctions",
                "version": "2.0.000"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "22",
                "locator": "25:1-25:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "21",
                  "locator": "25:32-25:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "20",
                    "locator": "25:41-25:48",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "codeSystems": {
            "def": [
              {
                "localId": "3",
                "locator": "7:1-7:87",
                "name": "LOINC:2.46",
                "id": "2.16.840.1.113883.6.1",
                "version": "urn:hl7:version:2.46",
                "accessLevel": "Public"
              },
              {
                "localId": "4",
                "locator": "8:1-8:97",
                "name": "SNOMEDCT:2016-03",
                "id": "2.16.840.1.113883.6.96",
                "version": "urn:hl7:version:2016-03",
                "accessLevel": "Public"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "5",
                "locator": "10:1-10:71",
                "name": "Encounter Inpatient",
                "id": "2.16.840.1.113883.3.666.5.307",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "locator": "11:1-11:88",
                "name": "Non-Elective Inpatient Encounter",
                "id": "2.16.840.1.113883.3.117.1.7.1.424",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "12:1-12:71",
                "name": "Ischemic Stroke",
                "id": "2.16.840.1.113883.3.117.1.7.1.247",
                "accessLevel": "Public"
              },
              {
                "localId": "8",
                "locator": "13:1-13:74",
                "name": "Hemorrhagic Stroke",
                "id": "2.16.840.1.113883.3.117.1.7.1.212",
                "accessLevel": "Public"
              },
              {
                "localId": "9",
                "locator": "14:1-14:65",
                "name": "Comfort Measures",
                "id": "1.3.6.1.4.1.33895.1.3.0.45",
                "accessLevel": "Public"
              },
              {
                "localId": "10",
                "locator": "15:1-15:82",
                "name": "Emergency Department Visit",
                "id": "2.16.840.1.113883.3.117.1.7.1.292",
                "accessLevel": "Public"
              },
              {
                "localId": "11",
                "locator": "16:1-16:83",
                "name": "Left Against Medical Advice",
                "id": "2.16.840.1.113883.3.117.1.7.1.308",
                "accessLevel": "Public"
              },
              {
                "localId": "12",
                "locator": "17:1-17:107",
                "name": "Discharged to Health Care Facility for Hospice Care",
                "id": "2.16.840.1.113883.3.117.1.7.1.207",
                "accessLevel": "Public"
              },
              {
                "localId": "13",
                "locator": "18:1-18:71",
                "name": "Patient Expired",
                "id": "2.16.840.1.113883.3.117.1.7.1.309",
                "accessLevel": "Public"
              },
              {
                "localId": "14",
                "locator": "19:1-19:87",
                "name": "Discharge To Acute Care Facility",
                "id": "2.16.840.1.113883.3.117.1.7.1.87",
                "accessLevel": "Public"
              },
              {
                "localId": "15",
                "locator": "20:1-20:91",
                "name": "Discharged to Home for Hospice Care",
                "id": "2.16.840.1.113883.3.117.1.7.1.209",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "17",
                "locator": "22:1-22:66",
                "name": "Birthdate",
                "id": "21112-8",
                "display": "Birth date",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "16",
                  "locator": "22:34-22:45",
                  "name": "LOINC:2.46"
                }
              },
              {
                "localId": "19",
                "locator": "23:1-23:63",
                "name": "Dead",
                "id": "419099009",
                "display": "Dead",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "18",
                  "locator": "23:31-23:48",
                  "name": "SNOMEDCT:2016-03"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "27:1-27:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "27:1-27:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "26",
                "locator": "29:1-31:55",
                "name": "Intervention Comfort Measures",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "26",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Intervention Comfort Measures\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "25",
                          "s": [
                            {
                              "r": "23",
                              "s": [
                                {
                                  "value": [
                                    "[",
                                    "\"Intervention, Order\"",
                                    ": "
                                  ]
                                },
                                {
                                  "s": [
                                    {
                                      "value": [
                                        "\"Comfort Measures\""
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "]"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tunion "
                              ]
                            },
                            {
                              "r": "24",
                              "s": [
                                {
                                  "value": [
                                    "[",
                                    "\"Intervention, Performed\"",
                                    ": "
                                  ]
                                },
                                {
                                  "s": [
                                    {
                                      "value": [
                                        "\"Comfort Measures\""
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "]"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "25",
                  "locator": "30:2-31:55",
                  "type": "Union",
                  "operand": [
                    {
                      "locator": "30:2-30:44",
                      "type": "As",
                      "operand": {
                        "localId": "23",
                        "locator": "30:2-30:44",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionOrder",
                        "templateId": "PositiveInterventionOrder",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Comfort Measures",
                          "type": "ValueSetRef"
                        }
                      },
                      "asTypeSpecifier": {
                        "type": "ListTypeSpecifier",
                        "elementType": {
                          "type": [
                            {
                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionPerformed",
                              "type": "NamedTypeSpecifier"
                            },
                            {
                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionOrder",
                              "type": "NamedTypeSpecifier"
                            }
                          ]
                        }
                      }
                    },
                    {
                      "locator": "31:9-31:55",
                      "type": "As",
                      "operand": {
                        "localId": "24",
                        "locator": "31:9-31:55",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionPerformed",
                        "templateId": "PositiveInterventionPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Comfort Measures",
                          "type": "ValueSetRef"
                        }
                      },
                      "asTypeSpecifier": {
                        "type": "ListTypeSpecifier",
                        "elementType": {
                          "type": [
                            {
                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionPerformed",
                              "type": "NamedTypeSpecifier"
                            },
                            {
                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionOrder",
                              "type": "NamedTypeSpecifier"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              },
              {
                "localId": "41",
                "locator": "62:1-65:75",
                "name": "Non Elective Inpatient Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "41",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Non Elective Inpatient Encounter\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "40",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "28",
                                  "s": [
                                    {
                                      "r": "27",
                                      "s": [
                                        {
                                          "r": "27",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Encounter, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Non-Elective Inpatient Encounter\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "39",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "39",
                                  "s": [
                                    {
                                      "r": "34",
                                      "s": [
                                        {
                                          "r": "32",
                                          "s": [
                                            {
                                              "r": "29",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "32",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"LengthInDays\"",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "31",
                                                  "s": [
                                                    {
                                                      "r": "30",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "NonElectiveEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "31",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "<=",
                                            " ",
                                            "120"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "38",
                                      "s": [
                                        {
                                          "r": "36",
                                          "s": [
                                            {
                                              "r": "35",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "36",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "ends during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "37",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "40",
                  "locator": "63:2-65:75",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "28",
                      "locator": "63:2-63:82",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "27",
                        "locator": "63:2-63:61",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                        "templateId": "PositiveEncounterPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Non-Elective Inpatient Encounter",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "39",
                    "locator": "64:3-65:75",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "34",
                        "locator": "64:9-64:72",
                        "type": "LessOrEqual",
                        "operand": [
                          {
                            "localId": "32",
                            "locator": "64:9-64:66",
                            "name": "LengthInDays",
                            "libraryName": "Global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "31",
                                "locator": "64:31-64:65",
                                "path": "relevantPeriod",
                                "scope": "NonElectiveEncounter",
                                "type": "Property"
                              }
                            ]
                          },
                          {
                            "localId": "33",
                            "locator": "64:70-64:72",
                            "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                            "value": "120",
                            "type": "Literal"
                          }
                        ]
                      },
                      {
                        "localId": "38",
                        "locator": "65:8-65:75",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "65:44-65:47",
                            "type": "End",
                            "operand": {
                              "localId": "36",
                              "locator": "65:8-65:42",
                              "path": "relevantPeriod",
                              "scope": "NonElectiveEncounter",
                              "type": "Property"
                            }
                          },
                          {
                            "localId": "37",
                            "locator": "65:56-65:75",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "54",
                "locator": "33:1-36:66",
                "name": "All Stroke Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "54",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"All Stroke Encounter\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "53",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "43",
                                  "s": [
                                    {
                                      "r": "42",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Non Elective Inpatient Encounter\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "NonElectiveEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "52",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "52",
                                  "s": [
                                    {
                                      "r": "47",
                                      "s": [
                                        {
                                          "r": "45",
                                          "s": [
                                            {
                                              "r": "44",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "45",
                                              "s": [
                                                {
                                                  "value": [
                                                    "principalDiagnosis"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "46",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Hemorrhagic Stroke\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tor "
                                      ]
                                    },
                                    {
                                      "r": "51",
                                      "s": [
                                        {
                                          "r": "49",
                                          "s": [
                                            {
                                              "r": "48",
                                              "s": [
                                                {
                                                  "value": [
                                                    "NonElectiveEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "49",
                                              "s": [
                                                {
                                                  "value": [
                                                    "principalDiagnosis"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "50",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Ischemic Stroke\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "53",
                  "locator": "34:2-36:66",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "43",
                      "locator": "34:2-34:56",
                      "alias": "NonElectiveEncounter",
                      "expression": {
                        "localId": "42",
                        "locator": "34:2-34:35",
                        "name": "Non Elective Inpatient Encounter",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "52",
                    "locator": "35:3-36:66",
                    "type": "Or",
                    "operand": [
                      {
                        "localId": "47",
                        "locator": "35:9-35:71",
                        "type": "InValueSet",
                        "code": {
                          "localId": "45",
                          "locator": "35:9-35:47",
                          "path": "principalDiagnosis",
                          "scope": "NonElectiveEncounter",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "46",
                          "locator": "35:52-35:71",
                          "name": "Hemorrhagic Stroke"
                        }
                      },
                      {
                        "localId": "51",
                        "locator": "36:7-36:66",
                        "type": "InValueSet",
                        "code": {
                          "localId": "49",
                          "locator": "36:7-36:45",
                          "path": "principalDiagnosis",
                          "scope": "NonElectiveEncounter",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "50",
                          "locator": "36:50-36:66",
                          "name": "Ischemic Stroke"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "70",
                "locator": "57:1-60:116",
                "name": "Encounter with Principal Diagnosis and Age",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "70",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Encounter with Principal Diagnosis and Age\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "69",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "56",
                                  "s": [
                                    {
                                      "r": "55",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"All Stroke Encounter\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "AllStrokeEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "68",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "58",
                                  "s": [
                                    {
                                      "r": "57",
                                      "s": [
                                        {
                                          "r": "57",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Patient Characteristic Birthdate\"",
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "BirthDate"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "67",
                                  "s": [
                                    {
                                      "r": "65",
                                      "s": [
                                        {
                                          "r": "59",
                                          "s": [
                                            {
                                              "value": [
                                                "Global"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "65",
                                          "s": [
                                            {
                                              "value": [
                                                "\"CalendarAgeInYearsAt\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "61",
                                              "s": [
                                                {
                                                  "r": "60",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "BirthDate"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "61",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "birthDatetime"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ", "
                                              ]
                                            },
                                            {
                                              "r": "64",
                                              "s": [
                                                {
                                                  "value": [
                                                    "start of "
                                                  ]
                                                },
                                                {
                                                  "r": "63",
                                                  "s": [
                                                    {
                                                      "r": "62",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "AllStrokeEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "63",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ">=",
                                        " ",
                                        "18"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "69",
                  "locator": "58:2-60:116",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "56",
                      "locator": "58:2-58:42",
                      "alias": "AllStrokeEncounter",
                      "expression": {
                        "localId": "55",
                        "locator": "58:2-58:23",
                        "name": "All Stroke Encounter",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "68",
                      "locator": "59:3-60:116",
                      "alias": "BirthDate",
                      "type": "With",
                      "expression": {
                        "localId": "57",
                        "locator": "59:8-59:43",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicBirthdate",
                        "type": "Retrieve"
                      },
                      "suchThat": {
                        "localId": "67",
                        "locator": "60:14-60:116",
                        "type": "GreaterOrEqual",
                        "operand": [
                          {
                            "localId": "65",
                            "locator": "60:14-60:111",
                            "name": "CalendarAgeInYearsAt",
                            "libraryName": "Global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "61",
                                "locator": "60:44-60:66",
                                "path": "birthDatetime",
                                "scope": "BirthDate",
                                "type": "Property"
                              },
                              {
                                "localId": "64",
                                "locator": "60:69-60:110",
                                "type": "Start",
                                "operand": {
                                  "localId": "63",
                                  "locator": "60:78-60:110",
                                  "path": "relevantPeriod",
                                  "scope": "AllStrokeEncounter",
                                  "type": "Property"
                                }
                              }
                            ]
                          },
                          {
                            "localId": "66",
                            "locator": "60:115-60:116",
                            "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                            "value": "18",
                            "type": "Literal"
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "78",
                "locator": "38:1-40:64",
                "name": "Ischemic Stroke Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "78",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Ischemic Stroke Encounter\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "77",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "72",
                                  "s": [
                                    {
                                      "r": "71",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Encounter with Principal Diagnosis and Age\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "EncounterWithAge"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "76",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "76",
                                  "s": [
                                    {
                                      "r": "74",
                                      "s": [
                                        {
                                          "r": "73",
                                          "s": [
                                            {
                                              "value": [
                                                "EncounterWithAge"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "74",
                                          "s": [
                                            {
                                              "value": [
                                                "principalDiagnosis"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " in "
                                      ]
                                    },
                                    {
                                      "r": "75",
                                      "s": [
                                        {
                                          "value": [
                                            "\"Ischemic Stroke\""
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "77",
                  "locator": "39:2-40:64",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "72",
                      "locator": "39:2-39:62",
                      "alias": "EncounterWithAge",
                      "expression": {
                        "localId": "71",
                        "locator": "39:2-39:45",
                        "name": "Encounter with Principal Diagnosis and Age",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "76",
                    "locator": "40:3-40:64",
                    "type": "InValueSet",
                    "code": {
                      "localId": "74",
                      "locator": "40:9-40:43",
                      "path": "principalDiagnosis",
                      "scope": "EncounterWithAge",
                      "type": "Property"
                    },
                    "valueset": {
                      "localId": "75",
                      "locator": "40:48-40:64",
                      "name": "Ischemic Stroke"
                    }
                  }
                }
              },
              {
                "localId": "106",
                "locator": "42:1-50:2",
                "name": "Ischemic Stroke Encounters with Discharge Status",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "106",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Ischemic Stroke Encounters with Discharge Status\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "105",
                          "s": [
                            {
                              "value": [
                                "( "
                              ]
                            },
                            {
                              "r": "105",
                              "s": [
                                {
                                  "value": [
                                    "( "
                                  ]
                                },
                                {
                                  "r": "105",
                                  "s": [
                                    {
                                      "s": [
                                        {
                                          "r": "80",
                                          "s": [
                                            {
                                              "r": "79",
                                              "s": [
                                                {
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Ischemic Stroke Encounter\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " ",
                                                "IschemicStrokeEncounter"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\t\t"
                                      ]
                                    },
                                    {
                                      "r": "104",
                                      "s": [
                                        {
                                          "value": [
                                            "where "
                                          ]
                                        },
                                        {
                                          "r": "104",
                                          "s": [
                                            {
                                              "r": "99",
                                              "s": [
                                                {
                                                  "r": "94",
                                                  "s": [
                                                    {
                                                      "r": "89",
                                                      "s": [
                                                        {
                                                          "r": "84",
                                                          "s": [
                                                            {
                                                              "r": "82",
                                                              "s": [
                                                                {
                                                                  "r": "81",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "IschemicStrokeEncounter"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "82",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "dischargeDisposition"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " in "
                                                              ]
                                                            },
                                                            {
                                                              "r": "83",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Discharge To Acute Care Facility\""
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\n\t\t\t\t\tor "
                                                          ]
                                                        },
                                                        {
                                                          "r": "88",
                                                          "s": [
                                                            {
                                                              "r": "86",
                                                              "s": [
                                                                {
                                                                  "r": "85",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "IschemicStrokeEncounter"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "86",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "dischargeDisposition"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " in "
                                                              ]
                                                            },
                                                            {
                                                              "r": "87",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Left Against Medical Advice\""
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t\t\tor "
                                                      ]
                                                    },
                                                    {
                                                      "r": "93",
                                                      "s": [
                                                        {
                                                          "r": "91",
                                                          "s": [
                                                            {
                                                              "r": "90",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "IschemicStrokeEncounter"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "91",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "dischargeDisposition"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " in "
                                                          ]
                                                        },
                                                        {
                                                          "r": "92",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Patient Expired\""
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t\tor "
                                                  ]
                                                },
                                                {
                                                  "r": "98",
                                                  "s": [
                                                    {
                                                      "r": "96",
                                                      "s": [
                                                        {
                                                          "r": "95",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "IschemicStrokeEncounter"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "96",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "dischargeDisposition"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " in "
                                                      ]
                                                    },
                                                    {
                                                      "r": "97",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Discharged to Home for Hospice Care\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t\tor "
                                              ]
                                            },
                                            {
                                              "r": "103",
                                              "s": [
                                                {
                                                  "r": "101",
                                                  "s": [
                                                    {
                                                      "r": "100",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "IschemicStrokeEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "101",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "dischargeDisposition"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " in "
                                                  ]
                                                },
                                                {
                                                  "r": "102",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Discharged to Health Care Facility for Hospice Care\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t)"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t)"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "105",
                  "locator": "43:2-50:2",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "80",
                      "locator": "43:6-43:56",
                      "alias": "IschemicStrokeEncounter",
                      "expression": {
                        "localId": "79",
                        "locator": "43:6-43:32",
                        "name": "Ischemic Stroke Encounter",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "104",
                    "locator": "44:5-48:109",
                    "type": "Or",
                    "operand": [
                      {
                        "localId": "99",
                        "locator": "44:11-47:93",
                        "type": "Or",
                        "operand": [
                          {
                            "localId": "94",
                            "locator": "44:11-46:73",
                            "type": "Or",
                            "operand": [
                              {
                                "localId": "89",
                                "locator": "44:11-45:85",
                                "type": "Or",
                                "operand": [
                                  {
                                    "localId": "84",
                                    "locator": "44:11-44:92",
                                    "type": "InValueSet",
                                    "code": {
                                      "localId": "82",
                                      "locator": "44:11-44:54",
                                      "path": "dischargeDisposition",
                                      "scope": "IschemicStrokeEncounter",
                                      "type": "Property"
                                    },
                                    "valueset": {
                                      "localId": "83",
                                      "locator": "44:59-44:92",
                                      "name": "Discharge To Acute Care Facility"
                                    }
                                  },
                                  {
                                    "localId": "88",
                                    "locator": "45:9-45:85",
                                    "type": "InValueSet",
                                    "code": {
                                      "localId": "86",
                                      "locator": "45:9-45:52",
                                      "path": "dischargeDisposition",
                                      "scope": "IschemicStrokeEncounter",
                                      "type": "Property"
                                    },
                                    "valueset": {
                                      "localId": "87",
                                      "locator": "45:57-45:85",
                                      "name": "Left Against Medical Advice"
                                    }
                                  }
                                ]
                              },
                              {
                                "localId": "93",
                                "locator": "46:9-46:73",
                                "type": "InValueSet",
                                "code": {
                                  "localId": "91",
                                  "locator": "46:9-46:52",
                                  "path": "dischargeDisposition",
                                  "scope": "IschemicStrokeEncounter",
                                  "type": "Property"
                                },
                                "valueset": {
                                  "localId": "92",
                                  "locator": "46:57-46:73",
                                  "name": "Patient Expired"
                                }
                              }
                            ]
                          },
                          {
                            "localId": "98",
                            "locator": "47:9-47:93",
                            "type": "InValueSet",
                            "code": {
                              "localId": "96",
                              "locator": "47:9-47:52",
                              "path": "dischargeDisposition",
                              "scope": "IschemicStrokeEncounter",
                              "type": "Property"
                            },
                            "valueset": {
                              "localId": "97",
                              "locator": "47:57-47:93",
                              "name": "Discharged to Home for Hospice Care"
                            }
                          }
                        ]
                      },
                      {
                        "localId": "103",
                        "locator": "48:9-48:109",
                        "type": "InValueSet",
                        "code": {
                          "localId": "101",
                          "locator": "48:9-48:52",
                          "path": "dischargeDisposition",
                          "scope": "IschemicStrokeEncounter",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "102",
                          "locator": "48:57-48:109",
                          "name": "Discharged to Health Care Facility for Hospice Care"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "123",
                "locator": "52:1-55:148",
                "name": "Comfort Measures during Hospitalization",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "123",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Comfort Measures during Hospitalization\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "122",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "108",
                                  "s": [
                                    {
                                      "r": "107",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Ischemic Stroke Encounter\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "IschemicStrokeEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "121",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "110",
                                  "s": [
                                    {
                                      "r": "109",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Intervention Comfort Measures\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "ComfortMeasure"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "120",
                                  "s": [
                                    {
                                      "r": "116",
                                      "s": [
                                        {
                                          "value": [
                                            "Coalesce",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "113",
                                          "s": [
                                            {
                                              "value": [
                                                "start of "
                                              ]
                                            },
                                            {
                                              "r": "112",
                                              "s": [
                                                {
                                                  "r": "111",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "ComfortMeasure"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "112",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "relevantPeriod"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ", "
                                          ]
                                        },
                                        {
                                          "r": "115",
                                          "s": [
                                            {
                                              "r": "114",
                                              "s": [
                                                {
                                                  "value": [
                                                    "ComfortMeasure"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "115",
                                              "s": [
                                                {
                                                  "value": [
                                                    "authorDatetime"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ")"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "r": "120",
                                      "value": [
                                        "during",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "119",
                                      "s": [
                                        {
                                          "r": "117",
                                          "s": [
                                            {
                                              "value": [
                                                "Global"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "119",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Hospitalization\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "118",
                                              "s": [
                                                {
                                                  "value": [
                                                    "IschemicStrokeEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "122",
                  "locator": "53:2-55:148",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "108",
                      "locator": "53:2-53:52",
                      "alias": "IschemicStrokeEncounter",
                      "expression": {
                        "localId": "107",
                        "locator": "53:2-53:28",
                        "name": "Ischemic Stroke Encounter",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "121",
                      "locator": "54:3-55:148",
                      "alias": "ComfortMeasure",
                      "type": "With",
                      "expression": {
                        "localId": "109",
                        "locator": "54:8-54:38",
                        "name": "Intervention Comfort Measures",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "120",
                        "locator": "55:14-55:148",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "116",
                            "locator": "55:14-55:92",
                            "type": "Coalesce",
                            "operand": [
                              {
                                "localId": "113",
                                "locator": "55:23-55:60",
                                "type": "Start",
                                "operand": {
                                  "localId": "112",
                                  "locator": "55:32-55:60",
                                  "path": "relevantPeriod",
                                  "scope": "ComfortMeasure",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "115",
                                "locator": "55:63-55:91",
                                "path": "authorDatetime",
                                "scope": "ComfortMeasure",
                                "type": "Property"
                              }
                            ]
                          },
                          {
                            "localId": "119",
                            "locator": "55:100-55:148",
                            "name": "Hospitalization",
                            "libraryName": "Global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "118",
                                "locator": "55:125-55:147",
                                "name": "IschemicStrokeEncounter",
                                "type": "AliasRef"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Intervention Comfort Measures\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "[\"Intervention, Order\": "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Comfort Measures\""
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "]"
                              }
                            ]
                          }
                        ],
                        "node_type": "Retrieve",
                        "ref_id": "23"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    union "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "[\"Intervention, Performed\": "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Comfort Measures\""
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "]"
                              }
                            ]
                          }
                        ],
                        "node_type": "Retrieve",
                        "ref_id": "24"
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "25"
                  }
                ],
                "ref_id": "26"
              }
            ],
            "define_name": "Intervention Comfort Measures"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Non Elective Inpatient Encounter\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Encounter, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Non-Elective Inpatient Encounter\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "27"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "27"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "28"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "29"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"LengthInDays\"("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "NonElectiveEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "30"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "31"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "31"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "32"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "32"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&lt;= 120"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "LessOrEqual",
                                "ref_id": "34"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "35"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "36"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "36"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " ends during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "37"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "38"
                              }
                            ],
                            "ref_id": "39"
                          }
                        ],
                        "ref_id": "39"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "40"
                  }
                ],
                "ref_id": "41"
              }
            ],
            "define_name": "Non Elective Inpatient Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"All Stroke Encounter\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Non Elective Inpatient Encounter\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "42"
                              },
                              {
                                "children": [
                                  {
                                    "text": " NonElectiveEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "43"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "44"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "principalDiagnosis"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "45"
                                      }
                                    ],
                                    "ref_id": "45"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Hemorrhagic Stroke\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "46"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "47"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      or "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "NonElectiveEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "48"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "principalDiagnosis"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "49"
                                      }
                                    ],
                                    "ref_id": "49"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Ischemic Stroke\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "50"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "51"
                              }
                            ],
                            "ref_id": "52"
                          }
                        ],
                        "ref_id": "52"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "53"
                  }
                ],
                "ref_id": "54"
              }
            ],
            "define_name": "All Stroke Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Encounter with Principal Diagnosis and Age\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"All Stroke Encounter\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "55"
                              },
                              {
                                "children": [
                                  {
                                    "text": " AllStrokeEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "56"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Patient Characteristic Birthdate\"]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "57"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "57"
                              },
                              {
                                "children": [
                                  {
                                    "text": " BirthDate"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "58"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Global"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "59"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"CalendarAgeInYearsAt\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "BirthDate"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "60"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "birthDatetime"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "61"
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "61"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ", "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "start of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "AllStrokeEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "62"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "63"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "63"
                                          }
                                        ],
                                        "node_type": "Start",
                                        "ref_id": "64"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ")"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "65"
                                  }
                                ],
                                "node_type": "FunctionRef",
                                "ref_id": "65"
                              },
                              {
                                "children": [
                                  {
                                    "text": "&gt;= 18"
                                  }
                                ]
                              }
                            ],
                            "node_type": "GreaterOrEqual",
                            "ref_id": "67"
                          }
                        ],
                        "ref_id": "68"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "69"
                  }
                ],
                "ref_id": "70"
              }
            ],
            "define_name": "Encounter with Principal Diagnosis and Age"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Ischemic Stroke Encounter\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Encounter with Principal Diagnosis and Age\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "71"
                              },
                              {
                                "children": [
                                  {
                                    "text": " EncounterWithAge"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "72"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "EncounterWithAge"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "73"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "principalDiagnosis"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "74"
                                  }
                                ],
                                "ref_id": "74"
                              },
                              {
                                "children": [
                                  {
                                    "text": " in "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Ischemic Stroke\""
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "75"
                              }
                            ],
                            "ref_id": "76"
                          }
                        ],
                        "ref_id": "76"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "77"
                  }
                ],
                "ref_id": "78"
              }
            ],
            "define_name": "Ischemic Stroke Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Ischemic Stroke Encounters with Discharge Status\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "( "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "( "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Ischemic Stroke Encounter\""
                                                  }
                                                ]
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "ExpressionRef",
                                        "ref_id": "79"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " IschemicStrokeEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "80"
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n        "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "where "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "IschemicStrokeEncounter"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "81"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "dischargeDisposition"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "82"
                                                          }
                                                        ],
                                                        "ref_id": "82"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " in "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Discharge To Acute Care Facility\""
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "83"
                                                      }
                                                    ],
                                                    "node_type": "InValueSet",
                                                    "ref_id": "84"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\n          or "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "IschemicStrokeEncounter"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "85"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "dischargeDisposition"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "86"
                                                          }
                                                        ],
                                                        "ref_id": "86"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " in "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Left Against Medical Advice\""
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "87"
                                                      }
                                                    ],
                                                    "node_type": "InValueSet",
                                                    "ref_id": "88"
                                                  }
                                                ],
                                                "node_type": "Or",
                                                "ref_id": "89"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n          or "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "IschemicStrokeEncounter"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "90"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "dischargeDisposition"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "91"
                                                      }
                                                    ],
                                                    "ref_id": "91"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " in "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Patient Expired\""
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "92"
                                                  }
                                                ],
                                                "node_type": "InValueSet",
                                                "ref_id": "93"
                                              }
                                            ],
                                            "node_type": "Or",
                                            "ref_id": "94"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n          or "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "IschemicStrokeEncounter"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "95"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "dischargeDisposition"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "96"
                                                  }
                                                ],
                                                "ref_id": "96"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " in "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Discharged to Home for Hospice Care\""
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "97"
                                              }
                                            ],
                                            "node_type": "InValueSet",
                                            "ref_id": "98"
                                          }
                                        ],
                                        "node_type": "Or",
                                        "ref_id": "99"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n          or "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "IschemicStrokeEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "100"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "dischargeDisposition"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "101"
                                              }
                                            ],
                                            "ref_id": "101"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " in "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Discharged to Health Care Facility for Hospice Care\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "102"
                                          }
                                        ],
                                        "node_type": "InValueSet",
                                        "ref_id": "103"
                                      }
                                    ],
                                    "ref_id": "104"
                                  }
                                ],
                                "ref_id": "104"
                              }
                            ],
                            "node_type": "Query",
                            "ref_id": "105"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    )"
                              }
                            ]
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "105"
                      },
                      {
                        "children": [
                          {
                            "text": "\n  )"
                          }
                        ]
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "105"
                  }
                ],
                "ref_id": "106"
              }
            ],
            "define_name": "Ischemic Stroke Encounters with Discharge Status"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Comfort Measures during Hospitalization\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Ischemic Stroke Encounter\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "107"
                              },
                              {
                                "children": [
                                  {
                                    "text": " IschemicStrokeEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "108"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Intervention Comfort Measures\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "109"
                              },
                              {
                                "children": [
                                  {
                                    "text": " ComfortMeasure"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "110"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Coalesce("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "start of "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "ComfortMeasure"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "111"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "relevantPeriod"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "112"
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "112"
                                      }
                                    ],
                                    "node_type": "Start",
                                    "ref_id": "113"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": ", "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "ComfortMeasure"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "114"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "authorDatetime"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "115"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "115"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": ")"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Coalesce",
                                "ref_id": "116"
                              },
                              {
                                "children": [
                                  {
                                    "text": "during "
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "120"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Global"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "117"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Hospitalization\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "IschemicStrokeEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "118"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ")"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "119"
                                  }
                                ],
                                "node_type": "FunctionRef",
                                "ref_id": "119"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "120"
                          }
                        ],
                        "ref_id": "121"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "122"
                  }
                ],
                "ref_id": "123"
              }
            ],
            "define_name": "Comfort Measures during Hospitalization"
          }
        ],
        "identifier": {
          "id": "TJC_Overall",
          "version": "1.4.000"
        }
      },
      "is_main_library": false,
      "is_top_level": true,
      "library_name": "TJC_Overall",
      "library_version": "1.4.000",
      "statement_dependencies": [
        {
          "statement_name": "Ischemic Stroke Encounter",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Encounter with Principal Diagnosis and Age"
            }
          ]
        },
        {
          "statement_name": "Encounter with Principal Diagnosis and Age",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "All Stroke Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "CalendarAgeInYearsAt"
            }
          ]
        },
        {
          "statement_name": "All Stroke Encounter",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Non Elective Inpatient Encounter"
            }
          ]
        },
        {
          "statement_name": "Non Elective Inpatient Encounter",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "LengthInDays"
            }
          ]
        },
        {
          "statement_name": "Ischemic Stroke Encounters with Discharge Status",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            }
          ]
        },
        {
          "statement_name": "Comfort Measures during Hospitalization",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Ischemic Stroke Encounter"
            },
            {
              "hqmf_id": null,
              "library_name": "TJC_Overall",
              "statement_name": "Intervention Comfort Measures"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization"
            }
          ]
        },
        {
          "statement_name": "Intervention Comfort Measures"
        }
      ]
    },
    {
      "cql": "library MATGlobalCommonFunctions version '2.0.000'\r\n\r\nusing QDM version '5.3'\r\n\r\ncodesystem \"LOINC:2.46\": 'urn:oid:2.16.840.1.113883.6.1' version 'urn:hl7:version:2.46'\r\ncodesystem \"SNOMEDCT:2016-03\": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2016-03'\r\n\r\nvalueset \"Emergency Department Visit\": 'urn:oid:2.16.840.1.113883.3.117.1.7.1.292'\r\nvalueset \"Encounter Inpatient\": 'urn:oid:2.16.840.1.113883.3.666.5.307'\r\nvalueset \"Intensive Care Unit\": 'urn:oid:2.16.840.1.113762.1.4.1110.23'\r\n\r\ncode \"Birthdate\": '21112-8' from \"LOINC:2.46\" display 'Birth date'\r\ncode \"Dead\": '419099009' from \"SNOMEDCT:2016-03\" display 'Dead'\r\n\r\nparameter \"Measurement Period\" Interval<DateTime>\r\n\r\ncontext Patient\r\n\r\ndefine \"Encounter\":\r\n\t[\"Encounter, Performed\": \"Emergency Department Visit\"]\r\n\r\ndefine \"Inpatient Encounter\":\r\n\t[\"Encounter, Performed\": \"Encounter Inpatient\"] EncounterInpatient\r\n\t\twhere \"LengthInDays\"(EncounterInpatient.relevantPeriod)<= 120\r\n\t\t\tand EncounterInpatient.relevantPeriod ends during \"Measurement Period\"\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, given the DateTime @2012-01-01T06:30:00.0Z, this function will return @2012-01-01T00:00:00.0Z.*/\r\n\r\ndefine function \"ToDate\"(Value DateTime):\r\n\tDateTime(year from Value, month from Value, day from Value, 0, 0, 0, 0, timezone from Value)\n\n/*CalendarAgeInDaysAt calculates the calendar age (meaning the age without considering time components) in days.*/\r\n\r\ndefine function \"CalendarAgeInDaysAt\"(BirthDateTime DateTime, AsOf DateTime):\r\n\tdays between ToDate(BirthDateTime)and ToDate(AsOf)\n\n/*CalendarAgeInDays calculates the calendar age (meaning the age without considering time components) in days as of today*/\r\n\r\ndefine function \"CalendarAgeInDays\"(BirthDateTime DateTime):\r\n\tCalendarAgeInDaysAt(BirthDateTime, Today())\n\n/*CalendarAgeInMonthsAt calculates the calendar age (meaning the age without considering time components) in months.*/\r\n\r\ndefine function \"CalendarAgeInMonthsAt\"(BirthDateTime DateTime, AsOf DateTime):\r\n\tmonths between ToDate(BirthDateTime)and ToDate(AsOf)\n\n/*CalendarAgeInMonths calculates the calendar age (meaning the age without considering time components) in months as of today.*/\r\n\r\ndefine function \"CalendarAgeInMonths\"(BirthDateTime DateTime):\r\n\tCalendarAgeInMonthsAt(BirthDateTime, Today())\n\n/*CalendarAgeInYearsAt calculates the calendar age (meaning the age without considering time components) in years.*/\r\n\r\ndefine function \"CalendarAgeInYearsAt\"(BirthDateTime DateTime, AsOf DateTime):\r\n\tyears between ToDate(BirthDateTime)and ToDate(AsOf)\n\n/*CalendarAgeInYears calculates the calendar age (meaning the age without considering time components) in years as of today.*/\r\n\r\ndefine function \"CalendarAgeInYears\"(BirthDateTime DateTime):\r\n\tCalendarAgeInYearsAt(BirthDateTime, Today())\n\n/*Hospitalization returns the total interval for admission to discharge for the given encounter, or for the admission of any immediately prior emergency department visit to the discharge of the given encounter.*/\r\n\r\ndefine function \"Hospitalization\"(Encounter \"Encounter, Performed\"):\r\n\t( singleton from ( [\"Encounter, Performed\": \"Emergency Department Visit\"] EDVisit\r\n\t\t\twhere EDVisit.relevantPeriod ends 1 hour or less on or before start of Encounter.relevantPeriod\r\n\t) ) X\r\n\t\treturn if X is null then Encounter.relevantPeriod else Interval[start of X.relevantPeriod, end of Encounter.relevantPeriod]\n\n/*calculates the difference in calendar days between the start and end of the given interval.*/\r\n\r\ndefine function \"LengthInDays\"(Value Interval<DateTime>):\r\n\tdifference in days between start of Value and end of Value\n\n/* returns list of all locations within an encounter, including locations for immediately prior ED visit.  If data contains many encounters within 1 hour before the start of encounter error will occur indicating the hospitalization cannot be determined*/\r\n\r\ndefine function \"Hospitalization Locations\"(Encounter \"Encounter, Performed\"):\r\n\t( singleton from ( [\"Encounter, Performed\": \"Emergency Department Visit\"] EDVisit\r\n\t\t\twhere EDVisit.relevantPeriod ends 1 hour or less on or before start of Encounter.relevantPeriod\r\n\t) ) EDEncounter\r\n\t\treturn if EDEncounter is null then Encounter.facilityLocations else flatten { EDEncounter.facilityLocations, Encounter.facilityLocations }\n\n/*Returns the length of stay in days (i.e. the number of days between admission and discharge) for the given encounter, or from the admission of any immediately prior emergency department visit to the discharge of the encounter*/\r\n\r\ndefine function \"Hospitalization Length of Stay\"(Encounter \"Encounter, Performed\"):\r\n\tLengthInDays(\"Hospitalization\"(Encounter))\n\n/*Returns admission time for an encounter or for immediately prior emergency department visit.  If the data contain many encounters within 1 hour before the start of the encounter an error indicating hospitalization cannot be determined\n*/\r\n\r\ndefine function \"Hospital Admission Time\"(Encounter \"Encounter, Performed\"):\r\n\tstart of \"Hospitalization\"(Encounter)\n\n/*Hospital Discharge Time returns the discharge time for an encounter*/\r\n\r\ndefine function \"Hospital Discharge Time\"(Encounter \"Encounter, Performed\"):\r\n\tend of Encounter.relevantPeriod\n\n/*Returns earliest arrival time for an encounter including any prior ED visit. If the data contain multiple encounters within 1 hour before the start of the encounter, an error will occur indicating it cannot be unambiguously determined\n*/\r\n\r\ndefine function \"Hospital Arrival Time\"(Encounter \"Encounter, Performed\"):\r\n\tstart of First((\"Hospitalization Locations\"(Encounter))HospitalLocation\r\n\t\t\tsort by start of locationPeriod\r\n\t).locationPeriod\n\n/*Returns the latest departure time for encounter including any prior ED visit. If the data contain multiple encounters within 1 hour before the start of the encounter, an error will occur indicating it cannot be unambiguously determined*/\r\n\r\ndefine function \"Hospital Departure Time\"(Encounter \"Encounter, Performed\"):\r\n\tend of Last((\"Hospitalization Locations\"(Encounter))HospitalLocation\r\n\t\t\tsort by start of locationPeriod\r\n\t).locationPeriod\n\n/*Returns the arrival time in the ED for the encounter.  If the data contain multiple encounters within 1 hour before the start of the encounter or multiple ED locations an error will occur indicating it cannot be determined\n*/\r\n\r\ndefine function \"Emergency Department Arrival Time\"(Encounter \"Encounter, Performed\"):\r\n\tstart of ( singleton from ( ( \"Hospitalization Locations\"(Encounter)) HospitalLocation\r\n\t\t\t\twhere HospitalLocation.code in \"Emergency Department Visit\"\r\n\t\t)\r\n\t).locationPeriod\n\n/*First Inpatient Intensive Care Unit returns the first intensive care unit for\nthe given encounter, without considering any immediately prior emergency\ndepartment visit.*/\r\n\r\ndefine function \"First Inpatient Intensive Care Unit\"(Encounter \"Encounter, Performed\"):\r\n\tFirst((Encounter.facilityLocations)HospitalLocation\r\n\t\t\twhere HospitalLocation.code in \"Intensive Care Unit\"\r\n\t\t\t\tand HospitalLocation.locationPeriod during Encounter.relevantPeriod\r\n\t\t\tsort by start of locationPeriod\r\n\t)\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "MATGlobalCommonFunctions",
            "version": "2.0.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "locator": "3:1-3:23",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_3",
                "version": "5.3"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "13",
                "locator": "15:1-15:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "12",
                  "locator": "15:32-15:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "11",
                    "locator": "15:41-15:48",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "codeSystems": {
            "def": [
              {
                "localId": "2",
                "locator": "5:1-5:87",
                "name": "LOINC:2.46",
                "id": "2.16.840.1.113883.6.1",
                "version": "urn:hl7:version:2.46",
                "accessLevel": "Public"
              },
              {
                "localId": "3",
                "locator": "6:1-6:97",
                "name": "SNOMEDCT:2016-03",
                "id": "2.16.840.1.113883.6.96",
                "version": "urn:hl7:version:2016-03",
                "accessLevel": "Public"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "4",
                "locator": "8:1-8:82",
                "name": "Emergency Department Visit",
                "id": "2.16.840.1.113883.3.117.1.7.1.292",
                "accessLevel": "Public"
              },
              {
                "localId": "5",
                "locator": "9:1-9:71",
                "name": "Encounter Inpatient",
                "id": "2.16.840.1.113883.3.666.5.307",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "locator": "10:1-10:71",
                "name": "Intensive Care Unit",
                "id": "2.16.840.1.113762.1.4.1110.23",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "8",
                "locator": "12:1-12:66",
                "name": "Birthdate",
                "id": "21112-8",
                "display": "Birth date",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "7",
                  "locator": "12:34-12:45",
                  "name": "LOINC:2.46"
                }
              },
              {
                "localId": "10",
                "locator": "13:1-13:63",
                "name": "Dead",
                "id": "419099009",
                "display": "Dead",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "9",
                  "locator": "13:31-13:48",
                  "name": "SNOMEDCT:2016-03"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "17:1-17:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "17:1-17:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "15",
                "locator": "19:1-20:55",
                "name": "Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "15",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Encounter\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "14",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Encounter, Performed\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Emergency Department Visit\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "14",
                  "locator": "20:2-20:55",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                  "templateId": "PositiveEncounterPerformed",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Emergency Department Visit",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "27",
                "locator": "63:1-64:59",
                "name": "LengthInDays",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "27",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"LengthInDays\"",
                            "(",
                            "Value",
                            " "
                          ]
                        },
                        {
                          "r": "21",
                          "s": [
                            {
                              "value": [
                                "Interval<"
                              ]
                            },
                            {
                              "r": "20",
                              "s": [
                                {
                                  "value": [
                                    "DateTime"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ">"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "26",
                          "s": [
                            {
                              "r": "26",
                              "s": [
                                {
                                  "value": [
                                    "difference in days between "
                                  ]
                                },
                                {
                                  "r": "23",
                                  "s": [
                                    {
                                      "value": [
                                        "start of "
                                      ]
                                    },
                                    {
                                      "r": "22",
                                      "s": [
                                        {
                                          "value": [
                                            "Value"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    " and "
                                  ]
                                },
                                {
                                  "r": "25",
                                  "s": [
                                    {
                                      "value": [
                                        "end of "
                                      ]
                                    },
                                    {
                                      "r": "24",
                                      "s": [
                                        {
                                          "value": [
                                            "Value"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "26",
                  "locator": "64:2-64:59",
                  "precision": "Day",
                  "type": "DifferenceBetween",
                  "operand": [
                    {
                      "localId": "23",
                      "locator": "64:29-64:42",
                      "type": "Start",
                      "operand": {
                        "localId": "22",
                        "locator": "64:38-64:42",
                        "name": "Value",
                        "type": "OperandRef"
                      }
                    },
                    {
                      "localId": "25",
                      "locator": "64:48-64:59",
                      "type": "End",
                      "operand": {
                        "localId": "24",
                        "locator": "64:55-64:59",
                        "name": "Value",
                        "type": "OperandRef"
                      }
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "Value",
                    "operandTypeSpecifier": {
                      "localId": "21",
                      "locator": "63:38-63:55",
                      "type": "IntervalTypeSpecifier",
                      "pointType": {
                        "localId": "20",
                        "locator": "63:47-63:54",
                        "name": "{urn:hl7-org:elm-types:r1}DateTime",
                        "type": "NamedTypeSpecifier"
                      }
                    }
                  }
                ]
              },
              {
                "localId": "37",
                "locator": "22:1-25:73",
                "name": "Inpatient Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "37",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Inpatient Encounter\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "36",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "17",
                                  "s": [
                                    {
                                      "r": "16",
                                      "s": [
                                        {
                                          "r": "16",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Encounter, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Encounter Inpatient\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "EncounterInpatient"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "35",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "35",
                                  "s": [
                                    {
                                      "r": "30",
                                      "s": [
                                        {
                                          "r": "28",
                                          "s": [
                                            {
                                              "value": [
                                                "\"LengthInDays\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "19",
                                              "s": [
                                                {
                                                  "r": "18",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "EncounterInpatient"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "19",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "relevantPeriod"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "<=",
                                            " ",
                                            "120"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "34",
                                      "s": [
                                        {
                                          "r": "32",
                                          "s": [
                                            {
                                              "r": "31",
                                              "s": [
                                                {
                                                  "value": [
                                                    "EncounterInpatient"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "32",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "ends during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "33",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "36",
                  "locator": "23:2-25:73",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "17",
                      "locator": "23:2-23:67",
                      "alias": "EncounterInpatient",
                      "expression": {
                        "localId": "16",
                        "locator": "23:2-23:48",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                        "templateId": "PositiveEncounterPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Encounter Inpatient",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "35",
                    "locator": "24:3-25:73",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "30",
                        "locator": "24:9-24:63",
                        "type": "LessOrEqual",
                        "operand": [
                          {
                            "localId": "28",
                            "locator": "24:9-24:57",
                            "name": "LengthInDays",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "19",
                                "locator": "24:24-24:56",
                                "path": "relevantPeriod",
                                "scope": "EncounterInpatient",
                                "type": "Property"
                              }
                            ]
                          },
                          {
                            "localId": "29",
                            "locator": "24:61-24:63",
                            "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                            "value": "120",
                            "type": "Literal"
                          }
                        ]
                      },
                      {
                        "localId": "34",
                        "locator": "25:8-25:73",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "25:42-25:45",
                            "type": "End",
                            "operand": {
                              "localId": "32",
                              "locator": "25:8-25:40",
                              "path": "relevantPeriod",
                              "scope": "EncounterInpatient",
                              "type": "Property"
                            }
                          },
                          {
                            "localId": "33",
                            "locator": "25:54-25:73",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "52",
                "locator": "28:1-29:93",
                "name": "ToDate",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "52",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"ToDate\"",
                            "(",
                            "Value",
                            " "
                          ]
                        },
                        {
                          "r": "38",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "51",
                          "s": [
                            {
                              "r": "51",
                              "s": [
                                {
                                  "value": [
                                    "DateTime",
                                    "("
                                  ]
                                },
                                {
                                  "r": "40",
                                  "s": [
                                    {
                                      "value": [
                                        "year from "
                                      ]
                                    },
                                    {
                                      "r": "39",
                                      "s": [
                                        {
                                          "value": [
                                            "Value"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "42",
                                  "s": [
                                    {
                                      "value": [
                                        "month from "
                                      ]
                                    },
                                    {
                                      "r": "41",
                                      "s": [
                                        {
                                          "value": [
                                            "Value"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "44",
                                  "s": [
                                    {
                                      "value": [
                                        "day from "
                                      ]
                                    },
                                    {
                                      "r": "43",
                                      "s": [
                                        {
                                          "value": [
                                            "Value"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", ",
                                    "0",
                                    ", ",
                                    "0",
                                    ", ",
                                    "0",
                                    ", ",
                                    "0",
                                    ", "
                                  ]
                                },
                                {
                                  "r": "50",
                                  "s": [
                                    {
                                      "value": [
                                        "timezone from "
                                      ]
                                    },
                                    {
                                      "r": "49",
                                      "s": [
                                        {
                                          "value": [
                                            "Value"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "51",
                  "locator": "29:2-29:93",
                  "type": "DateTime",
                  "year": {
                    "localId": "40",
                    "locator": "29:11-29:25",
                    "precision": "Year",
                    "type": "DateTimeComponentFrom",
                    "operand": {
                      "localId": "39",
                      "locator": "29:21-29:25",
                      "name": "Value",
                      "type": "OperandRef"
                    }
                  },
                  "month": {
                    "localId": "42",
                    "locator": "29:28-29:43",
                    "precision": "Month",
                    "type": "DateTimeComponentFrom",
                    "operand": {
                      "localId": "41",
                      "locator": "29:39-29:43",
                      "name": "Value",
                      "type": "OperandRef"
                    }
                  },
                  "day": {
                    "localId": "44",
                    "locator": "29:46-29:59",
                    "precision": "Day",
                    "type": "DateTimeComponentFrom",
                    "operand": {
                      "localId": "43",
                      "locator": "29:55-29:59",
                      "name": "Value",
                      "type": "OperandRef"
                    }
                  },
                  "hour": {
                    "localId": "45",
                    "locator": "29:62",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "minute": {
                    "localId": "46",
                    "locator": "29:65",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "second": {
                    "localId": "47",
                    "locator": "29:68",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "millisecond": {
                    "localId": "48",
                    "locator": "29:71",
                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                    "value": "0",
                    "type": "Literal"
                  },
                  "timezoneOffset": {
                    "localId": "50",
                    "locator": "29:74-29:92",
                    "type": "TimezoneFrom",
                    "operand": {
                      "localId": "49",
                      "locator": "29:88-29:92",
                      "name": "Value",
                      "type": "OperandRef"
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Value",
                    "operandTypeSpecifier": {
                      "localId": "38",
                      "locator": "28:32-28:39",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "60",
                "locator": "32:1-33:51",
                "name": "CalendarAgeInDaysAt",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "60",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInDaysAt\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "53",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            ", ",
                            "AsOf",
                            " "
                          ]
                        },
                        {
                          "r": "54",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "59",
                          "s": [
                            {
                              "r": "59",
                              "s": [
                                {
                                  "value": [
                                    "days between "
                                  ]
                                },
                                {
                                  "r": "56",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "55",
                                      "s": [
                                        {
                                          "value": [
                                            "BirthDateTime"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "and "
                                  ]
                                },
                                {
                                  "r": "58",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "57",
                                      "s": [
                                        {
                                          "value": [
                                            "AsOf"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "59",
                  "locator": "33:2-33:51",
                  "precision": "Day",
                  "type": "DurationBetween",
                  "operand": [
                    {
                      "localId": "56",
                      "locator": "33:15-33:35",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "55",
                          "locator": "33:22-33:34",
                          "name": "BirthDateTime",
                          "type": "OperandRef"
                        }
                      ]
                    },
                    {
                      "localId": "58",
                      "locator": "33:40-33:51",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "57",
                          "locator": "33:47-33:50",
                          "name": "AsOf",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "53",
                      "locator": "32:53-32:60",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  },
                  {
                    "name": "AsOf",
                    "operandTypeSpecifier": {
                      "localId": "54",
                      "locator": "32:68-32:75",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "65",
                "locator": "36:1-37:44",
                "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": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "64",
                          "s": [
                            {
                              "r": "64",
                              "s": [
                                {
                                  "value": [
                                    "CalendarAgeInDaysAt",
                                    "("
                                  ]
                                },
                                {
                                  "r": "62",
                                  "s": [
                                    {
                                      "value": [
                                        "BirthDateTime"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "63",
                                  "s": [
                                    {
                                      "value": [
                                        "Today",
                                        "()"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "64",
                  "locator": "37:2-37:44",
                  "name": "CalendarAgeInDaysAt",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "62",
                      "locator": "37:22-37:34",
                      "name": "BirthDateTime",
                      "type": "OperandRef"
                    },
                    {
                      "localId": "63",
                      "locator": "37:37-37:43",
                      "type": "Today"
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "61",
                      "locator": "36:51-36:58",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "73",
                "locator": "40:1-41:53",
                "name": "CalendarAgeInMonthsAt",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "73",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInMonthsAt\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "66",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            ", ",
                            "AsOf",
                            " "
                          ]
                        },
                        {
                          "r": "67",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "72",
                          "s": [
                            {
                              "r": "72",
                              "s": [
                                {
                                  "value": [
                                    "months between "
                                  ]
                                },
                                {
                                  "r": "69",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "68",
                                      "s": [
                                        {
                                          "value": [
                                            "BirthDateTime"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "and "
                                  ]
                                },
                                {
                                  "r": "71",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "70",
                                      "s": [
                                        {
                                          "value": [
                                            "AsOf"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "72",
                  "locator": "41:2-41:53",
                  "precision": "Month",
                  "type": "DurationBetween",
                  "operand": [
                    {
                      "localId": "69",
                      "locator": "41:17-41:37",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "68",
                          "locator": "41:24-41:36",
                          "name": "BirthDateTime",
                          "type": "OperandRef"
                        }
                      ]
                    },
                    {
                      "localId": "71",
                      "locator": "41:42-41:53",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "70",
                          "locator": "41:49-41:52",
                          "name": "AsOf",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "66",
                      "locator": "40:55-40:62",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  },
                  {
                    "name": "AsOf",
                    "operandTypeSpecifier": {
                      "localId": "67",
                      "locator": "40:70-40:77",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "78",
                "locator": "44:1-45:46",
                "name": "CalendarAgeInMonths",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "78",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInMonths\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "74",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "77",
                          "s": [
                            {
                              "r": "77",
                              "s": [
                                {
                                  "value": [
                                    "CalendarAgeInMonthsAt",
                                    "("
                                  ]
                                },
                                {
                                  "r": "75",
                                  "s": [
                                    {
                                      "value": [
                                        "BirthDateTime"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "76",
                                  "s": [
                                    {
                                      "value": [
                                        "Today",
                                        "()"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "77",
                  "locator": "45:2-45:46",
                  "name": "CalendarAgeInMonthsAt",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "75",
                      "locator": "45:24-45:36",
                      "name": "BirthDateTime",
                      "type": "OperandRef"
                    },
                    {
                      "localId": "76",
                      "locator": "45:39-45:45",
                      "type": "Today"
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "74",
                      "locator": "44:53-44:60",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "86",
                "locator": "48:1-49:52",
                "name": "CalendarAgeInYearsAt",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "86",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInYearsAt\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "79",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            ", ",
                            "AsOf",
                            " "
                          ]
                        },
                        {
                          "r": "80",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "85",
                          "s": [
                            {
                              "r": "85",
                              "s": [
                                {
                                  "value": [
                                    "years between "
                                  ]
                                },
                                {
                                  "r": "82",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "81",
                                      "s": [
                                        {
                                          "value": [
                                            "BirthDateTime"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "and "
                                  ]
                                },
                                {
                                  "r": "84",
                                  "s": [
                                    {
                                      "value": [
                                        "ToDate",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "83",
                                      "s": [
                                        {
                                          "value": [
                                            "AsOf"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "85",
                  "locator": "49:2-49:52",
                  "precision": "Year",
                  "type": "DurationBetween",
                  "operand": [
                    {
                      "localId": "82",
                      "locator": "49:16-49:36",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "81",
                          "locator": "49:23-49:35",
                          "name": "BirthDateTime",
                          "type": "OperandRef"
                        }
                      ]
                    },
                    {
                      "localId": "84",
                      "locator": "49:41-49:52",
                      "name": "ToDate",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "83",
                          "locator": "49:48-49:51",
                          "name": "AsOf",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "79",
                      "locator": "48:54-48:61",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  },
                  {
                    "name": "AsOf",
                    "operandTypeSpecifier": {
                      "localId": "80",
                      "locator": "48:69-48:76",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "91",
                "locator": "52:1-53:45",
                "name": "CalendarAgeInYears",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "91",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"CalendarAgeInYears\"",
                            "(",
                            "BirthDateTime",
                            " "
                          ]
                        },
                        {
                          "r": "87",
                          "s": [
                            {
                              "value": [
                                "DateTime"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "90",
                          "s": [
                            {
                              "r": "90",
                              "s": [
                                {
                                  "value": [
                                    "CalendarAgeInYearsAt",
                                    "("
                                  ]
                                },
                                {
                                  "r": "88",
                                  "s": [
                                    {
                                      "value": [
                                        "BirthDateTime"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ", "
                                  ]
                                },
                                {
                                  "r": "89",
                                  "s": [
                                    {
                                      "value": [
                                        "Today",
                                        "()"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "90",
                  "locator": "53:2-53:45",
                  "name": "CalendarAgeInYearsAt",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "88",
                      "locator": "53:23-53:35",
                      "name": "BirthDateTime",
                      "type": "OperandRef"
                    },
                    {
                      "localId": "89",
                      "locator": "53:38-53:44",
                      "type": "Today"
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "BirthDateTime",
                    "operandTypeSpecifier": {
                      "localId": "87",
                      "locator": "52:52-52:59",
                      "name": "{urn:hl7-org:elm-types:r1}DateTime",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "119",
                "locator": "56:1-60:125",
                "name": "Hospitalization",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "119",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospitalization\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "92",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "118",
                          "s": [
                            {
                              "r": "118",
                              "s": [
                                {
                                  "s": [
                                    {
                                      "r": "104",
                                      "s": [
                                        {
                                          "r": "103",
                                          "s": [
                                            {
                                              "value": [
                                                "( "
                                              ]
                                            },
                                            {
                                              "r": "103",
                                              "s": [
                                                {
                                                  "value": [
                                                    "singleton from "
                                                  ]
                                                },
                                                {
                                                  "r": "102",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "( "
                                                      ]
                                                    },
                                                    {
                                                      "r": "102",
                                                      "s": [
                                                        {
                                                          "s": [
                                                            {
                                                              "r": "94",
                                                              "s": [
                                                                {
                                                                  "r": "93",
                                                                  "s": [
                                                                    {
                                                                      "r": "93",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Encounter, Performed\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Emergency Department Visit\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "EDVisit"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\n\t\t\t"
                                                          ]
                                                        },
                                                        {
                                                          "r": "101",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "where "
                                                              ]
                                                            },
                                                            {
                                                              "r": "101",
                                                              "s": [
                                                                {
                                                                  "r": "96",
                                                                  "s": [
                                                                    {
                                                                      "r": "95",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "EDVisit"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "96",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "relevantPeriod"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "101",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "ends "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "100",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "1 ",
                                                                            "hour"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        " or less on or before"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "99",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "98",
                                                                      "s": [
                                                                        {
                                                                          "r": "97",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "98",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t)"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " )"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "X"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t"
                                  ]
                                },
                                {
                                  "r": "117",
                                  "s": [
                                    {
                                      "value": [
                                        "return "
                                      ]
                                    },
                                    {
                                      "r": "116",
                                      "s": [
                                        {
                                          "value": [
                                            "if "
                                          ]
                                        },
                                        {
                                          "r": "106",
                                          "s": [
                                            {
                                              "r": "105",
                                              "s": [
                                                {
                                                  "value": [
                                                    "X"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " is null"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " then "
                                          ]
                                        },
                                        {
                                          "r": "108",
                                          "s": [
                                            {
                                              "r": "107",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "108",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " else "
                                          ]
                                        },
                                        {
                                          "r": "115",
                                          "s": [
                                            {
                                              "value": [
                                                "Interval["
                                              ]
                                            },
                                            {
                                              "r": "111",
                                              "s": [
                                                {
                                                  "value": [
                                                    "start of "
                                                  ]
                                                },
                                                {
                                                  "r": "110",
                                                  "s": [
                                                    {
                                                      "r": "109",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "X"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "110",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ", "
                                              ]
                                            },
                                            {
                                              "r": "114",
                                              "s": [
                                                {
                                                  "value": [
                                                    "end of "
                                                  ]
                                                },
                                                {
                                                  "r": "113",
                                                  "s": [
                                                    {
                                                      "r": "112",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Encounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "113",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "118",
                  "locator": "57:2-60:125",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "104",
                      "locator": "57:2-59:6",
                      "alias": "X",
                      "expression": {
                        "localId": "103",
                        "locator": "57:2-59:4",
                        "type": "SingletonFrom",
                        "operand": {
                          "localId": "102",
                          "locator": "57:19-59:2",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "94",
                              "locator": "57:21-57:82",
                              "alias": "EDVisit",
                              "expression": {
                                "localId": "93",
                                "locator": "57:21-57:74",
                                "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                "templateId": "PositiveEncounterPerformed",
                                "codeProperty": "code",
                                "type": "Retrieve",
                                "codes": {
                                  "name": "Emergency Department Visit",
                                  "type": "ValueSetRef"
                                }
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "101",
                            "locator": "58:4-58:98",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "58:33-58:36",
                                "type": "End",
                                "operand": {
                                  "localId": "96",
                                  "locator": "58:10-58:31",
                                  "path": "relevantPeriod",
                                  "scope": "EDVisit",
                                  "type": "Property"
                                }
                              },
                              {
                                "locator": "58:38-58:51",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "locator": "58:66-58:98",
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "99",
                                      "locator": "58:66-58:98",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "98",
                                        "locator": "58:75-58:98",
                                        "path": "relevantPeriod",
                                        "type": "Property",
                                        "source": {
                                          "localId": "97",
                                          "locator": "58:75-58:83",
                                          "name": "Encounter",
                                          "type": "OperandRef"
                                        }
                                      }
                                    },
                                    {
                                      "localId": "100",
                                      "locator": "58:38-58:43",
                                      "value": 1,
                                      "unit": "hour",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "99",
                                  "locator": "58:66-58:98",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "98",
                                    "locator": "58:75-58:98",
                                    "path": "relevantPeriod",
                                    "type": "Property",
                                    "source": {
                                      "localId": "97",
                                      "locator": "58:75-58:83",
                                      "name": "Encounter",
                                      "type": "OperandRef"
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "return": {
                    "localId": "117",
                    "locator": "60:3-60:125",
                    "expression": {
                      "localId": "116",
                      "locator": "60:10-60:125",
                      "type": "If",
                      "condition": {
                        "asType": "{urn:hl7-org:elm-types:r1}Boolean",
                        "type": "As",
                        "operand": {
                          "localId": "106",
                          "locator": "60:13-60:21",
                          "type": "IsNull",
                          "operand": {
                            "localId": "105",
                            "locator": "60:13",
                            "name": "X",
                            "type": "AliasRef"
                          }
                        },
                        "asTypeSpecifier": {
                          "name": "{urn:hl7-org:elm-types:r1}Boolean",
                          "type": "NamedTypeSpecifier"
                        }
                      },
                      "then": {
                        "localId": "108",
                        "locator": "60:28-60:51",
                        "path": "relevantPeriod",
                        "type": "Property",
                        "source": {
                          "localId": "107",
                          "locator": "60:28-60:36",
                          "name": "Encounter",
                          "type": "OperandRef"
                        }
                      },
                      "else": {
                        "localId": "115",
                        "locator": "60:58-60:125",
                        "lowClosed": true,
                        "highClosed": true,
                        "type": "Interval",
                        "low": {
                          "localId": "111",
                          "locator": "60:67-60:91",
                          "type": "Start",
                          "operand": {
                            "localId": "110",
                            "locator": "60:76-60:91",
                            "path": "relevantPeriod",
                            "scope": "X",
                            "type": "Property"
                          }
                        },
                        "high": {
                          "localId": "114",
                          "locator": "60:94-60:124",
                          "type": "End",
                          "operand": {
                            "localId": "113",
                            "locator": "60:101-60:124",
                            "path": "relevantPeriod",
                            "type": "Property",
                            "source": {
                              "localId": "112",
                              "locator": "60:101-60:109",
                              "name": "Encounter",
                              "type": "OperandRef"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "92",
                      "locator": "56:45-56:66",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "149",
                "locator": "67:1-71:140",
                "name": "Hospitalization Locations",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "149",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospitalization Locations\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "123",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "148",
                          "s": [
                            {
                              "r": "148",
                              "s": [
                                {
                                  "s": [
                                    {
                                      "r": "135",
                                      "s": [
                                        {
                                          "r": "134",
                                          "s": [
                                            {
                                              "value": [
                                                "( "
                                              ]
                                            },
                                            {
                                              "r": "134",
                                              "s": [
                                                {
                                                  "value": [
                                                    "singleton from "
                                                  ]
                                                },
                                                {
                                                  "r": "133",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "( "
                                                      ]
                                                    },
                                                    {
                                                      "r": "133",
                                                      "s": [
                                                        {
                                                          "s": [
                                                            {
                                                              "r": "125",
                                                              "s": [
                                                                {
                                                                  "r": "124",
                                                                  "s": [
                                                                    {
                                                                      "r": "124",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Encounter, Performed\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Emergency Department Visit\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "EDVisit"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\n\t\t\t"
                                                          ]
                                                        },
                                                        {
                                                          "r": "132",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "where "
                                                              ]
                                                            },
                                                            {
                                                              "r": "132",
                                                              "s": [
                                                                {
                                                                  "r": "127",
                                                                  "s": [
                                                                    {
                                                                      "r": "126",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "EDVisit"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "127",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "relevantPeriod"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "132",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "ends "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "131",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "1 ",
                                                                            "hour"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        " or less on or before"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "130",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "129",
                                                                      "s": [
                                                                        {
                                                                          "r": "128",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "129",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t)"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " )"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "EDEncounter"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t"
                                  ]
                                },
                                {
                                  "r": "147",
                                  "s": [
                                    {
                                      "value": [
                                        "return "
                                      ]
                                    },
                                    {
                                      "r": "146",
                                      "s": [
                                        {
                                          "value": [
                                            "if "
                                          ]
                                        },
                                        {
                                          "r": "137",
                                          "s": [
                                            {
                                              "r": "136",
                                              "s": [
                                                {
                                                  "value": [
                                                    "EDEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " is null"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " then "
                                          ]
                                        },
                                        {
                                          "r": "139",
                                          "s": [
                                            {
                                              "r": "138",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "139",
                                              "s": [
                                                {
                                                  "value": [
                                                    "facilityLocations"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " else "
                                          ]
                                        },
                                        {
                                          "r": "145",
                                          "s": [
                                            {
                                              "value": [
                                                "flatten "
                                              ]
                                            },
                                            {
                                              "r": "144",
                                              "s": [
                                                {
                                                  "value": [
                                                    "{ "
                                                  ]
                                                },
                                                {
                                                  "r": "141",
                                                  "s": [
                                                    {
                                                      "r": "140",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "EDEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "141",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "facilityLocations"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ", "
                                                  ]
                                                },
                                                {
                                                  "r": "143",
                                                  "s": [
                                                    {
                                                      "r": "142",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Encounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "143",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "facilityLocations"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " }"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "148",
                  "locator": "68:2-71:140",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "135",
                      "locator": "68:2-70:16",
                      "alias": "EDEncounter",
                      "expression": {
                        "localId": "134",
                        "locator": "68:2-70:4",
                        "type": "SingletonFrom",
                        "operand": {
                          "localId": "133",
                          "locator": "68:19-70:2",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "125",
                              "locator": "68:21-68:82",
                              "alias": "EDVisit",
                              "expression": {
                                "localId": "124",
                                "locator": "68:21-68:74",
                                "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                "templateId": "PositiveEncounterPerformed",
                                "codeProperty": "code",
                                "type": "Retrieve",
                                "codes": {
                                  "name": "Emergency Department Visit",
                                  "type": "ValueSetRef"
                                }
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "132",
                            "locator": "69:4-69:98",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "69:33-69:36",
                                "type": "End",
                                "operand": {
                                  "localId": "127",
                                  "locator": "69:10-69:31",
                                  "path": "relevantPeriod",
                                  "scope": "EDVisit",
                                  "type": "Property"
                                }
                              },
                              {
                                "locator": "69:38-69:51",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "locator": "69:66-69:98",
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "130",
                                      "locator": "69:66-69:98",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "129",
                                        "locator": "69:75-69:98",
                                        "path": "relevantPeriod",
                                        "type": "Property",
                                        "source": {
                                          "localId": "128",
                                          "locator": "69:75-69:83",
                                          "name": "Encounter",
                                          "type": "OperandRef"
                                        }
                                      }
                                    },
                                    {
                                      "localId": "131",
                                      "locator": "69:38-69:43",
                                      "value": 1,
                                      "unit": "hour",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "130",
                                  "locator": "69:66-69:98",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "129",
                                    "locator": "69:75-69:98",
                                    "path": "relevantPeriod",
                                    "type": "Property",
                                    "source": {
                                      "localId": "128",
                                      "locator": "69:75-69:83",
                                      "name": "Encounter",
                                      "type": "OperandRef"
                                    }
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "return": {
                    "localId": "147",
                    "locator": "71:3-71:140",
                    "expression": {
                      "localId": "146",
                      "locator": "71:10-71:140",
                      "type": "If",
                      "condition": {
                        "asType": "{urn:hl7-org:elm-types:r1}Boolean",
                        "type": "As",
                        "operand": {
                          "localId": "137",
                          "locator": "71:13-71:31",
                          "type": "IsNull",
                          "operand": {
                            "localId": "136",
                            "locator": "71:13-71:23",
                            "name": "EDEncounter",
                            "type": "AliasRef"
                          }
                        },
                        "asTypeSpecifier": {
                          "name": "{urn:hl7-org:elm-types:r1}Boolean",
                          "type": "NamedTypeSpecifier"
                        }
                      },
                      "then": {
                        "localId": "139",
                        "locator": "71:38-71:64",
                        "path": "facilityLocations",
                        "type": "Property",
                        "source": {
                          "localId": "138",
                          "locator": "71:38-71:46",
                          "name": "Encounter",
                          "type": "OperandRef"
                        }
                      },
                      "else": {
                        "localId": "145",
                        "locator": "71:71-71:140",
                        "type": "Flatten",
                        "operand": {
                          "localId": "144",
                          "locator": "71:79-71:140",
                          "type": "List",
                          "element": [
                            {
                              "localId": "141",
                              "locator": "71:81-71:109",
                              "path": "facilityLocations",
                              "scope": "EDEncounter",
                              "type": "Property"
                            },
                            {
                              "localId": "143",
                              "locator": "71:112-71:138",
                              "path": "facilityLocations",
                              "type": "Property",
                              "source": {
                                "localId": "142",
                                "locator": "71:112-71:120",
                                "name": "Encounter",
                                "type": "OperandRef"
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "123",
                      "locator": "67:55-67:76",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "154",
                "locator": "74:1-75:43",
                "name": "Hospitalization Length of Stay",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "154",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospitalization Length of Stay\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "150",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "153",
                          "s": [
                            {
                              "r": "153",
                              "s": [
                                {
                                  "value": [
                                    "LengthInDays",
                                    "("
                                  ]
                                },
                                {
                                  "r": "152",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Hospitalization\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "151",
                                      "s": [
                                        {
                                          "value": [
                                            "Encounter"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ")"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "153",
                  "locator": "75:2-75:43",
                  "name": "LengthInDays",
                  "type": "FunctionRef",
                  "operand": [
                    {
                      "localId": "152",
                      "locator": "75:15-75:42",
                      "name": "Hospitalization",
                      "type": "FunctionRef",
                      "operand": [
                        {
                          "localId": "151",
                          "locator": "75:33-75:41",
                          "name": "Encounter",
                          "type": "OperandRef"
                        }
                      ]
                    }
                  ]
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "150",
                      "locator": "74:60-74:81",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "159",
                "locator": "79:1-80:38",
                "name": "Hospital Admission Time",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "159",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospital Admission Time\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "155",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "158",
                          "s": [
                            {
                              "r": "158",
                              "s": [
                                {
                                  "value": [
                                    "start of "
                                  ]
                                },
                                {
                                  "r": "157",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Hospitalization\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "156",
                                      "s": [
                                        {
                                          "value": [
                                            "Encounter"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "158",
                  "locator": "80:2-80:38",
                  "type": "Start",
                  "operand": {
                    "localId": "157",
                    "locator": "80:11-80:38",
                    "name": "Hospitalization",
                    "type": "FunctionRef",
                    "operand": [
                      {
                        "localId": "156",
                        "locator": "80:29-80:37",
                        "name": "Encounter",
                        "type": "OperandRef"
                      }
                    ]
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "155",
                      "locator": "79:53-79:74",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "164",
                "locator": "83:1-84:32",
                "name": "Hospital Discharge Time",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "164",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospital Discharge Time\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "160",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "163",
                          "s": [
                            {
                              "r": "163",
                              "s": [
                                {
                                  "value": [
                                    "end of "
                                  ]
                                },
                                {
                                  "r": "162",
                                  "s": [
                                    {
                                      "r": "161",
                                      "s": [
                                        {
                                          "value": [
                                            "Encounter"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "."
                                      ]
                                    },
                                    {
                                      "r": "162",
                                      "s": [
                                        {
                                          "value": [
                                            "relevantPeriod"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "163",
                  "locator": "84:2-84:32",
                  "type": "End",
                  "operand": {
                    "localId": "162",
                    "locator": "84:9-84:32",
                    "path": "relevantPeriod",
                    "type": "Property",
                    "source": {
                      "localId": "161",
                      "locator": "84:9-84:17",
                      "name": "Encounter",
                      "type": "OperandRef"
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "160",
                      "locator": "83:53-83:74",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "177",
                "locator": "88:1-91:17",
                "name": "Hospital Arrival Time",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "177",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospital Arrival Time\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "165",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "176",
                          "s": [
                            {
                              "r": "176",
                              "s": [
                                {
                                  "value": [
                                    "start of "
                                  ]
                                },
                                {
                                  "r": "175",
                                  "s": [
                                    {
                                      "r": "174",
                                      "s": [
                                        {
                                          "value": [
                                            "First",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "173",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "168",
                                                  "s": [
                                                    {
                                                      "r": "167",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "("
                                                          ]
                                                        },
                                                        {
                                                          "r": "167",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Hospitalization Locations\"",
                                                                "("
                                                              ]
                                                            },
                                                            {
                                                              "r": "166",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "Encounter"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ")"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            ")"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "HospitalLocation"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "172",
                                              "s": [
                                                {
                                                  "value": [
                                                    "sort by "
                                                  ]
                                                },
                                                {
                                                  "r": "171",
                                                  "s": [
                                                    {
                                                      "r": "170",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "start of "
                                                          ]
                                                        },
                                                        {
                                                          "r": "169",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "locationPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t)"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "."
                                      ]
                                    },
                                    {
                                      "r": "175",
                                      "s": [
                                        {
                                          "value": [
                                            "locationPeriod"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "176",
                  "locator": "89:2-91:17",
                  "type": "Start",
                  "operand": {
                    "localId": "175",
                    "locator": "89:11-91:17",
                    "path": "locationPeriod",
                    "type": "Property",
                    "source": {
                      "localId": "174",
                      "locator": "89:11-91:2",
                      "type": "First",
                      "source": {
                        "localId": "173",
                        "locator": "89:17-90:34",
                        "type": "Query",
                        "source": [
                          {
                            "localId": "168",
                            "locator": "89:17-89:72",
                            "alias": "HospitalLocation",
                            "expression": {
                              "localId": "167",
                              "locator": "89:17-89:56",
                              "name": "Hospitalization Locations",
                              "type": "FunctionRef",
                              "operand": [
                                {
                                  "localId": "166",
                                  "locator": "89:46-89:54",
                                  "name": "Encounter",
                                  "type": "OperandRef"
                                }
                              ]
                            }
                          }
                        ],
                        "relationship": [

                        ],
                        "sort": {
                          "localId": "172",
                          "locator": "90:4-90:34",
                          "by": [
                            {
                              "localId": "171",
                              "locator": "90:12-90:34",
                              "direction": "asc",
                              "type": "ByExpression",
                              "expression": {
                                "localId": "170",
                                "locator": "90:12-90:34",
                                "type": "Start",
                                "operand": {
                                  "localId": "169",
                                  "locator": "90:21-90:34",
                                  "name": "locationPeriod",
                                  "type": "IdentifierRef"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "165",
                      "locator": "88:51-88:72",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "190",
                "locator": "94:1-97:17",
                "name": "Hospital Departure Time",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "190",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Hospital Departure Time\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "178",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "189",
                          "s": [
                            {
                              "r": "189",
                              "s": [
                                {
                                  "value": [
                                    "end of "
                                  ]
                                },
                                {
                                  "r": "188",
                                  "s": [
                                    {
                                      "r": "187",
                                      "s": [
                                        {
                                          "value": [
                                            "Last",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "186",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "181",
                                                  "s": [
                                                    {
                                                      "r": "180",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "("
                                                          ]
                                                        },
                                                        {
                                                          "r": "180",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Hospitalization Locations\"",
                                                                "("
                                                              ]
                                                            },
                                                            {
                                                              "r": "179",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "Encounter"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ")"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            ")"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "HospitalLocation"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "185",
                                              "s": [
                                                {
                                                  "value": [
                                                    "sort by "
                                                  ]
                                                },
                                                {
                                                  "r": "184",
                                                  "s": [
                                                    {
                                                      "r": "183",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "start of "
                                                          ]
                                                        },
                                                        {
                                                          "r": "182",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "locationPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t)"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "."
                                      ]
                                    },
                                    {
                                      "r": "188",
                                      "s": [
                                        {
                                          "value": [
                                            "locationPeriod"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "189",
                  "locator": "95:2-97:17",
                  "type": "End",
                  "operand": {
                    "localId": "188",
                    "locator": "95:9-97:17",
                    "path": "locationPeriod",
                    "type": "Property",
                    "source": {
                      "localId": "187",
                      "locator": "95:9-97:2",
                      "type": "Last",
                      "source": {
                        "localId": "186",
                        "locator": "95:14-96:34",
                        "type": "Query",
                        "source": [
                          {
                            "localId": "181",
                            "locator": "95:14-95:69",
                            "alias": "HospitalLocation",
                            "expression": {
                              "localId": "180",
                              "locator": "95:14-95:53",
                              "name": "Hospitalization Locations",
                              "type": "FunctionRef",
                              "operand": [
                                {
                                  "localId": "179",
                                  "locator": "95:43-95:51",
                                  "name": "Encounter",
                                  "type": "OperandRef"
                                }
                              ]
                            }
                          }
                        ],
                        "relationship": [

                        ],
                        "sort": {
                          "localId": "185",
                          "locator": "96:4-96:34",
                          "by": [
                            {
                              "localId": "184",
                              "locator": "96:12-96:34",
                              "direction": "asc",
                              "type": "ByExpression",
                              "expression": {
                                "localId": "183",
                                "locator": "96:12-96:34",
                                "type": "Start",
                                "operand": {
                                  "localId": "182",
                                  "locator": "96:21-96:34",
                                  "name": "locationPeriod",
                                  "type": "IdentifierRef"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "178",
                      "locator": "94:53-94:74",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "203",
                "locator": "101:1-105:17",
                "name": "Emergency Department Arrival Time",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "203",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"Emergency Department Arrival Time\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "191",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "202",
                          "s": [
                            {
                              "r": "202",
                              "s": [
                                {
                                  "value": [
                                    "start of "
                                  ]
                                },
                                {
                                  "r": "201",
                                  "s": [
                                    {
                                      "r": "200",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "200",
                                          "s": [
                                            {
                                              "value": [
                                                "singleton from "
                                              ]
                                            },
                                            {
                                              "r": "199",
                                              "s": [
                                                {
                                                  "value": [
                                                    "( "
                                                  ]
                                                },
                                                {
                                                  "r": "199",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "r": "194",
                                                          "s": [
                                                            {
                                                              "r": "193",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "( "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "193",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Hospitalization Locations\"",
                                                                        "("
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "192",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "Encounter"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        ")"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    ")"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " ",
                                                                "HospitalLocation"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t\t"
                                                      ]
                                                    },
                                                    {
                                                      "r": "198",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "where "
                                                          ]
                                                        },
                                                        {
                                                          "r": "198",
                                                          "s": [
                                                            {
                                                              "r": "196",
                                                              "s": [
                                                                {
                                                                  "r": "195",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "HospitalLocation"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "196",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "code"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " in "
                                                              ]
                                                            },
                                                            {
                                                              "r": "197",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Emergency Department Visit\""
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t)"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t)"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "."
                                      ]
                                    },
                                    {
                                      "r": "201",
                                      "s": [
                                        {
                                          "value": [
                                            "locationPeriod"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "202",
                  "locator": "102:2-105:17",
                  "type": "Start",
                  "operand": {
                    "localId": "201",
                    "locator": "102:11-105:17",
                    "path": "locationPeriod",
                    "type": "Property",
                    "source": {
                      "localId": "200",
                      "locator": "102:11-105:2",
                      "type": "SingletonFrom",
                      "operand": {
                        "localId": "199",
                        "locator": "102:28-104:3",
                        "type": "Query",
                        "source": [
                          {
                            "localId": "194",
                            "locator": "102:30-102:87",
                            "alias": "HospitalLocation",
                            "expression": {
                              "localId": "193",
                              "locator": "102:30-102:70",
                              "name": "Hospitalization Locations",
                              "type": "FunctionRef",
                              "operand": [
                                {
                                  "localId": "192",
                                  "locator": "102:60-102:68",
                                  "name": "Encounter",
                                  "type": "OperandRef"
                                }
                              ]
                            }
                          }
                        ],
                        "relationship": [

                        ],
                        "where": {
                          "localId": "198",
                          "locator": "103:5-103:63",
                          "type": "InValueSet",
                          "code": {
                            "localId": "196",
                            "locator": "103:11-103:31",
                            "path": "code",
                            "scope": "HospitalLocation",
                            "type": "Property"
                          },
                          "valueset": {
                            "localId": "197",
                            "locator": "103:36-103:63",
                            "name": "Emergency Department Visit"
                          }
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "191",
                      "locator": "101:63-101:84",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              },
              {
                "localId": "224",
                "locator": "110:1-115:2",
                "name": "First Inpatient Intensive Care Unit",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "224",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"First Inpatient Intensive Care Unit\"",
                            "(",
                            "Encounter",
                            " "
                          ]
                        },
                        {
                          "r": "204",
                          "s": [
                            {
                              "value": [
                                "\"Encounter, Performed\""
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "223",
                          "s": [
                            {
                              "r": "223",
                              "s": [
                                {
                                  "value": [
                                    "First",
                                    "("
                                  ]
                                },
                                {
                                  "r": "222",
                                  "s": [
                                    {
                                      "s": [
                                        {
                                          "r": "207",
                                          "s": [
                                            {
                                              "r": "206",
                                              "s": [
                                                {
                                                  "value": [
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "206",
                                                  "s": [
                                                    {
                                                      "r": "205",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Encounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "206",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "facilityLocations"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "HospitalLocation"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\t"
                                      ]
                                    },
                                    {
                                      "r": "217",
                                      "s": [
                                        {
                                          "value": [
                                            "where "
                                          ]
                                        },
                                        {
                                          "r": "217",
                                          "s": [
                                            {
                                              "r": "211",
                                              "s": [
                                                {
                                                  "r": "209",
                                                  "s": [
                                                    {
                                                      "r": "208",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "HospitalLocation"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "209",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "code"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " in "
                                                  ]
                                                },
                                                {
                                                  "r": "210",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Intensive Care Unit\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\tand "
                                              ]
                                            },
                                            {
                                              "r": "216",
                                              "s": [
                                                {
                                                  "r": "213",
                                                  "s": [
                                                    {
                                                      "r": "212",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "HospitalLocation"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "213",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "locationPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "during",
                                                    " "
                                                  ]
                                                },
                                                {
                                                  "r": "215",
                                                  "s": [
                                                    {
                                                      "r": "214",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Encounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "215",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\t"
                                      ]
                                    },
                                    {
                                      "r": "221",
                                      "s": [
                                        {
                                          "value": [
                                            "sort by "
                                          ]
                                        },
                                        {
                                          "r": "220",
                                          "s": [
                                            {
                                              "r": "219",
                                              "s": [
                                                {
                                                  "value": [
                                                    "start of "
                                                  ]
                                                },
                                                {
                                                  "r": "218",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "locationPeriod"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t)"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "223",
                  "locator": "111:2-115:2",
                  "type": "First",
                  "source": {
                    "localId": "222",
                    "locator": "111:8-114:34",
                    "type": "Query",
                    "source": [
                      {
                        "localId": "207",
                        "locator": "111:8-111:52",
                        "alias": "HospitalLocation",
                        "expression": {
                          "localId": "206",
                          "locator": "111:8-111:36",
                          "path": "facilityLocations",
                          "type": "Property",
                          "source": {
                            "localId": "205",
                            "locator": "111:9-111:17",
                            "name": "Encounter",
                            "type": "OperandRef"
                          }
                        }
                      }
                    ],
                    "relationship": [

                    ],
                    "where": {
                      "localId": "217",
                      "locator": "112:4-113:71",
                      "type": "And",
                      "operand": [
                        {
                          "localId": "211",
                          "locator": "112:10-112:55",
                          "type": "InValueSet",
                          "code": {
                            "localId": "209",
                            "locator": "112:10-112:30",
                            "path": "code",
                            "scope": "HospitalLocation",
                            "type": "Property"
                          },
                          "valueset": {
                            "localId": "210",
                            "locator": "112:35-112:55",
                            "name": "Intensive Care Unit"
                          }
                        },
                        {
                          "localId": "216",
                          "locator": "113:9-113:71",
                          "type": "IncludedIn",
                          "operand": [
                            {
                              "localId": "213",
                              "locator": "113:9-113:39",
                              "path": "locationPeriod",
                              "scope": "HospitalLocation",
                              "type": "Property"
                            },
                            {
                              "localId": "215",
                              "locator": "113:48-113:71",
                              "path": "relevantPeriod",
                              "type": "Property",
                              "source": {
                                "localId": "214",
                                "locator": "113:48-113:56",
                                "name": "Encounter",
                                "type": "OperandRef"
                              }
                            }
                          ]
                        }
                      ]
                    },
                    "sort": {
                      "localId": "221",
                      "locator": "114:4-114:34",
                      "by": [
                        {
                          "localId": "220",
                          "locator": "114:12-114:34",
                          "direction": "asc",
                          "type": "ByExpression",
                          "expression": {
                            "localId": "219",
                            "locator": "114:12-114:34",
                            "type": "Start",
                            "operand": {
                              "localId": "218",
                              "locator": "114:21-114:34",
                              "name": "locationPeriod",
                              "type": "IdentifierRef"
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "operand": [
                  {
                    "name": "Encounter",
                    "operandTypeSpecifier": {
                      "localId": "204",
                      "locator": "110:65-110:86",
                      "name": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                      "type": "NamedTypeSpecifier"
                    }
                  }
                ]
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Encounter\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Encounter, Performed\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Emergency Department Visit\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "14"
                  }
                ],
                "ref_id": "15"
              }
            ],
            "define_name": "Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"LengthInDays\"(Value "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "Interval&lt;"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "DateTime"
                              }
                            ]
                          }
                        ],
                        "ref_id": "20"
                      },
                      {
                        "children": [
                          {
                            "text": "&gt;"
                          }
                        ]
                      }
                    ],
                    "ref_id": "21"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "difference in days between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "start of "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Value"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "22"
                              }
                            ],
                            "node_type": "Start",
                            "ref_id": "23"
                          },
                          {
                            "children": [
                              {
                                "text": " and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "end of "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Value"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "24"
                              }
                            ],
                            "node_type": "End",
                            "ref_id": "25"
                          }
                        ],
                        "node_type": "DifferenceBetween",
                        "ref_id": "26"
                      }
                    ],
                    "node_type": "DifferenceBetween",
                    "ref_id": "26"
                  }
                ],
                "ref_id": "27"
              }
            ],
            "define_name": "LengthInDays"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Inpatient Encounter\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Encounter, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Encounter Inpatient\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "16"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "16"
                              },
                              {
                                "children": [
                                  {
                                    "text": " EncounterInpatient"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "17"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"LengthInDays\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "EncounterInpatient"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "18"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "relevantPeriod"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "19"
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "19"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ")"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "28"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&lt;= 120"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "LessOrEqual",
                                "ref_id": "30"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "EncounterInpatient"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "31"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "32"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "32"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " ends during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "33"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "34"
                              }
                            ],
                            "ref_id": "35"
                          }
                        ],
                        "ref_id": "35"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "36"
                  }
                ],
                "ref_id": "37"
              }
            ],
            "define_name": "Inpatient Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"ToDate\"(Value "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "38"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "DateTime("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "year from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Value"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "39"
                              }
                            ],
                            "ref_id": "40"
                          },
                          {
                            "children": [
                              {
                                "text": ", "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "month from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Value"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "41"
                              }
                            ],
                            "ref_id": "42"
                          },
                          {
                            "children": [
                              {
                                "text": ", "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "day from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Value"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "43"
                              }
                            ],
                            "ref_id": "44"
                          },
                          {
                            "children": [
                              {
                                "text": ", 0, 0, 0, 0, "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "timezone from "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Value"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "49"
                              }
                            ],
                            "ref_id": "50"
                          },
                          {
                            "children": [
                              {
                                "text": ")"
                              }
                            ]
                          }
                        ],
                        "node_type": "DateTime",
                        "ref_id": "51"
                      }
                    ],
                    "node_type": "DateTime",
                    "ref_id": "51"
                  }
                ],
                "ref_id": "52"
              }
            ],
            "define_name": "ToDate"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"CalendarAgeInDaysAt\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "53"
                  },
                  {
                    "children": [
                      {
                        "text": ", AsOf "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "54"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "days between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "BirthDateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "55"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "56"
                          },
                          {
                            "children": [
                              {
                                "text": "and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "AsOf"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "57"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "58"
                          }
                        ],
                        "node_type": "DurationBetween",
                        "ref_id": "59"
                      }
                    ],
                    "node_type": "DurationBetween",
                    "ref_id": "59"
                  }
                ],
                "ref_id": "60"
              }
            ],
            "define_name": "CalendarAgeInDaysAt"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"CalendarAgeInDays\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "61"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "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 \"CalendarAgeInMonthsAt\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "66"
                  },
                  {
                    "children": [
                      {
                        "text": ", AsOf "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "67"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "months between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "BirthDateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "68"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "69"
                          },
                          {
                            "children": [
                              {
                                "text": "and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "AsOf"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "70"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "71"
                          }
                        ],
                        "node_type": "DurationBetween",
                        "ref_id": "72"
                      }
                    ],
                    "node_type": "DurationBetween",
                    "ref_id": "72"
                  }
                ],
                "ref_id": "73"
              }
            ],
            "define_name": "CalendarAgeInMonthsAt"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"CalendarAgeInMonths\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "74"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "CalendarAgeInMonthsAt("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "BirthDateTime"
                                  }
                                ]
                              }
                            ],
                            "node_type": "OperandRef",
                            "ref_id": "75"
                          },
                          {
                            "children": [
                              {
                                "text": ", "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "Today()"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Today",
                            "ref_id": "76"
                          },
                          {
                            "children": [
                              {
                                "text": ")"
                              }
                            ]
                          }
                        ],
                        "node_type": "FunctionRef",
                        "ref_id": "77"
                      }
                    ],
                    "node_type": "FunctionRef",
                    "ref_id": "77"
                  }
                ],
                "ref_id": "78"
              }
            ],
            "define_name": "CalendarAgeInMonths"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"CalendarAgeInYearsAt\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "79"
                  },
                  {
                    "children": [
                      {
                        "text": ", AsOf "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "80"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "years between "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "BirthDateTime"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "81"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "82"
                          },
                          {
                            "children": [
                              {
                                "text": "and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "ToDate("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "AsOf"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "83"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "84"
                          }
                        ],
                        "node_type": "DurationBetween",
                        "ref_id": "85"
                      }
                    ],
                    "node_type": "DurationBetween",
                    "ref_id": "85"
                  }
                ],
                "ref_id": "86"
              }
            ],
            "define_name": "CalendarAgeInYearsAt"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"CalendarAgeInYears\"(BirthDateTime "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "DateTime"
                          }
                        ]
                      }
                    ],
                    "ref_id": "87"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "CalendarAgeInYearsAt("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "BirthDateTime"
                                  }
                                ]
                              }
                            ],
                            "node_type": "OperandRef",
                            "ref_id": "88"
                          },
                          {
                            "children": [
                              {
                                "text": ", "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "Today()"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Today",
                            "ref_id": "89"
                          },
                          {
                            "children": [
                              {
                                "text": ")"
                              }
                            ]
                          }
                        ],
                        "node_type": "FunctionRef",
                        "ref_id": "90"
                      }
                    ],
                    "node_type": "FunctionRef",
                    "ref_id": "90"
                  }
                ],
                "ref_id": "91"
              }
            ],
            "define_name": "CalendarAgeInYears"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospitalization\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "92"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "( "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "singleton from "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "( "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Encounter, Performed\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Emergency Department Visit\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "93"
                                                              }
                                                            ],
                                                            "node_type": "Retrieve",
                                                            "ref_id": "93"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " EDVisit"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "94"
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\n      "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "where "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "EDVisit"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "95"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "relevantPeriod"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "96"
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "96"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "ends "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "1 hour"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Quantity",
                                                                "ref_id": "100"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": " or less on or before"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "101"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "97"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "98"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "98"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "99"
                                                          }
                                                        ],
                                                        "ref_id": "101"
                                                      }
                                                    ],
                                                    "ref_id": "101"
                                                  }
                                                ],
                                                "node_type": "Query",
                                                "ref_id": "102"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n  )"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "102"
                                          }
                                        ],
                                        "node_type": "SingletonFrom",
                                        "ref_id": "103"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "SingletonFrom",
                                    "ref_id": "103"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " X"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "104"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "return "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "if "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "X"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "105"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " is null"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "IsNull",
                                    "ref_id": "106"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " then "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "107"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "108"
                                      }
                                    ],
                                    "ref_id": "108"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " else "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Interval["
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "start of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "X"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "109"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "110"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "110"
                                          }
                                        ],
                                        "ref_id": "111"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ", "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "end of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Encounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "112"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "113"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "113"
                                          }
                                        ],
                                        "ref_id": "114"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "115"
                                  }
                                ],
                                "node_type": "If",
                                "ref_id": "116"
                              }
                            ],
                            "ref_id": "117"
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "118"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "118"
                  }
                ],
                "ref_id": "119"
              }
            ],
            "define_name": "Hospitalization"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospitalization Locations\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "123"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "( "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "singleton from "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "( "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Encounter, Performed\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Emergency Department Visit\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "124"
                                                              }
                                                            ],
                                                            "node_type": "Retrieve",
                                                            "ref_id": "124"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " EDVisit"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "125"
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\n      "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "where "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "EDVisit"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "126"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "relevantPeriod"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "127"
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "127"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "ends "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "1 hour"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Quantity",
                                                                "ref_id": "131"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": " or less on or before"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "132"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "128"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "129"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "129"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "130"
                                                          }
                                                        ],
                                                        "ref_id": "132"
                                                      }
                                                    ],
                                                    "ref_id": "132"
                                                  }
                                                ],
                                                "node_type": "Query",
                                                "ref_id": "133"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n  )"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "133"
                                          }
                                        ],
                                        "node_type": "SingletonFrom",
                                        "ref_id": "134"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "SingletonFrom",
                                    "ref_id": "134"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " EDEncounter"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "135"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "return "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "if "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "EDEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "136"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " is null"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "IsNull",
                                    "ref_id": "137"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " then "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "138"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "facilityLocations"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "139"
                                      }
                                    ],
                                    "ref_id": "139"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " else "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "flatten "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "{ "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "EDEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "140"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "facilityLocations"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "141"
                                              }
                                            ],
                                            "ref_id": "141"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ", "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Encounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "142"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "facilityLocations"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "143"
                                              }
                                            ],
                                            "ref_id": "143"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " }"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "List",
                                        "ref_id": "144"
                                      }
                                    ],
                                    "ref_id": "145"
                                  }
                                ],
                                "node_type": "If",
                                "ref_id": "146"
                              }
                            ],
                            "ref_id": "147"
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "148"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "148"
                  }
                ],
                "ref_id": "149"
              }
            ],
            "define_name": "Hospitalization Locations"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospitalization Length of Stay\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "150"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "LengthInDays("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Hospitalization\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Encounter"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "151"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "152"
                          },
                          {
                            "children": [
                              {
                                "text": ")"
                              }
                            ]
                          }
                        ],
                        "node_type": "FunctionRef",
                        "ref_id": "153"
                      }
                    ],
                    "node_type": "FunctionRef",
                    "ref_id": "153"
                  }
                ],
                "ref_id": "154"
              }
            ],
            "define_name": "Hospitalization Length of Stay"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospital Admission Time\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "155"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "start of "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Hospitalization\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Encounter"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "OperandRef",
                                "ref_id": "156"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "node_type": "FunctionRef",
                            "ref_id": "157"
                          }
                        ],
                        "node_type": "Start",
                        "ref_id": "158"
                      }
                    ],
                    "node_type": "Start",
                    "ref_id": "158"
                  }
                ],
                "ref_id": "159"
              }
            ],
            "define_name": "Hospital Admission Time"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospital Discharge Time\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "160"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "end of "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Encounter"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "161"
                              },
                              {
                                "children": [
                                  {
                                    "text": "."
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "relevantPeriod"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "162"
                              }
                            ],
                            "node_type": "Property",
                            "ref_id": "162"
                          }
                        ],
                        "node_type": "End",
                        "ref_id": "163"
                      }
                    ],
                    "node_type": "End",
                    "ref_id": "163"
                  }
                ],
                "ref_id": "164"
              }
            ],
            "define_name": "Hospital Discharge Time"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospital Arrival Time\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "165"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "start of "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "First("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "("
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Hospitalization Locations\"("
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "Encounter"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "OperandRef",
                                                        "ref_id": "166"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ")"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "FunctionRef",
                                                    "ref_id": "167"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": ")"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "FunctionRef",
                                                "ref_id": "167"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "HospitalLocation"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "168"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n      "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "sort by "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "start of "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "locationPeriod"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "IdentifierRef",
                                                    "ref_id": "169"
                                                  }
                                                ],
                                                "node_type": "Start",
                                                "ref_id": "170"
                                              }
                                            ],
                                            "ref_id": "171"
                                          }
                                        ],
                                        "ref_id": "172"
                                      }
                                    ],
                                    "ref_id": "173"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n  )"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "174"
                              },
                              {
                                "children": [
                                  {
                                    "text": "."
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "locationPeriod"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "175"
                              }
                            ],
                            "node_type": "Property",
                            "ref_id": "175"
                          }
                        ],
                        "node_type": "Start",
                        "ref_id": "176"
                      }
                    ],
                    "node_type": "Start",
                    "ref_id": "176"
                  }
                ],
                "ref_id": "177"
              }
            ],
            "define_name": "Hospital Arrival Time"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Hospital Departure Time\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "178"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "end of "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Last("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "("
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Hospitalization Locations\"("
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "Encounter"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "OperandRef",
                                                        "ref_id": "179"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ")"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "FunctionRef",
                                                    "ref_id": "180"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": ")"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "FunctionRef",
                                                "ref_id": "180"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "HospitalLocation"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "181"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n      "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "sort by "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "start of "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "locationPeriod"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "IdentifierRef",
                                                    "ref_id": "182"
                                                  }
                                                ],
                                                "node_type": "Start",
                                                "ref_id": "183"
                                              }
                                            ],
                                            "ref_id": "184"
                                          }
                                        ],
                                        "ref_id": "185"
                                      }
                                    ],
                                    "ref_id": "186"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n  )"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "187"
                              },
                              {
                                "children": [
                                  {
                                    "text": "."
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "locationPeriod"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "188"
                              }
                            ],
                            "node_type": "Property",
                            "ref_id": "188"
                          }
                        ],
                        "node_type": "End",
                        "ref_id": "189"
                      }
                    ],
                    "node_type": "End",
                    "ref_id": "189"
                  }
                ],
                "ref_id": "190"
              }
            ],
            "define_name": "Hospital Departure Time"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"Emergency Department Arrival Time\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "191"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "start of "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "singleton from "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "( "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "( "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Hospitalization Locations\"("
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "Encounter"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "OperandRef",
                                                                "ref_id": "192"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": ")"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "FunctionRef",
                                                            "ref_id": "193"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": ")"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "FunctionRef",
                                                        "ref_id": "193"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " HospitalLocation"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "194"
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n        "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "where "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "HospitalLocation"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "195"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "code"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "196"
                                                          }
                                                        ],
                                                        "ref_id": "196"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " in "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Emergency Department Visit\""
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "197"
                                                      }
                                                    ],
                                                    "ref_id": "198"
                                                  }
                                                ],
                                                "ref_id": "198"
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "199"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n    )"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Query",
                                        "ref_id": "199"
                                      }
                                    ],
                                    "ref_id": "200"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n  )"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "200"
                              },
                              {
                                "children": [
                                  {
                                    "text": "."
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "locationPeriod"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "201"
                              }
                            ],
                            "node_type": "Property",
                            "ref_id": "201"
                          }
                        ],
                        "node_type": "Start",
                        "ref_id": "202"
                      }
                    ],
                    "node_type": "Start",
                    "ref_id": "202"
                  }
                ],
                "ref_id": "203"
              }
            ],
            "define_name": "Emergency Department Arrival Time"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"First Inpatient Intensive Care Unit\"(Encounter "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Encounter, Performed\""
                          }
                        ]
                      }
                    ],
                    "ref_id": "204"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "First("
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Encounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "205"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "facilityLocations"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "206"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "206"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "206"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "HospitalLocation"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "207"
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "where "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "HospitalLocation"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "208"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "code"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "209"
                                              }
                                            ],
                                            "ref_id": "209"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " in "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Intensive Care Unit\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "210"
                                          }
                                        ],
                                        "node_type": "InValueSet",
                                        "ref_id": "211"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        and "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "HospitalLocation"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "212"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "locationPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "213"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "213"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " during "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Encounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "214"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "215"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "215"
                                          }
                                        ],
                                        "node_type": "IncludedIn",
                                        "ref_id": "216"
                                      }
                                    ],
                                    "ref_id": "217"
                                  }
                                ],
                                "ref_id": "217"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "sort by "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "start of "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "locationPeriod"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "IdentifierRef",
                                            "ref_id": "218"
                                          }
                                        ],
                                        "node_type": "Start",
                                        "ref_id": "219"
                                      }
                                    ],
                                    "ref_id": "220"
                                  }
                                ],
                                "ref_id": "221"
                              }
                            ],
                            "ref_id": "222"
                          },
                          {
                            "children": [
                              {
                                "text": "\n  )"
                              }
                            ]
                          }
                        ],
                        "node_type": "First",
                        "ref_id": "223"
                      }
                    ],
                    "node_type": "First",
                    "ref_id": "223"
                  }
                ],
                "ref_id": "224"
              }
            ],
            "define_name": "First Inpatient Intensive Care Unit"
          }
        ],
        "identifier": {
          "id": "MATGlobalCommonFunctions",
          "version": "2.0.000"
        }
      },
      "is_main_library": false,
      "is_top_level": true,
      "library_name": "MATGlobalCommonFunctions",
      "library_version": "2.0.000",
      "statement_dependencies": [
        {
          "statement_name": "LengthInDays"
        },
        {
          "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 who are prescribed or continuing to take statin medication at hospital discharge",
  "hqmf_id": "40280382-6240-B6B9-0162-53EAF1380A5D",
  "hqmf_set_id": "1F503318-BB8D-4B91-AF63-223AE0A2328E",
  "hqmf_version_number": "7",
  "main_cql_library": "DischargedonStatinMedication",
  "measure_attributes": [
    {
      "code": "OTH",
      "value": "105",
      "name": "eCQM Identifier (Measure Authoring Tool)",
      "code_obj": {
        "type": "CD",
        "null_flavor": "OTH",
        "original_text": "eCQM Identifier (Measure Authoring Tool)"
      },
      "value_obj": {
        "type": "ED",
        "value": "105",
        "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-2017 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-2017 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": "There is an extensive and consistent body of evidence supporting the use of statins for secondary prevention in patients with clinically evident atherosclerotic cardiovascular disease (ASCVD), which includes individuals with ischemic stroke due to large artery atherosclerosis, individuals with ischemic stroke due to intrinsic small vessel disease, and individuals with ischemic stroke not directly due to atherosclerosis but with clinically evident atherosclerotic disease in an uninvolved cerebral or noncerebral bed.  Both women and men with clinical ASCVD are at increased risk for recurrent ASCVD and ASCVD death.  High-intensity statin therapy should be initiated or continued as first-line therapy in women and men less than or equal to 75 years of age who have clinical ASCVD, unless contraindicated. In patients with clinical ASCVD and a contraindication to high-intensity statin therapy, moderate-intensity therapy should be considered as an alternative if it can be tolerated.  In individuals greater than 75 years of age, the potential for ASCVD risk reduction benefits, adverse effects, drug-drug interactions, and patient preferences should be considered, and statin therapy individualized based on these considerations (Stone, 2013).",
      "name": "Rationale",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "RAT",
        "title": "Rationale"
      },
      "value_obj": {
        "type": "ED",
        "value": "There is an extensive and consistent body of evidence supporting the use of statins for secondary prevention in patients with clinically evident atherosclerotic cardiovascular disease (ASCVD), which includes individuals with ischemic stroke due to large artery atherosclerosis, individuals with ischemic stroke due to intrinsic small vessel disease, and individuals with ischemic stroke not directly due to atherosclerosis but with clinically evident atherosclerotic disease in an uninvolved cerebral or noncerebral bed.  Both women and men with clinical ASCVD are at increased risk for recurrent ASCVD and ASCVD death.  High-intensity statin therapy should be initiated or continued as first-line therapy in women and men less than or equal to 75 years of age who have clinical ASCVD, unless contraindicated. In patients with clinical ASCVD and a contraindication to high-intensity statin therapy, moderate-intensity therapy should be considered as an alternative if it can be tolerated.  In individuals greater than 75 years of age, the potential for ASCVD risk reduction benefits, adverse effects, drug-drug interactions, and patient preferences should be considered, and statin therapy individualized based on these considerations (Stone, 2013).",
        "media_type": "text/plain"
      }
    },
    {
      "code": "CRS",
      "value": "For patients with stroke of atherosclerotic origin, intensive lipid lowering therapy with statins should be initiated",
      "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": "For patients with stroke of atherosclerotic origin, intensive lipid lowering therapy with statins should be initiated",
        "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": "Stone NJ, Robinson J, Lichtenstein AH, Noel Bairey Merz C, Blum CB, Eckel RH, Goldberg AC, Gordon D, Levy D, Lloyd-Jones DM, McBride P, Schwartz JS, Shero Jr, ST, Smith SC, Watson K, Wilson PWF. \"Guideline on the Treatment of Blood Cholesterol to Reduce Atherosclerotic Cardiovascular Disease in Adults: A Report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines.\" [In eng]. Circulation 11, (Nov 2013): 1-84.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Stone NJ, Robinson J, Lichtenstein AH, Noel Bairey Merz C, Blum CB, Eckel RH, Goldberg AC, Gordon D, Levy D, Lloyd-Jones DM, McBride P, Schwartz JS, Shero Jr, ST, Smith SC, Watson K, Wilson PWF. \"Guideline on the Treatment of Blood Cholesterol to Reduce Atherosclerotic Cardiovascular Disease in Adults: A Report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines.\" [In eng]. Circulation 11, (Nov 2013): 1-84.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Amarenco, P., J. Bogousslavsky, A. Callahan, 3rd, L. B. Goldstein, M. Hennerici, A. E. Rudolph, H. Sillesen, et al. \"High-Dose Atorvastatin after Stroke or Transient Ischemic Attack.\" [In eng]. N Engl J Med 355, no. 6 (Aug 10 2006): 549-59",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Amarenco, P., J. Bogousslavsky, A. Callahan, 3rd, L. B. Goldstein, M. Hennerici, A. E. Rudolph, H. Sillesen, et al. \"High-Dose Atorvastatin after Stroke or Transient Ischemic Attack.\" [In eng]. N Engl J Med 355, no. 6 (Aug 10 2006): 549-59",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Feher, A., G. Pusch, K. Koltai, A. Tibold, B. Gasztonyi, L. Szapary, and G. Feher. \"Statintherapy in the Primary and the Secondary Prevention of Ischaemic Cerebrovascular Diseases.\" [In eng]. Int J Cardiol 148, no. 2 (Apr 14 2011): 131-8.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Feher, A., G. Pusch, K. Koltai, A. Tibold, B. Gasztonyi, L. Szapary, and G. Feher. \"Statintherapy in the Primary and the Secondary Prevention of Ischaemic Cerebrovascular Diseases.\" [In eng]. Int J Cardiol 148, no. 2 (Apr 14 2011): 131-8.",
        "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": "National Cholesterol Education Program Expert Panel on Detection, Evaluation, and Adults Treatment of High Blood Cholesterol in Adults.\"Third Report of the National Cholesterol Education Program (Ncep) Expert Panel on Detection, Evaluation, and Treatment of High Blood Cholesterol in Adults (Adult Treatment Panel Iii) Final Report.\" [In eng]. Circulation 106, no. 25 (Dec 17 2002): 3143-421.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "National Cholesterol Education Program Expert Panel on Detection, Evaluation, and Adults Treatment of High Blood Cholesterol in Adults.\"Third Report of the National Cholesterol Education Program (Ncep) Expert Panel on Detection, Evaluation, and Treatment of High Blood Cholesterol in Adults (Adult Treatment Panel Iii) Final Report.\" [In eng]. Circulation 106, no. 25 (Dec 17 2002): 3143-421.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Squizzato, A., E. Romualdi, F. Dentali, and W. Ageno. \"Statins for Acute Ischemic Stroke.\" [In eng]. Cochrane Database Syst Rev, no. 8 (2011): CD007551.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Squizzato, A., E. Romualdi, F. Dentali, and W. Ageno. \"Statins for Acute Ischemic Stroke.\" [In eng]. Cochrane Database Syst Rev, no. 8 (2011): CD007551.",
        "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",
      "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",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEX",
      "value": "*Patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations.\n*Patients with comfort measures documented\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 admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations.\n*Patients with comfort measures documented\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 statin medication 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 statin medication 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 reason for not prescribing statin medication at discharge\n*Patients with a maximum LDL-c result of  less than 70 mg/dL <= 30 days prior to arrival or any time during the hospital stay",
      "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 reason for not prescribing statin medication at discharge\n*Patients with a maximum LDL-c result of  less than 70 mg/dL <= 30 days prior to arrival or any time during the hospital stay",
        "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": "57FE43A4-CBE2-4E94-B271-60D3C4077789",
      "preconditions": [
        {
          "id": 2,
          "preconditions": [
            {
              "id": 1,
              "reference": "DischargedonStatinMedication__Initial_Population__0FCEF10B_44C1_4201_B48E_03B5EEBA15E1"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENOM": {
      "conjunction?": true,
      "type": "DENOM",
      "hqmf_id": "342426D4-36EE-43DC-A11C-F83C0F3AEE81",
      "preconditions": [
        {
          "id": 4,
          "preconditions": [
            {
              "id": 3,
              "reference": "DischargedonStatinMedication__Denominator__0FCEF10B_44C1_4201_B48E_03B5EEBA15E1"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "NUMER": {
      "conjunction?": true,
      "type": "NUMER",
      "hqmf_id": "A1560C0B-DE34-42FA-B2BB-7D0A559A8CB9",
      "preconditions": [
        {
          "id": 6,
          "preconditions": [
            {
              "id": 5,
              "reference": "DischargedonStatinMedication__Numerator__0FCEF10B_44C1_4201_B48E_03B5EEBA15E1"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENEXCEP": {
      "conjunction?": true,
      "type": "DENEXCEP",
      "hqmf_id": "9C16306F-1ADD-4475-BF09-2DA51F56F160",
      "preconditions": [
        {
          "id": 8,
          "preconditions": [
            {
              "id": 7,
              "reference": "DischargedonStatinMedication__Denominator_Exceptions__0FCEF10B_44C1_4201_B48E_03B5EEBA15E1"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    },
    "DENEX": {
      "conjunction?": true,
      "type": "DENEX",
      "hqmf_id": "8F0CCD37-2974-4B86-A15A-9982FCA7DAB2",
      "preconditions": [
        {
          "id": 10,
          "preconditions": [
            {
              "id": 9,
              "reference": "DischargedonStatinMedication__Denominator_Exclusions__0FCEF10B_44C1_4201_B48E_03B5EEBA15E1"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    }
  },
  "population_sets": [
    {
      "population_set_id": "PopulationCriteria1",
      "populations": {
        "DENEX": {
          "hqmf_id": "8F0CCD37-2974-4B86-A15A-9982FCA7DAB2",
          "library_name": "DischargedonStatinMedication",
          "statement_name": "Denominator Exclusions"
        },
        "DENEXCEP": {
          "hqmf_id": "9C16306F-1ADD-4475-BF09-2DA51F56F160",
          "library_name": "DischargedonStatinMedication",
          "statement_name": "Denominator Exceptions"
        },
        "DENOM": {
          "hqmf_id": "342426D4-36EE-43DC-A11C-F83C0F3AEE81",
          "library_name": "DischargedonStatinMedication",
          "statement_name": "Denominator"
        },
        "IPP": {
          "hqmf_id": "57FE43A4-CBE2-4E94-B271-60D3C4077789",
          "library_name": "DischargedonStatinMedication",
          "statement_name": "Initial Population"
        },
        "NUMER": {
          "hqmf_id": "A1560C0B-DE34-42FA-B2BB-7D0A559A8CB9",
          "library_name": "DischargedonStatinMedication",
          "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": "5d289cae31fe5f8b2b7e3a55",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "payer",
      "qdmTitle": "Patient Characteristic Payer",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::PatientCharacteristicPayer"
    },
    {
      "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": "5d289cae31fe5f8b2b7e3a56",
      "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": "5d289cae31fe5f8b2b7e3a57",
      "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.292",
      "dataElementCodes": [

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

      ],
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.5",
      "id": "5d289cae31fe5f8b2b7e3a58",
      "lengthOfStay": null,
      "negationRationale": null,
      "participant": null,
      "priority": null,
      "qdmCategory": "encounter",
      "qdmStatus": "performed",
      "qdmTitle": "Encounter, Performed",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::EncounterPerformed"
    },
    {
      "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": "5d289cae31fe5f8b2b7e3a59",
      "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.215",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Laboratory Test, Performed: LDL-c",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.42",
      "id": "5d289cae31fe5f8b2b7e3a5a",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "laboratory_test",
      "qdmStatus": "performed",
      "qdmTitle": "Laboratory Test, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "referenceRange": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "resultDatetime": null,
      "status": null,
      "_type": "QDM::LaboratoryTestPerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.117.1.7.1.423",
      "dataElementCodes": [

      ],
      "description": "Allergy/Intolerance: StatinAllergen",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.119",
      "id": "5d289cae31fe5f8b2b7e3a5b",
      "prevalencePeriod": null,
      "qdmCategory": "allergy",
      "qdmStatus": "intolerance",
      "qdmTitle": "Allergy/Intolerance",
      "qdmVersion": "5.5",
      "recorder": null,
      "severity": null,
      "type": null,
      "_type": "QDM::AllergyIntolerance"
    },
    {
      "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": "5d289cae31fe5f8b2b7e3a5c",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "race",
      "qdmTitle": "Patient Characteristic Race",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicRace"
    },
    {
      "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": "5d289cae31fe5f8b2b7e3a5d",
      "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": "5d289cae31fe5f8b2b7e3a5e",
      "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"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113762.1.4.1110.19",
      "dataElementCodes": [

      ],
      "daysSupplied": null,
      "description": "Medication, Not Discharged: StatinGrouper",
      "dosage": null,
      "frequency": null,
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.48",
      "id": "5d289cae31fe5f8b2b7e3a5f",
      "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.113762.1.4.1110.19",
      "dataElementCodes": [

      ],
      "daysSupplied": null,
      "description": "Medication, Discharge: StatinGrouper",
      "dosage": null,
      "frequency": null,
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.48",
      "id": "5d289cae31fe5f8b2b7e3a60",
      "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"
    }
  ],
  "title": "Discharged on Statin Medication",
  "updated_at": null,
  "value_set_ids": [
    "5d289cae31fe5f8b2b7e3a3e",
    "5d289cae31fe5f8b2b7e3a3f",
    "5d289cae31fe5f8b2b7e3a40",
    "5d289cae31fe5f8b2b7e3a41",
    "5d289cae31fe5f8b2b7e3a42",
    "5d289cae31fe5f8b2b7e3a43",
    "5d289cae31fe5f8b2b7e3a44",
    "5d289cae31fe5f8b2b7e3a45",
    "5d289cae31fe5f8b2b7e3a46",
    "5d289cae31fe5f8b2b7e3a47",
    "5d289cae31fe5f8b2b7e3a48",
    "5d289cae31fe5f8b2b7e3a49",
    "5d289cae31fe5f8b2b7e3a4a",
    "5d289cae31fe5f8b2b7e3a4b",
    "5d289cae31fe5f8b2b7e3a4c",
    "5d289cae31fe5f8b2b7e3a4d",
    "5d289cae31fe5f8b2b7e3a4e",
    "5d289cae31fe5f8b2b7e3a4f",
    "5d289cae31fe5f8b2b7e3a50",
    "5d289cae31fe5f8b2b7e3a51",
    "5d289cae31fe5f8b2b7e3a52",
    "5d289cae31fe5f8b2b7e3a53",
    "5d289cae31fe5f8b2b7e3a54"
  ]
}