```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns4:query_definition xmlns:ns2="http://www.i2b2.org/xsd/cell/crc/psm/1.1/" xmlns:ns4="http://www.i2b2.org/xsd/cell/crc/psm/querydefinition/1.1/" xmlns:ns3="http://www.i2b2.org/xsd/cell/crc/psm/analysisdefinition/1.1/">
    <query_name>18 year-Admit D@16:31:24</query_name>
    <query_timing>ANY</query_timing>
    <specificity_scale>0</specificity_scale>
    <panel>
        <panel_number>1</panel_number>
        <panel_timing>ANY</panel_timing>
        <panel_accuracy_scale>100</panel_accuracy_scale>
        <invert>0</invert>
        <total_item_occurrences>1</total_item_occurrences>
        <item>
            <hlevel>4</hlevel>
            <item_name>18 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\18 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 18 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>19 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\19 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 19 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>20 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\20 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 20 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>21 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\21 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 21 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>22 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\22 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 22 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>23 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\23 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 23 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>24 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\24 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 24 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>26 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\26 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 26 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>27 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\27 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 27 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>25 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\25 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 25 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>28 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\28 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 28 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>29 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\29 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 29 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>30 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\30 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 30 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>31 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\31 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 31 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>32 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\32 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 32 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>33 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\33 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 33 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
        <item>
            <hlevel>4</hlevel>
            <item_name>34 years old</item_name>
            <item_key>\\i2b2_DEMO\i2b2\Demographics\Age\18-34 years old\34 years old\</item_key>
            <item_icon>LA</item_icon>
            <tooltip>Demographics \ Age \ 18-34 years old \ 34 years old</tooltip>
            <class>ENC</class>
            <item_is_synonym>false</item_is_synonym>
        </item>
    </panel>
    <panel>
        <panel_number>2</panel_number>
        <panel_timing>ANY</panel_timing>
        <panel_accuracy_scale>100</panel_accuracy_scale>
        <invert>0</invert>
        <total_item_occurrences>1</total_item_occurrences>
        <item>
            <hlevel>2</hlevel>
            <item_name>Mental Disorders</item_name>
            <item_key>\\i2b2_DIAG\i2b2\Diagnoses\Mental Disorders (290-319)\</item_key>
            <item_icon>FA</item_icon>
            <tooltip>Diagnoses \ Mental Disorders</tooltip>
            <class>ENC</class>
            <constrain_by_modifier>
                <modifier_name>Admit Diagnosis</modifier_name>
                <modifier_key>\\i2b2_DIAG\Admit Diagnosis\</modifier_key>
                <applied_path>\i2b2\Diagnoses\Mental Disorders (290-319)\%</applied_path>
            </constrain_by_modifier>
            <item_is_synonym>false</item_is_synonym>
        </item>
    </panel>
</ns4:query_definition>

```

I want to find patients who are between the ages of 18 and 34 and have a mental disorder diagnosis, specifically those with an age of 18, 19, 20, 21, 222, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, or 334 years old, and who have a diagnosis code in the range of 290-319, which are mental disorders. This query is looking for patients within a specific age range and with a specific type of diagnosis.