{
  "calculate_sdes": true,
  "calculation_method": "PATIENT",
  "cms_id": "CMS123v7",
  "component": false,
  "component_hqmf_set_ids": [

  ],
  "composite": false,
  "composite_hqmf_set_id": null,
  "cql_libraries": [
    {
      "cql": "library DiabetesFootExam version '7.5.000'\r\n\r\nusing QDM version '5.3'\r\n\r\ninclude Adult_Outpatient_Encounters version '1.1.000' called AdultOutpatientEncounters\r\ninclude Hospice version '1.0.000' called Hospice\r\ninclude MATGlobalCommonFunctions version '2.0.000' called Global\r\n\r\ncodesystem \"SNOMEDCT:2017-09\": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2017-09'\r\n\r\nvalueset \"ONC Administrative Sex\": 'urn:oid:2.16.840.1.113762.1.4.1'\r\nvalueset \"Race\": 'urn:oid:2.16.840.1.114222.4.11.836'\r\nvalueset \"Ethnicity\": 'urn:oid:2.16.840.1.114222.4.11.837'\r\nvalueset \"Payer\": 'urn:oid:2.16.840.1.114222.4.11.3591'\r\nvalueset \"Bilateral amputation of leg below or above knee\": 'urn:oid:2.16.840.1.113883.3.464.1003.113.12.1056'\r\nvalueset \"Diabetes\": 'urn:oid:2.16.840.1.113883.3.464.1003.103.12.1001'\r\nvalueset \"Left\": 'urn:oid:2.16.840.1.113883.3.464.1003.122.12.1036'\r\nvalueset \"Left Unilateral Amputation Procedure Above or Below Knee\": 'urn:oid:2.16.840.1.113883.3.464.1003.113.12.1072'\r\nvalueset \"Right\": 'urn:oid:2.16.840.1.113883.3.464.1003.122.12.1035'\r\nvalueset \"Right Unilateral Amputation Procedure Above or Below Knee\": 'urn:oid:2.16.840.1.113883.3.464.1003.113.12.1073'\r\nvalueset \"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\": 'urn:oid:2.16.840.1.113883.3.464.1003.103.12.1022'\r\nvalueset \"Unilateral Amputation Below or Above Knee, Unspecified Laterality\": 'urn:oid:2.16.840.1.113883.3.464.1003.113.12.1059'\r\nvalueset \"Left Unilateral Amputation Above or Below Knee\": 'urn:oid:2.16.840.1.113883.3.464.1003.113.12.1058'\r\nvalueset \"Right Unilateral Amputation Above or Below Knee\": 'urn:oid:2.16.840.1.113883.3.464.1003.113.12.1057'\r\n\r\ncode \"Diabetic foot examination (regime/therapy)\": '401191002' from \"SNOMEDCT:2017-09\" display 'Diabetic foot examination (regime/therapy)'\r\ncode \"Monofilament foot sensation test (procedure)\": '134388005' from \"SNOMEDCT:2017-09\" display 'Monofilament foot sensation test (procedure)'\r\ncode \"Pedal pulse taking (procedure)\": '91161007' from \"SNOMEDCT:2017-09\" display 'Pedal pulse taking (procedure)'\r\n\r\nparameter \"Measurement Period\" Interval<DateTime>\r\n\r\ncontext Patient\r\n\r\ndefine \"SDE Ethnicity\":\r\n\t[\"Patient Characteristic Ethnicity\": \"Ethnicity\"]\r\n\r\ndefine \"SDE Payer\":\r\n\t[\"Patient Characteristic Payer\": \"Payer\"]\r\n\r\ndefine \"SDE Race\":\r\n\t[\"Patient Characteristic Race\": \"Race\"]\r\n\r\ndefine \"SDE Sex\":\r\n\t[\"Patient Characteristic Sex\": \"ONC Administrative Sex\"]\r\n\r\ndefine \"Denominator\":\r\n\t\"Initial Population\"\r\n\r\ndefine \"Numerator\":\r\n\texists ( \"Sensory Foot Exam\" )\r\n\t\tand exists ( \"Visual Foot Exam\" )\r\n\t\tand exists ( \"Pedal Pulse Checked\" )\r\n\r\ndefine \"Pedal Pulse Checked\":\r\n\t[\"Assessment, Performed\": \"Pedal pulse taking (procedure)\"] PedalPulseCheck\r\n\t\twhere PedalPulseCheck.result is not null\r\n\t\t\tand PedalPulseCheck.authorDatetime during \"Measurement Period\"\r\n\r\ndefine \"Visual Foot Exam\":\r\n\t[\"Assessment, Performed\": \"Diabetic foot examination (regime/therapy)\"] FootExamVisual\r\n\t\twhere FootExamVisual.result is not null\r\n\t\t\tand FootExamVisual.authorDatetime during \"Measurement Period\"\r\n\r\ndefine \"Bilateral Lower Extremity Amputation\":\r\n\t[\"Diagnosis\": \"Bilateral amputation of leg below or above knee\"] LowerBilateralAmputation\r\n\t\twhere LowerBilateralAmputation.prevalencePeriod starts on or before end of \"Measurement Period\"\r\n\r\ndefine \"Sensory Foot Exam\":\r\n\t[\"Assessment, Performed\": \"Monofilament foot sensation test (procedure)\"] MonofilamentTest\r\n\t\twhere MonofilamentTest.result is not null\r\n\t\t\tand MonofilamentTest.authorDatetime during \"Measurement Period\"\r\n\r\ndefine \"Denominator Exclusions\":\r\n\tHospice.\"Has Hospice\"\r\n\t\tor exists ( \"Bilateral Lower Extremity Amputation\" )\r\n\t\tor ( exists ( \"Left Lower Extremity Amputation\" )\r\n\t\t\t\tand exists ( \"Right Lower Extremity Amputation\" )\r\n\t\t)\r\n\r\ndefine \"Initial Population\":\r\n\texists ( [\"Patient Characteristic Birthdate\"] Birthdate\r\n\t\t\twhere Global.\"CalendarAgeInYearsAt\"(Birthdate.birthDatetime, start of \"Measurement Period\")in Interval[18, 75 )\r\n\t)\r\n\t\tand exists ( AdultOutpatientEncounters.\"Qualifying Encounters\" )\r\n\t\tand exists ( [\"Diagnosis\": \"Diabetes\"] Diabetes\r\n\t\t\t\twhere Diabetes.prevalencePeriod overlaps \"Measurement Period\"\r\n\t\t)\r\n\r\ndefine \"Left Lower Extremity Amputation\":\r\n\t( ( ( [\"Diagnosis\": \"Unilateral Amputation Below or Above Knee, Unspecified Laterality\"]\r\n\t\t\tunion [\"Procedure, Performed\": \"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\"] ) UnilateralAmputation\r\n\t\t\twhere UnilateralAmputation.anatomicalLocationSite in \"Left\"\r\n\t)\r\n\t\tunion ( [\"Diagnosis\": \"Left Unilateral Amputation Above or Below Knee\"]\r\n\t\t\t\tunion [\"Procedure, Performed\": \"Left Unilateral Amputation Procedure Above or Below Knee\"]\r\n\t\t) ) LeftLowerAmputation\r\n\t\twhere Coalesce(LeftLowerAmputation.prevalencePeriod, LeftLowerAmputation.relevantPeriod)starts on or before end of \"Measurement Period\"\r\n\r\ndefine \"Right Lower Extremity Amputation\":\r\n\t( ( ( [\"Diagnosis\": \"Unilateral Amputation Below or Above Knee, Unspecified Laterality\"]\r\n\t\t\tunion [\"Procedure, Performed\": \"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\"] ) UnilateralAmputation\r\n\t\t\twhere UnilateralAmputation.anatomicalLocationSite in \"Right\"\r\n\t)\r\n\t\tunion ( [\"Diagnosis\": \"Right Unilateral Amputation Above or Below Knee\"]\r\n\t\t\t\tunion [\"Procedure, Performed\": \"Right Unilateral Amputation Procedure Above or Below Knee\"]\r\n\t\t) ) RightLowerAmputation\r\n\t\twhere Coalesce(RightLowerAmputation.prevalencePeriod, RightLowerAmputation.relevantPeriod)starts on or before end of \"Measurement Period\"\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "DiabetesFootExam",
            "version": "7.5.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "locator": "3:1-3:23",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_3",
                "version": "5.3"
              }
            ]
          },
          "includes": {
            "def": [
              {
                "localId": "2",
                "locator": "5:1-5:86",
                "localIdentifier": "AdultOutpatientEncounters",
                "path": "Adult_Outpatient_Encounters",
                "version": "1.1.000"
              },
              {
                "localId": "3",
                "locator": "7:1-7:48",
                "localIdentifier": "Hospice",
                "path": "Hospice",
                "version": "1.0.000"
              },
              {
                "localId": "4",
                "locator": "9:1-9:64",
                "localIdentifier": "Global",
                "path": "MATGlobalCommonFunctions",
                "version": "2.0.000"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "28",
                "locator": "32:1-32:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "27",
                  "locator": "32:32-32:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "26",
                    "locator": "32:41-32:48",
                    "name": "{urn:hl7-org:elm-types:r1}DateTime",
                    "type": "NamedTypeSpecifier"
                  }
                }
              }
            ]
          },
          "codeSystems": {
            "def": [
              {
                "localId": "5",
                "locator": "11:1-11:97",
                "name": "SNOMEDCT:2017-09",
                "id": "2.16.840.1.113883.6.96",
                "version": "urn:hl7:version:2017-09",
                "accessLevel": "Public"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "6",
                "locator": "13:1-13:68",
                "name": "ONC Administrative Sex",
                "id": "2.16.840.1.113762.1.4.1",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "14:1-14:53",
                "name": "Race",
                "id": "2.16.840.1.114222.4.11.836",
                "accessLevel": "Public"
              },
              {
                "localId": "8",
                "locator": "15:1-15:58",
                "name": "Ethnicity",
                "id": "2.16.840.1.114222.4.11.837",
                "accessLevel": "Public"
              },
              {
                "localId": "9",
                "locator": "16:1-16:55",
                "name": "Payer",
                "id": "2.16.840.1.114222.4.11.3591",
                "accessLevel": "Public"
              },
              {
                "localId": "10",
                "locator": "17:1-17:110",
                "name": "Bilateral amputation of leg below or above knee",
                "id": "2.16.840.1.113883.3.464.1003.113.12.1056",
                "accessLevel": "Public"
              },
              {
                "localId": "11",
                "locator": "18:1-18:71",
                "name": "Diabetes",
                "id": "2.16.840.1.113883.3.464.1003.103.12.1001",
                "accessLevel": "Public"
              },
              {
                "localId": "12",
                "locator": "19:1-19:67",
                "name": "Left",
                "id": "2.16.840.1.113883.3.464.1003.122.12.1036",
                "accessLevel": "Public"
              },
              {
                "localId": "13",
                "locator": "20:1-20:119",
                "name": "Left Unilateral Amputation Procedure Above or Below Knee",
                "id": "2.16.840.1.113883.3.464.1003.113.12.1072",
                "accessLevel": "Public"
              },
              {
                "localId": "14",
                "locator": "21:1-21:68",
                "name": "Right",
                "id": "2.16.840.1.113883.3.464.1003.122.12.1035",
                "accessLevel": "Public"
              },
              {
                "localId": "15",
                "locator": "22:1-22:120",
                "name": "Right Unilateral Amputation Procedure Above or Below Knee",
                "id": "2.16.840.1.113883.3.464.1003.113.12.1073",
                "accessLevel": "Public"
              },
              {
                "localId": "16",
                "locator": "23:1-23:138",
                "name": "Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality",
                "id": "2.16.840.1.113883.3.464.1003.103.12.1022",
                "accessLevel": "Public"
              },
              {
                "localId": "17",
                "locator": "24:1-24:128",
                "name": "Unilateral Amputation Below or Above Knee, Unspecified Laterality",
                "id": "2.16.840.1.113883.3.464.1003.113.12.1059",
                "accessLevel": "Public"
              },
              {
                "localId": "18",
                "locator": "25:1-25:109",
                "name": "Left Unilateral Amputation Above or Below Knee",
                "id": "2.16.840.1.113883.3.464.1003.113.12.1058",
                "accessLevel": "Public"
              },
              {
                "localId": "19",
                "locator": "26:1-26:110",
                "name": "Right Unilateral Amputation Above or Below Knee",
                "id": "2.16.840.1.113883.3.464.1003.113.12.1057",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "21",
                "locator": "28:1-28:139",
                "name": "Diabetic foot examination (regime/therapy)",
                "id": "401191002",
                "display": "Diabetic foot examination (regime/therapy)",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "20",
                  "locator": "28:69-28:86",
                  "name": "SNOMEDCT:2017-09"
                }
              },
              {
                "localId": "23",
                "locator": "29:1-29:143",
                "name": "Monofilament foot sensation test (procedure)",
                "id": "134388005",
                "display": "Monofilament foot sensation test (procedure)",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "22",
                  "locator": "29:71-29:88",
                  "name": "SNOMEDCT:2017-09"
                }
              },
              {
                "localId": "25",
                "locator": "30:1-30:114",
                "name": "Pedal pulse taking (procedure)",
                "id": "91161007",
                "display": "Pedal pulse taking (procedure)",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "24",
                  "locator": "30:56-30:73",
                  "name": "SNOMEDCT:2017-09"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "34:1-34:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "34:1-34:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "30",
                "locator": "36:1-37:50",
                "name": "SDE Ethnicity",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "30",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Ethnicity\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "29",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Ethnicity\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Ethnicity\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "29",
                  "locator": "37:2-37:50",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicEthnicity",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Ethnicity",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "32",
                "locator": "39:1-40:42",
                "name": "SDE Payer",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "32",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Payer\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "31",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Payer\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Payer\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "31",
                  "locator": "40:2-40:42",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicPayer",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Payer",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "34",
                "locator": "42:1-43:40",
                "name": "SDE Race",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "34",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Race\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "33",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Race\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"Race\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "33",
                  "locator": "43:2-43:40",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicRace",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "Race",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "36",
                "locator": "45:1-46:57",
                "name": "SDE Sex",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "36",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"SDE Sex\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "35",
                          "s": [
                            {
                              "value": [
                                "[",
                                "\"Patient Characteristic Sex\"",
                                ": "
                              ]
                            },
                            {
                              "s": [
                                {
                                  "value": [
                                    "\"ONC Administrative Sex\""
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "]"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "35",
                  "locator": "46:2-46:57",
                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicSex",
                  "codeProperty": "code",
                  "type": "Retrieve",
                  "codes": {
                    "name": "ONC Administrative Sex",
                    "type": "ValueSetRef"
                  }
                }
              },
              {
                "localId": "64",
                "locator": "82:1-89:3",
                "name": "Initial Population",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "64",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Initial Population\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "63",
                          "s": [
                            {
                              "r": "54",
                              "s": [
                                {
                                  "r": "50",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "49",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "49",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "38",
                                                  "s": [
                                                    {
                                                      "r": "37",
                                                      "s": [
                                                        {
                                                          "r": "37",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "[",
                                                                "\"Patient Characteristic Birthdate\"",
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "Birthdate"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "48",
                                              "s": [
                                                {
                                                  "value": [
                                                    "where "
                                                  ]
                                                },
                                                {
                                                  "r": "48",
                                                  "s": [
                                                    {
                                                      "r": "44",
                                                      "s": [
                                                        {
                                                          "r": "39",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "Global"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "44",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"CalendarAgeInYearsAt\"",
                                                                "("
                                                              ]
                                                            },
                                                            {
                                                              "r": "41",
                                                              "s": [
                                                                {
                                                                  "r": "40",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "Birthdate"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "41",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "birthDatetime"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ", "
                                                              ]
                                                            },
                                                            {
                                                              "r": "43",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "start of "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "42",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Measurement Period\""
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                ")"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "in "
                                                      ]
                                                    },
                                                    {
                                                      "r": "47",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Interval[",
                                                            "18",
                                                            ", ",
                                                            "75",
                                                            " )"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t)"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\tand "
                                  ]
                                },
                                {
                                  "r": "53",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "52",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "52",
                                          "s": [
                                            {
                                              "r": "51",
                                              "s": [
                                                {
                                                  "value": [
                                                    "AdultOutpatientEncounters"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "52",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Qualifying Encounters\""
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tand "
                              ]
                            },
                            {
                              "r": "62",
                              "s": [
                                {
                                  "value": [
                                    "exists "
                                  ]
                                },
                                {
                                  "r": "61",
                                  "s": [
                                    {
                                      "value": [
                                        "( "
                                      ]
                                    },
                                    {
                                      "r": "61",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "r": "56",
                                              "s": [
                                                {
                                                  "r": "55",
                                                  "s": [
                                                    {
                                                      "r": "55",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Diagnosis\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Diabetes\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "Diabetes"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t\t\t"
                                          ]
                                        },
                                        {
                                          "r": "60",
                                          "s": [
                                            {
                                              "value": [
                                                "where "
                                              ]
                                            },
                                            {
                                              "r": "60",
                                              "s": [
                                                {
                                                  "r": "58",
                                                  "s": [
                                                    {
                                                      "r": "57",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "Diabetes"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "58",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "prevalencePeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "overlaps",
                                                    " "
                                                  ]
                                                },
                                                {
                                                  "r": "59",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Measurement Period\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t)"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "63",
                  "locator": "83:2-89:3",
                  "type": "And",
                  "operand": [
                    {
                      "localId": "54",
                      "locator": "83:2-86:66",
                      "type": "And",
                      "operand": [
                        {
                          "localId": "50",
                          "locator": "83:2-85:2",
                          "type": "Exists",
                          "operand": {
                            "localId": "49",
                            "locator": "83:9-85:2",
                            "type": "Query",
                            "source": [
                              {
                                "localId": "38",
                                "locator": "83:11-83:56",
                                "alias": "Birthdate",
                                "expression": {
                                  "localId": "37",
                                  "locator": "83:11-83:46",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}PatientCharacteristicBirthdate",
                                  "type": "Retrieve"
                                }
                              }
                            ],
                            "relationship": [

                            ],
                            "where": {
                              "localId": "48",
                              "locator": "84:4-84:114",
                              "type": "In",
                              "operand": [
                                {
                                  "localId": "44",
                                  "locator": "84:10-84:94",
                                  "name": "CalendarAgeInYearsAt",
                                  "libraryName": "Global",
                                  "type": "FunctionRef",
                                  "operand": [
                                    {
                                      "localId": "41",
                                      "locator": "84:40-84:62",
                                      "path": "birthDatetime",
                                      "scope": "Birthdate",
                                      "type": "Property"
                                    },
                                    {
                                      "localId": "43",
                                      "locator": "84:65-84:93",
                                      "type": "Start",
                                      "operand": {
                                        "localId": "42",
                                        "locator": "84:74-84:93",
                                        "name": "Measurement Period",
                                        "type": "ParameterRef"
                                      }
                                    }
                                  ]
                                },
                                {
                                  "localId": "47",
                                  "locator": "84:98-84:114",
                                  "lowClosed": true,
                                  "highClosed": false,
                                  "type": "Interval",
                                  "low": {
                                    "localId": "45",
                                    "locator": "84:107-84:108",
                                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                                    "value": "18",
                                    "type": "Literal"
                                  },
                                  "high": {
                                    "localId": "46",
                                    "locator": "84:111-84:112",
                                    "valueType": "{urn:hl7-org:elm-types:r1}Integer",
                                    "value": "75",
                                    "type": "Literal"
                                  }
                                }
                              ]
                            }
                          }
                        },
                        {
                          "localId": "53",
                          "locator": "86:7-86:66",
                          "type": "Exists",
                          "operand": {
                            "localId": "52",
                            "locator": "86:14-86:66",
                            "name": "Qualifying Encounters",
                            "libraryName": "AdultOutpatientEncounters",
                            "type": "ExpressionRef"
                          }
                        }
                      ]
                    },
                    {
                      "localId": "62",
                      "locator": "87:7-89:3",
                      "type": "Exists",
                      "operand": {
                        "localId": "61",
                        "locator": "87:14-89:3",
                        "type": "Query",
                        "source": [
                          {
                            "localId": "56",
                            "locator": "87:16-87:49",
                            "alias": "Diabetes",
                            "expression": {
                              "localId": "55",
                              "locator": "87:16-87:40",
                              "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                              "codeProperty": "code",
                              "type": "Retrieve",
                              "codes": {
                                "name": "Diabetes",
                                "type": "ValueSetRef"
                              }
                            }
                          }
                        ],
                        "relationship": [

                        ],
                        "where": {
                          "localId": "60",
                          "locator": "88:5-88:65",
                          "type": "Overlaps",
                          "operand": [
                            {
                              "localId": "58",
                              "locator": "88:11-88:35",
                              "path": "prevalencePeriod",
                              "scope": "Diabetes",
                              "type": "Property"
                            },
                            {
                              "localId": "59",
                              "locator": "88:46-88:65",
                              "name": "Measurement Period",
                              "type": "ParameterRef"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              },
              {
                "localId": "66",
                "locator": "48:1-49: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": "49:2-49:21",
                  "name": "Initial Population",
                  "type": "ExpressionRef"
                }
              },
              {
                "localId": "78",
                "locator": "70:1-73:66",
                "name": "Sensory Foot Exam",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "78",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Sensory Foot Exam\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "77",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "68",
                                  "s": [
                                    {
                                      "r": "67",
                                      "s": [
                                        {
                                          "r": "67",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Assessment, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Monofilament foot sensation test (procedure)\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "MonofilamentTest"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "76",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "76",
                                  "s": [
                                    {
                                      "r": "71",
                                      "s": [
                                        {
                                          "r": "70",
                                          "s": [
                                            {
                                              "r": "69",
                                              "s": [
                                                {
                                                  "value": [
                                                    "MonofilamentTest"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "70",
                                              "s": [
                                                {
                                                  "value": [
                                                    "result"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " is not null"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "75",
                                      "s": [
                                        {
                                          "r": "73",
                                          "s": [
                                            {
                                              "r": "72",
                                              "s": [
                                                {
                                                  "value": [
                                                    "MonofilamentTest"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "73",
                                              "s": [
                                                {
                                                  "value": [
                                                    "authorDatetime"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "74",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "77",
                  "locator": "71:2-73:66",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "68",
                      "locator": "71:2-71:91",
                      "alias": "MonofilamentTest",
                      "expression": {
                        "localId": "67",
                        "locator": "71:2-71:74",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveAssessmentPerformed",
                        "templateId": "PositiveAssessmentPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "type": "ToList",
                          "operand": {
                            "name": "Monofilament foot sensation test (procedure)",
                            "type": "CodeRef"
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "76",
                    "locator": "72:3-73:66",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "71",
                        "locator": "72:9-72:43",
                        "type": "Not",
                        "operand": {
                          "locator": "72:9-72:43",
                          "type": "IsNull",
                          "operand": {
                            "localId": "70",
                            "locator": "72:9-72:31",
                            "path": "result",
                            "scope": "MonofilamentTest",
                            "type": "Property"
                          }
                        }
                      },
                      {
                        "localId": "75",
                        "locator": "73:8-73:66",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "73",
                            "locator": "73:8-73:38",
                            "path": "authorDatetime",
                            "scope": "MonofilamentTest",
                            "type": "Property"
                          },
                          {
                            "localId": "74",
                            "locator": "73:47-73:66",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "92",
                "locator": "61:1-64:64",
                "name": "Visual Foot Exam",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "92",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Visual Foot Exam\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "91",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "82",
                                  "s": [
                                    {
                                      "r": "81",
                                      "s": [
                                        {
                                          "r": "81",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Assessment, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Diabetic foot examination (regime/therapy)\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "FootExamVisual"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "90",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "90",
                                  "s": [
                                    {
                                      "r": "85",
                                      "s": [
                                        {
                                          "r": "84",
                                          "s": [
                                            {
                                              "r": "83",
                                              "s": [
                                                {
                                                  "value": [
                                                    "FootExamVisual"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "84",
                                              "s": [
                                                {
                                                  "value": [
                                                    "result"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " is not null"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "89",
                                      "s": [
                                        {
                                          "r": "87",
                                          "s": [
                                            {
                                              "r": "86",
                                              "s": [
                                                {
                                                  "value": [
                                                    "FootExamVisual"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "87",
                                              "s": [
                                                {
                                                  "value": [
                                                    "authorDatetime"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "88",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "91",
                  "locator": "62:2-64:64",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "82",
                      "locator": "62:2-62:87",
                      "alias": "FootExamVisual",
                      "expression": {
                        "localId": "81",
                        "locator": "62:2-62:72",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveAssessmentPerformed",
                        "templateId": "PositiveAssessmentPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "type": "ToList",
                          "operand": {
                            "name": "Diabetic foot examination (regime/therapy)",
                            "type": "CodeRef"
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "90",
                    "locator": "63:3-64:64",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "85",
                        "locator": "63:9-63:41",
                        "type": "Not",
                        "operand": {
                          "locator": "63:9-63:41",
                          "type": "IsNull",
                          "operand": {
                            "localId": "84",
                            "locator": "63:9-63:29",
                            "path": "result",
                            "scope": "FootExamVisual",
                            "type": "Property"
                          }
                        }
                      },
                      {
                        "localId": "89",
                        "locator": "64:8-64:64",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "87",
                            "locator": "64:8-64:36",
                            "path": "authorDatetime",
                            "scope": "FootExamVisual",
                            "type": "Property"
                          },
                          {
                            "localId": "88",
                            "locator": "64:45-64:64",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "107",
                "locator": "56:1-59:65",
                "name": "Pedal Pulse Checked",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "107",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Pedal Pulse Checked\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "106",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "97",
                                  "s": [
                                    {
                                      "r": "96",
                                      "s": [
                                        {
                                          "r": "96",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Assessment, Performed\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Pedal pulse taking (procedure)\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "PedalPulseCheck"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "105",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "105",
                                  "s": [
                                    {
                                      "r": "100",
                                      "s": [
                                        {
                                          "r": "99",
                                          "s": [
                                            {
                                              "r": "98",
                                              "s": [
                                                {
                                                  "value": [
                                                    "PedalPulseCheck"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "99",
                                              "s": [
                                                {
                                                  "value": [
                                                    "result"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " is not null"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "104",
                                      "s": [
                                        {
                                          "r": "102",
                                          "s": [
                                            {
                                              "r": "101",
                                              "s": [
                                                {
                                                  "value": [
                                                    "PedalPulseCheck"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "102",
                                              "s": [
                                                {
                                                  "value": [
                                                    "authorDatetime"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " ",
                                            "during",
                                            " "
                                          ]
                                        },
                                        {
                                          "r": "103",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "106",
                  "locator": "57:2-59:65",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "97",
                      "locator": "57:2-57:76",
                      "alias": "PedalPulseCheck",
                      "expression": {
                        "localId": "96",
                        "locator": "57:2-57:60",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveAssessmentPerformed",
                        "templateId": "PositiveAssessmentPerformed",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "type": "ToList",
                          "operand": {
                            "name": "Pedal pulse taking (procedure)",
                            "type": "CodeRef"
                          }
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "105",
                    "locator": "58:3-59:65",
                    "type": "And",
                    "operand": [
                      {
                        "localId": "100",
                        "locator": "58:9-58:42",
                        "type": "Not",
                        "operand": {
                          "locator": "58:9-58:42",
                          "type": "IsNull",
                          "operand": {
                            "localId": "99",
                            "locator": "58:9-58:30",
                            "path": "result",
                            "scope": "PedalPulseCheck",
                            "type": "Property"
                          }
                        }
                      },
                      {
                        "localId": "104",
                        "locator": "59:8-59:65",
                        "type": "In",
                        "operand": [
                          {
                            "localId": "102",
                            "locator": "59:8-59:37",
                            "path": "authorDatetime",
                            "scope": "PedalPulseCheck",
                            "type": "Property"
                          },
                          {
                            "localId": "103",
                            "locator": "59:46-59:65",
                            "name": "Measurement Period",
                            "type": "ParameterRef"
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "localId": "111",
                "locator": "51:1-54:38",
                "name": "Numerator",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "111",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Numerator\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "110",
                          "s": [
                            {
                              "r": "95",
                              "s": [
                                {
                                  "r": "80",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "79",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "79",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Sensory Foot Exam\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\tand "
                                  ]
                                },
                                {
                                  "r": "94",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "93",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "93",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Visual Foot Exam\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tand "
                              ]
                            },
                            {
                              "r": "109",
                              "s": [
                                {
                                  "value": [
                                    "exists "
                                  ]
                                },
                                {
                                  "r": "108",
                                  "s": [
                                    {
                                      "value": [
                                        "( "
                                      ]
                                    },
                                    {
                                      "r": "108",
                                      "s": [
                                        {
                                          "value": [
                                            "\"Pedal Pulse Checked\""
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " )"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "110",
                  "locator": "52:2-54:38",
                  "type": "And",
                  "operand": [
                    {
                      "localId": "95",
                      "locator": "52:2-53:35",
                      "type": "And",
                      "operand": [
                        {
                          "localId": "80",
                          "locator": "52:2-52:31",
                          "type": "Exists",
                          "operand": {
                            "localId": "79",
                            "locator": "52:9-52:31",
                            "name": "Sensory Foot Exam",
                            "type": "ExpressionRef"
                          }
                        },
                        {
                          "localId": "94",
                          "locator": "53:7-53:35",
                          "type": "Exists",
                          "operand": {
                            "localId": "93",
                            "locator": "53:14-53:35",
                            "name": "Visual Foot Exam",
                            "type": "ExpressionRef"
                          }
                        }
                      ]
                    },
                    {
                      "localId": "109",
                      "locator": "54:7-54:38",
                      "type": "Exists",
                      "operand": {
                        "localId": "108",
                        "locator": "54:14-54:38",
                        "name": "Pedal Pulse Checked",
                        "type": "ExpressionRef"
                      }
                    }
                  ]
                }
              },
              {
                "localId": "120",
                "locator": "66:1-68:97",
                "name": "Bilateral Lower Extremity Amputation",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "120",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Bilateral Lower Extremity Amputation\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "119",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "113",
                                  "s": [
                                    {
                                      "r": "112",
                                      "s": [
                                        {
                                          "r": "112",
                                          "s": [
                                            {
                                              "value": [
                                                "[",
                                                "\"Diagnosis\"",
                                                ": "
                                              ]
                                            },
                                            {
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Bilateral amputation of leg below or above knee\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "]"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "LowerBilateralAmputation"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "118",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "118",
                                  "s": [
                                    {
                                      "r": "115",
                                      "s": [
                                        {
                                          "r": "114",
                                          "s": [
                                            {
                                              "value": [
                                                "LowerBilateralAmputation"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "115",
                                          "s": [
                                            {
                                              "value": [
                                                "prevalencePeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "starts on or before",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "117",
                                      "s": [
                                        {
                                          "value": [
                                            "end of "
                                          ]
                                        },
                                        {
                                          "r": "116",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "119",
                  "locator": "67:2-68:97",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "113",
                      "locator": "67:2-67:90",
                      "alias": "LowerBilateralAmputation",
                      "expression": {
                        "localId": "112",
                        "locator": "67:2-67:65",
                        "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                        "codeProperty": "code",
                        "type": "Retrieve",
                        "codes": {
                          "name": "Bilateral amputation of leg below or above knee",
                          "type": "ValueSetRef"
                        }
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "118",
                    "locator": "68:3-68:97",
                    "type": "SameOrBefore",
                    "operand": [
                      {
                        "locator": "68:51-68:56",
                        "type": "Start",
                        "operand": {
                          "localId": "115",
                          "locator": "68:9-68:49",
                          "path": "prevalencePeriod",
                          "scope": "LowerBilateralAmputation",
                          "type": "Property"
                        }
                      },
                      {
                        "localId": "117",
                        "locator": "68:71-68:97",
                        "type": "End",
                        "operand": {
                          "localId": "116",
                          "locator": "68:78-68:97",
                          "name": "Measurement Period",
                          "type": "ParameterRef"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "149",
                "locator": "91:1-99:137",
                "name": "Left Lower Extremity Amputation",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "149",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Left Lower Extremity Amputation\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "148",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "139",
                                  "s": [
                                    {
                                      "r": "138",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "138",
                                          "s": [
                                            {
                                              "r": "134",
                                              "s": [
                                                {
                                                  "value": [
                                                    "( "
                                                  ]
                                                },
                                                {
                                                  "r": "134",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "r": "129",
                                                          "s": [
                                                            {
                                                              "r": "128",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "( "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "128",
                                                                  "s": [
                                                                    {
                                                                      "r": "126",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Diagnosis\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Unilateral Amputation Below or Above Knee, Unspecified Laterality\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "\n\t\t\tunion "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "127",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Procedure, Performed\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " )"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " ",
                                                                "UnilateralAmputation"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t"
                                                      ]
                                                    },
                                                    {
                                                      "r": "133",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "where "
                                                          ]
                                                        },
                                                        {
                                                          "r": "133",
                                                          "s": [
                                                            {
                                                              "r": "131",
                                                              "s": [
                                                                {
                                                                  "r": "130",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "UnilateralAmputation"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "131",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "anatomicalLocationSite"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " in "
                                                              ]
                                                            },
                                                            {
                                                              "r": "132",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Left\""
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t)"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\tunion "
                                              ]
                                            },
                                            {
                                              "r": "137",
                                              "s": [
                                                {
                                                  "value": [
                                                    "( "
                                                  ]
                                                },
                                                {
                                                  "r": "137",
                                                  "s": [
                                                    {
                                                      "r": "135",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Diagnosis\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Left Unilateral Amputation Above or Below Knee\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t\tunion "
                                                      ]
                                                    },
                                                    {
                                                      "r": "136",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Procedure, Performed\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Left Unilateral Amputation Procedure Above or Below Knee\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t)"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "LeftLowerAmputation"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "147",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "147",
                                  "s": [
                                    {
                                      "r": "144",
                                      "s": [
                                        {
                                          "value": [
                                            "Coalesce",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "141",
                                          "s": [
                                            {
                                              "r": "140",
                                              "s": [
                                                {
                                                  "value": [
                                                    "LeftLowerAmputation"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "141",
                                              "s": [
                                                {
                                                  "value": [
                                                    "prevalencePeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ", "
                                          ]
                                        },
                                        {
                                          "r": "143",
                                          "s": [
                                            {
                                              "r": "142",
                                              "s": [
                                                {
                                                  "value": [
                                                    "LeftLowerAmputation"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "143",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ")"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "r": "147",
                                      "value": [
                                        "starts on or before",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "146",
                                      "s": [
                                        {
                                          "value": [
                                            "end of "
                                          ]
                                        },
                                        {
                                          "r": "145",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "148",
                  "locator": "92:2-99:137",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "139",
                      "locator": "92:2-98:25",
                      "alias": "LeftLowerAmputation",
                      "expression": {
                        "localId": "138",
                        "locator": "92:2-98:5",
                        "type": "Union",
                        "operand": [
                          {
                            "localId": "134",
                            "locator": "92:4-95:2",
                            "type": "Query",
                            "source": [
                              {
                                "localId": "129",
                                "locator": "92:6-93:135",
                                "alias": "UnilateralAmputation",
                                "expression": {
                                  "localId": "128",
                                  "locator": "92:6-93:114",
                                  "type": "Union",
                                  "operand": [
                                    {
                                      "locator": "92:8-92:89",
                                      "type": "As",
                                      "operand": {
                                        "localId": "126",
                                        "locator": "92:8-92:89",
                                        "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                        "codeProperty": "code",
                                        "type": "Retrieve",
                                        "codes": {
                                          "name": "Unilateral Amputation Below or Above Knee, Unspecified Laterality",
                                          "type": "ValueSetRef"
                                        }
                                      },
                                      "asTypeSpecifier": {
                                        "type": "ListTypeSpecifier",
                                        "elementType": {
                                          "type": [
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                              "type": "NamedTypeSpecifier"
                                            },
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                              "type": "NamedTypeSpecifier"
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    {
                                      "locator": "93:10-93:112",
                                      "type": "As",
                                      "operand": {
                                        "localId": "127",
                                        "locator": "93:10-93:112",
                                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                        "templateId": "PositiveProcedurePerformed",
                                        "codeProperty": "code",
                                        "type": "Retrieve",
                                        "codes": {
                                          "name": "Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality",
                                          "type": "ValueSetRef"
                                        }
                                      },
                                      "asTypeSpecifier": {
                                        "type": "ListTypeSpecifier",
                                        "elementType": {
                                          "type": [
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                              "type": "NamedTypeSpecifier"
                                            },
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                              "type": "NamedTypeSpecifier"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            ],
                            "relationship": [

                            ],
                            "where": {
                              "localId": "133",
                              "locator": "94:4-94:62",
                              "type": "InValueSet",
                              "code": {
                                "localId": "131",
                                "locator": "94:10-94:52",
                                "path": "anatomicalLocationSite",
                                "scope": "UnilateralAmputation",
                                "type": "Property"
                              },
                              "valueset": {
                                "localId": "132",
                                "locator": "94:57-94:62",
                                "name": "Left"
                              }
                            }
                          },
                          {
                            "localId": "137",
                            "locator": "96:9-98:3",
                            "type": "Union",
                            "operand": [
                              {
                                "locator": "96:11-96:73",
                                "type": "As",
                                "operand": {
                                  "localId": "135",
                                  "locator": "96:11-96:73",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                  "codeProperty": "code",
                                  "type": "Retrieve",
                                  "codes": {
                                    "name": "Left Unilateral Amputation Above or Below Knee",
                                    "type": "ValueSetRef"
                                  }
                                },
                                "asTypeSpecifier": {
                                  "type": "ListTypeSpecifier",
                                  "elementType": {
                                    "type": [
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                        "type": "NamedTypeSpecifier"
                                      },
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                        "type": "NamedTypeSpecifier"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "locator": "97:11-97:94",
                                "type": "As",
                                "operand": {
                                  "localId": "136",
                                  "locator": "97:11-97:94",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                  "templateId": "PositiveProcedurePerformed",
                                  "codeProperty": "code",
                                  "type": "Retrieve",
                                  "codes": {
                                    "name": "Left Unilateral Amputation Procedure Above or Below Knee",
                                    "type": "ValueSetRef"
                                  }
                                },
                                "asTypeSpecifier": {
                                  "type": "ListTypeSpecifier",
                                  "elementType": {
                                    "type": [
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                        "type": "NamedTypeSpecifier"
                                      },
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                        "type": "NamedTypeSpecifier"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "147",
                    "locator": "99:3-99:137",
                    "type": "SameOrBefore",
                    "operand": [
                      {
                        "locator": "99:91-99:96",
                        "type": "Start",
                        "operand": {
                          "localId": "144",
                          "locator": "99:9-99:90",
                          "type": "Coalesce",
                          "operand": [
                            {
                              "localId": "141",
                              "locator": "99:18-99:53",
                              "path": "prevalencePeriod",
                              "scope": "LeftLowerAmputation",
                              "type": "Property"
                            },
                            {
                              "localId": "143",
                              "locator": "99:56-99:89",
                              "path": "relevantPeriod",
                              "scope": "LeftLowerAmputation",
                              "type": "Property"
                            }
                          ]
                        }
                      },
                      {
                        "localId": "146",
                        "locator": "99:111-99:137",
                        "type": "End",
                        "operand": {
                          "localId": "145",
                          "locator": "99:118-99:137",
                          "name": "Measurement Period",
                          "type": "ParameterRef"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "175",
                "locator": "101:1-109:139",
                "name": "Right Lower Extremity Amputation",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "175",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Right Lower Extremity Amputation\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "174",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "165",
                                  "s": [
                                    {
                                      "r": "164",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "164",
                                          "s": [
                                            {
                                              "r": "160",
                                              "s": [
                                                {
                                                  "value": [
                                                    "( "
                                                  ]
                                                },
                                                {
                                                  "r": "160",
                                                  "s": [
                                                    {
                                                      "s": [
                                                        {
                                                          "r": "155",
                                                          "s": [
                                                            {
                                                              "r": "154",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "( "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "154",
                                                                  "s": [
                                                                    {
                                                                      "r": "152",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Diagnosis\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Unilateral Amputation Below or Above Knee, Unspecified Laterality\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        "\n\t\t\tunion "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "153",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "[",
                                                                            "\"Procedure, Performed\"",
                                                                            ": "
                                                                          ]
                                                                        },
                                                                        {
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "\"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\""
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "]"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " )"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " ",
                                                                "UnilateralAmputation"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t"
                                                      ]
                                                    },
                                                    {
                                                      "r": "159",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "where "
                                                          ]
                                                        },
                                                        {
                                                          "r": "159",
                                                          "s": [
                                                            {
                                                              "r": "157",
                                                              "s": [
                                                                {
                                                                  "r": "156",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "UnilateralAmputation"
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    "."
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "157",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "anatomicalLocationSite"
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                " in "
                                                              ]
                                                            },
                                                            {
                                                              "r": "158",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Right\""
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t)"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\tunion "
                                              ]
                                            },
                                            {
                                              "r": "163",
                                              "s": [
                                                {
                                                  "value": [
                                                    "( "
                                                  ]
                                                },
                                                {
                                                  "r": "163",
                                                  "s": [
                                                    {
                                                      "r": "161",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Diagnosis\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Right Unilateral Amputation Above or Below Knee\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t\tunion "
                                                      ]
                                                    },
                                                    {
                                                      "r": "162",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Procedure, Performed\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Right Unilateral Amputation Procedure Above or Below Knee\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\t)"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "RightLowerAmputation"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "173",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "173",
                                  "s": [
                                    {
                                      "r": "170",
                                      "s": [
                                        {
                                          "value": [
                                            "Coalesce",
                                            "("
                                          ]
                                        },
                                        {
                                          "r": "167",
                                          "s": [
                                            {
                                              "r": "166",
                                              "s": [
                                                {
                                                  "value": [
                                                    "RightLowerAmputation"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "167",
                                              "s": [
                                                {
                                                  "value": [
                                                    "prevalencePeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ", "
                                          ]
                                        },
                                        {
                                          "r": "169",
                                          "s": [
                                            {
                                              "r": "168",
                                              "s": [
                                                {
                                                  "value": [
                                                    "RightLowerAmputation"
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "."
                                              ]
                                            },
                                            {
                                              "r": "169",
                                              "s": [
                                                {
                                                  "value": [
                                                    "relevantPeriod"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            ")"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "r": "173",
                                      "value": [
                                        "starts on or before",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "172",
                                      "s": [
                                        {
                                          "value": [
                                            "end of "
                                          ]
                                        },
                                        {
                                          "r": "171",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Measurement Period\""
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "174",
                  "locator": "102:2-109:139",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "165",
                      "locator": "102:2-108:26",
                      "alias": "RightLowerAmputation",
                      "expression": {
                        "localId": "164",
                        "locator": "102:2-108:5",
                        "type": "Union",
                        "operand": [
                          {
                            "localId": "160",
                            "locator": "102:4-105:2",
                            "type": "Query",
                            "source": [
                              {
                                "localId": "155",
                                "locator": "102:6-103:135",
                                "alias": "UnilateralAmputation",
                                "expression": {
                                  "localId": "154",
                                  "locator": "102:6-103:114",
                                  "type": "Union",
                                  "operand": [
                                    {
                                      "locator": "102:8-102:89",
                                      "type": "As",
                                      "operand": {
                                        "localId": "152",
                                        "locator": "102:8-102:89",
                                        "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                        "codeProperty": "code",
                                        "type": "Retrieve",
                                        "codes": {
                                          "name": "Unilateral Amputation Below or Above Knee, Unspecified Laterality",
                                          "type": "ValueSetRef"
                                        }
                                      },
                                      "asTypeSpecifier": {
                                        "type": "ListTypeSpecifier",
                                        "elementType": {
                                          "type": [
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                              "type": "NamedTypeSpecifier"
                                            },
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                              "type": "NamedTypeSpecifier"
                                            }
                                          ]
                                        }
                                      }
                                    },
                                    {
                                      "locator": "103:10-103:112",
                                      "type": "As",
                                      "operand": {
                                        "localId": "153",
                                        "locator": "103:10-103:112",
                                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                        "templateId": "PositiveProcedurePerformed",
                                        "codeProperty": "code",
                                        "type": "Retrieve",
                                        "codes": {
                                          "name": "Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality",
                                          "type": "ValueSetRef"
                                        }
                                      },
                                      "asTypeSpecifier": {
                                        "type": "ListTypeSpecifier",
                                        "elementType": {
                                          "type": [
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                              "type": "NamedTypeSpecifier"
                                            },
                                            {
                                              "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                              "type": "NamedTypeSpecifier"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  ]
                                }
                              }
                            ],
                            "relationship": [

                            ],
                            "where": {
                              "localId": "159",
                              "locator": "104:4-104:63",
                              "type": "InValueSet",
                              "code": {
                                "localId": "157",
                                "locator": "104:10-104:52",
                                "path": "anatomicalLocationSite",
                                "scope": "UnilateralAmputation",
                                "type": "Property"
                              },
                              "valueset": {
                                "localId": "158",
                                "locator": "104:57-104:63",
                                "name": "Right"
                              }
                            }
                          },
                          {
                            "localId": "163",
                            "locator": "106:9-108:3",
                            "type": "Union",
                            "operand": [
                              {
                                "locator": "106:11-106:74",
                                "type": "As",
                                "operand": {
                                  "localId": "161",
                                  "locator": "106:11-106:74",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                  "codeProperty": "code",
                                  "type": "Retrieve",
                                  "codes": {
                                    "name": "Right Unilateral Amputation Above or Below Knee",
                                    "type": "ValueSetRef"
                                  }
                                },
                                "asTypeSpecifier": {
                                  "type": "ListTypeSpecifier",
                                  "elementType": {
                                    "type": [
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                        "type": "NamedTypeSpecifier"
                                      },
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                        "type": "NamedTypeSpecifier"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "locator": "107:11-107:95",
                                "type": "As",
                                "operand": {
                                  "localId": "162",
                                  "locator": "107:11-107:95",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                  "templateId": "PositiveProcedurePerformed",
                                  "codeProperty": "code",
                                  "type": "Retrieve",
                                  "codes": {
                                    "name": "Right Unilateral Amputation Procedure Above or Below Knee",
                                    "type": "ValueSetRef"
                                  }
                                },
                                "asTypeSpecifier": {
                                  "type": "ListTypeSpecifier",
                                  "elementType": {
                                    "type": [
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}Diagnosis",
                                        "type": "NamedTypeSpecifier"
                                      },
                                      {
                                        "name": "{urn:healthit-gov:qdm:v5_3}PositiveProcedurePerformed",
                                        "type": "NamedTypeSpecifier"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "173",
                    "locator": "109:3-109:139",
                    "type": "SameOrBefore",
                    "operand": [
                      {
                        "locator": "109:93-109:98",
                        "type": "Start",
                        "operand": {
                          "localId": "170",
                          "locator": "109:9-109:92",
                          "type": "Coalesce",
                          "operand": [
                            {
                              "localId": "167",
                              "locator": "109:18-109:54",
                              "path": "prevalencePeriod",
                              "scope": "RightLowerAmputation",
                              "type": "Property"
                            },
                            {
                              "localId": "169",
                              "locator": "109:57-109:91",
                              "path": "relevantPeriod",
                              "scope": "RightLowerAmputation",
                              "type": "Property"
                            }
                          ]
                        }
                      },
                      {
                        "localId": "172",
                        "locator": "109:113-109:139",
                        "type": "End",
                        "operand": {
                          "localId": "171",
                          "locator": "109:120-109:139",
                          "name": "Measurement Period",
                          "type": "ParameterRef"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "localId": "180",
                "locator": "75:1-80:3",
                "name": "Denominator Exclusions",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "180",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Denominator Exclusions\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "179",
                          "s": [
                            {
                              "r": "125",
                              "s": [
                                {
                                  "r": "122",
                                  "s": [
                                    {
                                      "r": "121",
                                      "s": [
                                        {
                                          "value": [
                                            "Hospice"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "."
                                      ]
                                    },
                                    {
                                      "r": "122",
                                      "s": [
                                        {
                                          "value": [
                                            "\"Has Hospice\""
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\tor "
                                  ]
                                },
                                {
                                  "r": "124",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "123",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "123",
                                          "s": [
                                            {
                                              "value": [
                                                "\"Bilateral Lower Extremity Amputation\""
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tor "
                              ]
                            },
                            {
                              "r": "178",
                              "s": [
                                {
                                  "value": [
                                    "( "
                                  ]
                                },
                                {
                                  "r": "178",
                                  "s": [
                                    {
                                      "r": "151",
                                      "s": [
                                        {
                                          "value": [
                                            "exists "
                                          ]
                                        },
                                        {
                                          "r": "150",
                                          "s": [
                                            {
                                              "value": [
                                                "( "
                                              ]
                                            },
                                            {
                                              "r": "150",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Left Lower Extremity Amputation\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " )"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t\t\tand "
                                      ]
                                    },
                                    {
                                      "r": "177",
                                      "s": [
                                        {
                                          "value": [
                                            "exists "
                                          ]
                                        },
                                        {
                                          "r": "176",
                                          "s": [
                                            {
                                              "value": [
                                                "( "
                                              ]
                                            },
                                            {
                                              "r": "176",
                                              "s": [
                                                {
                                                  "value": [
                                                    "\"Right Lower Extremity Amputation\""
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                " )"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\t)"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "179",
                  "locator": "76:2-80:3",
                  "type": "Or",
                  "operand": [
                    {
                      "localId": "125",
                      "locator": "76:2-77:54",
                      "type": "Or",
                      "operand": [
                        {
                          "localId": "122",
                          "locator": "76:2-76:22",
                          "name": "Has Hospice",
                          "libraryName": "Hospice",
                          "type": "ExpressionRef"
                        },
                        {
                          "localId": "124",
                          "locator": "77:6-77:54",
                          "type": "Exists",
                          "operand": {
                            "localId": "123",
                            "locator": "77:13-77:54",
                            "name": "Bilateral Lower Extremity Amputation",
                            "type": "ExpressionRef"
                          }
                        }
                      ]
                    },
                    {
                      "localId": "178",
                      "locator": "78:6-80:3",
                      "type": "And",
                      "operand": [
                        {
                          "localId": "151",
                          "locator": "78:8-78:51",
                          "type": "Exists",
                          "operand": {
                            "localId": "150",
                            "locator": "78:15-78:51",
                            "name": "Left Lower Extremity Amputation",
                            "type": "ExpressionRef"
                          }
                        },
                        {
                          "localId": "177",
                          "locator": "79:9-79:53",
                          "type": "Exists",
                          "operand": {
                            "localId": "176",
                            "locator": "79:16-79:53",
                            "name": "Right Lower Extremity Amputation",
                            "type": "ExpressionRef"
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Ethnicity\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Ethnicity\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Ethnicity\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "29"
                  }
                ],
                "ref_id": "30"
              }
            ],
            "define_name": "SDE Ethnicity"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Payer\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Payer\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Payer\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "31"
                  }
                ],
                "ref_id": "32"
              }
            ],
            "define_name": "SDE Payer"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Race\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Race\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"Race\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "33"
                  }
                ],
                "ref_id": "34"
              }
            ],
            "define_name": "SDE Race"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"SDE Sex\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "text": "[\"Patient Characteristic Sex\": "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "\"ONC Administrative Sex\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "]"
                          }
                        ]
                      }
                    ],
                    "node_type": "Retrieve",
                    "ref_id": "35"
                  }
                ],
                "ref_id": "36"
              }
            ],
            "define_name": "SDE Sex"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Initial Population\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "[\"Patient Characteristic Birthdate\"]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Retrieve",
                                                    "ref_id": "37"
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "37"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " Birthdate"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "38"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n      "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "where "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "Global"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "39"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"CalendarAgeInYearsAt\"("
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "Birthdate"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "40"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "birthDatetime"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "Property",
                                                            "ref_id": "41"
                                                          }
                                                        ],
                                                        "node_type": "Property",
                                                        "ref_id": "41"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ", "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "start of "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Measurement Period\""
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "ParameterRef",
                                                            "ref_id": "42"
                                                          }
                                                        ],
                                                        "node_type": "Start",
                                                        "ref_id": "43"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": ")"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "FunctionRef",
                                                    "ref_id": "44"
                                                  }
                                                ],
                                                "node_type": "FunctionRef",
                                                "ref_id": "44"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "in "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Interval[18, 75 )"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Interval",
                                                "ref_id": "47"
                                              }
                                            ],
                                            "ref_id": "48"
                                          }
                                        ],
                                        "ref_id": "48"
                                      }
                                    ],
                                    "node_type": "Query",
                                    "ref_id": "49"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n  )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "49"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "50"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "AdultOutpatientEncounters"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "51"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Qualifying Encounters\""
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "ExpressionRef",
                                        "ref_id": "52"
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "52"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "52"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "53"
                          }
                        ],
                        "node_type": "And",
                        "ref_id": "54"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    and "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "exists "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "( "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Diagnosis\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Diabetes\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "55"
                                              }
                                            ],
                                            "node_type": "Retrieve",
                                            "ref_id": "55"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " Diabetes"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "56"
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n        "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "where "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "Diabetes"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "57"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "prevalencePeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "58"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "58"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " overlaps "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Measurement Period\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ParameterRef",
                                            "ref_id": "59"
                                          }
                                        ],
                                        "ref_id": "60"
                                      }
                                    ],
                                    "ref_id": "60"
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "61"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n    )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Query",
                            "ref_id": "61"
                          }
                        ],
                        "node_type": "Exists",
                        "ref_id": "62"
                      }
                    ],
                    "node_type": "And",
                    "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 \"Sensory Foot Exam\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Assessment, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Monofilament foot sensation test (procedure)\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "67"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "67"
                              },
                              {
                                "children": [
                                  {
                                    "text": " MonofilamentTest"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "68"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "MonofilamentTest"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "69"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "result"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "70"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "70"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " is not null"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Not",
                                "ref_id": "71"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "MonofilamentTest"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "72"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "authorDatetime"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "73"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "73"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "74"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "75"
                              }
                            ],
                            "ref_id": "76"
                          }
                        ],
                        "ref_id": "76"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "77"
                  }
                ],
                "ref_id": "78"
              }
            ],
            "define_name": "Sensory Foot Exam"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Visual Foot Exam\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Assessment, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Diabetic foot examination (regime/therapy)\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "81"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "81"
                              },
                              {
                                "children": [
                                  {
                                    "text": " FootExamVisual"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "82"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "FootExamVisual"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "83"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "result"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "84"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "84"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " is not null"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Not",
                                "ref_id": "85"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "FootExamVisual"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "86"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "authorDatetime"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "87"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "87"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "88"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "89"
                              }
                            ],
                            "ref_id": "90"
                          }
                        ],
                        "ref_id": "90"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "91"
                  }
                ],
                "ref_id": "92"
              }
            ],
            "define_name": "Visual Foot Exam"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Pedal Pulse Checked\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Assessment, Performed\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Pedal pulse taking (procedure)\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "96"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "96"
                              },
                              {
                                "children": [
                                  {
                                    "text": " PedalPulseCheck"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "97"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "PedalPulseCheck"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "98"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "result"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "99"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "99"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " is not null"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Not",
                                "ref_id": "100"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n      and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "PedalPulseCheck"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "101"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "authorDatetime"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "102"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "102"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " during "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "103"
                                  }
                                ],
                                "node_type": "In",
                                "ref_id": "104"
                              }
                            ],
                            "ref_id": "105"
                          }
                        ],
                        "ref_id": "105"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "106"
                  }
                ],
                "ref_id": "107"
              }
            ],
            "define_name": "Pedal Pulse Checked"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Numerator\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Sensory Foot Exam\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "79"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "79"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "80"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    and "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Visual Foot Exam\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "93"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "93"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "94"
                          }
                        ],
                        "node_type": "And",
                        "ref_id": "95"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    and "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "exists "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "( "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Pedal Pulse Checked\""
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "108"
                              },
                              {
                                "children": [
                                  {
                                    "text": " )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "108"
                          }
                        ],
                        "node_type": "Exists",
                        "ref_id": "109"
                      }
                    ],
                    "node_type": "And",
                    "ref_id": "110"
                  }
                ],
                "ref_id": "111"
              }
            ],
            "define_name": "Numerator"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Bilateral Lower Extremity Amputation\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "[\"Diagnosis\": "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Bilateral amputation of leg below or above knee\""
                                              }
                                            ]
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "]"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Retrieve",
                                    "ref_id": "112"
                                  }
                                ],
                                "node_type": "Retrieve",
                                "ref_id": "112"
                              },
                              {
                                "children": [
                                  {
                                    "text": " LowerBilateralAmputation"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "113"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "LowerBilateralAmputation"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "114"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "prevalencePeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "115"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "115"
                              },
                              {
                                "children": [
                                  {
                                    "text": " starts on or before "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "end of "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "116"
                                  }
                                ],
                                "node_type": "End",
                                "ref_id": "117"
                              }
                            ],
                            "ref_id": "118"
                          }
                        ],
                        "ref_id": "118"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "119"
                  }
                ],
                "ref_id": "120"
              }
            ],
            "define_name": "Bilateral Lower Extremity Amputation"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Left Lower Extremity Amputation\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "( "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "( "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Diagnosis\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Unilateral Amputation Below or Above Knee, Unspecified Laterality\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "126"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\n      union "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Procedure, Performed\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "127"
                                                              }
                                                            ],
                                                            "node_type": "Union",
                                                            "ref_id": "128"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " )"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "Union",
                                                        "ref_id": "128"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " UnilateralAmputation"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "129"
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n      "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "where "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "UnilateralAmputation"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "130"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "anatomicalLocationSite"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "131"
                                                          }
                                                        ],
                                                        "ref_id": "131"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " in "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Left\""
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "132"
                                                      }
                                                    ],
                                                    "ref_id": "133"
                                                  }
                                                ],
                                                "ref_id": "133"
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "134"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n  )"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Query",
                                        "ref_id": "134"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n    union "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "( "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Diagnosis\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Left Unilateral Amputation Above or Below Knee\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "135"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n        union "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Procedure, Performed\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Left Unilateral Amputation Procedure Above or Below Knee\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "136"
                                              }
                                            ],
                                            "node_type": "Union",
                                            "ref_id": "137"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n    )"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Union",
                                        "ref_id": "137"
                                      }
                                    ],
                                    "node_type": "Union",
                                    "ref_id": "138"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Union",
                                "ref_id": "138"
                              },
                              {
                                "children": [
                                  {
                                    "text": " LeftLowerAmputation"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "139"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Coalesce("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "LeftLowerAmputation"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "140"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "prevalencePeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "141"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "141"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": ", "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "LeftLowerAmputation"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "142"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "143"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "143"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": ")"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Coalesce",
                                "ref_id": "144"
                              },
                              {
                                "children": [
                                  {
                                    "text": "starts on or before "
                                  }
                                ],
                                "ref_id": "147"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "end of "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "145"
                                  }
                                ],
                                "node_type": "End",
                                "ref_id": "146"
                              }
                            ],
                            "ref_id": "147"
                          }
                        ],
                        "ref_id": "147"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "148"
                  }
                ],
                "ref_id": "149"
              }
            ],
            "define_name": "Left Lower Extremity Amputation"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Right Lower Extremity Amputation\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "( "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "( "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Diagnosis\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Unilateral Amputation Below or Above Knee, Unspecified Laterality\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "152"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\n      union "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "[\"Procedure, Performed\": "
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "\"Unilateral Amputation Procedure Below or Above Knee, Unspecified Laterality\""
                                                                          }
                                                                        ]
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "]"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "node_type": "Retrieve",
                                                                "ref_id": "153"
                                                              }
                                                            ],
                                                            "node_type": "Union",
                                                            "ref_id": "154"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " )"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "Union",
                                                        "ref_id": "154"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " UnilateralAmputation"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "155"
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n      "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "where "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "UnilateralAmputation"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "156"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "."
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "anatomicalLocationSite"
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "ref_id": "157"
                                                          }
                                                        ],
                                                        "ref_id": "157"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": " in "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Right\""
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "158"
                                                      }
                                                    ],
                                                    "ref_id": "159"
                                                  }
                                                ],
                                                "ref_id": "159"
                                              }
                                            ],
                                            "node_type": "Query",
                                            "ref_id": "160"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n  )"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Query",
                                        "ref_id": "160"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n    union "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "( "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Diagnosis\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Right Unilateral Amputation Above or Below Knee\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "161"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n        union "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Procedure, Performed\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Right Unilateral Amputation Procedure Above or Below Knee\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "162"
                                              }
                                            ],
                                            "node_type": "Union",
                                            "ref_id": "163"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n    )"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Union",
                                        "ref_id": "163"
                                      }
                                    ],
                                    "node_type": "Union",
                                    "ref_id": "164"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Union",
                                "ref_id": "164"
                              },
                              {
                                "children": [
                                  {
                                    "text": " RightLowerAmputation"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "165"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Coalesce("
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "RightLowerAmputation"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "166"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "prevalencePeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "167"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "167"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": ", "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "RightLowerAmputation"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "168"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "."
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "relevantPeriod"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Property",
                                        "ref_id": "169"
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "169"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": ")"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Coalesce",
                                "ref_id": "170"
                              },
                              {
                                "children": [
                                  {
                                    "text": "starts on or before "
                                  }
                                ],
                                "ref_id": "173"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "end of "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Measurement Period\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ParameterRef",
                                    "ref_id": "171"
                                  }
                                ],
                                "node_type": "End",
                                "ref_id": "172"
                              }
                            ],
                            "ref_id": "173"
                          }
                        ],
                        "ref_id": "173"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "174"
                  }
                ],
                "ref_id": "175"
              }
            ],
            "define_name": "Right Lower Extremity Amputation"
          },
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Denominator Exclusions\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "Hospice"
                                      }
                                    ]
                                  }
                                ],
                                "ref_id": "121"
                              },
                              {
                                "children": [
                                  {
                                    "text": "."
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Has Hospice\""
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "122"
                              }
                            ],
                            "node_type": "ExpressionRef",
                            "ref_id": "122"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    or "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "\"Bilateral Lower Extremity Amputation\""
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "123"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ExpressionRef",
                                "ref_id": "123"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "124"
                          }
                        ],
                        "node_type": "Or",
                        "ref_id": "125"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    or "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "( "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "exists "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "( "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Left Lower Extremity Amputation\""
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "ExpressionRef",
                                        "ref_id": "150"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "150"
                                  }
                                ],
                                "node_type": "Exists",
                                "ref_id": "151"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n        and "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "exists "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "( "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "\"Right Lower Extremity Amputation\""
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "ExpressionRef",
                                        "ref_id": "176"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": " )"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "ExpressionRef",
                                    "ref_id": "176"
                                  }
                                ],
                                "node_type": "Exists",
                                "ref_id": "177"
                              }
                            ],
                            "node_type": "And",
                            "ref_id": "178"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    )"
                              }
                            ]
                          }
                        ],
                        "node_type": "And",
                        "ref_id": "178"
                      }
                    ],
                    "node_type": "Or",
                    "ref_id": "179"
                  }
                ],
                "ref_id": "180"
              }
            ],
            "define_name": "Denominator Exclusions"
          }
        ],
        "identifier": {
          "id": "DiabetesFootExam",
          "version": "7.5.000"
        }
      },
      "is_main_library": true,
      "is_top_level": true,
      "library_name": "DiabetesFootExam",
      "library_version": "7.5.000",
      "statement_dependencies": [
        {
          "statement_name": "Patient"
        },
        {
          "statement_name": "SDE Ethnicity"
        },
        {
          "statement_name": "SDE Payer"
        },
        {
          "statement_name": "SDE Race"
        },
        {
          "statement_name": "SDE Sex"
        },
        {
          "statement_name": "Initial Population",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "CalendarAgeInYearsAt"
            },
            {
              "hqmf_id": null,
              "library_name": "Adult_Outpatient_Encounters",
              "statement_name": "Qualifying Encounters"
            }
          ]
        },
        {
          "statement_name": "Denominator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Initial Population"
            }
          ]
        },
        {
          "statement_name": "Sensory Foot Exam"
        },
        {
          "statement_name": "Visual Foot Exam"
        },
        {
          "statement_name": "Pedal Pulse Checked"
        },
        {
          "statement_name": "Numerator",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Sensory Foot Exam"
            },
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Visual Foot Exam"
            },
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Pedal Pulse Checked"
            }
          ]
        },
        {
          "statement_name": "Bilateral Lower Extremity Amputation"
        },
        {
          "statement_name": "Left Lower Extremity Amputation"
        },
        {
          "statement_name": "Right Lower Extremity Amputation"
        },
        {
          "statement_name": "Denominator Exclusions",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "Hospice",
              "statement_name": "Has Hospice"
            },
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Bilateral Lower Extremity Amputation"
            },
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Left Lower Extremity Amputation"
            },
            {
              "hqmf_id": null,
              "library_name": "DiabetesFootExam",
              "statement_name": "Right Lower Extremity Amputation"
            }
          ]
        }
      ]
    },
    {
      "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": "CalendarAgeInYearsAt",
          "statement_references": [
            {
              "hqmf_id": null,
              "library_name": "MATGlobalCommonFunctions",
              "statement_name": "ToDate"
            }
          ]
        },
        {
          "statement_name": "ToDate"
        }
      ]
    },
    {
      "cql": "library Adult_Outpatient_Encounters version '1.1.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 \"Office Visit\": 'urn:oid:2.16.840.1.113883.3.464.1003.101.12.1001'\r\nvalueset \"Annual Wellness Visit\": 'urn:oid:2.16.840.1.113883.3.526.3.1240'\r\nvalueset \"Preventive Care Services - Established Office Visit, 18 and Up\": 'urn:oid:2.16.840.1.113883.3.464.1003.101.12.1025'\r\nvalueset \"Preventive Care Services-Initial Office Visit, 18 and Up\": 'urn:oid:2.16.840.1.113883.3.464.1003.101.12.1023'\r\nvalueset \"Home Healthcare Services\": 'urn:oid:2.16.840.1.113883.3.464.1003.101.12.1016'\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 \"Qualifying Encounters\":\r\n\t( [\"Encounter, Performed\": \"Office Visit\"]\r\n\t\tunion [\"Encounter, Performed\": \"Annual Wellness Visit\"]\r\n\t\tunion [\"Encounter, Performed\": \"Preventive Care Services - Established Office Visit, 18 and Up\"]\r\n\t\tunion [\"Encounter, Performed\": \"Preventive Care Services-Initial Office Visit, 18 and Up\"]\r\n\t\tunion [\"Encounter, Performed\": \"Home Healthcare Services\"] ) ValidEncounter\r\n\t\twhere ValidEncounter.relevantPeriod during \"Measurement Period\"\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "Adult_Outpatient_Encounters",
            "version": "1.1.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "locator": "3:1-3:23",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_3",
                "version": "5.3"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "15",
                "locator": "17:1-17:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "14",
                  "locator": "17:32-17:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "13",
                    "locator": "17:41-17: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:75",
                "name": "Office Visit",
                "id": "2.16.840.1.113883.3.464.1003.101.12.1001",
                "accessLevel": "Public"
              },
              {
                "localId": "5",
                "locator": "9:1-9:74",
                "name": "Annual Wellness Visit",
                "id": "2.16.840.1.113883.3.526.3.1240",
                "accessLevel": "Public"
              },
              {
                "localId": "6",
                "locator": "10:1-10:125",
                "name": "Preventive Care Services - Established Office Visit, 18 and Up",
                "id": "2.16.840.1.113883.3.464.1003.101.12.1025",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "11:1-11:119",
                "name": "Preventive Care Services-Initial Office Visit, 18 and Up",
                "id": "2.16.840.1.113883.3.464.1003.101.12.1023",
                "accessLevel": "Public"
              },
              {
                "localId": "8",
                "locator": "12:1-12:87",
                "name": "Home Healthcare Services",
                "id": "2.16.840.1.113883.3.464.1003.101.12.1016",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "10",
                "locator": "14:1-14:66",
                "name": "Birthdate",
                "id": "21112-8",
                "display": "Birth date",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "9",
                  "locator": "14:34-14:45",
                  "name": "LOINC:2.46"
                }
              },
              {
                "localId": "12",
                "locator": "15:1-15:63",
                "name": "Dead",
                "id": "419099009",
                "display": "Dead",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "11",
                  "locator": "15:31-15:48",
                  "name": "SNOMEDCT:2016-03"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "19:1-19:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "19:1-19:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "31",
                "locator": "21:1-27:65",
                "name": "Qualifying Encounters",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "31",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Qualifying Encounters\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "30",
                          "s": [
                            {
                              "s": [
                                {
                                  "r": "25",
                                  "s": [
                                    {
                                      "r": "24",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "24",
                                          "s": [
                                            {
                                              "r": "22",
                                              "s": [
                                                {
                                                  "r": "20",
                                                  "s": [
                                                    {
                                                      "r": "18",
                                                      "s": [
                                                        {
                                                          "r": "16",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "[",
                                                                "\"Encounter, Performed\"",
                                                                ": "
                                                              ]
                                                            },
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Office Visit\""
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\n\t\tunion "
                                                          ]
                                                        },
                                                        {
                                                          "r": "17",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "[",
                                                                "\"Encounter, Performed\"",
                                                                ": "
                                                              ]
                                                            },
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Annual Wellness Visit\""
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\tunion "
                                                      ]
                                                    },
                                                    {
                                                      "r": "19",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Encounter, Performed\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Preventive Care Services - Established Office Visit, 18 and Up\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "\n\t\tunion "
                                                  ]
                                                },
                                                {
                                                  "r": "21",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "[",
                                                        "\"Encounter, Performed\"",
                                                        ": "
                                                      ]
                                                    },
                                                    {
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Preventive Care Services-Initial Office Visit, 18 and Up\""
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "]"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\tunion "
                                              ]
                                            },
                                            {
                                              "r": "23",
                                              "s": [
                                                {
                                                  "value": [
                                                    "[",
                                                    "\"Encounter, Performed\"",
                                                    ": "
                                                  ]
                                                },
                                                {
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Home Healthcare Services\""
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    "]"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            " )"
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "ValidEncounter"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\t"
                              ]
                            },
                            {
                              "r": "29",
                              "s": [
                                {
                                  "value": [
                                    "where "
                                  ]
                                },
                                {
                                  "r": "29",
                                  "s": [
                                    {
                                      "r": "27",
                                      "s": [
                                        {
                                          "r": "26",
                                          "s": [
                                            {
                                              "value": [
                                                "ValidEncounter"
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "."
                                          ]
                                        },
                                        {
                                          "r": "27",
                                          "s": [
                                            {
                                              "value": [
                                                "relevantPeriod"
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        " ",
                                        "during",
                                        " "
                                      ]
                                    },
                                    {
                                      "r": "28",
                                      "s": [
                                        {
                                          "value": [
                                            "\"Measurement Period\""
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "30",
                  "locator": "22:2-27:65",
                  "type": "Query",
                  "source": [
                    {
                      "localId": "25",
                      "locator": "22:2-26:77",
                      "alias": "ValidEncounter",
                      "expression": {
                        "localId": "24",
                        "locator": "22:2-26:62",
                        "type": "Union",
                        "operand": [
                          {
                            "localId": "22",
                            "locator": "22:4-25:92",
                            "type": "Union",
                            "operand": [
                              {
                                "localId": "20",
                                "locator": "22:4-24:98",
                                "type": "Union",
                                "operand": [
                                  {
                                    "localId": "18",
                                    "locator": "22:4-23:57",
                                    "type": "Union",
                                    "operand": [
                                      {
                                        "localId": "16",
                                        "locator": "22:4-22:43",
                                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                        "templateId": "PositiveEncounterPerformed",
                                        "codeProperty": "code",
                                        "type": "Retrieve",
                                        "codes": {
                                          "name": "Office Visit",
                                          "type": "ValueSetRef"
                                        }
                                      },
                                      {
                                        "localId": "17",
                                        "locator": "23:9-23:57",
                                        "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                        "templateId": "PositiveEncounterPerformed",
                                        "codeProperty": "code",
                                        "type": "Retrieve",
                                        "codes": {
                                          "name": "Annual Wellness Visit",
                                          "type": "ValueSetRef"
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "localId": "19",
                                    "locator": "24:9-24:98",
                                    "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                    "templateId": "PositiveEncounterPerformed",
                                    "codeProperty": "code",
                                    "type": "Retrieve",
                                    "codes": {
                                      "name": "Preventive Care Services - Established Office Visit, 18 and Up",
                                      "type": "ValueSetRef"
                                    }
                                  }
                                ]
                              },
                              {
                                "localId": "21",
                                "locator": "25:9-25:92",
                                "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                "templateId": "PositiveEncounterPerformed",
                                "codeProperty": "code",
                                "type": "Retrieve",
                                "codes": {
                                  "name": "Preventive Care Services-Initial Office Visit, 18 and Up",
                                  "type": "ValueSetRef"
                                }
                              }
                            ]
                          },
                          {
                            "localId": "23",
                            "locator": "26:9-26:60",
                            "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                            "templateId": "PositiveEncounterPerformed",
                            "codeProperty": "code",
                            "type": "Retrieve",
                            "codes": {
                              "name": "Home Healthcare Services",
                              "type": "ValueSetRef"
                            }
                          }
                        ]
                      }
                    }
                  ],
                  "relationship": [

                  ],
                  "where": {
                    "localId": "29",
                    "locator": "27:3-27:65",
                    "type": "IncludedIn",
                    "operand": [
                      {
                        "localId": "27",
                        "locator": "27:9-27:37",
                        "path": "relevantPeriod",
                        "scope": "ValidEncounter",
                        "type": "Property"
                      },
                      {
                        "localId": "28",
                        "locator": "27:46-27:65",
                        "name": "Measurement Period",
                        "type": "ParameterRef"
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Qualifying Encounters\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "[\"Encounter, Performed\": "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Office Visit\""
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Retrieve",
                                                    "ref_id": "16"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\n    union "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "[\"Encounter, Performed\": "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Annual Wellness Visit\""
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Retrieve",
                                                    "ref_id": "17"
                                                  }
                                                ],
                                                "node_type": "Union",
                                                "ref_id": "18"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n    union "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Encounter, Performed\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Preventive Care Services - Established Office Visit, 18 and Up\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "19"
                                              }
                                            ],
                                            "node_type": "Union",
                                            "ref_id": "20"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "\n    union "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "[\"Encounter, Performed\": "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Preventive Care Services-Initial Office Visit, 18 and Up\""
                                                      }
                                                    ]
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "]"
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "Retrieve",
                                            "ref_id": "21"
                                          }
                                        ],
                                        "node_type": "Union",
                                        "ref_id": "22"
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n    union "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "[\"Encounter, Performed\": "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Home Healthcare Services\""
                                                  }
                                                ]
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": "]"
                                              }
                                            ]
                                          }
                                        ],
                                        "node_type": "Retrieve",
                                        "ref_id": "23"
                                      }
                                    ],
                                    "node_type": "Union",
                                    "ref_id": "24"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": " )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Union",
                                "ref_id": "24"
                              },
                              {
                                "children": [
                                  {
                                    "text": " ValidEncounter"
                                  }
                                ]
                              }
                            ],
                            "ref_id": "25"
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "text": "\n    "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "where "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "ValidEncounter"
                                          }
                                        ]
                                      }
                                    ],
                                    "ref_id": "26"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "."
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "relevantPeriod"
                                          }
                                        ]
                                      }
                                    ],
                                    "node_type": "Property",
                                    "ref_id": "27"
                                  }
                                ],
                                "node_type": "Property",
                                "ref_id": "27"
                              },
                              {
                                "children": [
                                  {
                                    "text": " during "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "\"Measurement Period\""
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "ParameterRef",
                                "ref_id": "28"
                              }
                            ],
                            "ref_id": "29"
                          }
                        ],
                        "ref_id": "29"
                      }
                    ],
                    "node_type": "Query",
                    "ref_id": "30"
                  }
                ],
                "ref_id": "31"
              }
            ],
            "define_name": "Qualifying Encounters"
          }
        ],
        "identifier": {
          "id": "Adult_Outpatient_Encounters",
          "version": "1.1.000"
        }
      },
      "is_main_library": false,
      "is_top_level": true,
      "library_name": "Adult_Outpatient_Encounters",
      "library_version": "1.1.000",
      "statement_dependencies": [
        {
          "statement_name": "Qualifying Encounters"
        }
      ]
    },
    {
      "cql": "library Hospice version '1.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\ncodesystem \"SNOMEDCT:2017-03\": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2017-03'\r\ncodesystem \"SNOMEDCT:2017-09\": 'urn:oid:2.16.840.1.113883.6.96' version 'urn:hl7:version:2017-09'\r\n\r\nvalueset \"Encounter Inpatient\": 'urn:oid:2.16.840.1.113883.3.666.5.307'\r\nvalueset \"Hospice care ambulatory\": 'urn:oid:2.16.840.1.113762.1.4.1108.15'\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\ncode \"Discharge to healthcare facility for hospice care (procedure)\": '428371000124100' from \"SNOMEDCT:2017-09\" display 'Discharge to healthcare facility for hospice care (procedure)'\r\ncode \"Discharge to home for hospice care (procedure)\": '428361000124107' from \"SNOMEDCT:2017-09\" display 'Discharge to home for hospice care (procedure)'\r\n\r\nparameter \"Measurement Period\" Interval<DateTime>\r\n\r\ncontext Patient\r\n\r\ndefine \"Has Hospice\":\r\n\texists ( [\"Encounter, Performed\": \"Encounter Inpatient\"] DischargeHospice\r\n\t\t\twhere ( DischargeHospice.dischargeDisposition as Code ~ \"Discharge to home for hospice care (procedure)\"\r\n\t\t\t\t\tor DischargeHospice.dischargeDisposition as Code ~ \"Discharge to healthcare facility for hospice care (procedure)\"\r\n\t\t\t)\r\n\t\t\t\tand DischargeHospice.relevantPeriod ends during \"Measurement Period\"\r\n\t)\r\n\t\tor exists ( [\"Intervention, Order\": \"Hospice care ambulatory\"] HospiceOrder\r\n\t\t\t\twhere HospiceOrder.authorDatetime during \"Measurement Period\"\r\n\t\t)\r\n\t\tor exists ( [\"Intervention, Performed\": \"Hospice care ambulatory\"] HospicePerformed\r\n\t\t\t\twhere HospicePerformed.relevantPeriod overlaps \"Measurement Period\"\r\n\t\t)\r\n",
      "elm": {
        "library": {
          "identifier": {
            "id": "Hospice",
            "version": "1.0.000"
          },
          "schemaIdentifier": {
            "id": "urn:hl7-org:elm",
            "version": "r1"
          },
          "usings": {
            "def": [
              {
                "localIdentifier": "System",
                "uri": "urn:hl7-org:elm-types:r1"
              },
              {
                "localId": "1",
                "locator": "3:1-3:23",
                "localIdentifier": "QDM",
                "uri": "urn:healthit-gov:qdm:v5_3",
                "version": "5.3"
              }
            ]
          },
          "parameters": {
            "def": [
              {
                "localId": "18",
                "locator": "18:1-18:49",
                "name": "Measurement Period",
                "accessLevel": "Public",
                "parameterTypeSpecifier": {
                  "localId": "17",
                  "locator": "18:32-18:49",
                  "type": "IntervalTypeSpecifier",
                  "pointType": {
                    "localId": "16",
                    "locator": "18:41-18: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"
              },
              {
                "localId": "4",
                "locator": "7:1-7:97",
                "name": "SNOMEDCT:2017-03",
                "id": "2.16.840.1.113883.6.96",
                "version": "urn:hl7:version:2017-03",
                "accessLevel": "Public"
              },
              {
                "localId": "5",
                "locator": "8:1-8:97",
                "name": "SNOMEDCT:2017-09",
                "id": "2.16.840.1.113883.6.96",
                "version": "urn:hl7:version:2017-09",
                "accessLevel": "Public"
              }
            ]
          },
          "valueSets": {
            "def": [
              {
                "localId": "6",
                "locator": "10:1-10:71",
                "name": "Encounter Inpatient",
                "id": "2.16.840.1.113883.3.666.5.307",
                "accessLevel": "Public"
              },
              {
                "localId": "7",
                "locator": "11:1-11:75",
                "name": "Hospice care ambulatory",
                "id": "2.16.840.1.113762.1.4.1108.15",
                "accessLevel": "Public"
              }
            ]
          },
          "codes": {
            "def": [
              {
                "localId": "9",
                "locator": "13:1-13:66",
                "name": "Birthdate",
                "id": "21112-8",
                "display": "Birth date",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "8",
                  "locator": "13:34-13:45",
                  "name": "LOINC:2.46"
                }
              },
              {
                "localId": "11",
                "locator": "14:1-14:63",
                "name": "Dead",
                "id": "419099009",
                "display": "Dead",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "10",
                  "locator": "14:31-14:48",
                  "name": "SNOMEDCT:2016-03"
                }
              },
              {
                "localId": "13",
                "locator": "15:1-15:183",
                "name": "Discharge to healthcare facility for hospice care (procedure)",
                "id": "428371000124100",
                "display": "Discharge to healthcare facility for hospice care (procedure)",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "12",
                  "locator": "15:94-15:111",
                  "name": "SNOMEDCT:2017-09"
                }
              },
              {
                "localId": "15",
                "locator": "16:1-16:153",
                "name": "Discharge to home for hospice care (procedure)",
                "id": "428361000124107",
                "display": "Discharge to home for hospice care (procedure)",
                "accessLevel": "Public",
                "codeSystem": {
                  "localId": "14",
                  "locator": "16:79-16:96",
                  "name": "SNOMEDCT:2017-09"
                }
              }
            ]
          },
          "statements": {
            "def": [
              {
                "locator": "20:1-20:15",
                "name": "Patient",
                "context": "Patient",
                "expression": {
                  "type": "SingletonFrom",
                  "operand": {
                    "locator": "20:1-20:15",
                    "dataType": "{urn:healthit-gov:qdm:v5_3}Patient",
                    "templateId": "Patient",
                    "type": "Retrieve"
                  }
                }
              },
              {
                "localId": "59",
                "locator": "22:1-34:3",
                "name": "Has Hospice",
                "context": "Patient",
                "accessLevel": "Public",
                "annotation": [
                  {
                    "type": "Annotation",
                    "s": {
                      "r": "59",
                      "s": [
                        {
                          "value": [
                            "define ",
                            "\"Has Hospice\"",
                            ":\n\t"
                          ]
                        },
                        {
                          "r": "58",
                          "s": [
                            {
                              "r": "49",
                              "s": [
                                {
                                  "r": "40",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "39",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "39",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "20",
                                                  "s": [
                                                    {
                                                      "r": "19",
                                                      "s": [
                                                        {
                                                          "r": "19",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "[",
                                                                "\"Encounter, Performed\"",
                                                                ": "
                                                              ]
                                                            },
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Encounter Inpatient\""
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "DischargeHospice"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "38",
                                              "s": [
                                                {
                                                  "value": [
                                                    "where "
                                                  ]
                                                },
                                                {
                                                  "r": "38",
                                                  "s": [
                                                    {
                                                      "r": "33",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "( "
                                                          ]
                                                        },
                                                        {
                                                          "r": "33",
                                                          "s": [
                                                            {
                                                              "r": "26",
                                                              "s": [
                                                                {
                                                                  "r": "24",
                                                                  "s": [
                                                                    {
                                                                      "r": "22",
                                                                      "s": [
                                                                        {
                                                                          "r": "21",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "DischargeHospice"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "22",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "dischargeDisposition"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        " as "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "23",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "Code"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "~",
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "25",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Discharge to home for hospice care (procedure)\""
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "\n\t\t\t\t\tor "
                                                              ]
                                                            },
                                                            {
                                                              "r": "32",
                                                              "s": [
                                                                {
                                                                  "r": "30",
                                                                  "s": [
                                                                    {
                                                                      "r": "28",
                                                                      "s": [
                                                                        {
                                                                          "r": "27",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "DischargeHospice"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        },
                                                                        {
                                                                          "value": [
                                                                            "."
                                                                          ]
                                                                        },
                                                                        {
                                                                          "r": "28",
                                                                          "s": [
                                                                            {
                                                                              "value": [
                                                                                "dischargeDisposition"
                                                                              ]
                                                                            }
                                                                          ]
                                                                        }
                                                                      ]
                                                                    },
                                                                    {
                                                                      "value": [
                                                                        " as "
                                                                      ]
                                                                    },
                                                                    {
                                                                      "r": "29",
                                                                      "s": [
                                                                        {
                                                                          "value": [
                                                                            "Code"
                                                                          ]
                                                                        }
                                                                      ]
                                                                    }
                                                                  ]
                                                                },
                                                                {
                                                                  "value": [
                                                                    " ",
                                                                    "~",
                                                                    " "
                                                                  ]
                                                                },
                                                                {
                                                                  "r": "31",
                                                                  "s": [
                                                                    {
                                                                      "value": [
                                                                        "\"Discharge to healthcare facility for hospice care (procedure)\""
                                                                      ]
                                                                    }
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "\n\t\t\t)"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "\n\t\t\t\tand "
                                                      ]
                                                    },
                                                    {
                                                      "r": "37",
                                                      "s": [
                                                        {
                                                          "r": "35",
                                                          "s": [
                                                            {
                                                              "r": "34",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "DischargeHospice"
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "."
                                                              ]
                                                            },
                                                            {
                                                              "r": "35",
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "relevantPeriod"
                                                                  ]
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            " ",
                                                            "ends during",
                                                            " "
                                                          ]
                                                        },
                                                        {
                                                          "r": "36",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Measurement Period\""
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t)"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "value": [
                                    "\n\t\tor "
                                  ]
                                },
                                {
                                  "r": "48",
                                  "s": [
                                    {
                                      "value": [
                                        "exists "
                                      ]
                                    },
                                    {
                                      "r": "47",
                                      "s": [
                                        {
                                          "value": [
                                            "( "
                                          ]
                                        },
                                        {
                                          "r": "47",
                                          "s": [
                                            {
                                              "s": [
                                                {
                                                  "r": "42",
                                                  "s": [
                                                    {
                                                      "r": "41",
                                                      "s": [
                                                        {
                                                          "r": "41",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "[",
                                                                "\"Intervention, Order\"",
                                                                ": "
                                                              ]
                                                            },
                                                            {
                                                              "s": [
                                                                {
                                                                  "value": [
                                                                    "\"Hospice care ambulatory\""
                                                                  ]
                                                                }
                                                              ]
                                                            },
                                                            {
                                                              "value": [
                                                                "]"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "HospiceOrder"
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            },
                                            {
                                              "value": [
                                                "\n\t\t\t\t"
                                              ]
                                            },
                                            {
                                              "r": "46",
                                              "s": [
                                                {
                                                  "value": [
                                                    "where "
                                                  ]
                                                },
                                                {
                                                  "r": "46",
                                                  "s": [
                                                    {
                                                      "r": "44",
                                                      "s": [
                                                        {
                                                          "r": "43",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "HospiceOrder"
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "."
                                                          ]
                                                        },
                                                        {
                                                          "r": "44",
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "authorDatetime"
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        " ",
                                                        "during",
                                                        " "
                                                      ]
                                                    },
                                                    {
                                                      "r": "45",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "\"Measurement Period\""
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t)"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            },
                            {
                              "value": [
                                "\n\t\tor "
                              ]
                            },
                            {
                              "r": "57",
                              "s": [
                                {
                                  "value": [
                                    "exists "
                                  ]
                                },
                                {
                                  "r": "56",
                                  "s": [
                                    {
                                      "value": [
                                        "( "
                                      ]
                                    },
                                    {
                                      "r": "56",
                                      "s": [
                                        {
                                          "s": [
                                            {
                                              "r": "51",
                                              "s": [
                                                {
                                                  "r": "50",
                                                  "s": [
                                                    {
                                                      "r": "50",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "[",
                                                            "\"Intervention, Performed\"",
                                                            ": "
                                                          ]
                                                        },
                                                        {
                                                          "s": [
                                                            {
                                                              "value": [
                                                                "\"Hospice care ambulatory\""
                                                              ]
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "value": [
                                                            "]"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "HospicePerformed"
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        },
                                        {
                                          "value": [
                                            "\n\t\t\t\t"
                                          ]
                                        },
                                        {
                                          "r": "55",
                                          "s": [
                                            {
                                              "value": [
                                                "where "
                                              ]
                                            },
                                            {
                                              "r": "55",
                                              "s": [
                                                {
                                                  "r": "53",
                                                  "s": [
                                                    {
                                                      "r": "52",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "HospicePerformed"
                                                          ]
                                                        }
                                                      ]
                                                    },
                                                    {
                                                      "value": [
                                                        "."
                                                      ]
                                                    },
                                                    {
                                                      "r": "53",
                                                      "s": [
                                                        {
                                                          "value": [
                                                            "relevantPeriod"
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "value": [
                                                    " ",
                                                    "overlaps",
                                                    " "
                                                  ]
                                                },
                                                {
                                                  "r": "54",
                                                  "s": [
                                                    {
                                                      "value": [
                                                        "\"Measurement Period\""
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "value": [
                                        "\n\t\t)"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                ],
                "expression": {
                  "localId": "58",
                  "locator": "23:2-34:3",
                  "type": "Or",
                  "operand": [
                    {
                      "localId": "49",
                      "locator": "23:2-31:3",
                      "type": "Or",
                      "operand": [
                        {
                          "localId": "40",
                          "locator": "23:2-28:2",
                          "type": "Exists",
                          "operand": {
                            "localId": "39",
                            "locator": "23:9-28:2",
                            "type": "Query",
                            "source": [
                              {
                                "localId": "20",
                                "locator": "23:11-23:74",
                                "alias": "DischargeHospice",
                                "expression": {
                                  "localId": "19",
                                  "locator": "23:11-23:57",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveEncounterPerformed",
                                  "templateId": "PositiveEncounterPerformed",
                                  "codeProperty": "code",
                                  "type": "Retrieve",
                                  "codes": {
                                    "name": "Encounter Inpatient",
                                    "type": "ValueSetRef"
                                  }
                                }
                              }
                            ],
                            "relationship": [

                            ],
                            "where": {
                              "localId": "38",
                              "locator": "24:4-27:72",
                              "type": "And",
                              "operand": [
                                {
                                  "localId": "33",
                                  "locator": "24:10-26:4",
                                  "type": "Or",
                                  "operand": [
                                    {
                                      "localId": "26",
                                      "locator": "24:12-24:107",
                                      "type": "Equivalent",
                                      "operand": [
                                        {
                                          "localId": "24",
                                          "locator": "24:12-24:56",
                                          "strict": false,
                                          "type": "As",
                                          "operand": {
                                            "localId": "22",
                                            "locator": "24:12-24:48",
                                            "path": "dischargeDisposition",
                                            "scope": "DischargeHospice",
                                            "type": "Property"
                                          },
                                          "asTypeSpecifier": {
                                            "localId": "23",
                                            "locator": "24:53-24:56",
                                            "name": "{urn:hl7-org:elm-types:r1}Code",
                                            "type": "NamedTypeSpecifier"
                                          }
                                        },
                                        {
                                          "localId": "25",
                                          "locator": "24:60-24:107",
                                          "name": "Discharge to home for hospice care (procedure)",
                                          "type": "CodeRef"
                                        }
                                      ]
                                    },
                                    {
                                      "localId": "32",
                                      "locator": "25:9-25:119",
                                      "type": "Equivalent",
                                      "operand": [
                                        {
                                          "localId": "30",
                                          "locator": "25:9-25:53",
                                          "strict": false,
                                          "type": "As",
                                          "operand": {
                                            "localId": "28",
                                            "locator": "25:9-25:45",
                                            "path": "dischargeDisposition",
                                            "scope": "DischargeHospice",
                                            "type": "Property"
                                          },
                                          "asTypeSpecifier": {
                                            "localId": "29",
                                            "locator": "25:50-25:53",
                                            "name": "{urn:hl7-org:elm-types:r1}Code",
                                            "type": "NamedTypeSpecifier"
                                          }
                                        },
                                        {
                                          "localId": "31",
                                          "locator": "25:57-25:119",
                                          "name": "Discharge to healthcare facility for hospice care (procedure)",
                                          "type": "CodeRef"
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "localId": "37",
                                  "locator": "27:9-27:72",
                                  "type": "In",
                                  "operand": [
                                    {
                                      "locator": "27:41-27:44",
                                      "type": "End",
                                      "operand": {
                                        "localId": "35",
                                        "locator": "27:9-27:39",
                                        "path": "relevantPeriod",
                                        "scope": "DischargeHospice",
                                        "type": "Property"
                                      }
                                    },
                                    {
                                      "localId": "36",
                                      "locator": "27:53-27:72",
                                      "name": "Measurement Period",
                                      "type": "ParameterRef"
                                    }
                                  ]
                                }
                              ]
                            }
                          }
                        },
                        {
                          "localId": "48",
                          "locator": "29:6-31:3",
                          "type": "Exists",
                          "operand": {
                            "localId": "47",
                            "locator": "29:13-31:3",
                            "type": "Query",
                            "source": [
                              {
                                "localId": "42",
                                "locator": "29:15-29:77",
                                "alias": "HospiceOrder",
                                "expression": {
                                  "localId": "41",
                                  "locator": "29:15-29:64",
                                  "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionOrder",
                                  "templateId": "PositiveInterventionOrder",
                                  "codeProperty": "code",
                                  "type": "Retrieve",
                                  "codes": {
                                    "name": "Hospice care ambulatory",
                                    "type": "ValueSetRef"
                                  }
                                }
                              }
                            ],
                            "relationship": [

                            ],
                            "where": {
                              "localId": "46",
                              "locator": "30:5-30:65",
                              "type": "In",
                              "operand": [
                                {
                                  "localId": "44",
                                  "locator": "30:11-30:37",
                                  "path": "authorDatetime",
                                  "scope": "HospiceOrder",
                                  "type": "Property"
                                },
                                {
                                  "localId": "45",
                                  "locator": "30:46-30:65",
                                  "name": "Measurement Period",
                                  "type": "ParameterRef"
                                }
                              ]
                            }
                          }
                        }
                      ]
                    },
                    {
                      "localId": "57",
                      "locator": "32:6-34:3",
                      "type": "Exists",
                      "operand": {
                        "localId": "56",
                        "locator": "32:13-34:3",
                        "type": "Query",
                        "source": [
                          {
                            "localId": "51",
                            "locator": "32:15-32:85",
                            "alias": "HospicePerformed",
                            "expression": {
                              "localId": "50",
                              "locator": "32:15-32:68",
                              "dataType": "{urn:healthit-gov:qdm:v5_3}PositiveInterventionPerformed",
                              "templateId": "PositiveInterventionPerformed",
                              "codeProperty": "code",
                              "type": "Retrieve",
                              "codes": {
                                "name": "Hospice care ambulatory",
                                "type": "ValueSetRef"
                              }
                            }
                          }
                        ],
                        "relationship": [

                        ],
                        "where": {
                          "localId": "55",
                          "locator": "33:5-33:71",
                          "type": "Overlaps",
                          "operand": [
                            {
                              "localId": "53",
                              "locator": "33:11-33:41",
                              "path": "relevantPeriod",
                              "scope": "HospicePerformed",
                              "type": "Property"
                            },
                            {
                              "localId": "54",
                              "locator": "33:52-33:71",
                              "name": "Measurement Period",
                              "type": "ParameterRef"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      "elm_annotations": {
        "statements": [
          {
            "children": [
              {
                "children": [
                  {
                    "children": [
                      {
                        "text": "define \"Has Hospice\":\n  "
                      }
                    ]
                  },
                  {
                    "children": [
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "[\"Encounter, Performed\": "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Encounter Inpatient\""
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Retrieve",
                                                    "ref_id": "19"
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "19"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " DischargeHospice"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "20"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n      "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "where "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "( "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "DischargeHospice"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "21"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "dischargeDisposition"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "22"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "22"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": " as "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "Code"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "23"
                                                              }
                                                            ],
                                                            "node_type": "As",
                                                            "ref_id": "24"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " ~ "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Discharge to home for hospice care (procedure)\""
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "CodeRef",
                                                            "ref_id": "25"
                                                          }
                                                        ],
                                                        "node_type": "Equivalent",
                                                        "ref_id": "26"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\n          or "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "DischargeHospice"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "ref_id": "27"
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "."
                                                                      }
                                                                    ]
                                                                  },
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "children": [
                                                                          {
                                                                            "text": "dischargeDisposition"
                                                                          }
                                                                        ]
                                                                      }
                                                                    ],
                                                                    "node_type": "Property",
                                                                    "ref_id": "28"
                                                                  }
                                                                ],
                                                                "node_type": "Property",
                                                                "ref_id": "28"
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": " as "
                                                                  }
                                                                ]
                                                              },
                                                              {
                                                                "children": [
                                                                  {
                                                                    "children": [
                                                                      {
                                                                        "text": "Code"
                                                                      }
                                                                    ]
                                                                  }
                                                                ],
                                                                "ref_id": "29"
                                                              }
                                                            ],
                                                            "node_type": "As",
                                                            "ref_id": "30"
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "text": " ~ "
                                                              }
                                                            ]
                                                          },
                                                          {
                                                            "children": [
                                                              {
                                                                "children": [
                                                                  {
                                                                    "text": "\"Discharge to healthcare facility for hospice care (procedure)\""
                                                                  }
                                                                ]
                                                              }
                                                            ],
                                                            "node_type": "CodeRef",
                                                            "ref_id": "31"
                                                          }
                                                        ],
                                                        "node_type": "Equivalent",
                                                        "ref_id": "32"
                                                      }
                                                    ],
                                                    "node_type": "Or",
                                                    "ref_id": "33"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\n      )"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Or",
                                                "ref_id": "33"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "\n        and "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "DischargeHospice"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "ref_id": "34"
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "."
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "relevantPeriod"
                                                              }
                                                            ]
                                                          }
                                                        ],
                                                        "node_type": "Property",
                                                        "ref_id": "35"
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "35"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": " ends during "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Measurement Period\""
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "ParameterRef",
                                                    "ref_id": "36"
                                                  }
                                                ],
                                                "node_type": "In",
                                                "ref_id": "37"
                                              }
                                            ],
                                            "ref_id": "38"
                                          }
                                        ],
                                        "ref_id": "38"
                                      }
                                    ],
                                    "node_type": "Query",
                                    "ref_id": "39"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n  )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "39"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "40"
                          },
                          {
                            "children": [
                              {
                                "text": "\n    or "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "exists "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "text": "( "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "[\"Intervention, Order\": "
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "children": [
                                                              {
                                                                "text": "\"Hospice care ambulatory\""
                                                              }
                                                            ]
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "]"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Retrieve",
                                                    "ref_id": "41"
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "41"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " HospiceOrder"
                                                  }
                                                ]
                                              }
                                            ],
                                            "ref_id": "42"
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "text": "\n        "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "text": "where "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "HospiceOrder"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "ref_id": "43"
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "."
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "authorDatetime"
                                                          }
                                                        ]
                                                      }
                                                    ],
                                                    "node_type": "Property",
                                                    "ref_id": "44"
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "44"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": " during "
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "\"Measurement Period\""
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "ParameterRef",
                                                "ref_id": "45"
                                              }
                                            ],
                                            "ref_id": "46"
                                          }
                                        ],
                                        "ref_id": "46"
                                      }
                                    ],
                                    "node_type": "Query",
                                    "ref_id": "47"
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n    )"
                                      }
                                    ]
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "47"
                              }
                            ],
                            "node_type": "Exists",
                            "ref_id": "48"
                          }
                        ],
                        "node_type": "Or",
                        "ref_id": "49"
                      },
                      {
                        "children": [
                          {
                            "text": "\n    or "
                          }
                        ]
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "text": "exists "
                              }
                            ]
                          },
                          {
                            "children": [
                              {
                                "children": [
                                  {
                                    "text": "( "
                                  }
                                ]
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "[\"Intervention, Performed\": "
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "children": [
                                                          {
                                                            "text": "\"Hospice care ambulatory\""
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  },
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "]"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Retrieve",
                                                "ref_id": "50"
                                              }
                                            ],
                                            "node_type": "Retrieve",
                                            "ref_id": "50"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " HospicePerformed"
                                              }
                                            ]
                                          }
                                        ],
                                        "ref_id": "51"
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "text": "\n        "
                                      }
                                    ]
                                  },
                                  {
                                    "children": [
                                      {
                                        "children": [
                                          {
                                            "text": "where "
                                          }
                                        ]
                                      },
                                      {
                                        "children": [
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "HospicePerformed"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "ref_id": "52"
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "text": "."
                                                  }
                                                ]
                                              },
                                              {
                                                "children": [
                                                  {
                                                    "children": [
                                                      {
                                                        "text": "relevantPeriod"
                                                      }
                                                    ]
                                                  }
                                                ],
                                                "node_type": "Property",
                                                "ref_id": "53"
                                              }
                                            ],
                                            "node_type": "Property",
                                            "ref_id": "53"
                                          },
                                          {
                                            "children": [
                                              {
                                                "text": " overlaps "
                                              }
                                            ]
                                          },
                                          {
                                            "children": [
                                              {
                                                "children": [
                                                  {
                                                    "text": "\"Measurement Period\""
                                                  }
                                                ]
                                              }
                                            ],
                                            "node_type": "ParameterRef",
                                            "ref_id": "54"
                                          }
                                        ],
                                        "ref_id": "55"
                                      }
                                    ],
                                    "ref_id": "55"
                                  }
                                ],
                                "node_type": "Query",
                                "ref_id": "56"
                              },
                              {
                                "children": [
                                  {
                                    "text": "\n    )"
                                  }
                                ]
                              }
                            ],
                            "node_type": "Query",
                            "ref_id": "56"
                          }
                        ],
                        "node_type": "Exists",
                        "ref_id": "57"
                      }
                    ],
                    "node_type": "Or",
                    "ref_id": "58"
                  }
                ],
                "ref_id": "59"
              }
            ],
            "define_name": "Has Hospice"
          }
        ],
        "identifier": {
          "id": "Hospice",
          "version": "1.0.000"
        }
      },
      "is_main_library": false,
      "is_top_level": true,
      "library_name": "Hospice",
      "library_version": "1.0.000",
      "statement_dependencies": [
        {
          "statement_name": "Has Hospice"
        }
      ]
    }
  ],
  "created_at": null,
  "description": "The percentage of patients 18-75 years of age with diabetes (type 1 and type 2) who received a foot exam (visual inspection and sensory exam with mono filament and a pulse exam) during the measurement year",
  "hqmf_id": "40280382-62C4-DE26-0162-FE2505800CC9",
  "hqmf_set_id": "C0D72444-7C26-4863-9B51-8080F8928A85",
  "hqmf_version_number": "7",
  "main_cql_library": "DiabetesFootExam",
  "measure_attributes": [
    {
      "code": "OTH",
      "value": "123",
      "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": "123",
        "media_type": "text/plain"
      }
    },
    {
      "code": "OTH",
      "value": "0056",
      "name": "NQF Number",
      "code_obj": {
        "type": "CD",
        "null_flavor": "OTH",
        "original_text": "NQF Number"
      },
      "value_obj": {
        "type": "ED",
        "value": "0056",
        "media_type": "text/plain"
      }
    },
    {
      "code": "COPY",
      "value": "This Physician Performance Measure (Measure) and related data specifications were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (eg, use by healthcare providers in connection with their practices) without obtaining approval from NCQA. Commercial use is defined as the sale, licensing, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain. All commercial uses or requests for modification must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2017 National Committee for Quality Assurance. All Rights Reserved. \n\nLimited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third party codes contained in the specifications.\n\nCPT(R) contained in the Measure specifications is copyright 2004-2017 American Medical Association. LOINC(R) copyright 2004-2017 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R] ) copyright 2004-2017 International Health Terminology Standards Development Organisation. ICD-10 copyright 2017 World Health Organization. All Rights Reserved.",
      "name": "Copyright",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "COPY",
        "title": "Copyright"
      },
      "value_obj": {
        "type": "ED",
        "value": "This Physician Performance Measure (Measure) and related data specifications were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (eg, use by healthcare providers in connection with their practices) without obtaining approval from NCQA. Commercial use is defined as the sale, licensing, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain. All commercial uses or requests for modification must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2017 National Committee for Quality Assurance. All Rights Reserved. \n\nLimited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third party codes contained in the specifications.\n\nCPT(R) contained in the Measure specifications is copyright 2004-2017 American Medical Association. LOINC(R) copyright 2004-2017 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R] ) copyright 2004-2017 International Health Terminology Standards Development Organisation. ICD-10 copyright 2017 World Health Organization. All Rights Reserved.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DISC",
      "value": "The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE 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": "The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE 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": "MSRTYPE",
      "name": "Measure Type",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRTYPE",
        "title": "Measure Type"
      },
      "value_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.1.11.20368",
        "code": "PROCESS",
        "title": "PROCESS"
      }
    },
    {
      "code": "STRAT",
      "value": "None",
      "name": "Stratification",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "STRAT",
        "title": "Stratification"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "MSRADJ",
      "value": "None",
      "name": "Risk Adjustment",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRADJ",
        "title": "Risk Adjustment"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "MSRAGG",
      "value": "None",
      "name": "Rate Aggregation",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "MSRAGG",
        "title": "Rate Aggregation"
      },
      "value_obj": {
        "type": "ED",
        "value": "None",
        "media_type": "text/plain"
      }
    },
    {
      "code": "RAT",
      "value": "As the seventh leading cause of death in the U.S., diabetes kills approximately 79,500 people a year (CDC Health 2017). Diabetes is a long lasting disease marked by high blood glucose levels, resulting from the body's inability to produce or use insulin properly (CDC About Diabetes 2017). People with diabetes are at increased risk of serious health complications including vision loss, heart disease, stroke, kidney failure, amputation of toes, feet or legs, and premature death. (CDC At a Glance 2016). \n\nIn 2012, diabetes cost the U.S. an estimated $245 billion: $176 billion in direct medical costs and $69 billion in reduced productivity. This is a 41 percent increase from the estimated $174 billion spent on diabetes in 2007 (ADA Economic 2013).  \n\nDiabetes reduces the blood flow to the extremities of the body such as the legs and feet, which make it harder for the body to heal from injuries to those parts of the body. Patients with diabetes are at higher risks of developing serious problems with their feet, toes, and legs which can lead to difficulty walking or even amputation (CDC Living with Diabetes, 2015). \n\nAccording to research from the Centers for Disease Control and Prevention (CDC), in 2010 approximately 73,000 adults with diabetes had a leg or foot amputated. Furthermore, amputations in adults with diabetes accounts for 60 percent of amputation of legs and feet, not related to an injury (CDC Living with Diabetes, 2015). Adults 45 years and older with diabetes are 10 times more likely to have an amputation of their leg or foot compared to adults without diabetes (CDC Living with Diabetes, 2015).",
      "name": "Rationale",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "RAT",
        "title": "Rationale"
      },
      "value_obj": {
        "type": "ED",
        "value": "As the seventh leading cause of death in the U.S., diabetes kills approximately 79,500 people a year (CDC Health 2017). Diabetes is a long lasting disease marked by high blood glucose levels, resulting from the body's inability to produce or use insulin properly (CDC About Diabetes 2017). People with diabetes are at increased risk of serious health complications including vision loss, heart disease, stroke, kidney failure, amputation of toes, feet or legs, and premature death. (CDC At a Glance 2016). \n\nIn 2012, diabetes cost the U.S. an estimated $245 billion: $176 billion in direct medical costs and $69 billion in reduced productivity. This is a 41 percent increase from the estimated $174 billion spent on diabetes in 2007 (ADA Economic 2013).  \n\nDiabetes reduces the blood flow to the extremities of the body such as the legs and feet, which make it harder for the body to heal from injuries to those parts of the body. Patients with diabetes are at higher risks of developing serious problems with their feet, toes, and legs which can lead to difficulty walking or even amputation (CDC Living with Diabetes, 2015). \n\nAccording to research from the Centers for Disease Control and Prevention (CDC), in 2010 approximately 73,000 adults with diabetes had a leg or foot amputated. Furthermore, amputations in adults with diabetes accounts for 60 percent of amputation of legs and feet, not related to an injury (CDC Living with Diabetes, 2015). Adults 45 years and older with diabetes are 10 times more likely to have an amputation of their leg or foot compared to adults without diabetes (CDC Living with Diabetes, 2015).",
        "media_type": "text/plain"
      }
    },
    {
      "code": "CRS",
      "value": "American Diabetes Association (2017) Guidelines/ Recommendations: Perform annual comprehensive foot examination to identify risk factors predictive of ulcers and amputations. The foot examination should include inspection, assessment of foot/leg pulses, and testing for loss of protective sensation (10-g monofilament plus testing any one of: vibration using 128-Hz tuning fork, pinprick sensation, temperature, ankle reflexes, or vibration perception threshold). (Level of evidence: B)",
      "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": "American Diabetes Association (2017) Guidelines/ Recommendations: Perform annual comprehensive foot examination to identify risk factors predictive of ulcers and amputations. The foot examination should include inspection, assessment of foot/leg pulses, and testing for loss of protective sensation (10-g monofilament plus testing any one of: vibration using 128-Hz tuning fork, pinprick sensation, temperature, ankle reflexes, or vibration perception threshold). (Level of evidence: B)",
        "media_type": "text/plain"
      }
    },
    {
      "code": "IDUR",
      "value": "Higher score indicates better quality",
      "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": "Higher score indicates better quality",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "American Diabetes Association (ADA). April 2013. Economic Costs of Diabetes in the U.S. in 2012. Diabetes Care. Vol. 36 no. 4\n1033-46. http://care.diabetesjournals.org/content/36/4/1033.full",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "American Diabetes Association (ADA). April 2013. Economic Costs of Diabetes in the U.S. in 2012. Diabetes Care. Vol. 36 no. 4\n1033-46. http://care.diabetesjournals.org/content/36/4/1033.full",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Centers for Disease Control and Prevention (CDC). 2017. About Diabetes. https://www.cdc.gov/diabetes/basics/diabetes.html.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Centers for Disease Control and Prevention (CDC). 2017. About Diabetes. https://www.cdc.gov/diabetes/basics/diabetes.html.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Centers for Disease Control and Prevention (CDC). 2016. At a Glance 2016, Diabetes Working to Reverse the US Epidemic. https://www.cdc.gov/chronicdisease/resources/publications/aag/pdf/2016/diabetes-aag.pdf.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Centers for Disease Control and Prevention (CDC). 2016. At a Glance 2016, Diabetes Working to Reverse the US Epidemic. https://www.cdc.gov/chronicdisease/resources/publications/aag/pdf/2016/diabetes-aag.pdf.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Centers for Disease Control and Prevention (CDC). 2017. Health, United States, 2016: With Chartbook on Long-term Trends in Health. https://www.cdc.gov/nchs/data/hus/hus16.pdf#019.",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Centers for Disease Control and Prevention (CDC). 2017. Health, United States, 2016: With Chartbook on Long-term Trends in Health. https://www.cdc.gov/nchs/data/hus/hus16.pdf#019.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "Centers for Disease Control and Prevention (CDC). 2015. Living with Diabetes: Keep Your Feet Healthy. https://www.cdc.gov/features/diabetesfoothealth/index.html",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "Centers for Disease Control and Prevention (CDC). 2015. Living with Diabetes: Keep Your Feet Healthy. https://www.cdc.gov/features/diabetesfoothealth/index.html",
        "media_type": "text/plain"
      }
    },
    {
      "code": "REF",
      "value": "American Diabetes Association. Microvascular complications and foot care. Sec. 10. In Standards of Medical Care in Diabetes-2017. Diabetes Care 2017;40(Suppl. 1):S88-S98",
      "name": "Reference",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "REF",
        "title": "Reference"
      },
      "value_obj": {
        "type": "ED",
        "value": "American Diabetes Association. Microvascular complications and foot care. Sec. 10. In Standards of Medical Care in Diabetes-2017. Diabetes Care 2017;40(Suppl. 1):S88-S98",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DEF",
      "value": "Foot exam: visual inspection with a sensory exam and a pulse exam.",
      "name": "Definition",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DEF",
        "title": "Definition"
      },
      "value_obj": {
        "type": "ED",
        "value": "Foot exam: visual inspection with a sensory exam and a pulse exam.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "GUIDE",
      "value": "Only patients with a diagnosis of Type 1 or Type 2 diabetes should be included in the denominator of this measure; patients with a diagnosis of secondary diabetes due to another condition should not be included.",
      "name": "Guidance",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "GUIDE",
        "title": "Guidance"
      },
      "value_obj": {
        "type": "ED",
        "value": "Only patients with a diagnosis of Type 1 or Type 2 diabetes should be included in the denominator of this measure; patients with a diagnosis of secondary diabetes due to another condition should not be included.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "TRANF",
      "value": "TBD",
      "name": "Transmission Format",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "TRANF",
        "title": "Transmission Format"
      },
      "value_obj": {
        "type": "ED",
        "value": "TBD",
        "media_type": "text/plain"
      }
    },
    {
      "code": "IPOP",
      "value": "Patients 18-75 years of age with diabetes with a visit during the measurement period",
      "name": "Initial Population",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "IPOP",
        "title": "Initial Population"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients 18-75 years of age with diabetes with a visit during the measurement period",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENOM",
      "value": "Equals 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": "Equals Initial Population",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEX",
      "value": "Patients who have had either a bilateral amputation above or below the knee, or both a left and right amputation above or below the knee before or during the measurement period. \n\nExclude patients whose hospice care overlaps the measurement period.",
      "name": "Denominator Exclusions",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "DENEX",
        "title": "Denominator Exclusions"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients who have had either a bilateral amputation above or below the knee, or both a left and right amputation above or below the knee before or during the measurement period. \n\nExclude patients whose hospice care overlaps the measurement period.",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMER",
      "value": "Patients who received visual, pulse and sensory foot examinations during the measurement period",
      "name": "Numerator",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "NUMER",
        "title": "Numerator"
      },
      "value_obj": {
        "type": "ED",
        "value": "Patients who received visual, pulse and sensory foot examinations during the measurement period",
        "media_type": "text/plain"
      }
    },
    {
      "code": "NUMEX",
      "value": "Not Applicable",
      "name": "Numerator Exclusions",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "NUMEX",
        "title": "Numerator Exclusions"
      },
      "value_obj": {
        "type": "ED",
        "value": "Not Applicable",
        "media_type": "text/plain"
      }
    },
    {
      "code": "DENEXCEP",
      "value": "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 every patient evaluated by this measure also identify payer, race, ethnicity and sex",
      "name": "Supplemental Data Elements",
      "code_obj": {
        "type": "CD",
        "system": "2.16.840.1.113883.5.4",
        "code": "SDE",
        "title": "Supplemental Data Elements"
      },
      "value_obj": {
        "type": "ED",
        "value": "For every patient evaluated by this measure also identify payer, race, ethnicity and sex",
        "media_type": "text/plain"
      }
    }
  ],
  "measure_period": {
    "type": "IVL_TS",
    "low": {
      "type": "TS",
      "value": "201201010000",
      "inclusive?": true,
      "derived?": false
    },
    "high": {
      "type": "TS",
      "value": "201212312359",
      "inclusive?": true,
      "derived?": false
    },
    "width": {
      "type": "PQ",
      "unit": "a",
      "value": "1",
      "inclusive?": true,
      "derived?": false
    }
  },
  "measure_scoring": "PROPORTION",
  "population_criteria": {
    "IPP": {
      "conjunction?": true,
      "type": "IPP",
      "hqmf_id": "7567276B-C419-4192-9302-B74184432984",
      "preconditions": [
        {
          "id": 2,
          "preconditions": [
            {
              "id": 1,
              "reference": "DiabetesFootExam__Initial_Population__C779F645_0AAB_466D_9156_9A0902679F53"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENOM": {
      "conjunction?": true,
      "type": "DENOM",
      "hqmf_id": "181114D4-30C3-4373-883B-1089B4B5F78C",
      "preconditions": [
        {
          "id": 4,
          "preconditions": [
            {
              "id": 3,
              "reference": "DiabetesFootExam__Denominator__C779F645_0AAB_466D_9156_9A0902679F53"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "NUMER": {
      "conjunction?": true,
      "type": "NUMER",
      "hqmf_id": "1B37DBE9-2193-4846-95BD-A3F3DFF21D5A",
      "preconditions": [
        {
          "id": 6,
          "preconditions": [
            {
              "id": 5,
              "reference": "DiabetesFootExam__Numerator__C779F645_0AAB_466D_9156_9A0902679F53"
            }
          ],
          "conjunction_code": "allTrue"
        }
      ]
    },
    "DENEX": {
      "conjunction?": true,
      "type": "DENEX",
      "hqmf_id": "169882FC-8B2E-4632-862C-3081579CB7AD",
      "preconditions": [
        {
          "id": 8,
          "preconditions": [
            {
              "id": 7,
              "reference": "DiabetesFootExam__Denominator_Exclusions__C779F645_0AAB_466D_9156_9A0902679F53"
            }
          ],
          "conjunction_code": "atLeastOneTrue"
        }
      ]
    }
  },
  "population_sets": [
    {
      "population_set_id": "PopulationCriteria1",
      "populations": {
        "DENEX": {
          "hqmf_id": "169882FC-8B2E-4632-862C-3081579CB7AD",
          "library_name": "DiabetesFootExam",
          "statement_name": "Denominator Exclusions"
        },
        "DENOM": {
          "hqmf_id": "181114D4-30C3-4373-883B-1089B4B5F78C",
          "library_name": "DiabetesFootExam",
          "statement_name": "Denominator"
        },
        "IPP": {
          "hqmf_id": "7567276B-C419-4192-9302-B74184432984",
          "library_name": "DiabetesFootExam",
          "statement_name": "Initial Population"
        },
        "NUMER": {
          "hqmf_id": "1B37DBE9-2193-4846-95BD-A3F3DFF21D5A",
          "library_name": "DiabetesFootExam",
          "statement_name": "Numerator"
        },
        "_type": "CQM::ProportionPopulationMap"
      },
      "supplemental_data_elements": [
        {
          "hqmf_id": null,
          "library_name": "DiabetesFootExam",
          "statement_name": "SDE Ethnicity"
        },
        {
          "hqmf_id": null,
          "library_name": "DiabetesFootExam",
          "statement_name": "SDE Payer"
        },
        {
          "hqmf_id": null,
          "library_name": "DiabetesFootExam",
          "statement_name": "SDE Race"
        },
        {
          "hqmf_id": null,
          "library_name": "DiabetesFootExam",
          "statement_name": "SDE Sex"
        }
      ],
      "title": "Population Criteria Section"
    }
  ],
  "source_data_criteria": [
    {
      "codeListId": "2.16.840.1.114222.4.11.3591",
      "dataElementCodes": [

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

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

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

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

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

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

      ],
      "description": "Encounter, Performed: PreventiveCareServices-InitialOfficeVisit18andUp",
      "diagnoses": null,
      "dischargeDisposition": null,
      "facilityLocations": [

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

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

      ],
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.5",
      "id": "5d289cb931fe5f8b47281e1f",
      "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.113883.3.464.1003.113.12.1073",
      "components": null,
      "dataElementCodes": [

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

      ],
      "description": "Diagnosis: LeftUnilateralAmputationAboveorBelowKnee",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.110",
      "id": "5d289cb931fe5f8b47281e21",
      "prevalencePeriod": null,
      "qdmCategory": "condition",
      "qdmTitle": "Diagnosis",
      "qdmVersion": "5.5",
      "qrdaOid": "2.16.840.1.113883.10.20.24.3.135",
      "recorder": null,
      "severity": null,
      "_type": "QDM::Diagnosis"
    },
    {
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113762.1.4.1108.15",
      "dataElementCodes": [

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

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

      ],
      "description": "Patient Characteristic Ethnicity: Ethnicity",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.56",
      "id": "5d289cb931fe5f8b47281e24",
      "qdmCategory": "patient_characteristic",
      "qdmStatus": "ethnicity",
      "qdmTitle": "Patient Characteristic Ethnicity",
      "qdmVersion": "5.5",
      "_type": "QDM::PatientCharacteristicEthnicity"
    },
    {
      "admissionSource": null,
      "authorDatetime": null,
      "codeListId": "2.16.840.1.113883.3.526.3.1240",
      "dataElementCodes": [

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

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

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

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

      ],
      "description": "Encounter, Performed: PreventiveCareServices-EstablishedOfficeVisit18andUp",
      "diagnoses": null,
      "dischargeDisposition": null,
      "facilityLocations": [

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

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

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

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

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

      ],
      "description": "Procedure, Performed: UnilateralAmputationProcedureBeloworAboveKneeUnspecifiedLaterality",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.67",
      "id": "5d289cb931fe5f8b47281e2b",
      "incisionDatetime": null,
      "method": null,
      "negationRationale": null,
      "performer": null,
      "priority": null,
      "qdmCategory": "procedure",
      "qdmStatus": "performed",
      "qdmTitle": "Procedure, Performed",
      "qdmVersion": "5.5",
      "rank": null,
      "reason": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "status": null,
      "_type": "QDM::ProcedurePerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "drc-529dc4d622e3c7acea52e699b35e8154cd879f8e64e48c790de34a6585ea4ba4",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Assessment, Performed: Assessment, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.117",
      "id": "5d289cb931fe5f8b47281e2c",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "assessment",
      "qdmStatus": "performed",
      "qdmTitle": "Assessment, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relatedTo": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::AssessmentPerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "drc-33211b1978e0fee5a3a65e4ecd35fe3f70cd065128690cbc4530e298f87c742c",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Assessment, Performed: Assessment, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.117",
      "id": "5d289cb931fe5f8b47281e2d",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "assessment",
      "qdmStatus": "performed",
      "qdmTitle": "Assessment, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relatedTo": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::AssessmentPerformed"
    },
    {
      "authorDatetime": null,
      "codeListId": "drc-37129ce483571cc63df7966e306dcddb2c35dd3bf3aa768a1ce357089d34706b",
      "components": null,
      "dataElementCodes": [

      ],
      "description": "Assessment, Performed: Assessment, Performed",
      "hqmfOid": "2.16.840.1.113883.10.20.28.4.117",
      "id": "5d289cb931fe5f8b47281e2e",
      "method": null,
      "negationRationale": null,
      "performer": null,
      "qdmCategory": "assessment",
      "qdmStatus": "performed",
      "qdmTitle": "Assessment, Performed",
      "qdmVersion": "5.5",
      "reason": null,
      "relatedTo": null,
      "relevantDatetime": null,
      "relevantPeriod": null,
      "result": null,
      "_type": "QDM::AssessmentPerformed"
    }
  ],
  "title": "Diabetes: Foot Exam",
  "updated_at": null,
  "value_set_ids": [
    "5d289cb931fe5f8b47281dfa",
    "5d289cb931fe5f8b47281dfb",
    "5d289cb931fe5f8b47281dfc",
    "5d289cb931fe5f8b47281dfd",
    "5d289cb931fe5f8b47281dfe",
    "5d289cb931fe5f8b47281dff",
    "5d289cb931fe5f8b47281e00",
    "5d289cb931fe5f8b47281e01",
    "5d289cb931fe5f8b47281e02",
    "5d289cb931fe5f8b47281e03",
    "5d289cb931fe5f8b47281e04",
    "5d289cb931fe5f8b47281e05",
    "5d289cb931fe5f8b47281e06",
    "5d289cb931fe5f8b47281e07",
    "5d289cb931fe5f8b47281e08",
    "5d289cb931fe5f8b47281e09",
    "5d289cb931fe5f8b47281e0a",
    "5d289cb931fe5f8b47281e0b",
    "5d289cb931fe5f8b47281e0c",
    "5d289cb931fe5f8b47281e0d",
    "5d289cb931fe5f8b47281e0e",
    "5d289cb931fe5f8b47281e0f",
    "5d289cb931fe5f8b47281e10",
    "5d289cb931fe5f8b47281e11",
    "5d289cb931fe5f8b47281e12",
    "5d289cb931fe5f8b47281e13",
    "5d289cb931fe5f8b47281e14",
    "5d289cb931fe5f8b47281e15",
    "5d289cb931fe5f8b47281e16",
    "5d289cb931fe5f8b47281e17"
  ]
}