{
  "calculate_sdes": false,
  "calculate_ravs": true,
  "calculation_method": "EPISODE_OF_CARE",
  "cms_id": "CMS530v0",
  "component": false,
  "component_hqmf_set_ids": [

  ],
  "composite": false,
  "composite_hqmf_set_id": null,
  "cql_libraries": [
    {
      "cql": "library CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData version '0.1.016'\r\n\r\nusing QDM version '5.3'\r\n\r\ninclude MATGlobalCommonFunctions version '2.0.000' called Global\r\n\r\ncodesystem \"LOINC:2.58\": 'urn:oid:2.16.840.1.113883.6.1' version 'urn:hl7:version:2.58'\r\ncodesystem \"LOINC:2.63\": 'urn:oid:2.16.840.1.113883.6.1' version 'urn:hl7:version:2.63'\r\n\r\nvalueset \"Payer\": 'urn:oid:2.16.840.1.114222.4.11.3591'\r\nvalueset \"Bicarbonate Lab Test\": 'urn:oid:2.16.840.1.113762.1.4.1045.138'\r\nvalueset \"Body Temperature LOINC\": 'urn:oid:2.16.840.1.113762.1.4.1045.152'\r\nvalueset \"Body Weight\": 'urn:oid:2.16.840.1.113762.1.4.1045.159'\r\nvalueset \"Creatinine Lab Test\": 'urn:oid:2.16.840.1.113883.3.666.5.2363'\r\nvalueset \"Glucose Lab Test\": 'urn:oid:2.16.840.1.113762.1.4.1045.134'\r\nvalueset \"Hematocrit lab test\": 'urn:oid:2.16.840.1.113762.1.4.1045.114'\r\nvalueset \"Medicare payer\": 'urn:oid:2.16.840.1.113762.1.4.1104.10'\r\nvalueset \"Potassium Lab Test\": 'urn:oid:2.16.840.1.113762.1.4.1045.117'\r\nvalueset \"Sodium Lab Test V\": 'urn:oid:2.16.840.1.113762.1.4.1045.119'\r\nvalueset \"White Blood Cells Count Lab Test\": 'urn:oid:2.16.840.1.113762.1.4.1045.129'\r\nvalueset \"Acute care hospital Inpatient Encounter\": 'urn:oid:2.16.840.1.113883.3.666.5.2289'\r\n\r\ncode \"Heart rate\": '8867-4' from \"LOINC:2.58\" display 'Heart rate'\r\ncode \"Oxygen saturation in Arterial blood by Pulse oximetry\": '59408-5' from \"LOINC:2.63\" display 'Oxygen saturation in Arterial blood by Pulse oximetry'\r\ncode \"Respiratory rate\": '9279-1' from \"LOINC:2.63\" display 'Respiratory rate'\r\ncode \"Systolic blood pressure\": '8480-6' from \"LOINC:2.58\" display 'Systolic blood pressure'\r\n\r\nparameter \"Measurement Period\" Interval<DateTime>\r\n\r\ncontext Patient\r\n\r\ndefine \"Denominator\":\r\n\t\"Initial Population\"\r\n\r\ndefine \"Initial Population\":\r\n\t\"IP Encounters\"\r\n\r\ndefine \"Numerator\":\r\n\t\"Initial Population\"\r\n\r\ndefine \"Results\":\r\n\t{\n\t    // First physical exams\r\n\t\tfirstHR: \"FirstPhysicalExam\"([\"Physical Exam, Performed\": \"Heart rate\"]),\r\n\t\tfirstSBP: \"FirstPhysicalExam\"([\"Physical Exam, Performed\": \"Systolic blood pressure\"]),\r\n\t\tfirstRR: \"FirstPhysicalExam\"([\"Physical Exam, Performed\": \"Respiratory rate\"]),\r\n\t\tfirstTemp: \"FirstPhysicalExam\"([\"Physical Exam, Performed\": \"Body Temperature LOINC\"]),\r\n\t\tfirstO2S: \"FirstPhysicalExam\"([\"Physical Exam, Performed\": \"Oxygen saturation in Arterial blood by Pulse oximetry\"]),\n\t    // Weight uses lab test timing\r\n\t\tfirstWeight: \"FirstPhysicalExamWithLabTiming\"([\"Physical Exam, Performed\": \"Body Weight\"]),\n\t\n\t    // First lab tests\r\n\t\tfirstHemat: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"Hematocrit lab test\"]),\r\n\t\tfirstWBC: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"White Blood Cells Count Lab Test\"]),\r\n\t\tfirstPotass: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"Potassium Lab Test\"]),\r\n\t\tfirstSodium: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"Sodium Lab Test V\"]),\r\n\t\tfirstBicarb: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"Bicarbonate Lab Test\"]),\r\n\t\tfirstCreat: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"Creatinine Lab Test\"]),\r\n\t\tfirstGlucose: \"FirstLabTest\"([\"Laboratory Test, Performed\": \"Glucose Lab Test\"])\r\n\t}\r\n\r\ndefine \"IP Encounters\":\r\n\tfrom\r\n\t\t[\"Encounter, Performed\": \"Acute care hospital Inpatient Encounter\"] Encounter,\r\n\t\t[\"Patient Characteristic\": \"Payer\"] Payer,\r\n\t\t[\"Patient Characteristic Birthdate\"] Birthdate\r\n\t\twhere Payer.code in \"Medicare payer\"\r\n\t\t\tand Global.\"Hospitalization Length of Stay\"(Encounter)< 365\r\n\t\t\tand Encounter.relevantPeriod ends during \"Measurement Period\"\r\n\t\t\tand Global.\"CalendarAgeInYearsAt\"(Birthdate.birthDatetime, start of Encounter.relevantPeriod)>= 65\r\n\t\treturn Encounter\r\n\r\ndefine function \"FirstPhysicalExamWithLabTiming\"(exam List<QDM.PositivePhysicalExamPerformed>):\r\n\t\"IP Encounters\" Encounter\r\n\t\treturn First(exam e\r\n\t\t\t\twhere e.relevantPeriod starts during Interval[start of Encounter.relevantPeriod - 1440 minutes, start of Encounter.relevantPeriod + 1440 minutes]\r\n\t\t\t\tsort by start of relevantPeriod\r\n\t\t).result\r\n\r\ndefine function \"FirstLabTest\"(lab List<QDM.PositiveLaboratoryTestPerformed>):\r\n\t\"IP Encounters\" Encounter\r\n\t\treturn First(lab l\r\n\t\t\t\twhere l.resultDatetime during Interval[start of Encounter.relevantPeriod - 1440 minutes, start of Encounter.relevantPeriod + 1440 minutes]\r\n\t\t\t\tsort by start of relevantPeriod\r\n\t\t).result\r\n\r\ndefine function \"FirstPhysicalExam\"(exam List<QDM.PositivePhysicalExamPerformed>):\r\n\t\"IP Encounters\" Encounter\r\n\t\treturn First(exam e\r\n\t\t\t\twhere e.relevantPeriod starts during Interval[start of Encounter.relevantPeriod - 1440 minutes, start of Encounter.relevantPeriod + 120 minutes]\r\n\t\t\t\tsort by start of relevantPeriod\r\n\t\t).result\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
            "version": "0.1.016"
          },
          "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": "27",
                "locator": "28:1-28:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "26",
                  "locator": "28:32-28:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "25",
                    "locator": "28:41-28:48",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "codeSystems": {
            "def": [
              {
                "localId": "3",
                "locator": "7:1-7:87",
                "name": "LOINC:2.58",
                "id": "2.16.840.1.113883.6.1",
                "version": "urn:hl7:version:2.58",
                "accessLevel": "Public"
              },
              {
                "localId": "4",
                "locator": "8:1-8:87",
                "name": "LOINC:2.63",
                "id": "2.16.840.1.113883.6.1",
                "version": "urn:hl7:version:2.63",
                "accessLevel": "Public"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "5",
                "locator": "10:1-10:55",
                "name": "Payer",
                "id": "2.16.840.1.114222.4.11.3591",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "locator": "11:1-11:73",
                "name": "Bicarbonate Lab Test",
                "id": "2.16.840.1.113762.1.4.1045.138",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "12:1-12:75",
                "name": "Body Temperature LOINC",
                "id": "2.16.840.1.113762.1.4.1045.152",
                "accessLevel": "Public"
              },
              {
                "localId": "8",
                "locator": "13:1-13:64",
                "name": "Body Weight",
                "id": "2.16.840.1.113762.1.4.1045.159",
                "accessLevel": "Public"
              },
              {
                "localId": "9",
                "locator": "14:1-14:72",
                "name": "Creatinine Lab Test",
                "id": "2.16.840.1.113883.3.666.5.2363",
                "accessLevel": "Public"
              },
              {
                "localId": "10",
                "locator": "15:1-15:69",
                "name": "Glucose Lab Test",
                "id": "2.16.840.1.113762.1.4.1045.134",
                "accessLevel": "Public"
              },
              {
                "localId": "11",
                "locator": "16:1-16:72",
                "name": "Hematocrit lab test",
                "id": "2.16.840.1.113762.1.4.1045.114",
                "accessLevel": "Public"
              },
              {
                "localId": "12",
                "locator": "17:1-17:66",
                "name": "Medicare payer",
                "id": "2.16.840.1.113762.1.4.1104.10",
                "accessLevel": "Public"
              },
              {
                "localId": "13",
                "locator": "18:1-18:71",
                "name": "Potassium Lab Test",
                "id": "2.16.840.1.113762.1.4.1045.117",
                "accessLevel": "Public"
              },
              {
                "localId": "14",
                "locator": "19:1-19:70",
                "name": "Sodium Lab Test V",
                "id": "2.16.840.1.113762.1.4.1045.119",
                "accessLevel": "Public"
              },
              {
                "localId": "15",
                "locator": "20:1-20:85",
                "name": "White Blood Cells Count Lab Test",
                "id": "2.16.840.1.113762.1.4.1045.129",
                "accessLevel": "Public"
              },
              {
                "localId": "16",
                "locator": "21:1-21:92",
                "name": "Acute care hospital Inpatient Encounter",
                "id": "2.16.840.1.113883.3.666.5.2289",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "18",
                "locator": "23:1-23:66",
                "name": "Heart rate",
                "id": "8867-4",
                "display": "Heart rate",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "17",
                  "locator": "23:34-23:45",
                  "name": "LOINC:2.58"
                }
              },
              {
                "localId": "20",
                "locator": "24:1-24:153",
                "name": "Oxygen saturation in Arterial blood by Pulse oximetry",
                "id": "59408-5",
                "display": "Oxygen saturation in Arterial blood by Pulse oximetry",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "19",
                  "locator": "24:78-24:89",
                  "name": "LOINC:2.63"
                }
              },
              {
                "localId": "22",
                "locator": "25:1-25:78",
                "name": "Respiratory rate",
                "id": "9279-1",
                "display": "Respiratory rate",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "21",
                  "locator": "25:40-25:51",
                  "name": "LOINC:2.63"
                }
              },
              {
                "localId": "24",
                "locator": "26:1-26:92",
                "name": "Systolic blood pressure",
                "id": "8480-6",
                "display": "Systolic blood pressure",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "23",
                  "locator": "26:47-26:58",
                  "name": "LOINC:2.58"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "30:1-30:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "30:1-30:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "62",
                "locator": "62:1-71:18",
                "name": "IP Encounters",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "62",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"IP Encounters\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "61",
                          "s": [
                            {
                              "s": [
                                {
                                  "value": [
                                    "from\n\t\t"
                                  ]
                                },
                                {
                                  "r": "29",
                                  "s": [
                                    {
                                      "r": "28",
                                      "s": [
                                        {
                                          "r": "28",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Encounter, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Acute care hospital Inpatient Encounter\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Encounter"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ",\n\t\t"
                                  ]
                                },
                                {
                                  "r": "31",
                                  "s": [
                                    {
                                      "r": "30",
                                      "s": [
                                        {
                                          "r": "30",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Patient Characteristic\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Payer\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Payer"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    ",\n\t\t"
                                  ]
                                },
                                {
                                  "r": "33",
                                  "s": [
                                    {
                                      "r": "32",
                                      "s": [
                                        {
                                          "r": "32",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Patient Characteristic Birthdate\"",
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "Birthdate"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "58",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "58",
                                  "s": [
                                    {
                                      "r": "48",
                                      "s": [
                                        {
                                          "r": "43",
                                          "s": [
                                            {
                                              "r": "37",
                                              "s": [
                                                {
                                                  "r": "35",
                                                  "s": [
                                                    {
                                                      "r": "34",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Payer"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "35",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "code"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " in "
                                                  ]
                                                },
                                                {
                                                  "r": "36",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Medicare payer\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\tand "
                                              ]
                                            },
                                            {
                                              "r": "42",
                                              "s": [
                                                {
                                                  "r": "40",
                                                  "s": [
                                                    {
                                                      "r": "38",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Global"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "40",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Hospitalization Length of Stay\"",
                                                            "("
                                                          ]
                                                        },
                                                        {
                                                          "r": "39",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Encounter"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            ")"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "<",
                                                    " ",
                                                    "365"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t\tand "
                                          ]
                                        },
                                        {
                                          "r": "47",
                                          "s": [
                                            {
                                              "r": "45",
                                              "s": [
                                                {
                                                  "r": "44",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "Encounter"
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "."
                                                  ]
                                                },
                                                {
                                                  "r": "45",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "relevantPeriod"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " ",
                                                "ends during",
                                                " "
                                              ]
                                            },
                                            {
                                              "r": "46",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Measurement Period\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "57",
                                      "s": [
                                        {
                                          "r": "55",
                                          "s": [
                                            {
                                              "r": "49",
                                              "s": [
                                                {
                                                  "value": [
                                                    "Global"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "55",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"CalendarAgeInYearsAt\"",
                                                    "("
                                                  ]
                                                },
                                                {
                                                  "r": "51",
                                                  "s": [
                                                    {
                                                      "r": "50",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Birthdate"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "51",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "birthDatetime"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ", "
                                                  ]
                                                },
                                                {
                                                  "r": "54",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "start of "
                                                      ]
                                                    },
                                                    {
                                                      "r": "53",
                                                      "s": [
                                                        {
                                                          "r": "52",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Encounter"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "53",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "relevantPeriod"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    ")"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ">=",
                                            " ",
                                            "65"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "60",
                              "s": [
                                {
                                  "value": [
                                    "return "
                                  ]
                                },
                                {
                                  "r": "59",
                                  "s": [
                                    {
                                      "value": [
                                        "Encounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "61",
                  "locator": "63:2-71:18",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "29",
                      "locator": "64:3-64:79",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "28",
                        "locator": "64:3-64:69",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                        "templateId": "PositiveEncounterPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Acute care hospital Inpatient Encounter",
                          "type": "ValueSetRef"
                        }
                      }
                    },
                    {
                      "localId": "31",
                      "locator": "65:3-65:43",
                      "alias": "Payer",
                      "expression": {
                        "localId": "30",
                        "locator": "65:3-65:37",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristic",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Payer",
                          "type": "ValueSetRef"
                        }
                      }
                    },
                    {
                      "localId": "33",
                      "locator": "66:3-66:48",
                      "alias": "Birthdate",
                      "expression": {
                        "localId": "32",
                        "locator": "66:3-66:38",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicBirthdate",
                        "type": "Retrieve"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "58",
                    "locator": "67:3-70:101",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "48",
                        "locator": "67:9-69:64",
                        "type": "And",
                        "operand": [
                          {
                            "localId": "43",
                            "locator": "67:9-68:62",
                            "type": "And",
                            "operand": [
                              {
                                "localId": "37",
                                "locator": "67:9-67:38",
                                "type": "InValueSet",
                                "code": {
                                  "localId": "35",
                                  "locator": "67:9-67:18",
                                  "path": "code",
                                  "scope": "Payer",
                                  "type": "Property"
                                },
                                "valueset": {
                                  "localId": "36",
                                  "locator": "67:23-67:38",
                                  "name": "Medicare payer"
                                }
                              },
                              {
                                "localId": "42",
                                "locator": "68:8-68:62",
                                "type": "Less",
                                "operand": [
                                  {
                                    "localId": "40",
                                    "locator": "68:8-68:57",
                                    "name": "Hospitalization Length of Stay",
                                    "libraryName": "Global",
                                    "type": "FunctionRef",
                                    "operand": [
                                      {
                                        "localId": "39",
                                        "locator": "68:48-68:56",
                                        "name": "Encounter",
                                        "type": "AliasRef"
                                      }
                                    ]
                                  },
                                  {
                                    "localId": "41",
                                    "locator": "68:60-68:62",
                                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                                    "value": "365",
                                    "type": "Literal"
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "localId": "47",
                            "locator": "69:8-69:64",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "69:33-69:36",
                                "type": "End",
                                "operand": {
                                  "localId": "45",
                                  "locator": "69:8-69:31",
                                  "path": "relevantPeriod",
                                  "scope": "Encounter",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "46",
                                "locator": "69:45-69:64",
                                "name": "Measurement Period",
                                "type": "ParameterRef"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "localId": "57",
                        "locator": "70:8-70:101",
                        "type": "GreaterOrEqual",
                        "operand": [
                          {
                            "localId": "55",
                            "locator": "70:8-70:96",
                            "name": "CalendarAgeInYearsAt",
                            "libraryName": "Global",
                            "type": "FunctionRef",
                            "operand": [
                              {
                                "localId": "51",
                                "locator": "70:38-70:60",
                                "path": "birthDatetime",
                                "scope": "Birthdate",
                                "type": "Property"
                              },
                              {
                                "localId": "54",
                                "locator": "70:63-70:95",
                                "type": "Start",
                                "operand": {
                                  "localId": "53",
                                  "locator": "70:72-70:95",
                                  "path": "relevantPeriod",
                                  "scope": "Encounter",
                                  "type": "Property"
                                }
                              }
                            ]
                          },
                          {
                            "localId": "56",
                            "locator": "70:100-70:101",
                            "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                            "value": "65",
                            "type": "Literal"
                          }
                        ]
                      }
                    ]
                  },
                  "return": {
                    "localId": "60",
                    "locator": "71:3-71:18",
                    "expression": {
                      "localId": "59",
                      "locator": "71:10-71:18",
                      "name": "Encounter",
                      "type": "AliasRef"
                    }
                  }
                }
              },
              {
                "localId": "64",
                "locator": "35:1-36:16",
                "name": "Initial Population",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "64",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Initial Population\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "63",
                          "s": [
                            {
                              "value": [
                                "\"IP Encounters\""
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "63",
                  "locator": "36:2-36:16",
                  "name": "IP Encounters",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "66",
                "locator": "32:1-33:21",
                "name": "Denominator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "66",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "65",
                          "s": [
                            {
                              "value": [
                                "\"Initial Population\""
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "65",
                  "locator": "33:2-33:21",
                  "name": "Initial Population",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "68",
                "locator": "38:1-39:21",
                "name": "Numerator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "68",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Numerator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "67",
                          "s": [
                            {
                              "value": [
                                "\"Initial Population\""
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "67",
                  "locator": "39:2-39:21",
                  "name": "Initial Population",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "99",
                "locator": "87:1-92:10",
                "name": "FirstPhysicalExam",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "99",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"FirstPhysicalExam\"",
                            "(",
                            "exam",
                            " "
                          ]
                        },
                        {
                          "r": "71",
                          "s": [
                            {
                              "value": [
                                "List<"
                              ]
                            },
                            {
                              "r": "70",
                              "s": [
                                {
                                  "value": [
                                    "QDM",
                                    ".",
                                    "PositivePhysicalExamPerformed"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ">"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "98",
                          "s": [
                            {
                              "r": "98",
                              "s": [
                                {
                                  "s": [
                                    {
                                      "r": "73",
                                      "s": [
                                        {
                                          "r": "72",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"IP Encounters\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "Encounter"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t"
                                  ]
                                },
                                {
                                  "r": "97",
                                  "s": [
                                    {
                                      "value": [
                                        "return "
                                      ]
                                    },
                                    {
                                      "r": "96",
                                      "s": [
                                        {
                                          "r": "95",
                                          "s": [
                                            {
                                              "value": [
                                                "First",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "94",
                                              "s": [
                                                {
                                                  "s": [
                                                    {
                                                      "r": "75",
                                                      "s": [
                                                        {
                                                          "r": "74",
                                                          "s": [
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "exam"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "e"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t"
                                                  ]
                                                },
                                                {
                                                  "r": "89",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "where "
                                                      ]
                                                    },
                                                    {
                                                      "r": "89",
                                                      "s": [
                                                        {
                                                          "r": "77",
                                                          "s": [
                                                            {
                                                              "r": "76",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "e"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "77",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "relevantPeriod"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "starts during",
                                                            " "
                                                          ]
                                                        },
                                                        {
                                                          "r": "88",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Interval["
                                                              ]
                                                            },
                                                            {
                                                              "r": "82",
                                                              "s": [
                                                                {
                                                                  "r": "80",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "79",
                                                                      "s": [
                                                                        {
                                                                          "r": "78",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "79",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " - "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "81",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "1440 ",
                                                                        "minutes"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ", "
                                                              ]
                                                            },
                                                            {
                                                              "r": "87",
                                                              "s": [
                                                                {
                                                                  "r": "85",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "84",
                                                                      "s": [
                                                                        {
                                                                          "r": "83",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "84",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " + "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "86",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "120 ",
                                                                        "minutes"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t"
                                                  ]
                                                },
                                                {
                                                  "r": "93",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "sort by "
                                                      ]
                                                    },
                                                    {
                                                      "r": "92",
                                                      "s": [
                                                        {
                                                          "r": "91",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "start of "
                                                              ]
                                                            },
                                                            {
                                                              "r": "90",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "relevantPeriod"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t)"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "96",
                                          "s": [
                                            {
                                              "value": [
                                                "result"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "98",
                  "locator": "88:2-92:10",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "73",
                      "locator": "88:2-88:26",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "72",
                        "locator": "88:2-88:16",
                        "name": "IP Encounters",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "return": {
                    "localId": "97",
                    "locator": "89:3-92:10",
                    "expression": {
                      "localId": "96",
                      "locator": "89:10-92:10",
                      "path": "result",
                      "type": "Property",
                      "source": {
                        "localId": "95",
                        "locator": "89:10-92:3",
                        "type": "First",
                        "source": {
                          "localId": "94",
                          "locator": "89:16-91:35",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "75",
                              "locator": "89:16-89:21",
                              "alias": "e",
                              "expression": {
                                "localId": "74",
                                "locator": "89:16-89:19",
                                "name": "exam",
                                "type": "OperandRef"
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "89",
                            "locator": "90:5-90:148",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "90:28-90:33",
                                "type": "Start",
                                "operand": {
                                  "localId": "77",
                                  "locator": "90:11-90:26",
                                  "path": "relevantPeriod",
                                  "scope": "e",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "88",
                                "locator": "90:42-90:148",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "localId": "82",
                                  "locator": "90:51-90:98",
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "80",
                                      "locator": "90:51-90:83",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "79",
                                        "locator": "90:60-90:83",
                                        "path": "relevantPeriod",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "81",
                                      "locator": "90:87-90:98",
                                      "value": 1440,
                                      "unit": "minutes",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "87",
                                  "locator": "90:101-90:147",
                                  "type": "Add",
                                  "operand": [
                                    {
                                      "localId": "85",
                                      "locator": "90:101-90:133",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "84",
                                        "locator": "90:110-90:133",
                                        "path": "relevantPeriod",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "86",
                                      "locator": "90:137-90:147",
                                      "value": 120,
                                      "unit": "minutes",
                                      "type": "Quantity"
                                    }
                                  ]
                                }
                              }
                            ]
                          },
                          "sort": {
                            "localId": "93",
                            "locator": "91:5-91:35",
                            "by": [
                              {
                                "localId": "92",
                                "locator": "91:13-91:35",
                                "direction": "asc",
                                "type": "ByExpression",
                                "expression": {
                                  "localId": "91",
                                  "locator": "91:13-91:35",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "90",
                                    "locator": "91:22-91:35",
                                    "name": "relevantPeriod",
                                    "type": "IdentifierRef"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "exam",
                    "operandTypeSpecifier": {
                      "localId": "71",
                      "locator": "87:42-87:80",
                      "type": "ListTypeSpecifier",
                      "elementType": {
                        "localId": "70",
                        "locator": "87:47-87:79",
                        "name": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                        "type": "NamedTypeSpecifier"
                      }
                    }
                  }
                ]
              },
              {
                "localId": "139",
                "locator": "73:1-78:10",
                "name": "FirstPhysicalExamWithLabTiming",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "139",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"FirstPhysicalExamWithLabTiming\"",
                            "(",
                            "exam",
                            " "
                          ]
                        },
                        {
                          "r": "111",
                          "s": [
                            {
                              "value": [
                                "List<"
                              ]
                            },
                            {
                              "r": "110",
                              "s": [
                                {
                                  "value": [
                                    "QDM",
                                    ".",
                                    "PositivePhysicalExamPerformed"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ">"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "138",
                          "s": [
                            {
                              "r": "138",
                              "s": [
                                {
                                  "s": [
                                    {
                                      "r": "113",
                                      "s": [
                                        {
                                          "r": "112",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"IP Encounters\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "Encounter"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t"
                                  ]
                                },
                                {
                                  "r": "137",
                                  "s": [
                                    {
                                      "value": [
                                        "return "
                                      ]
                                    },
                                    {
                                      "r": "136",
                                      "s": [
                                        {
                                          "r": "135",
                                          "s": [
                                            {
                                              "value": [
                                                "First",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "134",
                                              "s": [
                                                {
                                                  "s": [
                                                    {
                                                      "r": "115",
                                                      "s": [
                                                        {
                                                          "r": "114",
                                                          "s": [
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "exam"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "e"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t"
                                                  ]
                                                },
                                                {
                                                  "r": "129",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "where "
                                                      ]
                                                    },
                                                    {
                                                      "r": "129",
                                                      "s": [
                                                        {
                                                          "r": "117",
                                                          "s": [
                                                            {
                                                              "r": "116",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "e"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "117",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "relevantPeriod"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "starts during",
                                                            " "
                                                          ]
                                                        },
                                                        {
                                                          "r": "128",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Interval["
                                                              ]
                                                            },
                                                            {
                                                              "r": "122",
                                                              "s": [
                                                                {
                                                                  "r": "120",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "119",
                                                                      "s": [
                                                                        {
                                                                          "r": "118",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "119",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " - "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "121",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "1440 ",
                                                                        "minutes"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ", "
                                                              ]
                                                            },
                                                            {
                                                              "r": "127",
                                                              "s": [
                                                                {
                                                                  "r": "125",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "124",
                                                                      "s": [
                                                                        {
                                                                          "r": "123",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "124",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " + "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "126",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "1440 ",
                                                                        "minutes"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t"
                                                  ]
                                                },
                                                {
                                                  "r": "133",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "sort by "
                                                      ]
                                                    },
                                                    {
                                                      "r": "132",
                                                      "s": [
                                                        {
                                                          "r": "131",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "start of "
                                                              ]
                                                            },
                                                            {
                                                              "r": "130",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "relevantPeriod"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t)"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "136",
                                          "s": [
                                            {
                                              "value": [
                                                "result"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "138",
                  "locator": "74:2-78:10",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "113",
                      "locator": "74:2-74:26",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "112",
                        "locator": "74:2-74:16",
                        "name": "IP Encounters",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "return": {
                    "localId": "137",
                    "locator": "75:3-78:10",
                    "expression": {
                      "localId": "136",
                      "locator": "75:10-78:10",
                      "path": "result",
                      "type": "Property",
                      "source": {
                        "localId": "135",
                        "locator": "75:10-78:3",
                        "type": "First",
                        "source": {
                          "localId": "134",
                          "locator": "75:16-77:35",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "115",
                              "locator": "75:16-75:21",
                              "alias": "e",
                              "expression": {
                                "localId": "114",
                                "locator": "75:16-75:19",
                                "name": "exam",
                                "type": "OperandRef"
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "129",
                            "locator": "76:5-76:149",
                            "type": "In",
                            "operand": [
                              {
                                "locator": "76:28-76:33",
                                "type": "Start",
                                "operand": {
                                  "localId": "117",
                                  "locator": "76:11-76:26",
                                  "path": "relevantPeriod",
                                  "scope": "e",
                                  "type": "Property"
                                }
                              },
                              {
                                "localId": "128",
                                "locator": "76:42-76:149",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "localId": "122",
                                  "locator": "76:51-76:98",
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "120",
                                      "locator": "76:51-76:83",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "119",
                                        "locator": "76:60-76:83",
                                        "path": "relevantPeriod",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "121",
                                      "locator": "76:87-76:98",
                                      "value": 1440,
                                      "unit": "minutes",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "127",
                                  "locator": "76:101-76:148",
                                  "type": "Add",
                                  "operand": [
                                    {
                                      "localId": "125",
                                      "locator": "76:101-76:133",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "124",
                                        "locator": "76:110-76:133",
                                        "path": "relevantPeriod",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "126",
                                      "locator": "76:137-76:148",
                                      "value": 1440,
                                      "unit": "minutes",
                                      "type": "Quantity"
                                    }
                                  ]
                                }
                              }
                            ]
                          },
                          "sort": {
                            "localId": "133",
                            "locator": "77:5-77:35",
                            "by": [
                              {
                                "localId": "132",
                                "locator": "77:13-77:35",
                                "direction": "asc",
                                "type": "ByExpression",
                                "expression": {
                                  "localId": "131",
                                  "locator": "77:13-77:35",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "130",
                                    "locator": "77:22-77:35",
                                    "name": "relevantPeriod",
                                    "type": "IdentifierRef"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "exam",
                    "operandTypeSpecifier": {
                      "localId": "111",
                      "locator": "73:55-73:93",
                      "type": "ListTypeSpecifier",
                      "elementType": {
                        "localId": "110",
                        "locator": "73:60-73:92",
                        "name": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                        "type": "NamedTypeSpecifier"
                      }
                    }
                  }
                ]
              },
              {
                "localId": "171",
                "locator": "80:1-85:10",
                "name": "FirstLabTest",
                "context": "Patient",
                "accessLevel": "Public",
                "type": "FunctionDef",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "171",
                      "s": [
                        {
                          "value": [
                            "define function ",
                            "\"FirstLabTest\"",
                            "(",
                            "lab",
                            " "
                          ]
                        },
                        {
                          "r": "143",
                          "s": [
                            {
                              "value": [
                                "List<"
                              ]
                            },
                            {
                              "r": "142",
                              "s": [
                                {
                                  "value": [
                                    "QDM",
                                    ".",
                                    "PositiveLaboratoryTestPerformed"
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ">"
                              ]
                            }
                          ]
                        },
                        {
                          "value": [
                            " ):\n\t"
                          ]
                        },
                        {
                          "r": "170",
                          "s": [
                            {
                              "r": "170",
                              "s": [
                                {
                                  "s": [
                                    {
                                      "r": "145",
                                      "s": [
                                        {
                                          "r": "144",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"IP Encounters\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "Encounter"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t"
                                  ]
                                },
                                {
                                  "r": "169",
                                  "s": [
                                    {
                                      "value": [
                                        "return "
                                      ]
                                    },
                                    {
                                      "r": "168",
                                      "s": [
                                        {
                                          "r": "167",
                                          "s": [
                                            {
                                              "value": [
                                                "First",
                                                "("
                                              ]
                                            },
                                            {
                                              "r": "166",
                                              "s": [
                                                {
                                                  "s": [
                                                    {
                                                      "r": "147",
                                                      "s": [
                                                        {
                                                          "r": "146",
                                                          "s": [
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "lab"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "l"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t"
                                                  ]
                                                },
                                                {
                                                  "r": "161",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "where "
                                                      ]
                                                    },
                                                    {
                                                      "r": "161",
                                                      "s": [
                                                        {
                                                          "r": "149",
                                                          "s": [
                                                            {
                                                              "r": "148",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "l"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "149",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "resultDatetime"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "during",
                                                            " "
                                                          ]
                                                        },
                                                        {
                                                          "r": "160",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Interval["
                                                              ]
                                                            },
                                                            {
                                                              "r": "154",
                                                              "s": [
                                                                {
                                                                  "r": "152",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "151",
                                                                      "s": [
                                                                        {
                                                                          "r": "150",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "151",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " - "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "153",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "1440 ",
                                                                        "minutes"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ", "
                                                              ]
                                                            },
                                                            {
                                                              "r": "159",
                                                              "s": [
                                                                {
                                                                  "r": "157",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "start of "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "156",
                                                                      "s": [
                                                                        {
                                                                          "r": "155",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "Encounter"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "156",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "relevantPeriod"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " + "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "158",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "1440 ",
                                                                        "minutes"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t\t\t"
                                                  ]
                                                },
                                                {
                                                  "r": "165",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "sort by "
                                                      ]
                                                    },
                                                    {
                                                      "r": "164",
                                                      "s": [
                                                        {
                                                          "r": "163",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "start of "
                                                              ]
                                                            },
                                                            {
                                                              "r": "162",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "relevantPeriod"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t)"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "168",
                                          "s": [
                                            {
                                              "value": [
                                                "result"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "170",
                  "locator": "81:2-85:10",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "145",
                      "locator": "81:2-81:26",
                      "alias": "Encounter",
                      "expression": {
                        "localId": "144",
                        "locator": "81:2-81:16",
                        "name": "IP Encounters",
                        "type": "ExpressionRef"
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "return": {
                    "localId": "169",
                    "locator": "82:3-85:10",
                    "expression": {
                      "localId": "168",
                      "locator": "82:10-85:10",
                      "path": "result",
                      "type": "Property",
                      "source": {
                        "localId": "167",
                        "locator": "82:10-85:3",
                        "type": "First",
                        "source": {
                          "localId": "166",
                          "locator": "82:16-84:35",
                          "type": "Query",
                          "source": [
                            {
                              "localId": "147",
                              "locator": "82:16-82:20",
                              "alias": "l",
                              "expression": {
                                "localId": "146",
                                "locator": "82:16-82:18",
                                "name": "lab",
                                "type": "OperandRef"
                              }
                            }
                          ],
                          "relationship": [

                          ],
                          "where": {
                            "localId": "161",
                            "locator": "83:5-83:142",
                            "type": "In",
                            "operand": [
                              {
                                "localId": "149",
                                "locator": "83:11-83:26",
                                "path": "resultDatetime",
                                "scope": "l",
                                "type": "Property"
                              },
                              {
                                "localId": "160",
                                "locator": "83:35-83:142",
                                "lowClosed": true,
                                "highClosed": true,
                                "type": "Interval",
                                "low": {
                                  "localId": "154",
                                  "locator": "83:44-83:91",
                                  "type": "Subtract",
                                  "operand": [
                                    {
                                      "localId": "152",
                                      "locator": "83:44-83:76",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "151",
                                        "locator": "83:53-83:76",
                                        "path": "relevantPeriod",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "153",
                                      "locator": "83:80-83:91",
                                      "value": 1440,
                                      "unit": "minutes",
                                      "type": "Quantity"
                                    }
                                  ]
                                },
                                "high": {
                                  "localId": "159",
                                  "locator": "83:94-83:141",
                                  "type": "Add",
                                  "operand": [
                                    {
                                      "localId": "157",
                                      "locator": "83:94-83:126",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "156",
                                        "locator": "83:103-83:126",
                                        "path": "relevantPeriod",
                                        "scope": "Encounter",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "158",
                                      "locator": "83:130-83:141",
                                      "value": 1440,
                                      "unit": "minutes",
                                      "type": "Quantity"
                                    }
                                  ]
                                }
                              }
                            ]
                          },
                          "sort": {
                            "localId": "165",
                            "locator": "84:5-84:35",
                            "by": [
                              {
                                "localId": "164",
                                "locator": "84:13-84:35",
                                "direction": "asc",
                                "type": "ByExpression",
                                "expression": {
                                  "localId": "163",
                                  "locator": "84:13-84:35",
                                  "type": "Start",
                                  "operand": {
                                    "localId": "162",
                                    "locator": "84:22-84:35",
                                    "name": "relevantPeriod",
                                    "type": "IdentifierRef"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "operand": [
                  {
                    "name": "lab",
                    "operandTypeSpecifier": {
                      "localId": "143",
                      "locator": "80:36-80:76",
                      "type": "ListTypeSpecifier",
                      "elementType": {
                        "localId": "142",
                        "locator": "80:41-80:75",
                        "name": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                        "type": "NamedTypeSpecifier"
                      }
                    }
                  }
                ]
              },
              {
                "localId": "186",
                "locator": "41:1-60:2",
                "name": "Results",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "186",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Results\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "185",
                          "s": [
                            {
                              "value": [
                                "{\n\t    // First physical exams\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstHR",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "100",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstPhysicalExam\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "69",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Physical Exam, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Heart rate\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstSBP",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "102",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstPhysicalExam\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "101",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Physical Exam, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Systolic blood pressure\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstRR",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "104",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstPhysicalExam\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "103",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Physical Exam, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Respiratory rate\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstTemp",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "106",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstPhysicalExam\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "105",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Physical Exam, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Body Temperature LOINC\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstO2S",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "108",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstPhysicalExam\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "107",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Physical Exam, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Oxygen saturation in Arterial blood by Pulse oximetry\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t    // Weight uses lab test timing\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstWeight",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "140",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstPhysicalExamWithLabTiming\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "109",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Physical Exam, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Body Weight\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\n\t    // First lab tests\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstHemat",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "172",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "141",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Hematocrit lab test\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstWBC",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "174",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "173",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"White Blood Cells Count Lab Test\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstPotass",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "176",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "175",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Potassium Lab Test\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstSodium",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "178",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "177",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Sodium Lab Test V\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstBicarb",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "180",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "179",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Bicarbonate Lab Test\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstCreat",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "182",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "181",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Creatinine Lab Test\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                ",\n\t\t"
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "firstGlucose",
                                    ": "
                                  ]
                                },
                                {
                                  "r": "184",
                                  "s": [
                                    {
                                      "value": [
                                        "\"FirstLabTest\"",
                                        "("
                                      ]
                                    },
                                    {
                                      "r": "183",
                                      "s": [
                                        {
                                          "value": [
                                            "[",
                                            "\"Laboratory Test, Performed\"",
                                            ": "
                                          ]
                                        },
                                        {
                                          "s": [
                                            {
                                              "value": [
                                                "\"Glucose Lab Test\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "]"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        ")"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t}"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "185",
                  "locator": "42:2-60:2",
                  "type": "Tuple",
                  "element": [
                    {
                      "name": "firstHR",
                      "value": {
                        "localId": "100",
                        "locator": "44:12-44:74",
                        "name": "FirstPhysicalExam",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "69",
                            "locator": "44:32-44:73",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                            "templateId": "PositivePhysicalExamPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "type": "ToList",
                              "operand": {
                                "name": "Heart rate",
                                "type": "CodeRef"
                              }
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstSBP",
                      "value": {
                        "localId": "102",
                        "locator": "45:13-45:88",
                        "name": "FirstPhysicalExam",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "101",
                            "locator": "45:33-45:87",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                            "templateId": "PositivePhysicalExamPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "type": "ToList",
                              "operand": {
                                "name": "Systolic blood pressure",
                                "type": "CodeRef"
                              }
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstRR",
                      "value": {
                        "localId": "104",
                        "locator": "46:12-46:80",
                        "name": "FirstPhysicalExam",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "103",
                            "locator": "46:32-46:79",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                            "templateId": "PositivePhysicalExamPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "type": "ToList",
                              "operand": {
                                "name": "Respiratory rate",
                                "type": "CodeRef"
                              }
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstTemp",
                      "value": {
                        "localId": "106",
                        "locator": "47:14-47:88",
                        "name": "FirstPhysicalExam",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "105",
                            "locator": "47:34-47:87",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                            "templateId": "PositivePhysicalExamPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Body Temperature LOINC",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstO2S",
                      "value": {
                        "localId": "108",
                        "locator": "48:13-48:118",
                        "name": "FirstPhysicalExam",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "107",
                            "locator": "48:33-48:117",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                            "templateId": "PositivePhysicalExamPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "type": "ToList",
                              "operand": {
                                "name": "Oxygen saturation in Arterial blood by Pulse oximetry",
                                "type": "CodeRef"
                              }
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstWeight",
                      "value": {
                        "localId": "140",
                        "locator": "50:16-50:92",
                        "name": "FirstPhysicalExamWithLabTiming",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "109",
                            "locator": "50:49-50:91",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositivePhysicalExamPerformed",
                            "templateId": "PositivePhysicalExamPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Body Weight",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstHemat",
                      "value": {
                        "localId": "172",
                        "locator": "53:15-53:83",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "141",
                            "locator": "53:30-53:82",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Hematocrit lab test",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstWBC",
                      "value": {
                        "localId": "174",
                        "locator": "54:13-54:94",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "173",
                            "locator": "54:28-54:93",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "White Blood Cells Count Lab Test",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstPotass",
                      "value": {
                        "localId": "176",
                        "locator": "55:16-55:83",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "175",
                            "locator": "55:31-55:82",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Potassium Lab Test",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstSodium",
                      "value": {
                        "localId": "178",
                        "locator": "56:16-56:82",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "177",
                            "locator": "56:31-56:81",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Sodium Lab Test V",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstBicarb",
                      "value": {
                        "localId": "180",
                        "locator": "57:16-57:85",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "179",
                            "locator": "57:31-57:84",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Bicarbonate Lab Test",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstCreat",
                      "value": {
                        "localId": "182",
                        "locator": "58:15-58:83",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "181",
                            "locator": "58:30-58:82",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Creatinine Lab Test",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    },
                    {
                      "name": "firstGlucose",
                      "value": {
                        "localId": "184",
                        "locator": "59:17-59:82",
                        "name": "FirstLabTest",
                        "type": "FunctionRef",
                        "operand": [
                          {
                            "localId": "183",
                            "locator": "59:32-59:81",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveLaboratoryTestPerformed",
                            "templateId": "PositiveLaboratoryTestPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Glucose Lab Test",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"IP Encounters\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "from\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Encounter, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Acute care hospital Inpatient Encounter\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "28"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "28"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Encounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "29"
                          },
                          {
                            "children": [
                              {
                                "text": ",\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Patient Characteristic\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Payer\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "30"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "30"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Payer"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "31"
                          },
                          {
                            "children": [
                              {
                                "text": ",\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Patient Characteristic Birthdate\"]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "32"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "32"
                              },
                              {
                                "children": [
                                  {
                                    "text": " Birthdate"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "33"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Payer"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "34"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "code"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "35"
                                              }
                                            ],
                                            "ref_id": "35"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " in "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Medicare payer\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "36"
                                          }
                                        ],
                                        "node_type": "InValueSet",
                                        "ref_id": "37"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n      and "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Global"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "38"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Hospitalization Length of Stay\"("
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Encounter"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "AliasRef",
                                                    "ref_id": "39"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": ")"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "FunctionRef",
                                                "ref_id": "40"
                                              }
                                            ],
                                            "node_type": "FunctionRef",
                                            "ref_id": "40"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "&lt; 365"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Less",
                                        "ref_id": "42"
                                      }
                                    ],
                                    "node_type": "And",
                                    "ref_id": "43"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n      and "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "Encounter"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "44"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "."
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "relevantPeriod"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "45"
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "45"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " ends during "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Measurement Period\""
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "ParameterRef",
                                        "ref_id": "46"
                                      }
                                    ],
                                    "node_type": "In",
                                    "ref_id": "47"
                                  }
                                ],
                                "node_type": "And",
                                "ref_id": "48"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "Global"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "49"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"CalendarAgeInYearsAt\"("
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Birthdate"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "50"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "birthDatetime"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "51"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "51"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ", "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "start of "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Encounter"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "52"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "relevantPeriod"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "53"
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "53"
                                              }
                                            ],
                                            "node_type": "Start",
                                            "ref_id": "54"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": ")"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "FunctionRef",
                                        "ref_id": "55"
                                      }
                                    ],
                                    "node_type": "FunctionRef",
                                    "ref_id": "55"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "&gt;= 65"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "GreaterOrEqual",
                                "ref_id": "57"
                              }
                            ],
                            "ref_id": "58"
                          }
                        ],
                        "ref_id": "58"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "return "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "Encounter"
                                  }
                                ]
                              }
                            ],
                            "node_type": "AliasRef",
                            "ref_id": "59"
                          }
                        ],
                        "ref_id": "60"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "61"
                  }
                ],
                "ref_id": "62"
              }
            ],
            "define_name": "IP Encounters"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Initial Population\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"IP Encounters\""
                          }
                        ]
                      }
                    ],
                    "node_type": "ExpressionRef",
                    "ref_id": "63"
                  }
                ],
                "ref_id": "64"
              }
            ],
            "define_name": "Initial Population"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Initial Population\""
                          }
                        ]
                      }
                    ],
                    "node_type": "ExpressionRef",
                    "ref_id": "65"
                  }
                ],
                "ref_id": "66"
              }
            ],
            "define_name": "Denominator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Numerator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "\"Initial Population\""
                          }
                        ]
                      }
                    ],
                    "node_type": "ExpressionRef",
                    "ref_id": "67"
                  }
                ],
                "ref_id": "68"
              }
            ],
            "define_name": "Numerator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"FirstPhysicalExam\"(exam "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "List&lt;"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "QDM.PositivePhysicalExamPerformed"
                              }
                            ]
                          }
                        ],
                        "ref_id": "70"
                      },
                      {
                        "children": [
                          {
                            "text": "&gt;"
                          }
                        ]
                      }
                    ],
                    "ref_id": "71"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"IP Encounters\""
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "72"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " Encounter"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "73"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "return "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "First("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "exam"
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "OperandRef",
                                                    "ref_id": "74"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " e"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "75"
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n        "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "where "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "e"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "76"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "relevantPeriod"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "Property",
                                                        "ref_id": "77"
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "77"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " starts during "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Interval["
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "78"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "79"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "79"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "80"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " - "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "1440 minutes"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Quantity",
                                                            "ref_id": "81"
                                                          }
                                                        ],
                                                        "ref_id": "82"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ", "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "83"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "84"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "84"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "85"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " + "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "120 minutes"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Quantity",
                                                            "ref_id": "86"
                                                          }
                                                        ],
                                                        "ref_id": "87"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Interval",
                                                    "ref_id": "88"
                                                  }
                                                ],
                                                "ref_id": "89"
                                              }
                                            ],
                                            "ref_id": "89"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n        "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "sort by "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "start of "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "relevantPeriod"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "IdentifierRef",
                                                        "ref_id": "90"
                                                      }
                                                    ],
                                                    "node_type": "Start",
                                                    "ref_id": "91"
                                                  }
                                                ],
                                                "ref_id": "92"
                                              }
                                            ],
                                            "ref_id": "93"
                                          }
                                        ],
                                        "ref_id": "94"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n    )"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "95"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "result"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "96"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "96"
                              }
                            ],
                            "ref_id": "97"
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "98"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "98"
                  }
                ],
                "ref_id": "99"
              }
            ],
            "define_name": "FirstPhysicalExam"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"FirstPhysicalExamWithLabTiming\"(exam "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "List&lt;"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "QDM.PositivePhysicalExamPerformed"
                              }
                            ]
                          }
                        ],
                        "ref_id": "110"
                      },
                      {
                        "children": [
                          {
                            "text": "&gt;"
                          }
                        ]
                      }
                    ],
                    "ref_id": "111"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"IP Encounters\""
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "112"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " Encounter"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "113"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "return "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "First("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "exam"
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "OperandRef",
                                                    "ref_id": "114"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " e"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "115"
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n        "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "where "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "e"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "116"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "relevantPeriod"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "Property",
                                                        "ref_id": "117"
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "117"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " starts during "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Interval["
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "118"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "119"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "119"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "120"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " - "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "1440 minutes"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Quantity",
                                                            "ref_id": "121"
                                                          }
                                                        ],
                                                        "ref_id": "122"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ", "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "123"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "124"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "124"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "125"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " + "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "1440 minutes"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Quantity",
                                                            "ref_id": "126"
                                                          }
                                                        ],
                                                        "ref_id": "127"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Interval",
                                                    "ref_id": "128"
                                                  }
                                                ],
                                                "ref_id": "129"
                                              }
                                            ],
                                            "ref_id": "129"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n        "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "sort by "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "start of "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "relevantPeriod"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "IdentifierRef",
                                                        "ref_id": "130"
                                                      }
                                                    ],
                                                    "node_type": "Start",
                                                    "ref_id": "131"
                                                  }
                                                ],
                                                "ref_id": "132"
                                              }
                                            ],
                                            "ref_id": "133"
                                          }
                                        ],
                                        "ref_id": "134"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n    )"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "135"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "result"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "136"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "136"
                              }
                            ],
                            "ref_id": "137"
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "138"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "138"
                  }
                ],
                "ref_id": "139"
              }
            ],
            "define_name": "FirstPhysicalExamWithLabTiming"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define function \"FirstLabTest\"(lab "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "List&lt;"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "QDM.PositiveLaboratoryTestPerformed"
                              }
                            ]
                          }
                        ],
                        "ref_id": "142"
                      },
                      {
                        "children": [
                          {
                            "text": "&gt;"
                          }
                        ]
                      }
                    ],
                    "ref_id": "143"
                  },
                  {
                    "children": [
                      {
                        "text": " ):\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"IP Encounters\""
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "144"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " Encounter"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "145"
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "text": "\n    "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "return "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "First("
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "lab"
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "OperandRef",
                                                    "ref_id": "146"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " l"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "147"
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n        "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "where "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "l"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "148"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "resultDatetime"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "Property",
                                                        "ref_id": "149"
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "149"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " during "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Interval["
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "150"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "151"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "151"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "152"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " - "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "1440 minutes"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Quantity",
                                                            "ref_id": "153"
                                                          }
                                                        ],
                                                        "ref_id": "154"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ", "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "start of "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "Encounter"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "155"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "relevantPeriod"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "156"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "156"
                                                              }
                                                            ],
                                                            "node_type": "Start",
                                                            "ref_id": "157"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " + "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "1440 minutes"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Quantity",
                                                            "ref_id": "158"
                                                          }
                                                        ],
                                                        "ref_id": "159"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Interval",
                                                    "ref_id": "160"
                                                  }
                                                ],
                                                "ref_id": "161"
                                              }
                                            ],
                                            "ref_id": "161"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n        "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "sort by "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "start of "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "relevantPeriod"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "IdentifierRef",
                                                        "ref_id": "162"
                                                      }
                                                    ],
                                                    "node_type": "Start",
                                                    "ref_id": "163"
                                                  }
                                                ],
                                                "ref_id": "164"
                                              }
                                            ],
                                            "ref_id": "165"
                                          }
                                        ],
                                        "ref_id": "166"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n    )"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "167"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "result"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "168"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "168"
                              }
                            ],
                            "ref_id": "169"
                          }
                        ],
                        "node_type": "Query",
                        "ref_id": "170"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "170"
                  }
                ],
                "ref_id": "171"
              }
            ],
            "define_name": "FirstLabTest"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Results\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "{\n      // First physical exams\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstHR: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstPhysicalExam\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Physical Exam, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Heart rate\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "69"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "100"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstSBP: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstPhysicalExam\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Physical Exam, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Systolic blood pressure\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "101"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "102"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstRR: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstPhysicalExam\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Physical Exam, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Respiratory rate\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "103"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "104"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstTemp: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstPhysicalExam\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Physical Exam, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Body Temperature LOINC\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "105"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "106"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstO2S: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstPhysicalExam\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Physical Exam, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Oxygen saturation in Arterial blood by Pulse oximetry\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "107"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "108"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n      // Weight uses lab test timing\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstWeight: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstPhysicalExamWithLabTiming\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Physical Exam, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Body Weight\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "109"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "140"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n  \n      // First lab tests\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstHemat: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Hematocrit lab test\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "141"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "172"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstWBC: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"White Blood Cells Count Lab Test\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "173"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "174"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstPotass: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Potassium Lab Test\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "175"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "176"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstSodium: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Sodium Lab Test V\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "177"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "178"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstBicarb: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Bicarbonate Lab Test\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "179"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "180"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstCreat: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Creatinine Lab Test\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "181"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "182"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": ",\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "firstGlucose: "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "\"FirstLabTest\"("
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "[\"Laboratory Test, Performed\": "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Glucose Lab Test\""
                                          }
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "]"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "183"
                              },
                              {
                                "children": [
                                  {
                                    "text": ")"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "184"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n  }"
                          }
                        ]
                      }
                    ],
                    "node_type": "Tuple",
                    "ref_id": "185"
                  }
                ],
                "ref_id": "186"
              }
            ],
            "define_name": "Results"
          }
        ],
        "identifier": {
          "id": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
          "version": "0.1.016"
        }
      },
      "is_main_library": true,
      "is_top_level": true,
      "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
      "library_version": "0.1.016",
      "statement_dependencies": [
        {
          "statement_name": "Patient"
        },
        {
          "statement_name": "IP Encounters",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization Length of Stay"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "CalendarAgeInYearsAt"
            }
          ]
        },
        {
          "statement_name": "Initial Population",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "IP Encounters"
            }
          ]
        },
        {
          "statement_name": "Denominator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "Initial Population"
            }
          ]
        },
        {
          "statement_name": "Numerator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "Initial Population"
            }
          ]
        },
        {
          "statement_name": "FirstPhysicalExam",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "IP Encounters"
            }
          ]
        },
        {
          "statement_name": "FirstPhysicalExamWithLabTiming",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "IP Encounters"
            }
          ]
        },
        {
          "statement_name": "FirstLabTest",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "IP Encounters"
            }
          ]
        },
        {
          "statement_name": "Results",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstPhysicalExam"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstPhysicalExam"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstPhysicalExam"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstPhysicalExam"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstPhysicalExam"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstPhysicalExamWithLabTiming"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            },
            {
              "hqmf_id": null,
              "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
              "statement_name": "FirstLabTest"
            }
          ]
        }
      ]
    },
    {
      "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": "Hospitalization Length of Stay",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "LengthInDays"
            },
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "Hospitalization"
            }
          ]
        },
        {
          "statement_name": "LengthInDays"
        },
        {
          "statement_name": "Hospitalization"
        },
        {
          "statement_name": "CalendarAgeInYearsAt",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "ToDate"
            }
          ]
        },
        {
          "statement_name": "ToDate"
        }
      ]
    }
  ],
  "created_at": null,
  "description": "This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the hybrid HWR outcome measure. It is designed to extract the first captured set of vital signs and basic laboratory results obtained on adult Medicare fee-for-service patients admitted to acute care short stay hospitals.",
  "hqmf_id": "40280382-5FA6-FE85-0160-128121CF2479",
  "hqmf_set_id": "FA75DE85-A934-45D7-A2F7-C700A756078B",
  "hqmf_version_number": "0",
  "main_cql_library": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
  "measure_attributes": [
    {
      "code": "OTH",
      "value": "529",
      "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": "529",
        "media_type": "text/plain"
      }
    },
    {
      "code": "OTH",
      "value": "2879",
      "name": "NQF Number",
      "code_obj": {
        "type": "CD",
        "null_flavor": "OTH",
        "original_text": "NQF Number"
      },
      "value_obj": {
        "type": "ED",
        "value": "2879",
        "media_type": "text/plain"
      }
    },
    {
      "code": "COPY",
      "value": "Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.  \n\nThis material contains SNOMED Clinical Terms (R) (SNOMED CT(C)) copyright 2004-2016 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": "Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.  \n\nThis material contains SNOMED Clinical Terms (R) (SNOMED CT(C)) copyright 2004-2016 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 specifications are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications.\n\nTHE MEASURES AND SPECIFICATIONS ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.\n\nDue to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
      "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 specifications are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications.\n\nTHE MEASURES AND SPECIFICATIONS ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.\n\nDue to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
        "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": "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": "For a detailed description of how the core clinical data elements are used in the hybrid HWR measure risk adjustment model, see the Hybrid HWR Measure with Electronic Health Record Extracted Risk Factors Specifications Report on QualityNet.org here:\nhttps://www.qualitynet.org/dcs/ContentServer?c=Page&pagename=QnetPublic%2FPage%2FQnetTier3&cid=1228776337297",
      "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": "For a detailed description of how the core clinical data elements are used in the hybrid HWR measure risk adjustment model, see the Hybrid HWR Measure with Electronic Health Record Extracted Risk Factors Specifications Report on QualityNet.org here:\nhttps://www.qualitynet.org/dcs/ContentServer?c=Page&pagename=QnetPublic%2FPage%2FQnetTier3&cid=1228776337297",
        "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": "Although we are using the \"proportion\" function in the MAT, hospitals will not report a proportion, ratio, or rate. Instead hospitals will report actual data values for all the elements included. \n\nThe intent of this logic is to extract the FIRST set of clinical data elements on patients, from hospital EHRs. The data will be linked with administrative claims to risk adjust the hybrid HWR outcome measure. This work addresses stakeholder concerns that clinical data garnered from patients, and used by clinicians to guide diagnostic decisions and treatment, are preferable to administrative claims data when profiling hospitals' case mix. We are calling the list of data elements for extraction the \"HWR-specific core clinical data elements\". The core clinical data elements are the first set of vital signs and basic laboratory test results captured on adult Medicare fee-for-service patients, age 65 or older (Initial Population), after they arrive at the hospital to which they are subsequently admitted. For example, this first set of data values is often captured in the emergency department or in the pre-operative area sometimes hours before a patient is admitted to that same facility. \n\nThese data elements were selected because they: 1. reflect patients' clinical status when they first present to the hospital; 2. are clinically and statistically relevant to patient outcomes; 3. are consistently obtained on adult inpatients based on current clinical practice; 4. are captured with a standard definition and recorded in a standard format across providers; and 5. are entered in structured fields that are feasibly retrieved from current EHR systems. Additional data called Linking Variables are used to link EHR data files with administrative claims data for CMS to calculate results for the hybrid HWR measure, which are: CMS Certification Number; Health Insurance Claim Number or Medicare Beneficiary Identifier; date of birth; sex; admission date; and discharge date.",
      "name": "Rationale",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "RAT",
        "title": "Rationale"
      },
      "value_obj": {
        "type": "ED",
        "value": "Although we are using the \"proportion\" function in the MAT, hospitals will not report a proportion, ratio, or rate. Instead hospitals will report actual data values for all the elements included. \n\nThe intent of this logic is to extract the FIRST set of clinical data elements on patients, from hospital EHRs. The data will be linked with administrative claims to risk adjust the hybrid HWR outcome measure. This work addresses stakeholder concerns that clinical data garnered from patients, and used by clinicians to guide diagnostic decisions and treatment, are preferable to administrative claims data when profiling hospitals' case mix. We are calling the list of data elements for extraction the \"HWR-specific core clinical data elements\". The core clinical data elements are the first set of vital signs and basic laboratory test results captured on adult Medicare fee-for-service patients, age 65 or older (Initial Population), after they arrive at the hospital to which they are subsequently admitted. For example, this first set of data values is often captured in the emergency department or in the pre-operative area sometimes hours before a patient is admitted to that same facility. \n\nThese data elements were selected because they: 1. reflect patients' clinical status when they first present to the hospital; 2. are clinically and statistically relevant to patient outcomes; 3. are consistently obtained on adult inpatients based on current clinical practice; 4. are captured with a standard definition and recorded in a standard format across providers; and 5. are entered in structured fields that are feasibly retrieved from current EHR systems. Additional data called Linking Variables are used to link EHR data files with administrative claims data for CMS to calculate results for the hybrid HWR measure, which are: CMS Certification Number; Health Insurance Claim Number or Medicare Beneficiary Identifier; date of birth; sex; admission date; and discharge date.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "CRS",
      "value": "The logic is not meant to guide or alter the care patients receive. The purpose of this core clinical data elements logic is to extract clinical data that are already routinely captured in EHRs among hospitalized adult patients. It is not intended to require that clinical staff perform additional measurements or tests that are not needed for diagnostic assessment or treatment of patients.",
      "name": "Clinical Recommendation Statement",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "CRS",
        "title": "Clinical Recommendation Statement"
      },
      "value_obj": {
        "type": "ED",
        "value": "The logic is not meant to guide or alter the care patients receive. The purpose of this core clinical data elements logic is to extract clinical data that are already routinely captured in EHRs among hospitalized adult patients. It is not intended to require that clinical staff perform additional measurements or tests that are not needed for diagnostic assessment or treatment of patients.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "IDUR",
      "value": "No actual measure score will be generated by hospitals. Instead hospitals will report the data values for each of the core clinical data elements for all patients in the Initial Population. These core clinical data elements will be linked to administrative claims data and used by CMS to calculate results for the hybrid HWR measure. Hospitals that submit this data will receive reports detailing the success of their data submission.",
      "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": "No actual measure score will be generated by hospitals. Instead hospitals will report the data values for each of the core clinical data elements for all patients in the Initial Population. These core clinical data elements will be linked to administrative claims data and used by CMS to calculate results for the hybrid HWR measure. Hospitals that submit this data will receive reports detailing the success of their data submission.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DEF",
      "value": "HWR-Specific Core Clinical Data Elements",
      "name": "Definition",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DEF",
        "title": "Definition"
      },
      "value_obj": {
        "type": "ED",
        "value": "HWR-Specific Core Clinical Data Elements",
        "media_type": "text/plain"
      }
    },
    {
      "code": "GUIDE",
      "value": "This logic guides the user to extract the FIRST captured HWR-specific core clinical data elements for all Medicare fee-for-service patients age 65 or older (Initial Population) directly admitted to the hospital or admitted to the same facility after an emergency department stay or surgical procedure. \n\nThe logic supports extraction of the FIRST set of HWR-specific core clinical data elements in two different ways depending on if the patient was a direct admission, meaning that the patient was admitted directly to an inpatient unit without first receiving care in the Emergency Department or other outpatient location within the same admitting facility: \n\n1. If the patient was a direct admission, the logic supports extraction of the FIRST captured vital signs within 2 hours after the start of the inpatient admission, and the FIRST captured laboratory test results within 24 hours after the start of the inpatient admission. \n2. If the patient has values captured prior to admission, for example from the emergency department or pre-operative or other outpatient area within the hospital, the logic supports extraction of the FIRST captured vital signs and laboratory test results within 24 hours PRIOR to the start of the inpatient admission. All clinical systems used in inpatient and outpatient locations within the hospital facility should be queried when looking for core clinical data element values related to a patient who is subsequently admitted.\n\nValue sets for the laboratory tests represent the LOINC codes currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for CCDE reporting.\n\nNOTE: Do not report ALL values on a patient during their entire admission. Only report the FIRST recorded value for EACH core clinical data element collected in the appropriate timeframe, if available.\n\nFor each patient please also submit the following Linking Variables: \nCMS Certification Number; \nHealth Insurance Claim Number or Medicare Beneficiary Identifier;\nDate of Birth;\nSex;\nAdmission Date; and,\nDischarge Date.",
      "name": "Guidance",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "GUIDE",
        "title": "Guidance"
      },
      "value_obj": {
        "type": "ED",
        "value": "This logic guides the user to extract the FIRST captured HWR-specific core clinical data elements for all Medicare fee-for-service patients age 65 or older (Initial Population) directly admitted to the hospital or admitted to the same facility after an emergency department stay or surgical procedure. \n\nThe logic supports extraction of the FIRST set of HWR-specific core clinical data elements in two different ways depending on if the patient was a direct admission, meaning that the patient was admitted directly to an inpatient unit without first receiving care in the Emergency Department or other outpatient location within the same admitting facility: \n\n1. If the patient was a direct admission, the logic supports extraction of the FIRST captured vital signs within 2 hours after the start of the inpatient admission, and the FIRST captured laboratory test results within 24 hours after the start of the inpatient admission. \n2. If the patient has values captured prior to admission, for example from the emergency department or pre-operative or other outpatient area within the hospital, the logic supports extraction of the FIRST captured vital signs and laboratory test results within 24 hours PRIOR to the start of the inpatient admission. All clinical systems used in inpatient and outpatient locations within the hospital facility should be queried when looking for core clinical data element values related to a patient who is subsequently admitted.\n\nValue sets for the laboratory tests represent the LOINC codes currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for CCDE reporting.\n\nNOTE: Do not report ALL values on a patient during their entire admission. Only report the FIRST recorded value for EACH core clinical data element collected in the appropriate timeframe, if available.\n\nFor each patient please also submit the following Linking Variables: \nCMS Certification Number; \nHealth Insurance Claim Number or Medicare Beneficiary Identifier;\nDate of Birth;\nSex;\nAdmission Date; and,\nDischarge Date.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "TRANF",
      "value": "To be determined.",
      "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": "To be determined.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "IPOP",
      "value": "All Medicare fee-for-service patients age 65 and older with an inpatient admission (length of stay <365 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": "All Medicare fee-for-service patients age 65 and older with an inpatient admission (length of stay <365 days) during the measurement period.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENOM",
      "value": "Same as initial population",
      "name": "Denominator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DENOM",
        "title": "Denominator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Same as initial population",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEX",
      "value": "None",
      "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": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMER",
      "value": "Same as initial population",
      "name": "Numerator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "NUMER",
        "title": "Numerator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Same as initial population",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMEX",
      "value": "None",
      "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": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEXCEP",
      "value": "None",
      "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": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "SDE",
      "value": "For patients in the denominator, report the FIRST value for vital signs captured within the 24 hours prior to the inpatient admission. If no values were captured in the 24 hours prior to the admission (for example, for patients directly admitted to the hospital) report the first value captured within 2 hours after the start of the inpatient admission. For laboratory test results, report the first value captured in the 24 hours prior to admission. If there are no values in the 24 hours prior to admission, report the first value captured within 24 hours after the start of the inpatient admission. First values for the following data elements may be captured in the emergency department or other outpatient area within the hospital before a patient is subsequently admitted to the same hospital. First values for these data elements may also be captured on an inpatient unit for directly admitted patients who do not receive care in the emergency department or other hospital outpatient location before admission. \n\nThe core clinical data elements are as follows:\nHeart rate\nSystolic blood pressure\nRespiratory rate\nTemperature\nOxygen saturation\nWeight\nHematocrit\nWhite blood cell count\nPotassium\nSodium\nBicarbonate\nCreatinine\nGlucose\n\nNOTE: Do not report ALL values on a patient during their entire admission. Only report the FIRST recorded value for EACH core clinical data element collected in the appropriate timeframe, if available.",
      "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 patients in the denominator, report the FIRST value for vital signs captured within the 24 hours prior to the inpatient admission. If no values were captured in the 24 hours prior to the admission (for example, for patients directly admitted to the hospital) report the first value captured within 2 hours after the start of the inpatient admission. For laboratory test results, report the first value captured in the 24 hours prior to admission. If there are no values in the 24 hours prior to admission, report the first value captured within 24 hours after the start of the inpatient admission. First values for the following data elements may be captured in the emergency department or other outpatient area within the hospital before a patient is subsequently admitted to the same hospital. First values for these data elements may also be captured on an inpatient unit for directly admitted patients who do not receive care in the emergency department or other hospital outpatient location before admission. \n\nThe core clinical data elements are as follows:\nHeart rate\nSystolic blood pressure\nRespiratory rate\nTemperature\nOxygen saturation\nWeight\nHematocrit\nWhite blood cell count\nPotassium\nSodium\nBicarbonate\nCreatinine\nGlucose\n\nNOTE: Do not report ALL values on a patient during their entire admission. Only report the FIRST recorded value for EACH core clinical data element collected in the appropriate timeframe, if available.",
        "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": "33719872-9241-4DF9-BF73-D7BDE6D44929",
      "preconditions": [
        {
          "id": 2,
          "preconditions": [
            {
              "id": 1,
              "reference": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData__IP_Encounters__61CCDF82_CA04_4F66_965D_2778481058B5"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENOM": {
      "conjunction?": true,
      "type": "DENOM",
      "hqmf_id": "B4C75BE6-6F53-42E3-9C63-13AB374685DE",
      "preconditions": [
        {
          "id": 4,
          "preconditions": [
            {
              "id": 3,
              "reference": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData__Denominator__61CCDF82_CA04_4F66_965D_2778481058B5"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "NUMER": {
      "conjunction?": true,
      "type": "NUMER",
      "hqmf_id": "ADE8C6B6-A77C-49E1-BB2A-728A5AA7BB06",
      "preconditions": [
        {
          "id": 6,
          "preconditions": [
            {
              "id": 5,
              "reference": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData__Numerator__61CCDF82_CA04_4F66_965D_2778481058B5"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    }
  },
  "population_sets": [
    {
      "population_set_id": "PopulationCriteria1",
      "populations": {
        "DENOM": {
          "hqmf_id": "B4C75BE6-6F53-42E3-9C63-13AB374685DE",
          "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
          "statement_name": "Denominator"
        },
        "IPP": {
          "hqmf_id": "33719872-9241-4DF9-BF73-D7BDE6D44929",
          "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
          "statement_name": "IP Encounters"
        },
        "NUMER": {
          "hqmf_id": "ADE8C6B6-A77C-49E1-BB2A-728A5AA7BB06",
          "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
          "statement_name": "Numerator"
        },
        "_type": "CQM::ProportionPopulationMap"
      },
      "supplemental_data_elements": [
        {
          "hqmf_id": null,
          "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
          "statement_name": "Patient"
        }
      ],
      "risk_adjustment_variables": [
        {
          "hqmf_id": null,
          "library_name": "CoreClinicalDataElementsfortheHybridHospitalWideReadmissionHWRMeasurewithClaimsandElectronicHealthRecordData",
          "statement_name": "IP Encounters"
        }
      ],
      "title": "Population Criteria Section"
    }
  ],
  "source_data_criteria": [
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.114222.4.11.3591",
      "dataElementCodes": [

      ],
      "description": "Patient Characteristic: Payer",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.53",
      "id": "5d289cd631fe5f8b8c55ca7f",
      "qdmCategory": "patient_characteristic",
      "qdmTitle": "Patient Characteristic",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristic"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113762.1.4.1045.152",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Physical Exam, Performed: BodyTemperatureLOINC",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.62",
      "id": "5d289cd631fe5f8b8c55ca80",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "physical_exam",
      "qdmStatus": "performed",
      "qdmTitle": "Physical Exam, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::PhysicalExamPerformed"
    },
    {
      "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": "5d289cd631fe5f8b8c55ca81",
      "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.159",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Physical Exam, Performed: BodyWeight",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.62",
      "id": "5d289cd631fe5f8b8c55ca82",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "physical_exam",
      "qdmStatus": "performed",
      "qdmTitle": "Physical Exam, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::PhysicalExamPerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113762.1.4.1045.134",
      "components": null,
      "dataElementCodes": [

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

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

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

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

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

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

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

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

      ],
      "description": "Laboratory Test, Performed: SodiumLabTestV",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.42",
      "id": "5d289cd631fe5f8b8c55ca8a",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "laboratory_test",
      "qdmStatus": "performed",
      "qdmTitle": "Laboratory Test, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "referenceRange": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "resultDatetime": null,
      "status": null,
      "_type": "QDM::LaboratoryTestPerformed"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "drc-3f0693cb371bd1e4897e23e2f3d8a1e7514ee188e6432d4ca26a1a9c739d1ed5",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Physical Exam, Performed: Physical Exam, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.62",
      "id": "5d289cd631fe5f8b8c55ca8b",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "physical_exam",
      "qdmStatus": "performed",
      "qdmTitle": "Physical Exam, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::PhysicalExamPerformed"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "drc-5288c3d17d0f24d203a005a7643c2d10bb205b6e62a79b2bc10f9b7757191637",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Physical Exam, Performed: Physical Exam, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.62",
      "id": "5d289cd631fe5f8b8c55ca8c",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "physical_exam",
      "qdmStatus": "performed",
      "qdmTitle": "Physical Exam, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::PhysicalExamPerformed"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "drc-c1f61825d13c60f07759c8dada377e6750a31ee6c2a31c1236f489e2b93482b6",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Physical Exam, Performed: Physical Exam, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.62",
      "id": "5d289cd631fe5f8b8c55ca8d",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "physical_exam",
      "qdmStatus": "performed",
      "qdmTitle": "Physical Exam, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::PhysicalExamPerformed"
    },
    {
      "anatomicalLocationSite": null,
      "authorDatetime": null,
      "codeListId": "drc-d20f2fc48045688c795dd40ecdb30e2500a3e8e90fb984c2f4450b2ca529e690",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Physical Exam, Performed: Physical Exam, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.62",
      "id": "5d289cd631fe5f8b8c55ca8e",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "physical_exam",
      "qdmStatus": "performed",
      "qdmTitle": "Physical Exam, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::PhysicalExamPerformed"
    }
  ],
  "title": "Core Clinical Data Elements for the Hybrid Hospital-Wide Readmission (HWR) Measure with Claims and Electronic Health Record Data",
  "updated_at": null,
  "value_set_ids": [
    "5d289cd631fe5f8b8c55ca6a",
    "5d289cd631fe5f8b8c55ca6b",
    "5d289cd631fe5f8b8c55ca6c",
    "5d289cd631fe5f8b8c55ca6d",
    "5d289cd631fe5f8b8c55ca6e",
    "5d289cd631fe5f8b8c55ca6f",
    "5d289cd631fe5f8b8c55ca70",
    "5d289cd631fe5f8b8c55ca71",
    "5d289cd631fe5f8b8c55ca72",
    "5d289cd631fe5f8b8c55ca73",
    "5d289cd631fe5f8b8c55ca74",
    "5d289cd631fe5f8b8c55ca75",
    "5d289cd631fe5f8b8c55ca76",
    "5d289cd631fe5f8b8c55ca77",
    "5d289cd631fe5f8b8c55ca78",
    "5d289cd631fe5f8b8c55ca79",
    "5d289cd631fe5f8b8c55ca7a",
    "5d289cd631fe5f8b8c55ca7b",
    "5d289cd631fe5f8b8c55ca7c",
    "5d289cd631fe5f8b8c55ca7d",
    "5d289cd631fe5f8b8c55ca7e"
  ]
}