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

  ],
  "composite": false,
  "composite_hqmf_set_id": null,
  "cql_libraries": [
    {
      "cql": "library PrimaryPCIReceivedWithin90MinutesofHospitalArrival version '7.1.000'\r\n\r\nusing QDM version '5.3'\r\n\r\ninclude MATGlobalCommonFunctions version '2.0.000' called Global\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 \"Acute or Evolving MI\": 'urn:oid:2.16.840.1.113883.3.666.5.3022'\r\nvalueset \"Ambulatory surgical center\": 'urn:oid:2.16.840.1.113883.3.666.5.687'\r\nvalueset \"Aortic balloon pump insertion\": 'urn:oid:2.16.840.1.113883.3.666.5.1151'\r\nvalueset \"Cardiopulmonary arrest\": 'urn:oid:2.16.840.1.113883.3.666.5.748'\r\nvalueset \"Encounter Inpatient\": 'urn:oid:2.16.840.1.113883.3.666.5.307'\r\nvalueset \"Endotracheal Intubation\": 'urn:oid:2.16.840.1.113762.1.4.1045.69'\r\nvalueset \"Fibrinolytic Therapy\": 'urn:oid:2.16.840.1.113883.3.666.5.736'\r\nvalueset \"Transfer From Emergency Department (ED) Locations\": 'urn:oid:2.16.840.1.113883.3.666.5.3006'\r\nvalueset \"Transfer From Inpatient\": 'urn:oid:2.16.840.1.113883.3.666.5.3013'\r\nvalueset \"Transfer From Outpatient\": 'urn:oid:2.16.840.1.113883.3.67.1.101.950'\r\nvalueset \"Ventricular Assist Device placement\": 'urn:oid:2.16.840.1.113883.3.666.5.3015'\r\nvalueset \"PCI\": 'urn:oid:2.16.840.1.113762.1.4.1045.67'\r\nvalueset \"Electrocardiogram (ECG)\": 'urn:oid:2.16.840.1.113883.3.666.5.735'\r\n\r\nparameter \"Measurement Period\" Interval<DateTime>\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 \"Exception Procedures\":\r\n\t( [\"Procedure, Performed\": \"Endotracheal Intubation\"]\r\n\t\t\tunion [\"Procedure, Performed\": \"Aortic balloon pump insertion\"]\r\n\t\t\tunion [\"Procedure, Performed\": \"Ventricular Assist Device placement\"]\r\n\t)\r\n\r\ndefine \"Denominator Exceptions\":\r\n\t( \"Procedure Exceptions Within 90 Minutes of Arrival\"\r\n\t\t\tunion \"Diagnosis Exception\"\r\n\t)\r\n\r\ndefine \"Diagnostic Electrocardiogram\":\r\n\t[\"Diagnostic Study, Performed\": \"Electrocardiogram (ECG)\"]\r\n\r\ndefine \"Fibrinolytic\":\r\n\t[\"Medication, Administered\": \"Fibrinolytic Therapy\"]\r\n\r\ndefine \"PCI Procedure\":\r\n\t[\"Procedure, Performed\": \"PCI\"]\r\n\r\ndefine \"Denominator Exclusions\":\r\n\t\"Denominator\" DenominatorEncounter\r\n\t\twhere DenominatorEncounter.admissionSource in \"Ambulatory surgical center\"\r\n\t\t\tor DenominatorEncounter.admissionSource in \"Transfer From Outpatient\"\r\n\t\t\tor DenominatorEncounter.admissionSource in \"Transfer From Emergency Department (ED) Locations\"\r\n\t\t\tor DenominatorEncounter.admissionSource in \"Transfer From Inpatient\"\r\n\r\ndefine \"AMI Encounter\":\r\n\t[\"Encounter, Performed\": \"Encounter Inpatient\"] Encounter\r\n\t\twith [\"Patient Characteristic Birthdate\"] BirthDate\r\n\t\t\tsuch that Global.CalendarAgeInYearsAt(BirthDate.birthDatetime, start of Encounter.relevantPeriod)>= 18\r\n\t\t\t\tand Encounter.principalDiagnosis in \"Acute or Evolving MI\"\r\n\r\ndefine \"Inpatient Encounters\":\r\n\t[\"Encounter, Performed\": \"Encounter Inpatient\"] Encounter\r\n\t\twhere Global.\"LengthInDays\"(Encounter.relevantPeriod)<= 120\r\n\t\t\tand Encounter.relevantPeriod ends during \"Measurement Period\"\r\n\r\ndefine \"Diagnosis Exception\":\r\n\t\"Inpatient Encounters\" Encounter\r\n\t\twith [\"Diagnosis\": \"Cardiopulmonary arrest\"] CardiacArrest\r\n\t\t\tsuch that CardiacArrest.prevalencePeriod starts 90 minutes or less on or after start of Global.Hospitalization(Encounter)\r\n\r\ndefine \"Initial Population\":\r\n\t\"Inpatient Encounters\"\r\n\t\tintersect \"AMI Encounter\"\r\n\r\ndefine \"Numerator\":\r\n\t\"Initial Population\" QualifyingEncounter\r\n\t\twith \"PCI Procedure\" PCI\r\n\t\t\tsuch that PCI.relevantPeriod starts 90 minutes or less on or after Global.\"Hospital Arrival Time\"(QualifyingEncounter)\r\n\r\ndefine \"Procedure Exceptions Within 90 Minutes of Arrival\":\r\n\t\"Inpatient Encounters\" Encounter\r\n\t\twith \"Exception Procedures\" ExceptionProcedures\r\n\t\t\tsuch that ExceptionProcedures.relevantPeriod starts 90 minutes or less on or after Global.\"Hospital Arrival Time\"(Encounter)\r\n\r\ndefine \"Denominator\":\r\n\t\"Initial Population\" QualifyingEncounter\r\n\t\tlet FirstPCI: First(\"PCI Procedure\" FirstPCI\r\n\t\t\t\twhere FirstPCI.relevantPeriod starts on or after Global.\"Hospital Arrival Time\"(QualifyingEncounter)\r\n\t\t\t\tsort by start of relevantPeriod\r\n\t\t)\r\n\t\twith \"Diagnostic Electrocardiogram\" ECG\r\n\t\t\tsuch that ECG.relevantPeriod starts during Global.\"Hospitalization\"(QualifyingEncounter)\r\n\t\t\t\tor ECG.relevantPeriod starts 1 hour or less on or before Global.\"Hospital Arrival Time\"(QualifyingEncounter)\r\n\t\twhere FirstPCI.relevantPeriod starts 1440 minutes or less on or after Global.\"Hospital Arrival Time\"(QualifyingEncounter)\r\n\t\t\tand not exists ( \"Fibrinolytic\" FibrinolyticTherapy\r\n\t\t\t\t\twhere FibrinolyticTherapy.relevantPeriod starts after Global.\"Hospital Arrival Time\"(QualifyingEncounter)\r\n\t\t\t\t\t\tand FibrinolyticTherapy.relevantPeriod starts before start of FirstPCI.relevantPeriod\r\n\t\t\t)\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
            "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"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "22",
                "locator": "27:1-27:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "21",
                  "locator": "27:32-27:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "20",
                    "locator": "27:41-27:48",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "3",
                "locator": "8:1-8:68",
                "name": "ONC Administrative Sex",
                "id": "2.16.840.1.113762.1.4.1",
                "accessLevel": "Public"
              },
              {
                "localId": "4",
                "locator": "9:1-9:53",
                "name": "Race",
                "id": "2.16.840.1.114222.4.11.836",
                "accessLevel": "Public"
              },
              {
                "localId": "5",
                "locator": "10:1-10:58",
                "name": "Ethnicity",
                "id": "2.16.840.1.114222.4.11.837",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "locator": "11:1-11:55",
                "name": "Payer",
                "id": "2.16.840.1.114222.4.11.3591",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "12:1-12:73",
                "name": "Acute or Evolving MI",
                "id": "2.16.840.1.113883.3.666.5.3022",
                "accessLevel": "Public"
              },
              {
                "localId": "8",
                "locator": "13:1-13:78",
                "name": "Ambulatory surgical center",
                "id": "2.16.840.1.113883.3.666.5.687",
                "accessLevel": "Public"
              },
              {
                "localId": "9",
                "locator": "14:1-14:82",
                "name": "Aortic balloon pump insertion",
                "id": "2.16.840.1.113883.3.666.5.1151",
                "accessLevel": "Public"
              },
              {
                "localId": "10",
                "locator": "15:1-15:74",
                "name": "Cardiopulmonary arrest",
                "id": "2.16.840.1.113883.3.666.5.748",
                "accessLevel": "Public"
              },
              {
                "localId": "11",
                "locator": "16:1-16:71",
                "name": "Encounter Inpatient",
                "id": "2.16.840.1.113883.3.666.5.307",
                "accessLevel": "Public"
              },
              {
                "localId": "12",
                "locator": "17:1-17:75",
                "name": "Endotracheal Intubation",
                "id": "2.16.840.1.113762.1.4.1045.69",
                "accessLevel": "Public"
              },
              {
                "localId": "13",
                "locator": "18:1-18:72",
                "name": "Fibrinolytic Therapy",
                "id": "2.16.840.1.113883.3.666.5.736",
                "accessLevel": "Public"
              },
              {
                "localId": "14",
                "locator": "19:1-19:102",
                "name": "Transfer From Emergency Department (ED) Locations",
                "id": "2.16.840.1.113883.3.666.5.3006",
                "accessLevel": "Public"
              },
              {
                "localId": "15",
                "locator": "20:1-20:76",
                "name": "Transfer From Inpatient",
                "id": "2.16.840.1.113883.3.666.5.3013",
                "accessLevel": "Public"
              },
              {
                "localId": "16",
                "locator": "21:1-21:79",
                "name": "Transfer From Outpatient",
                "id": "2.16.840.1.113883.3.67.1.101.950",
                "accessLevel": "Public"
              },
              {
                "localId": "17",
                "locator": "22:1-22:88",
                "name": "Ventricular Assist Device placement",
                "id": "2.16.840.1.113883.3.666.5.3015",
                "accessLevel": "Public"
              },
              {
                "localId": "18",
                "locator": "23:1-23:55",
                "name": "PCI",
                "id": "2.16.840.1.113762.1.4.1045.67",
                "accessLevel": "Public"
              },
              {
                "localId": "19",
                "locator": "24:1-24:75",
                "name": "Electrocardiogram (ECG)",
                "id": "2.16.840.1.113883.3.666.5.735",
                "accessLevel": "Public"
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "29:1-29:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "29:1-29:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "24",
                "locator": "31:1-32:50",
                "name": "SDE Ethnicity",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "24",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Ethnicity\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "23",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Ethnicity\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Ethnicity\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "23",
                  "locator": "32:2-32:50",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicEthnicity",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Ethnicity",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "26",
                "locator": "34:1-35:42",
                "name": "SDE Payer",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "26",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Payer\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "25",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Payer\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Payer\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "25",
                  "locator": "35:2-35:42",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicPayer",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Payer",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "28",
                "locator": "37:1-38:40",
                "name": "SDE Race",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "28",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Race\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "27",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Race\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Race\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "27",
                  "locator": "38:2-38:40",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicRace",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Race",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "30",
                "locator": "40:1-41:57",
                "name": "SDE Sex",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "30",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Sex\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "29",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Sex\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"ONC Administrative Sex\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "29",
                  "locator": "41:2-41:57",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicSex",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "ONC Administrative Sex",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "36",
                "locator": "43:1-47:2",
                "name": "Exception Procedures",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "36",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Exception Procedures\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "35",
                          "s": [
                            {
                              "value": [
                                "( "
                              ]
                            },
                            {
                              "r": "35",
                              "s": [
                                {
                                  "r": "33",
                                  "s": [
                                    {
                                      "r": "31",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Procedure, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Endotracheal Intubation\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tunion "
                                      ]
                                    },
                                    {
                                      "r": "32",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Procedure, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Aortic balloon pump insertion\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tunion "
                                  ]
                                },
                                {
                                  "r": "34",
                                  "s": [
                                    {
                                      "value": [
                                        "[",
                                        "\"Procedure, Performed\"",
                                        ": "
                                      ]
                                    },
                                    {
                                      "s": [
                                        {
                                          "value": [
                                            "\"Ventricular Assist Device placement\""
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "]"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t)"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "35",
                  "locator": "44:2-47:2",
                  "type": "Union",
                  "operand": [
                    {
                      "localId": "33",
                      "locator": "44:4-45:66",
                      "type": "Union",
                      "operand": [
                        {
                          "localId": "31",
                          "locator": "44:4-44:54",
                          "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                          "templateId": "PositiveProcedurePerformed",
                          "codeProperty": "code",
                          "type": "Retrieve",
                          "codes": {
                            "name": "Endotracheal Intubation",
                            "type": "ValueSetRef"
                          }
                        },
                        {
                          "localId": "32",
                          "locator": "45:10-45:66",
                          "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                          "templateId": "PositiveProcedurePerformed",
                          "codeProperty": "code",
                          "type": "Retrieve",
                          "codes": {
                            "name": "Aortic balloon pump insertion",
                            "type": "ValueSetRef"
                          }
                        }
                      ]
                    },
                    {
                      "localId": "34",
                      "locator": "46:10-46:72",
                      "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                      "templateId": "PositiveProcedurePerformed",
                      "codeProperty": "code",
                      "type": "Retrieve",
                      "codes": {
                        "name": "Ventricular Assist Device placement",
                        "type": "ValueSetRef"
                      }
                    }
                  ]
                }
              },
              {
                "localId": "51",
                "locator": "76:1-79:64",
                "name": "Inpatient Encounters",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "51",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Inpatient Encounters\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "50",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "38",
                                  "s": [
                                    {
                                      "r": "37",
                                      "s": [
                                        {
                                          "r": "37",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Encounter, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Encounter Inpatient\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Encounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "49",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "49",
                                  "s": [
                                    {
                                      "r": "44",
                                      "s": [
                                        {
                                          "r": "42",
                                          "s": [
                                            {
                                              "r": "39",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "42",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"LengthInDays\"",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "41",
                                                  "s": [
                                                    {
                                                      "r": "40",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Encounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "41",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "<=",
                                            " ",
                                            "120"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "48",
                                      "s": [
                                        {
                                          "r": "46",
                                          "s": [
                                            {
                                              "r": "45",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "46",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "ends during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "47",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "50",
                  "locator": "77:2-79:64",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "38",
                      "locator": "77:2-77:58",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "37",
                        "locator": "77:2-77:48",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                        "templateId": "PositiveEncounterPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Encounter Inpatient",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "49",
                    "locator": "78:3-79:64",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "44",
                        "locator": "78:9-78:61",
                        "type": "LessOrEqual",
                        "operand": [
                          {
                            "localId": "42",
                            "locator": "78:9-78:55",
                            "name": "LengthInDays",
                            "libraryName": "Global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "41",
                                "locator": "78:31-78:54",
                                "path": "relevantPeriod",
                                "scope": "Encounter",
                                "type": "Property"
                              }
                            ]
                          },
                          {
                            "localId": "43",
                            "locator": "78:59-78:61",
                            "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                            "value": "120",
                            "type": "Literal"
                          }
                        ]
                      },
                      {
                        "localId": "48",
                        "locator": "79:8-79:64",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "79:33-79:36",
                            "type": "End",
                            "operand": {
                              "localId": "46",
                              "locator": "79:8-79:31",
                              "path": "relevantPeriod",
                              "scope": "Encounter",
                              "type": "Property"
                            }
                          },
                          {
                            "localId": "47",
                            "locator": "79:45-79:64",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "65",
                "locator": "95:1-98:127",
                "name": "Procedure Exceptions Within 90 Minutes of Arrival",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "65",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Procedure Exceptions Within 90 Minutes of Arrival\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "64",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "53",
                                  "s": [
                                    {
                                      "r": "52",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Inpatient Encounters\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Encounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "63",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "55",
                                  "s": [
                                    {
                                      "r": "54",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Exception Procedures\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "ExceptionProcedures"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "62",
                                  "s": [
                                    {
                                      "r": "57",
                                      "s": [
                                        {
                                          "r": "56",
                                          "s": [
                                            {
                                              "value": [
                                                "ExceptionProcedures"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "57",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "62",
                                      "s": [
                                        {
                                          "value": [
                                            "starts "
                                          ]
                                        },
                                        {
                                          "r": "61",
                                          "s": [
                                            {
                                              "value": [
                                                "90 ",
                                                "minutes"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " or less on or after"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "60",
                                      "s": [
                                        {
                                          "r": "58",
                                          "s": [
                                            {
                                              "value": [
                                                "Global"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "60",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Hospital Arrival Time\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "59",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "64",
                  "locator": "96:2-98:127",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "53",
                      "locator": "96:2-96:33",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "52",
                        "locator": "96:2-96:23",
                        "name": "Inpatient Encounters",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "63",
                      "locator": "97:3-98:127",
                      "alias": "ExceptionProcedures",
                      "type": "With",
                      "expression": {
                        "localId": "54",
                        "locator": "97:8-97:29",
                        "name": "Exception Procedures",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "62",
                        "locator": "98:14-98:127",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "98:49-98:54",
                            "type": "Start",
                            "operand": {
                              "localId": "57",
                              "locator": "98:14-98:47",
                              "path": "relevantPeriod",
                              "scope": "ExceptionProcedures",
                              "type": "Property"
                            }
                          },
                          {
                            "locator": "98:56-98:73",
                            "lowClosed": true,
                            "highClosed": true,
                            "type": "Interval",
                            "low": {
                              "localId": "60",
                              "locator": "98:87-98:127",
                              "name": "Hospital Arrival Time",
                              "libraryName": "Global",
                              "type": "FunctionRef",
                              "operand": [
                                {
                                  "localId": "59",
                                  "locator": "98:118-98:126",
                                  "name": "Encounter",
                                  "type": "AliasRef"
                                }
                              ]
                            },
                            "high": {
                              "locator": "98:94-98:127",
                              "type": "Add",
                              "operand": [
                                {
                                  "localId": "60",
                                  "locator": "98:87-98:127",
                                  "name": "Hospital Arrival Time",
                                  "libraryName": "Global",
                                  "type": "FunctionRef",
                                  "operand": [
                                    {
                                      "localId": "59",
                                      "locator": "98:118-98:126",
                                      "name": "Encounter",
                                      "type": "AliasRef"
                                    }
                                  ]
                                },
                                {
                                  "localId": "61",
                                  "locator": "98:56-98:65",
                                  "value": 90,
                                  "unit": "minutes",
                                  "type": "Quantity"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "81",
                "locator": "81:1-84:124",
                "name": "Diagnosis Exception",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "81",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Diagnosis Exception\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "80",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "68",
                                  "s": [
                                    {
                                      "r": "67",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Inpatient Encounters\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Encounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "79",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "70",
                                  "s": [
                                    {
                                      "r": "69",
                                      "s": [
                                        {
                                          "r": "69",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Diagnosis\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Cardiopulmonary arrest\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "CardiacArrest"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "78",
                                  "s": [
                                    {
                                      "r": "72",
                                      "s": [
                                        {
                                          "r": "71",
                                          "s": [
                                            {
                                              "value": [
                                                "CardiacArrest"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "72",
                                          "s": [
                                            {
                                              "value": [
                                                "prevalencePeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "78",
                                      "s": [
                                        {
                                          "value": [
                                            "starts "
                                          ]
                                        },
                                        {
                                          "r": "77",
                                          "s": [
                                            {
                                              "value": [
                                                "90 ",
                                                "minutes"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " or less on or after"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "76",
                                      "s": [
                                        {
                                          "value": [
                                            "start of "
                                          ]
                                        },
                                        {
                                          "r": "75",
                                          "s": [
                                            {
                                              "r": "73",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "75",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Hospitalization",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "74",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "Encounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "80",
                  "locator": "82:2-84:124",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "68",
                      "locator": "82:2-82:33",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "67",
                        "locator": "82:2-82:23",
                        "name": "Inpatient Encounters",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "79",
                      "locator": "83:3-84:124",
                      "alias": "CardiacArrest",
                      "type": "With",
                      "expression": {
                        "localId": "69",
                        "locator": "83:8-83:46",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Cardiopulmonary arrest",
                          "type": "ValueSetRef"
                        }
                      },
                      "suchThat": {
                        "localId": "78",
                        "locator": "84:14-84:124",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "84:45-84:50",
                            "type": "Start",
                            "operand": {
                              "localId": "72",
                              "locator": "84:14-84:43",
                              "path": "prevalencePeriod",
                              "scope": "CardiacArrest",
                              "type": "Property"
                            }
                          },
                          {
                            "locator": "84:52-84:69",
                            "lowClosed": true,
                            "highClosed": true,
                            "type": "Interval",
                            "low": {
                              "localId": "76",
                              "locator": "84:83-84:124",
                              "type": "Start",
                              "operand": {
                                "localId": "75",
                                "locator": "84:92-84:124",
                                "name": "Hospitalization",
                                "libraryName": "Global",
                                "type": "FunctionRef",
                                "operand": [
                                  {
                                    "localId": "74",
                                    "locator": "84:115-84:123",
                                    "name": "Encounter",
                                    "type": "AliasRef"
                                  }
                                ]
                              }
                            },
                            "high": {
                              "locator": "84:83-84:124",
                              "type": "Add",
                              "operand": [
                                {
                                  "localId": "76",
                                  "locator": "84:83-84:124",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "75",
                                    "locator": "84:92-84:124",
                                    "name": "Hospitalization",
                                    "libraryName": "Global",
                                    "type": "FunctionRef",
                                    "operand": [
                                      {
                                        "localId": "74",
                                        "locator": "84:115-84:123",
                                        "name": "Encounter",
                                        "type": "AliasRef"
                                      }
                                    ]
                                  }
                                },
                                {
                                  "localId": "77",
                                  "locator": "84:52-84:61",
                                  "value": 90,
                                  "unit": "minutes",
                                  "type": "Quantity"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "84",
                "locator": "49:1-52:2",
                "name": "Denominator Exceptions",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "84",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exceptions\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "83",
                          "s": [
                            {
                              "value": [
                                "( "
                              ]
                            },
                            {
                              "r": "83",
                              "s": [
                                {
                                  "r": "66",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Procedure Exceptions Within 90 Minutes of Arrival\""
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tunion "
                                  ]
                                },
                                {
                                  "r": "82",
                                  "s": [
                                    {
                                      "value": [
                                        "\"Diagnosis Exception\""
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t)"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "83",
                  "locator": "50:2-52:2",
                  "type": "Union",
                  "operand": [
                    {
                      "localId": "66",
                      "locator": "50:4-50:54",
                      "name": "Procedure Exceptions Within 90 Minutes of Arrival",
                      "type": "ExpressionRef"
                    },
                    {
                      "localId": "82",
                      "locator": "51:10-51:30",
                      "name": "Diagnosis Exception",
                      "type": "ExpressionRef"
                    }
                  ]
                }
              },
              {
                "localId": "86",
                "locator": "54:1-55:59",
                "name": "Diagnostic Electrocardiogram",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "86",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Diagnostic Electrocardiogram\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "85",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Diagnostic Study, Performed\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Electrocardiogram (ECG)\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "85",
                  "locator": "55:2-55:59",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveDiagnosticStudyPerformed",
                  "templateId": "PositiveDiagnosticStudyPerformed",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Electrocardiogram (ECG)",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "88",
                "locator": "57:1-58:53",
                "name": "Fibrinolytic",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "88",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Fibrinolytic\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "87",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Medication, Administered\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Fibrinolytic Therapy\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "87",
                  "locator": "58:2-58:53",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveMedicationAdministered",
                  "templateId": "PositiveMedicationAdministered",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Fibrinolytic Therapy",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "90",
                "locator": "60:1-61:32",
                "name": "PCI Procedure",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "90",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"PCI Procedure\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "89",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Procedure, Performed\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"PCI\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "89",
                  "locator": "61:2-61:32",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                  "templateId": "PositiveProcedurePerformed",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "PCI",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "112",
                "locator": "70:1-74:62",
                "name": "AMI Encounter",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "112",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"AMI Encounter\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "111",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "93",
                                  "s": [
                                    {
                                      "r": "92",
                                      "s": [
                                        {
                                          "r": "92",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Encounter, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Encounter Inpatient\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Encounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "110",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "95",
                                  "s": [
                                    {
                                      "r": "94",
                                      "s": [
                                        {
                                          "r": "94",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Patient Characteristic Birthdate\"",
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "BirthDate"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "109",
                                  "s": [
                                    {
                                      "r": "104",
                                      "s": [
                                        {
                                          "r": "102",
                                          "s": [
                                            {
                                              "r": "96",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "102",
                                              "s": [
                                                {
                                                  "value": [
                                                    "CalendarAgeInYearsAt",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "98",
                                                  "s": [
                                                    {
                                                      "r": "97",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "BirthDate"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "98",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "birthDatetime"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ", "
                                                  ]
                                                },
                                                {
                                                  "r": "101",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "start of "
                                                      ]
                                                    },
                                                    {
                                                      "r": "100",
                                                      "s": [
                                                        {
                                                          "r": "99",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Encounter"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "100",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "relevantPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ">=",
                                            " ",
                                            "18"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "108",
                                      "s": [
                                        {
                                          "r": "106",
                                          "s": [
                                            {
                                              "r": "105",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Encounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "106",
                                              "s": [
                                                {
                                                  "value": [
                                                    "principalDiagnosis"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "107",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Acute or Evolving MI\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "111",
                  "locator": "71:2-74:62",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "93",
                      "locator": "71:2-71:58",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "92",
                        "locator": "71:2-71:48",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                        "templateId": "PositiveEncounterPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Encounter Inpatient",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "110",
                      "locator": "72:3-74:62",
                      "alias": "BirthDate",
                      "type": "With",
                      "expression": {
                        "localId": "94",
                        "locator": "72:8-72:43",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicBirthdate",
                        "type": "Retrieve"
                      },
                      "suchThat": {
                        "localId": "109",
                        "locator": "73:14-74:62",
                        "type": "And",
                        "operand": [
                          {
                            "localId": "104",
                            "locator": "73:14-73:105",
                            "type": "GreaterOrEqual",
                            "operand": [
                              {
                                "localId": "102",
                                "locator": "73:14-73:100",
                                "name": "CalendarAgeInYearsAt",
                                "libraryName": "Global",
                                "type": "FunctionRef",
                                "operand": [
                                  {
                                    "localId": "98",
                                    "locator": "73:42-73:64",
                                    "path": "birthDatetime",
                                    "scope": "BirthDate",
                                    "type": "Property"
                                  },
                                  {
                                    "localId": "101",
                                    "locator": "73:67-73:99",
                                    "type": "Start",
                                    "operand": {
                                      "localId": "100",
                                      "locator": "73:76-73:99",
                                      "path": "relevantPeriod",
                                      "scope": "Encounter",
                                      "type": "Property"
                                    }
                                  }
                                ]
                              },
                              {
                                "localId": "103",
                                "locator": "73:104-73:105",
                                "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                                "value": "18",
                                "type": "Literal"
                              }
                            ]
                          },
                          {
                            "localId": "108",
                            "locator": "74:9-74:62",
                            "type": "InValueSet",
                            "code": {
                              "localId": "106",
                              "locator": "74:9-74:36",
                              "path": "principalDiagnosis",
                              "scope": "Encounter",
                              "type": "Property"
                            },
                            "valueset": {
                              "localId": "107",
                              "locator": "74:41-74:62",
                              "name": "Acute or Evolving MI"
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              },
              {
                "localId": "115",
                "locator": "86:1-88:27",
                "name": "Initial Population",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "115",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Initial Population\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "114",
                          "s": [
                            {
                              "r": "91",
                              "s": [
                                {
                                  "value": [
                                    "\"Inpatient Encounters\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tintersect "
                              ]
                            },
                            {
                              "r": "113",
                              "s": [
                                {
                                  "value": [
                                    "\"AMI Encounter\""
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "114",
                  "locator": "87:2-88:27",
                  "type": "Intersect",
                  "operand": [
                    {
                      "localId": "91",
                      "locator": "87:2-87:23",
                      "name": "Inpatient Encounters",
                      "type": "ExpressionRef"
                    },
                    {
                      "localId": "113",
                      "locator": "88:13-88:27",
                      "name": "AMI Encounter",
                      "type": "ExpressionRef"
                    }
                  ]
                }
              },
              {
                "localId": "177",
                "locator": "100:1-113:4",
                "name": "Denominator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "177",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "176",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "117",
                                  "s": [
                                    {
                                      "r": "116",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Initial Population\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "QualifyingEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "let "
                                  ]
                                },
                                {
                                  "r": "132",
                                  "s": [
                                    {
                                      "value": [
                                        "FirstPCI",
                                        ": "
                                      ]
                                    },
                                    {
                                      "r": "131",
                                      "s": [
                                        {
                                          "value": [
                                            "First",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "130",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "119",
                                                  "s": [
                                                    {
                                                      "r": "118",
                                                      "s": [
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"PCI Procedure\""
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "FirstPCI"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "125",
                                              "s": [
                                                {
                                                  "value": [
                                                    "where "
                                                  ]
                                                },
                                                {
                                                  "r": "125",
                                                  "s": [
                                                    {
                                                      "r": "121",
                                                      "s": [
                                                        {
                                                          "r": "120",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "FirstPCI"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "121",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "relevantPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "starts on or after",
                                                        " "
                                                      ]
                                                    },
                                                    {
                                                      "r": "124",
                                                      "s": [
                                                        {
                                                          "r": "122",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Global"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "124",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Hospital Arrival Time\"",
                                                                "("
                                                              ]
                                                            },
                                                            {
                                                              "r": "123",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "QualifyingEncounter"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ")"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "129",
                                              "s": [
                                                {
                                                  "value": [
                                                    "sort by "
                                                  ]
                                                },
                                                {
                                                  "r": "128",
                                                  "s": [
                                                    {
                                                      "r": "127",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "start of "
                                                          ]
                                                        },
                                                        {
                                                          "r": "126",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "relevantPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t)"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "149",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "134",
                                  "s": [
                                    {
                                      "r": "133",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Diagnostic Electrocardiogram\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "ECG"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "148",
                                  "s": [
                                    {
                                      "r": "140",
                                      "s": [
                                        {
                                          "r": "136",
                                          "s": [
                                            {
                                              "r": "135",
                                              "s": [
                                                {
                                                  "value": [
                                                    "ECG"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "136",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "starts during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "139",
                                          "s": [
                                            {
                                              "r": "137",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "139",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Hospitalization\"",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "138",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "QualifyingEncounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\t\tor "
                                      ]
                                    },
                                    {
                                      "r": "147",
                                      "s": [
                                        {
                                          "r": "142",
                                          "s": [
                                            {
                                              "r": "141",
                                              "s": [
                                                {
                                                  "value": [
                                                    "ECG"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "142",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "147",
                                          "s": [
                                            {
                                              "value": [
                                                "starts "
                                              ]
                                            },
                                            {
                                              "r": "146",
                                              "s": [
                                                {
                                                  "value": [
                                                    "1 ",
                                                    "hour"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " or less on or before"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "145",
                                          "s": [
                                            {
                                              "r": "143",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "145",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Hospital Arrival Time\"",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "144",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "QualifyingEncounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "175",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "175",
                                  "s": [
                                    {
                                      "r": "156",
                                      "s": [
                                        {
                                          "r": "151",
                                          "s": [
                                            {
                                              "r": "150",
                                              "s": [
                                                {
                                                  "value": [
                                                    "FirstPCI"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "151",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "156",
                                          "s": [
                                            {
                                              "value": [
                                                "starts "
                                              ]
                                            },
                                            {
                                              "r": "155",
                                              "s": [
                                                {
                                                  "value": [
                                                    "1440 ",
                                                    "minutes"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " or less on or after"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "154",
                                          "s": [
                                            {
                                              "r": "152",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "154",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Hospital Arrival Time\"",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "153",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "QualifyingEncounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "174",
                                      "s": [
                                        {
                                          "value": [
                                            "not "
                                          ]
                                        },
                                        {
                                          "r": "173",
                                          "s": [
                                            {
                                              "value": [
                                                "exists "
                                              ]
                                            },
                                            {
                                              "r": "172",
                                              "s": [
                                                {
                                                  "value": [
                                                    "( "
                                                  ]
                                                },
                                                {
                                                  "r": "172",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "r": "158",
                                                          "s": [
                                                            {
                                                              "r": "157",
                                                              "s": [
                                                                {
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Fibrinolytic\""
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " ",
                                                                "FibrinolyticTherapy"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t\t\t"
                                                      ]
                                                    },
                                                    {
                                                      "r": "171",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "where "
                                                          ]
                                                        },
                                                        {
                                                          "r": "171",
                                                          "s": [
                                                            {
                                                              "r": "164",
                                                              "s": [
                                                                {
                                                                  "r": "160",
                                                                  "s": [
                                                                    {
                                                                      "r": "159",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "FibrinolyticTherapy"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "160",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "relevantPeriod"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "starts after",
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "163",
                                                                  "s": [
                                                                    {
                                                                      "r": "161",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "Global"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "163",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "\"Hospital Arrival Time\"",
                                                                            "("
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "162",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "QualifyingEncounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            ")"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "\n\t\t\t\t\t\tand "
                                                              ]
                                                            },
                                                            {
                                                              "r": "170",
                                                              "s": [
                                                                {
                                                                  "r": "166",
                                                                  "s": [
                                                                    {
                                                                      "r": "165",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "FibrinolyticTherapy"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "."
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "166",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "relevantPeriod"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "starts before",
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "169",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "168",
                                                                      "s": [
                                                                        {
                                                                          "r": "167",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "FirstPCI"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "168",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t)"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "176",
                  "locator": "101:2-113:4",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "117",
                      "locator": "101:2-101:41",
                      "alias": "QualifyingEncounter",
                      "expression": {
                        "localId": "116",
                        "locator": "101:2-101:21",
                        "name": "Initial Population",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "let": [
                    {
                      "localId": "132",
                      "locator": "102:7-105:3",
                      "identifier": "FirstPCI",
                      "expression": {
                        "localId": "131",
                        "locator": "102:17-105:3",
                        "type": "First",
                        "source": {
                          "localId": "130",
                          "locator": "102:23-104:35",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "119",
                              "locator": "102:23-102:46",
                              "alias": "FirstPCI",
                              "expression": {
                                "localId": "118",
                                "locator": "102:23-102:37",
                                "name": "PCI Procedure",
                                "type": "ExpressionRef"
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "125",
                            "locator": "103:5-103:104",
                            "type": "SameOrAfter",
                            "operand": [
                              {
                                "locator": "103:35-103:40",
                                "type": "Start",
                                "operand": {
                                  "localId": "121",
                                  "locator": "103:11-103:33",
                                  "path": "relevantPeriod",
                                  "scope": "FirstPCI",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "124",
                                "locator": "103:54-103:104",
                                "name": "Hospital Arrival Time",
                                "libraryName": "Global",
                                "type": "FunctionRef",
                                "operand": [
                                  {
                                    "localId": "123",
                                    "locator": "103:85-103:103",
                                    "name": "QualifyingEncounter",
                                    "type": "AliasRef"
                                  }
                                ]
                              }
                            ]
                          },
                          "sort": {
                            "localId": "129",
                            "locator": "104:5-104:35",
                            "by": [
                              {
                                "localId": "128",
                                "locator": "104:13-104:35",
                                "direction": "asc",
                                "type": "ByExpression",
                                "expression": {
                                  "localId": "127",
                                  "locator": "104:13-104:35",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "126",
                                    "locator": "104:22-104:35",
                                    "name": "relevantPeriod",
                                    "type": "IdentifierRef"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "149",
                      "locator": "106:3-108:112",
                      "alias": "ECG",
                      "type": "With",
                      "expression": {
                        "localId": "133",
                        "locator": "106:8-106:37",
                        "name": "Diagnostic Electrocardiogram",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "148",
                        "locator": "107:14-108:112",
                        "type": "Or",
                        "operand": [
                          {
                            "localId": "140",
                            "locator": "107:14-107:91",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "107:33-107:38",
                                "type": "Start",
                                "operand": {
                                  "localId": "136",
                                  "locator": "107:14-107:31",
                                  "path": "relevantPeriod",
                                  "scope": "ECG",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "139",
                                "locator": "107:47-107:91",
                                "name": "Hospitalization",
                                "libraryName": "Global",
                                "type": "FunctionRef",
                                "operand": [
                                  {
                                    "localId": "138",
                                    "locator": "107:72-107:90",
                                    "name": "QualifyingEncounter",
                                    "type": "AliasRef"
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "localId": "147",
                            "locator": "108:8-108:112",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "108:27-108:32",
                                "type": "Start",
                                "operand": {
                                  "localId": "142",
                                  "locator": "108:8-108:25",
                                  "path": "relevantPeriod",
                                  "scope": "ECG",
                                  "type": "Property"
                                }
                              },
                              {
                                "locator": "108:34-108:47",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "locator": "108:69-108:112",
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "145",
                                      "locator": "108:62-108:112",
                                      "name": "Hospital Arrival Time",
                                      "libraryName": "Global",
                                      "type": "FunctionRef",
                                      "operand": [
                                        {
                                          "localId": "144",
                                          "locator": "108:93-108:111",
                                          "name": "QualifyingEncounter",
                                          "type": "AliasRef"
                                        }
                                      ]
                                    },
                                    {
                                      "localId": "146",
                                      "locator": "108:34-108:39",
                                      "value": 1,
                                      "unit": "hour",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "145",
                                  "locator": "108:62-108:112",
                                  "name": "Hospital Arrival Time",
                                  "libraryName": "Global",
                                  "type": "FunctionRef",
                                  "operand": [
                                    {
                                      "localId": "144",
                                      "locator": "108:93-108:111",
                                      "name": "QualifyingEncounter",
                                      "type": "AliasRef"
                                    }
                                  ]
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ],
                  "where": {
                    "localId": "175",
                    "locator": "109:3-113:4",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "156",
                        "locator": "109:9-109:123",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "109:33-109:38",
                            "type": "Start",
                            "operand": {
                              "localId": "151",
                              "locator": "109:9-109:31",
                              "path": "relevantPeriod",
                              "type": "Property",
                              "source": {
                                "localId": "150",
                                "locator": "109:9-109:16",
                                "name": "FirstPCI",
                                "type": "QueryLetRef"
                              }
                            }
                          },
                          {
                            "locator": "109:40-109:59",
                            "lowClosed": true,
                            "highClosed": true,
                            "type": "Interval",
                            "low": {
                              "localId": "154",
                              "locator": "109:73-109:123",
                              "name": "Hospital Arrival Time",
                              "libraryName": "Global",
                              "type": "FunctionRef",
                              "operand": [
                                {
                                  "localId": "153",
                                  "locator": "109:104-109:122",
                                  "name": "QualifyingEncounter",
                                  "type": "AliasRef"
                                }
                              ]
                            },
                            "high": {
                              "locator": "109:80-109:123",
                              "type": "Add",
                              "operand": [
                                {
                                  "localId": "154",
                                  "locator": "109:73-109:123",
                                  "name": "Hospital Arrival Time",
                                  "libraryName": "Global",
                                  "type": "FunctionRef",
                                  "operand": [
                                    {
                                      "localId": "153",
                                      "locator": "109:104-109:122",
                                      "name": "QualifyingEncounter",
                                      "type": "AliasRef"
                                    }
                                  ]
                                },
                                {
                                  "localId": "155",
                                  "locator": "109:40-109:51",
                                  "value": 1440,
                                  "unit": "minutes",
                                  "type": "Quantity"
                                }
                              ]
                            }
                          }
                        ]
                      },
                      {
                        "localId": "174",
                        "locator": "110:8-113:4",
                        "type": "Not",
                        "operand": {
                          "localId": "173",
                          "locator": "110:12-113:4",
                          "type": "Exists",
                          "operand": {
                            "localId": "172",
                            "locator": "110:19-113:4",
                            "type": "Query",
                            "source": [
                              {
                                "localId": "158",
                                "locator": "110:21-110:54",
                                "alias": "FibrinolyticTherapy",
                                "expression": {
                                  "localId": "157",
                                  "locator": "110:21-110:34",
                                  "name": "Fibrinolytic",
                                  "type": "ExpressionRef"
                                }
                              }
                            ],
                            "relationship": [

                            ],
                            "where": {
                              "localId": "171",
                              "locator": "111:6-112:91",
                              "type": "And",
                              "operand": [
                                {
                                  "localId": "164",
                                  "locator": "111:12-111:110",
                                  "type": "After",
                                  "operand": [
                                    {
                                      "locator": "111:47-111:52",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "160",
                                        "locator": "111:12-111:45",
                                        "path": "relevantPeriod",
                                        "scope": "FibrinolyticTherapy",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "163",
                                      "locator": "111:60-111:110",
                                      "name": "Hospital Arrival Time",
                                      "libraryName": "Global",
                                      "type": "FunctionRef",
                                      "operand": [
                                        {
                                          "localId": "162",
                                          "locator": "111:91-111:109",
                                          "name": "QualifyingEncounter",
                                          "type": "AliasRef"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "localId": "170",
                                  "locator": "112:11-112:91",
                                  "type": "Before",
                                  "operand": [
                                    {
                                      "locator": "112:46-112:51",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "166",
                                        "locator": "112:11-112:44",
                                        "path": "relevantPeriod",
                                        "scope": "FibrinolyticTherapy",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "169",
                                      "locator": "112:60-112:91",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "168",
                                        "locator": "112:69-112:91",
                                        "path": "relevantPeriod",
                                        "type": "Property",
                                        "source": {
                                          "localId": "167",
                                          "locator": "112:69-112:76",
                                          "name": "FirstPCI",
                                          "type": "QueryLetRef"
                                        }
                                      }
                                    }
                                  ]
                                }
                              ]
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "200",
                "locator": "63:1-68:71",
                "name": "Denominator Exclusions",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "200",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exclusions\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "199",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "179",
                                  "s": [
                                    {
                                      "r": "178",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Denominator\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "DenominatorEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "198",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "198",
                                  "s": [
                                    {
                                      "r": "193",
                                      "s": [
                                        {
                                          "r": "188",
                                          "s": [
                                            {
                                              "r": "183",
                                              "s": [
                                                {
                                                  "r": "181",
                                                  "s": [
                                                    {
                                                      "r": "180",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "DenominatorEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "181",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "admissionSource"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " in "
                                                  ]
                                                },
                                                {
                                                  "r": "182",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Ambulatory surgical center\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\tor "
                                              ]
                                            },
                                            {
                                              "r": "187",
                                              "s": [
                                                {
                                                  "r": "185",
                                                  "s": [
                                                    {
                                                      "r": "184",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "DenominatorEncounter"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "185",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "admissionSource"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " in "
                                                  ]
                                                },
                                                {
                                                  "r": "186",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Transfer From Outpatient\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t\tor "
                                          ]
                                        },
                                        {
                                          "r": "192",
                                          "s": [
                                            {
                                              "r": "190",
                                              "s": [
                                                {
                                                  "r": "189",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "DenominatorEncounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "190",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "admissionSource"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " in "
                                              ]
                                            },
                                            {
                                              "r": "191",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Transfer From Emergency Department (ED) Locations\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tor "
                                      ]
                                    },
                                    {
                                      "r": "197",
                                      "s": [
                                        {
                                          "r": "195",
                                          "s": [
                                            {
                                              "r": "194",
                                              "s": [
                                                {
                                                  "value": [
                                                    "DenominatorEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "195",
                                              "s": [
                                                {
                                                  "value": [
                                                    "admissionSource"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " in "
                                          ]
                                        },
                                        {
                                          "r": "196",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Transfer From Inpatient\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "199",
                  "locator": "64:2-68:71",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "179",
                      "locator": "64:2-64:35",
                      "alias": "DenominatorEncounter",
                      "expression": {
                        "localId": "178",
                        "locator": "64:2-64:14",
                        "name": "Denominator",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "198",
                    "locator": "65:3-68:71",
                    "type": "Or",
                    "operand": [
                      {
                        "localId": "193",
                        "locator": "65:9-67:97",
                        "type": "Or",
                        "operand": [
                          {
                            "localId": "188",
                            "locator": "65:9-66:72",
                            "type": "Or",
                            "operand": [
                              {
                                "localId": "183",
                                "locator": "65:9-65:76",
                                "type": "InValueSet",
                                "code": {
                                  "localId": "181",
                                  "locator": "65:9-65:44",
                                  "path": "admissionSource",
                                  "scope": "DenominatorEncounter",
                                  "type": "Property"
                                },
                                "valueset": {
                                  "localId": "182",
                                  "locator": "65:49-65:76",
                                  "name": "Ambulatory surgical center"
                                }
                              },
                              {
                                "localId": "187",
                                "locator": "66:7-66:72",
                                "type": "InValueSet",
                                "code": {
                                  "localId": "185",
                                  "locator": "66:7-66:42",
                                  "path": "admissionSource",
                                  "scope": "DenominatorEncounter",
                                  "type": "Property"
                                },
                                "valueset": {
                                  "localId": "186",
                                  "locator": "66:47-66:72",
                                  "name": "Transfer From Outpatient"
                                }
                              }
                            ]
                          },
                          {
                            "localId": "192",
                            "locator": "67:7-67:97",
                            "type": "InValueSet",
                            "code": {
                              "localId": "190",
                              "locator": "67:7-67:42",
                              "path": "admissionSource",
                              "scope": "DenominatorEncounter",
                              "type": "Property"
                            },
                            "valueset": {
                              "localId": "191",
                              "locator": "67:47-67:97",
                              "name": "Transfer From Emergency Department (ED) Locations"
                            }
                          }
                        ]
                      },
                      {
                        "localId": "197",
                        "locator": "68:7-68:71",
                        "type": "InValueSet",
                        "code": {
                          "localId": "195",
                          "locator": "68:7-68:42",
                          "path": "admissionSource",
                          "scope": "DenominatorEncounter",
                          "type": "Property"
                        },
                        "valueset": {
                          "localId": "196",
                          "locator": "68:47-68:71",
                          "name": "Transfer From Inpatient"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "214",
                "locator": "90:1-93:121",
                "name": "Numerator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "214",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Numerator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "213",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "202",
                                  "s": [
                                    {
                                      "r": "201",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Initial Population\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "QualifyingEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "212",
                              "s": [
                                {
                                  "value": [
                                    "with "
                                  ]
                                },
                                {
                                  "r": "204",
                                  "s": [
                                    {
                                      "r": "203",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"PCI Procedure\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "PCI"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t\tsuch that "
                                  ]
                                },
                                {
                                  "r": "211",
                                  "s": [
                                    {
                                      "r": "206",
                                      "s": [
                                        {
                                          "r": "205",
                                          "s": [
                                            {
                                              "value": [
                                                "PCI"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "206",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "211",
                                      "s": [
                                        {
                                          "value": [
                                            "starts "
                                          ]
                                        },
                                        {
                                          "r": "210",
                                          "s": [
                                            {
                                              "value": [
                                                "90 ",
                                                "minutes"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " or less on or after"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "209",
                                      "s": [
                                        {
                                          "r": "207",
                                          "s": [
                                            {
                                              "value": [
                                                "Global"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "209",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Hospital Arrival Time\"",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "208",
                                              "s": [
                                                {
                                                  "value": [
                                                    "QualifyingEncounter"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                ")"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "213",
                  "locator": "91:2-93:121",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "202",
                      "locator": "91:2-91:41",
                      "alias": "QualifyingEncounter",
                      "expression": {
                        "localId": "201",
                        "locator": "91:2-91:21",
                        "name": "Initial Population",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [
                    {
                      "localId": "212",
                      "locator": "92:3-93:121",
                      "alias": "PCI",
                      "type": "With",
                      "expression": {
                        "localId": "203",
                        "locator": "92:8-92:22",
                        "name": "PCI Procedure",
                        "type": "ExpressionRef"
                      },
                      "suchThat": {
                        "localId": "211",
                        "locator": "93:14-93:121",
                        "type": "In",
                        "operand": [
                          {
                            "locator": "93:33-93:38",
                            "type": "Start",
                            "operand": {
                              "localId": "206",
                              "locator": "93:14-93:31",
                              "path": "relevantPeriod",
                              "scope": "PCI",
                              "type": "Property"
                            }
                          },
                          {
                            "locator": "93:40-93:57",
                            "lowClosed": true,
                            "highClosed": true,
                            "type": "Interval",
                            "low": {
                              "localId": "209",
                              "locator": "93:71-93:121",
                              "name": "Hospital Arrival Time",
                              "libraryName": "Global",
                              "type": "FunctionRef",
                              "operand": [
                                {
                                  "localId": "208",
                                  "locator": "93:102-93:120",
                                  "name": "QualifyingEncounter",
                                  "type": "AliasRef"
                                }
                              ]
                            },
                            "high": {
                              "locator": "93:78-93:121",
                              "type": "Add",
                              "operand": [
                                {
                                  "localId": "209",
                                  "locator": "93:71-93:121",
                                  "name": "Hospital Arrival Time",
                                  "libraryName": "Global",
                                  "type": "FunctionRef",
                                  "operand": [
                                    {
                                      "localId": "208",
                                      "locator": "93:102-93:120",
                                      "name": "QualifyingEncounter",
                                      "type": "AliasRef"
                                    }
                                  ]
                                },
                                {
                                  "localId": "210",
                                  "locator": "93:40-93:49",
                                  "value": 90,
                                  "unit": "minutes",
                                  "type": "Quantity"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "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": "23"
                  }
                ],
                "ref_id": "24"
              }
            ],
            "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": "25"
                  }
                ],
                "ref_id": "26"
              }
            ],
            "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": "27"
                  }
                ],
                "ref_id": "28"
              }
            ],
            "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": "29"
                  }
                ],
                "ref_id": "30"
              }
            ],
            "define_name": "SDE Sex"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Exception Procedures\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "( "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Procedure, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Endotracheal Intubation\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "31"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      union "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Procedure, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Aortic balloon pump insertion\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "32"
                              }
                            ],
                            "node_type": "Union",
                            "ref_id": "33"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      union "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "[\"Procedure, Performed\": "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Ventricular Assist Device placement\""
                                      }
                                    ]
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "text": "]"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Retrieve",
                            "ref_id": "34"
                          }
                        ],
                        "node_type": "Union",
                        "ref_id": "35"
                      },
                      {
                        "children": [
                          {
                            "text": "\n  )"
                          }
                        ]
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "35"
                  }
                ],
                "ref_id": "36"
              }
            ],
            "define_name": "Exception Procedures"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Inpatient Encounters\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Encounter, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Encounter Inpatient\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "37"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "37"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Encounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "38"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "39"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"LengthInDays\"("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Encounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "40"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "41"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "41"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "42"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "42"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&lt;= 120"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "LessOrEqual",
                                "ref_id": "44"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "45"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "46"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "46"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " ends during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "47"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "48"
                              }
                            ],
                            "ref_id": "49"
                          }
                        ],
                        "ref_id": "49"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "50"
                  }
                ],
                "ref_id": "51"
              }
            ],
            "define_name": "Inpatient Encounters"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Procedure Exceptions Within 90 Minutes of Arrival\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Inpatient Encounters\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "52"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Encounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "53"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Exception Procedures\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "54"
                              },
                              {
                                "children": [
                                  {
                                    "text": " ExceptionProcedures"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "55"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "ExceptionProcedures"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "56"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "57"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "57"
                              },
                              {
                                "children": [
                                  {
                                    "text": " "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "starts "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "90 minutes"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Quantity",
                                    "ref_id": "61"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " or less on or after"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "62"
                              },
                              {
                                "children": [
                                  {
                                    "text": " "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Global"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "58"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Hospital Arrival Time\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "59"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ")"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "60"
                                  }
                                ],
                                "node_type": "FunctionRef",
                                "ref_id": "60"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "62"
                          }
                        ],
                        "ref_id": "63"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "64"
                  }
                ],
                "ref_id": "65"
              }
            ],
            "define_name": "Procedure Exceptions Within 90 Minutes of Arrival"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Diagnosis Exception\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Inpatient Encounters\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "67"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Encounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "68"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Diagnosis\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Cardiopulmonary arrest\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "69"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "69"
                              },
                              {
                                "children": [
                                  {
                                    "text": " CardiacArrest"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "70"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "CardiacArrest"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "71"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "prevalencePeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "72"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "72"
                              },
                              {
                                "children": [
                                  {
                                    "text": " "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "starts "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "90 minutes"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Quantity",
                                    "ref_id": "77"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " or less on or after"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "78"
                              },
                              {
                                "children": [
                                  {
                                    "text": " "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "start of "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "73"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Hospitalization("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "Encounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "AliasRef",
                                            "ref_id": "74"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "75"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "75"
                                  }
                                ],
                                "node_type": "Start",
                                "ref_id": "76"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "78"
                          }
                        ],
                        "ref_id": "79"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "80"
                  }
                ],
                "ref_id": "81"
              }
            ],
            "define_name": "Diagnosis Exception"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator Exceptions\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "( "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Procedure Exceptions Within 90 Minutes of Arrival\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "66"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      union "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"Diagnosis Exception\""
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "82"
                          }
                        ],
                        "node_type": "Union",
                        "ref_id": "83"
                      },
                      {
                        "children": [
                          {
                            "text": "\n  )"
                          }
                        ]
                      }
                    ],
                    "node_type": "Union",
                    "ref_id": "83"
                  }
                ],
                "ref_id": "84"
              }
            ],
            "define_name": "Denominator Exceptions"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Diagnostic Electrocardiogram\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Diagnostic Study, Performed\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Electrocardiogram (ECG)\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "85"
                  }
                ],
                "ref_id": "86"
              }
            ],
            "define_name": "Diagnostic Electrocardiogram"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Fibrinolytic\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Medication, Administered\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Fibrinolytic Therapy\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "87"
                  }
                ],
                "ref_id": "88"
              }
            ],
            "define_name": "Fibrinolytic"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"PCI Procedure\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Procedure, Performed\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"PCI\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "89"
                  }
                ],
                "ref_id": "90"
              }
            ],
            "define_name": "PCI Procedure"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"AMI Encounter\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Encounter, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Encounter Inpatient\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "92"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "92"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Encounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "93"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Patient Characteristic Birthdate\"]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "94"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "94"
                              },
                              {
                                "children": [
                                  {
                                    "text": " BirthDate"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "95"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "96"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "CalendarAgeInYearsAt("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "BirthDate"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "97"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "birthDatetime"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "98"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "98"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ", "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "start of "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Encounter"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "99"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "relevantPeriod"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "100"
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "100"
                                              }
                                            ],
                                            "node_type": "Start",
                                            "ref_id": "101"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "102"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "102"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&gt;= 18"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "GreaterOrEqual",
                                "ref_id": "104"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n        and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Encounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "105"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "principalDiagnosis"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "106"
                                      }
                                    ],
                                    "ref_id": "106"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Acute or Evolving MI\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "107"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "108"
                              }
                            ],
                            "node_type": "And",
                            "ref_id": "109"
                          }
                        ],
                        "ref_id": "110"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "111"
                  }
                ],
                "ref_id": "112"
              }
            ],
            "define_name": "AMI Encounter"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Initial Population\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Inpatient Encounters\""
                              }
                            ]
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "91"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    intersect "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"AMI Encounter\""
                              }
                            ]
                          }
                        ],
                        "node_type": "ExpressionRef",
                        "ref_id": "113"
                      }
                    ],
                    "node_type": "Intersect",
                    "ref_id": "114"
                  }
                ],
                "ref_id": "115"
              }
            ],
            "define_name": "Initial Population"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Initial Population\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "116"
                              },
                              {
                                "children": [
                                  {
                                    "text": " QualifyingEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "117"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "let "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "FirstPCI: "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "First("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"PCI Procedure\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "ExpressionRef",
                                                "ref_id": "118"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " FirstPCI"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "119"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "where "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "FirstPCI"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "120"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "relevantPeriod"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "121"
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "121"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " starts on or after "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Global"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "122"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Hospital Arrival Time\"("
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "QualifyingEncounter"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "AliasRef",
                                                        "ref_id": "123"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ")"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "FunctionRef",
                                                    "ref_id": "124"
                                                  }
                                                ],
                                                "node_type": "FunctionRef",
                                                "ref_id": "124"
                                              }
                                            ],
                                            "ref_id": "125"
                                          }
                                        ],
                                        "ref_id": "125"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "sort by "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "start of "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "relevantPeriod"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "IdentifierRef",
                                                    "ref_id": "126"
                                                  }
                                                ],
                                                "node_type": "Start",
                                                "ref_id": "127"
                                              }
                                            ],
                                            "ref_id": "128"
                                          }
                                        ],
                                        "ref_id": "129"
                                      }
                                    ],
                                    "ref_id": "130"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n    )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "First",
                                "ref_id": "131"
                              }
                            ],
                            "ref_id": "132"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Diagnostic Electrocardiogram\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "133"
                              },
                              {
                                "children": [
                                  {
                                    "text": " ECG"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "134"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "ECG"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "135"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "136"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "136"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " starts during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "137"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Hospitalization\"("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "QualifyingEncounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "AliasRef",
                                            "ref_id": "138"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "139"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "139"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "140"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n        or "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "ECG"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "141"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "142"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "142"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "starts "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "1 hour"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Quantity",
                                        "ref_id": "146"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " or less on or before"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "In",
                                    "ref_id": "147"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "143"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Hospital Arrival Time\"("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "QualifyingEncounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "AliasRef",
                                            "ref_id": "144"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "145"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "145"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "147"
                              }
                            ],
                            "node_type": "Or",
                            "ref_id": "148"
                          }
                        ],
                        "ref_id": "149"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "FirstPCI"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "150"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "151"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "151"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "starts "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "1440 minutes"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Quantity",
                                        "ref_id": "155"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " or less on or after"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "In",
                                    "ref_id": "156"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "152"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Hospital Arrival Time\"("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "QualifyingEncounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "AliasRef",
                                            "ref_id": "153"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "154"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "154"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "156"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "not "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "exists "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "( "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Fibrinolytic\""
                                                                  }
                                                                ]
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "ExpressionRef",
                                                        "ref_id": "157"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " FibrinolyticTherapy"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "158"
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n          "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "where "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "FibrinolyticTherapy"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "159"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "relevantPeriod"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "160"
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "160"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " starts after "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "Global"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "161"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "\"Hospital Arrival Time\"("
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "QualifyingEncounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "AliasRef",
                                                                    "ref_id": "162"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": ")"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "FunctionRef",
                                                                "ref_id": "163"
                                                              }
                                                            ],
                                                            "node_type": "FunctionRef",
                                                            "ref_id": "163"
                                                          }
                                                        ],
                                                        "node_type": "After",
                                                        "ref_id": "164"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\n            and "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "FibrinolyticTherapy"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "165"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "."
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "relevantPeriod"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "166"
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "166"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " starts before "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "FirstPCI"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "167"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "168"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "168"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "169"
                                                          }
                                                        ],
                                                        "node_type": "Before",
                                                        "ref_id": "170"
                                                      }
                                                    ],
                                                    "ref_id": "171"
                                                  }
                                                ],
                                                "ref_id": "171"
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "172"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n      )"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Query",
                                        "ref_id": "172"
                                      }
                                    ],
                                    "node_type": "Exists",
                                    "ref_id": "173"
                                  }
                                ],
                                "node_type": "Not",
                                "ref_id": "174"
                              }
                            ],
                            "ref_id": "175"
                          }
                        ],
                        "ref_id": "175"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "176"
                  }
                ],
                "ref_id": "177"
              }
            ],
            "define_name": "Denominator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator Exclusions\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Denominator\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "178"
                              },
                              {
                                "children": [
                                  {
                                    "text": " DenominatorEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "179"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "DenominatorEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "180"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "admissionSource"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "181"
                                              }
                                            ],
                                            "ref_id": "181"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " in "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Ambulatory surgical center\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "182"
                                          }
                                        ],
                                        "node_type": "InValueSet",
                                        "ref_id": "183"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n      or "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "DenominatorEncounter"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "184"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "admissionSource"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "185"
                                              }
                                            ],
                                            "ref_id": "185"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " in "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Transfer From Outpatient\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "186"
                                          }
                                        ],
                                        "node_type": "InValueSet",
                                        "ref_id": "187"
                                      }
                                    ],
                                    "node_type": "Or",
                                    "ref_id": "188"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n      or "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "DenominatorEncounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "189"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "admissionSource"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "190"
                                          }
                                        ],
                                        "ref_id": "190"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " in "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Transfer From Emergency Department (ED) Locations\""
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "191"
                                      }
                                    ],
                                    "node_type": "InValueSet",
                                    "ref_id": "192"
                                  }
                                ],
                                "node_type": "Or",
                                "ref_id": "193"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      or "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "DenominatorEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "194"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "admissionSource"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "195"
                                      }
                                    ],
                                    "ref_id": "195"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " in "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Transfer From Inpatient\""
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "196"
                                  }
                                ],
                                "node_type": "InValueSet",
                                "ref_id": "197"
                              }
                            ],
                            "ref_id": "198"
                          }
                        ],
                        "ref_id": "198"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "199"
                  }
                ],
                "ref_id": "200"
              }
            ],
            "define_name": "Denominator Exclusions"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Numerator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Initial Population\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "201"
                              },
                              {
                                "children": [
                                  {
                                    "text": " QualifyingEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "202"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "with "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"PCI Procedure\""
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "203"
                              },
                              {
                                "children": [
                                  {
                                    "text": " PCI"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "204"
                          },
                          {
                            "children": [
                              {
                                "text": "\n      such that "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "PCI"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "205"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "206"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "206"
                              },
                              {
                                "children": [
                                  {
                                    "text": " "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "starts "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "90 minutes"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Quantity",
                                    "ref_id": "210"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " or less on or after"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "211"
                              },
                              {
                                "children": [
                                  {
                                    "text": " "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "Global"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "207"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Hospital Arrival Time\"("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "QualifyingEncounter"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "AliasRef",
                                        "ref_id": "208"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": ")"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "209"
                                  }
                                ],
                                "node_type": "FunctionRef",
                                "ref_id": "209"
                              }
                            ],
                            "node_type": "In",
                            "ref_id": "211"
                          }
                        ],
                        "ref_id": "212"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "213"
                  }
                ],
                "ref_id": "214"
              }
            ],
            "define_name": "Numerator"
          }
        ],
        "identifier": {
          "id": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
          "version": "7.1.000"
        }
      },
      "is_main_library": true,
      "is_top_level": true,
      "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
      "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": "Exception Procedures"
        },
        {
          "statement_name": "Inpatient Encounters",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "LengthInDays"
            }
          ]
        },
        {
          "statement_name": "Procedure Exceptions Within 90 Minutes of Arrival",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Inpatient Encounters"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Exception Procedures"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            }
          ]
        },
        {
          "statement_name": "Diagnosis Exception",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Inpatient Encounters"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization"
            }
          ]
        },
        {
          "statement_name": "Denominator Exceptions",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Procedure Exceptions Within 90 Minutes of Arrival"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Diagnosis Exception"
            }
          ]
        },
        {
          "statement_name": "Diagnostic Electrocardiogram"
        },
        {
          "statement_name": "Fibrinolytic"
        },
        {
          "statement_name": "PCI Procedure"
        },
        {
          "statement_name": "AMI Encounter",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "CalendarAgeInYearsAt"
            }
          ]
        },
        {
          "statement_name": "Initial Population",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Inpatient Encounters"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "AMI Encounter"
            }
          ]
        },
        {
          "statement_name": "Denominator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Initial Population"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "PCI Procedure"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Diagnostic Electrocardiogram"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Fibrinolytic"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            }
          ]
        },
        {
          "statement_name": "Denominator Exclusions",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Denominator"
            }
          ]
        },
        {
          "statement_name": "Numerator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "Initial Population"
            },
            {
              "hqmf_id": null,
              "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
              "statement_name": "PCI Procedure"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospital Arrival Time"
            }
          ]
        }
      ]
    },
    {
      "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": "Hospital Arrival Time",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization Locations"
            }
          ]
        },
        {
          "statement_name": "Hospitalization Locations"
        },
        {
          "statement_name": "Hospitalization"
        },
        {
          "statement_name": "CalendarAgeInYearsAt",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "ToDate"
            }
          ]
        },
        {
          "statement_name": "ToDate"
        }
      ]
    }
  ],
  "created_at": null,
  "description": "Acute myocardial infarction (AMI) patients with a diagnostic ECG and ST-segment elevation, who receive a primary percutaneous coronary intervention (PCI) during their hospital stay, and the time from hospital arrival to PCI is 90 minutes or less",
  "hqmf_id": "40280382-610B-E7A4-0161-BE5CF659426C",
  "hqmf_set_id": "84B9D0B5-0CAF-4E41-B345-3492A23C2E9F",
  "hqmf_version_number": "7",
  "main_cql_library": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
  "measure_attributes": [
    {
      "code": "OTH",
      "value": "53",
      "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": "53",
        "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\nThis material contains SNOMED Clinical Terms (R) (SNOMED CT(C)) copyright 2004-2017 International Health Terminology Standards Development Organization. All rights reserved.\n\nLOINC (R) is a registered trademark of the Regenstrief Institute.",
      "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\nThis material contains SNOMED Clinical Terms (R) (SNOMED CT(C)) copyright 2004-2017 International Health Terminology Standards Development Organization. All rights reserved.\n\nLOINC (R) is a registered trademark of the Regenstrief Institute.",
        "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. CMS has contracted with Mathematica Policy Research and its subcontractors, Lantana and Telligen, for the continued maintenance of this electronic measure.",
      "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. CMS has contracted with Mathematica Policy Research and its subcontractors, Lantana and Telligen, for the continued maintenance of this electronic measure.",
        "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": "The early use of primary angioplasty in patients with ST-segment myocardial infarction (STEMI) results in a significant reduction in mortality and morbidity. The earlier primary coronary intervention is provided, the more effective it is (Brodie, 1998 and DeLuca, 2004). National guidelines recommend the prompt initiation of PCI in patients presenting with ST-elevation myocardial infarction (O'Gara, 2013; and Levine 2011).",
      "name": "Rationale",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "RAT",
        "title": "Rationale"
      },
      "value_obj": {
        "type": "ED",
        "value": "The early use of primary angioplasty in patients with ST-segment myocardial infarction (STEMI) results in a significant reduction in mortality and morbidity. The earlier primary coronary intervention is provided, the more effective it is (Brodie, 1998 and DeLuca, 2004). National guidelines recommend the prompt initiation of PCI in patients presenting with ST-elevation myocardial infarction (O'Gara, 2013; and Levine 2011).",
        "media_type": "text/plain"
      }
    },
    {
      "code": "CRS",
      "value": "National guidelines recommend the prompt initiation of PCI in patients presenting with ST-elevation myocardial infarction",
      "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": "National guidelines recommend the prompt initiation of PCI in patients presenting with ST-elevation myocardial infarction",
        "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": "Brodie BR, Stuckey TD, Wall TC, Kissling G, Hansen CJ, Muncy DB, et al. Importance of time to reperfusion for 30-day and late survival and recovery of left ventricular function after primary angioplasty for acute myocardial infarction. J Am Coll Cardiol. 1998;32:1312-9.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Brodie BR, Stuckey TD, Wall TC, Kissling G, Hansen CJ, Muncy DB, et al. Importance of time to reperfusion for 30-day and late survival and recovery of left ventricular function after primary angioplasty for acute myocardial infarction. J Am Coll Cardiol. 1998;32:1312-9.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "DeLuca G, Suryapranata H, Ottervanger JP, Antman EM. Time delay to treatment and mortality in primary angioplasty for acute myocardial infarction: every minute of delay counts. Circulation 2004;109(10):1223-1225.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "DeLuca G, Suryapranata H, Ottervanger JP, Antman EM. Time delay to treatment and mortality in primary angioplasty for acute myocardial infarction: every minute of delay counts. Circulation 2004;109(10):1223-1225.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Krumholz HM, Anderson JL, Bachelder BL, Fesmire FM, Fihn SD, Foody JM, et al. ACC/AHA 2008 performance measures for adults with ST-elevation and non-ST-elevation myocardial infarction: a report of the American College of Cardiology/American Heart Association Task Force on Performance Measures (Writing Committee to Develop Performance Measures for ST-Elevation and Non-ST-Elevation Myocardial Infarction). J Am Coll Cardiol. 2008;52:2046-99.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Krumholz HM, Anderson JL, Bachelder BL, Fesmire FM, Fihn SD, Foody JM, et al. ACC/AHA 2008 performance measures for adults with ST-elevation and non-ST-elevation myocardial infarction: a report of the American College of Cardiology/American Heart Association Task Force on Performance Measures (Writing Committee to Develop Performance Measures for ST-Elevation and Non-ST-Elevation Myocardial Infarction). J Am Coll Cardiol. 2008;52:2046-99.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Levine GN, Bates ER, Blankenship JC, Bailey SR, Bittl JA, Cercek B, et al. 2011 ACCF/AHA/SCAI guideline for percutaneous coronary intervention: a report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines and the Society for Cardiovascular Angiography and Interventions. J Am Coll Cardiol. 2011;58:e44-122.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Levine GN, Bates ER, Blankenship JC, Bailey SR, Bittl JA, Cercek B, et al. 2011 ACCF/AHA/SCAI guideline for percutaneous coronary intervention: a report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines and the Society for Cardiovascular Angiography and Interventions. J Am Coll Cardiol. 2011;58:e44-122.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "O'Gara PT, Kushner FG, Ascheim DD, Casey DE, Jr, Chung MK, de Lemos JA, et al. 2013 ACCF/AHA guideline for the management of ST-elevation myocardial infarction: a report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines. J Am Coll Cardiol 2013;61:485-510.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "O'Gara PT, Kushner FG, Ascheim DD, Casey DE, Jr, Chung MK, de Lemos JA, et al. 2013 ACCF/AHA guideline for the management of ST-elevation myocardial infarction: a report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines. J Am Coll Cardiol 2013;61:485-510.",
        "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": "To identify the ECG closest to hospital arrival, the denominator will identify the most recent ECG performed that starts less than 1 hour prior to the emergency department (ED) or inpatient encounter OR the first ECG performed starts after the ED or inpatient encounter started.\n\nPCI procedures analyzed in this measure must be primary procedures. Primary includes emergent or urgent PCI procedures and not those described by the physician/APN/PA anywhere in the record as elective, not emergent, not immediate, not primary, not urgent, or secondary.\n\nFrom a clinical standpoint, Primary PCI is loosely defined as percutaneous coronary intervention performed in the acute setting in patients with ST-segment elevation MI which is intended to restore perfusion in the infarct-related artery.",
      "name": "Guidance",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "GUIDE",
        "title": "Guidance"
      },
      "value_obj": {
        "type": "ED",
        "value": "To identify the ECG closest to hospital arrival, the denominator will identify the most recent ECG performed that starts less than 1 hour prior to the emergency department (ED) or inpatient encounter OR the first ECG performed starts after the ED or inpatient encounter started.\n\nPCI procedures analyzed in this measure must be primary procedures. Primary includes emergent or urgent PCI procedures and not those described by the physician/APN/PA anywhere in the record as elective, not emergent, not immediate, not primary, not urgent, or secondary.\n\nFrom a clinical standpoint, Primary PCI is loosely defined as percutaneous coronary intervention performed in the acute setting in patients with ST-segment elevation MI which is intended to restore perfusion in the infarct-related artery.",
        "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 at the time of hospital admission with a principal diagnosis of an Acute or Evolving Myocardial Infarction (ST-segment elevation MI) with hospital stays <= 120 days during the 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 at the time of hospital admission with a principal diagnosis of an Acute or Evolving Myocardial Infarction (ST-segment elevation MI) with hospital stays <= 120 days during the measurement period",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENOM",
      "value": "Initial population with an ECG performed and a primary PCI procedure closest to the inpatient admission that does not start after fibrinolytic therapy",
      "name": "Denominator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DENOM",
        "title": "Denominator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Initial population with an ECG performed and a primary PCI procedure closest to the inpatient admission that does not start after fibrinolytic therapy",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEX",
      "value": "Patients who transferred from another hospital's inpatient, outpatient, or emergency department and ambulatory surgery center facilities are excluded",
      "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 who transferred from another hospital's inpatient, outpatient, or emergency department and ambulatory surgery center facilities are excluded",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMER",
      "value": "Initial population whose time from hospital arrival to primary PCI is 90 minutes or less",
      "name": "Numerator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "NUMER",
        "title": "Numerator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Initial population whose time from hospital arrival to primary PCI is 90 minutes or less",
        "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 who did not receive PCI within 90 minutes and have a documented reason. Documented reasons include:\n\"Diagnosis: Cardiopulmonary arrest\"\n\"Procedure, Performed: Endotracheal Intubation\"\n\"Procedure, Performed: Aortic balloon pump insertion\"\n\"Procedure, Performed: Ventricular Assist Device placement\"",
      "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 who did not receive PCI within 90 minutes and have a documented reason. Documented reasons include:\n\"Diagnosis: Cardiopulmonary arrest\"\n\"Procedure, Performed: Endotracheal Intubation\"\n\"Procedure, Performed: Aortic balloon pump insertion\"\n\"Procedure, Performed: Ventricular Assist Device placement\"",
        "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": "EAF94835-9BC5-467F-B055-40C923D82F7C",
      "preconditions": [
        {
          "id": 2,
          "preconditions": [
            {
              "id": 1,
              "reference": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival__Initial_Population__77D9529E_CE08_41CE_85A6_5186E1E5D7D2"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENOM": {
      "conjunction?": true,
      "type": "DENOM",
      "hqmf_id": "6E0F1E96-06BA-4BC2-885F-2FB247B41E8B",
      "preconditions": [
        {
          "id": 4,
          "preconditions": [
            {
              "id": 3,
              "reference": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival__Denominator__77D9529E_CE08_41CE_85A6_5186E1E5D7D2"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "NUMER": {
      "conjunction?": true,
      "type": "NUMER",
      "hqmf_id": "4681B8EB-4083-47AC-A7DE-9102482BACFD",
      "preconditions": [
        {
          "id": 6,
          "preconditions": [
            {
              "id": 5,
              "reference": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival__Numerator__77D9529E_CE08_41CE_85A6_5186E1E5D7D2"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENEXCEP": {
      "conjunction?": true,
      "type": "DENEXCEP",
      "hqmf_id": "4698D4AA-4E2E-4910-AB68-1C889690FEBE",
      "preconditions": [
        {
          "id": 8,
          "preconditions": [
            {
              "id": 7,
              "reference": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival__Denominator_Exceptions__77D9529E_CE08_41CE_85A6_5186E1E5D7D2"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    },
    "DENEX": {
      "conjunction?": true,
      "type": "DENEX",
      "hqmf_id": "BC6ABA5A-EF35-4ED9-A6FB-2A7B0AB77C2E",
      "preconditions": [
        {
          "id": 10,
          "preconditions": [
            {
              "id": 9,
              "reference": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival__Denominator_Exclusions__77D9529E_CE08_41CE_85A6_5186E1E5D7D2"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    }
  },
  "population_sets": [
    {
      "population_set_id": "PopulationCriteria1",
      "populations": {
        "DENEX": {
          "hqmf_id": "BC6ABA5A-EF35-4ED9-A6FB-2A7B0AB77C2E",
          "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
          "statement_name": "Denominator Exclusions"
        },
        "DENEXCEP": {
          "hqmf_id": "4698D4AA-4E2E-4910-AB68-1C889690FEBE",
          "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
          "statement_name": "Denominator Exceptions"
        },
        "DENOM": {
          "hqmf_id": "6E0F1E96-06BA-4BC2-885F-2FB247B41E8B",
          "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
          "statement_name": "Denominator"
        },
        "IPP": {
          "hqmf_id": "EAF94835-9BC5-467F-B055-40C923D82F7C",
          "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
          "statement_name": "Initial Population"
        },
        "NUMER": {
          "hqmf_id": "4681B8EB-4083-47AC-A7DE-9102482BACFD",
          "library_name": "PrimaryPCIReceivedWithin90MinutesofHospitalArrival",
          "statement_name": "Numerator"
        },
        "_type": "CQM::ProportionPopulationMap"
      },
      "title": "Population Criteria Section"
    }
  ],
  "source_data_criteria": [
    {
      "admissionSource": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.666.5.307",
      "dataElementCodes": [

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

      ],
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.5",
      "id": "5d289cd831fe5f8b969932a8",
      "lengthOfStay": null,
      "negationRationale": null,
      "participant": null,
      "priority": null,
      "qdmCategory": "encounter",
      "qdmStatus": "performed",
      "qdmTitle": "Encounter, Performed",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::EncounterPerformed"
    },
    {
      "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": "5d289cd831fe5f8b969932a9",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "payer",
      "qdmTitle": "Patient Characteristic Payer",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::PatientCharacteristicPayer"
    },
    {
      "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": "5d289cd831fe5f8b969932aa",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "gender",
      "qdmTitle": "Patient Characteristic Sex",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicSex"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.666.5.3015",
      "components": null,
      "dataElementCodes": [

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

      ],
      "description": "Diagnosis: Cardiopulmonaryarrest",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.110",
      "id": "5d289cd831fe5f8b969932ac",
      "prevalencePeriod": null,
      "qdmCategory": "condition",
      "qdmTitle": "Diagnosis",
      "qdmVersion": "5.5",
      "qrdaOid": "2.16.840.1.113883.10.20.24.3.135",
      "recorder": null,
      "severity": null,
      "_type": "QDM::Diagnosis"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.666.5.1151",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Procedure, Performed: Aorticballoonpumpinsertion",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.67",
      "id": "5d289cd831fe5f8b969932ad",
      "incisionDatetime": null,
      "method": null,
      "negationRationale": null,
      "performer": null,
      "priority": null,
      "qdmCategory": "procedure",
      "qdmStatus": "performed",
      "qdmTitle": "Procedure, Performed",
      "qdmVersion": "5.5",
      "rank": null,
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "status": null,
      "_type": "QDM::ProcedurePerformed"
    },
    {
      "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": "5d289cd831fe5f8b969932ae",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "ethnicity",
      "qdmTitle": "Patient Characteristic Ethnicity",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicEthnicity"
    },
    {
      "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": "5d289cd831fe5f8b969932af",
      "lengthOfStay": null,
      "negationRationale": null,
      "participant": null,
      "priority": null,
      "qdmCategory": "encounter",
      "qdmStatus": "performed",
      "qdmTitle": "Encounter, Performed",
      "qdmVersion": "5.5",
      "relevantPeriod": null,
      "_type": "QDM::EncounterPerformed"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113762.1.4.1045.67",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Procedure, Performed: PCI",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.67",
      "id": "5d289cd831fe5f8b969932b0",
      "incisionDatetime": null,
      "method": null,
      "negationRationale": null,
      "performer": null,
      "priority": null,
      "qdmCategory": "procedure",
      "qdmStatus": "performed",
      "qdmTitle": "Procedure, Performed",
      "qdmVersion": "5.5",
      "rank": null,
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "status": null,
      "_type": "QDM::ProcedurePerformed"
    },
    {
      "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": "5d289cd831fe5f8b969932b1",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "race",
      "qdmTitle": "Patient Characteristic Race",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicRace"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113762.1.4.1045.69",
      "components": null,
      "dataElementCodes": [

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

      ],
      "description": "Medication, Administered: FibrinolyticTherapy",
      "dosage": null,
      "frequency": null,
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.45",
      "id": "5d289cd831fe5f8b969932b3",
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "medication",
      "qdmStatus": "administered",
      "qdmTitle": "Medication, Administered",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "route": null,
      "_type": "QDM::MedicationAdministered"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.666.5.735",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Diagnostic Study, Performed: Electrocardiogram(ECG)",
      "facilityLocation": null,
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.23",
      "id": "5d289cd831fe5f8b969932b4",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "diagnostic_study",
      "qdmStatus": "performed",
      "qdmTitle": "Diagnostic Study, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "resultDatetime": null,
      "status": null,
      "_type": "QDM::DiagnosticStudyPerformed"
    }
  ],
  "title": "Primary PCI Received Within 90 Minutes of Hospital Arrival",
  "updated_at": null,
  "value_set_ids": [
    "5d289cd831fe5f8b96993293",
    "5d289cd831fe5f8b96993294",
    "5d289cd831fe5f8b96993295",
    "5d289cd831fe5f8b96993296",
    "5d289cd831fe5f8b96993297",
    "5d289cd831fe5f8b96993298",
    "5d289cd831fe5f8b96993299",
    "5d289cd831fe5f8b9699329a",
    "5d289cd831fe5f8b9699329b",
    "5d289cd831fe5f8b9699329c",
    "5d289cd831fe5f8b9699329d",
    "5d289cd831fe5f8b9699329e",
    "5d289cd831fe5f8b9699329f",
    "5d289cd831fe5f8b969932a0",
    "5d289cd831fe5f8b969932a1",
    "5d289cd831fe5f8b969932a2",
    "5d289cd831fe5f8b969932a3",
    "5d289cd831fe5f8b969932a4",
    "5d289cd831fe5f8b969932a5",
    "5d289cd831fe5f8b969932a6",
    "5d289cd831fe5f8b969932a7"
  ]
}