<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <!-- Rangos para Hemoglobina -->
        <record id="range_hgb_male_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_hemoglobin"/>
            <field name="name">Hombre adulto</field>
            <field name="gender">male</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">13.5</field>
            <field name="normal_max">17.5</field>
            <field name="critical_min">7.0</field>
            <field name="critical_max">20.0</field>
        </record>
        
        <record id="range_hgb_female_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_hemoglobin"/>
            <field name="name">Mujer adulta</field>
            <field name="gender">female</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="pregnant">False</field>
            <field name="normal_min">12.0</field>
            <field name="normal_max">15.5</field>
            <field name="critical_min">7.0</field>
            <field name="critical_max">20.0</field>
        </record>
        
        <record id="range_hgb_female_pregnant" model="lims.parameter.range">
            <field name="parameter_id" ref="param_hemoglobin"/>
            <field name="name">Mujer embarazada</field>
            <field name="gender">female</field>
            <field name="age_min">15</field>
            <field name="age_max">50</field>
            <field name="pregnant">True</field>
            <field name="normal_min">11.0</field>
            <field name="normal_max">14.0</field>
            <field name="critical_min">7.0</field>
            <field name="critical_max">20.0</field>
        </record>
        
        <record id="range_hgb_child" model="lims.parameter.range">
            <field name="parameter_id" ref="param_hemoglobin"/>
            <field name="name">Niños 2-12 años</field>
            <field name="gender">both</field>
            <field name="age_min">2</field>
            <field name="age_max">12</field>
            <field name="normal_min">11.5</field>
            <field name="normal_max">14.5</field>
            <field name="critical_min">7.0</field>
            <field name="critical_max">20.0</field>
        </record>
        
        <!-- Rangos para Hematocrito -->
        <record id="range_hct_male_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_hematocrit"/>
            <field name="name">Hombre adulto</field>
            <field name="gender">male</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">41</field>
            <field name="normal_max">53</field>
            <field name="critical_min">20</field>
            <field name="critical_max">60</field>
        </record>
        
        <record id="range_hct_female_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_hematocrit"/>
            <field name="name">Mujer adulta</field>
            <field name="gender">female</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">36</field>
            <field name="normal_max">46</field>
            <field name="critical_min">20</field>
            <field name="critical_max">60</field>
        </record>
        
        <!-- Rangos para Glóbulos Rojos -->
        <record id="range_rbc_male_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_rbc"/>
            <field name="name">Hombre adulto</field>
            <field name="gender">male</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">4.5</field>
            <field name="normal_max">5.9</field>
        </record>
        
        <record id="range_rbc_female_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_rbc"/>
            <field name="name">Mujer adulta</field>
            <field name="gender">female</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">4.1</field>
            <field name="normal_max">5.1</field>
        </record>
        
        <!-- Rangos para Glóbulos Blancos -->
        <record id="range_wbc_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_wbc"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">4.5</field>
            <field name="normal_max">11.0</field>
            <field name="critical_min">2.0</field>
            <field name="critical_max">30.0</field>
        </record>
        
        <record id="range_wbc_child" model="lims.parameter.range">
            <field name="parameter_id" ref="param_wbc"/>
            <field name="name">Niño</field>
            <field name="gender">both</field>
            <field name="age_min">2</field>
            <field name="age_max">17</field>
            <field name="normal_min">5.0</field>
            <field name="normal_max">15.0</field>
            <field name="critical_min">2.0</field>
            <field name="critical_max">30.0</field>
        </record>
        
        <!-- Rangos para Plaquetas -->
        <record id="range_platelets_all" model="lims.parameter.range">
            <field name="parameter_id" ref="param_platelets"/>
            <field name="name">Todos</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">150</field>
            <field name="normal_max">400</field>
            <field name="critical_min">50</field>
            <field name="critical_max">1000</field>
        </record>
        
        <!-- Rangos para Neutrófilos -->
        <record id="range_neutrophils_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_neutrophils"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">45</field>
            <field name="normal_max">70</field>
        </record>
        
        <!-- Rangos para Linfocitos -->
        <record id="range_lymphocytes_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_lymphocytes"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">20</field>
            <field name="normal_max">45</field>
        </record>
        
        <!-- Rangos para Glucosa -->
        <record id="range_glucose_fasting" model="lims.parameter.range">
            <field name="parameter_id" ref="param_glucose"/>
            <field name="name">Ayunas</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">70</field>
            <field name="normal_max">100</field>
            <field name="critical_min">40</field>
            <field name="critical_max">500</field>
            <field name="interpretation">Valores normales en ayunas. Prediabetes: 100-125 mg/dL. Diabetes: ≥126 mg/dL</field>
        </record>
        
        <!-- Rangos para Creatinina -->
        <record id="range_creatinine_male" model="lims.parameter.range">
            <field name="parameter_id" ref="param_creatinine"/>
            <field name="name">Hombre adulto</field>
            <field name="gender">male</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">0.7</field>
            <field name="normal_max">1.3</field>
            <field name="critical_max">6.0</field>
        </record>
        
        <record id="range_creatinine_female" model="lims.parameter.range">
            <field name="parameter_id" ref="param_creatinine"/>
            <field name="name">Mujer adulta</field>
            <field name="gender">female</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">0.6</field>
            <field name="normal_max">1.1</field>
            <field name="critical_max">6.0</field>
        </record>
        
        <!-- Rangos para Urea -->
        <record id="range_urea_adult" model="lims.parameter.range">
            <field name="parameter_id" ref="param_urea"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">15</field>
            <field name="normal_max">45</field>
            <field name="critical_max">100</field>
        </record>
        
        <!-- Rangos para Colesterol Total -->
        <record id="range_cholesterol_total" model="lims.parameter.range">
            <field name="parameter_id" ref="param_cholesterol_total"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">0</field>
            <field name="normal_max">200</field>
            <field name="interpretation">Deseable: &lt;200 mg/dL. Límite alto: 200-239 mg/dL. Alto: ≥240 mg/dL</field>
        </record>
        
        <!-- Rangos para HDL -->
        <record id="range_hdl_male" model="lims.parameter.range">
            <field name="parameter_id" ref="param_cholesterol_hdl"/>
            <field name="name">Hombre</field>
            <field name="gender">male</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">40</field>
            <field name="normal_max">100</field>
        </record>
        
        <record id="range_hdl_female" model="lims.parameter.range">
            <field name="parameter_id" ref="param_cholesterol_hdl"/>
            <field name="name">Mujer</field>
            <field name="gender">female</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">50</field>
            <field name="normal_max">100</field>
        </record>
        
        <!-- Rangos para LDL -->
        <record id="range_ldl_all" model="lims.parameter.range">
            <field name="parameter_id" ref="param_cholesterol_ldl"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">0</field>
            <field name="normal_max">100</field>
            <field name="interpretation">Óptimo: &lt;100 mg/dL. Casi óptimo: 100-129 mg/dL. Límite alto: 130-159 mg/dL. Alto: 160-189 mg/dL. Muy alto: ≥190 mg/dL</field>
        </record>
        
        <!-- Rangos para Triglicéridos -->
        <record id="range_triglycerides_all" model="lims.parameter.range">
            <field name="parameter_id" ref="param_triglycerides"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">0</field>
            <field name="normal_max">150</field>
            <field name="critical_max">500</field>
            <field name="interpretation">Normal: &lt;150 mg/dL. Límite alto: 150-199 mg/dL. Alto: 200-499 mg/dL. Muy alto: ≥500 mg/dL</field>
        </record>
        
        <!-- Rangos para ALT -->
        <record id="range_alt_male" model="lims.parameter.range">
            <field name="parameter_id" ref="param_alt"/>
            <field name="name">Hombre</field>
            <field name="gender">male</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">10</field>
            <field name="normal_max">40</field>
            <field name="critical_max">1000</field>
        </record>
        
        <record id="range_alt_female" model="lims.parameter.range">
            <field name="parameter_id" ref="param_alt"/>
            <field name="name">Mujer</field>
            <field name="gender">female</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">10</field>
            <field name="normal_max">35</field>
            <field name="critical_max">1000</field>
        </record>
        
        <!-- Rangos para AST -->
        <record id="range_ast_all" model="lims.parameter.range">
            <field name="parameter_id" ref="param_ast"/>
            <field name="name">Adulto</field>
            <field name="gender">both</field>
            <field name="age_min">18</field>
            <field name="age_max">99</field>
            <field name="normal_min">10</field>
            <field name="normal_max">40</field>
            <field name="critical_max">1000</field>
        </record>
        
        <!-- Rangos para pH de Orina -->
        <record id="range_urine_ph" model="lims.parameter.range">
            <field name="parameter_id" ref="param_urine_ph"/>
            <field name="name">Normal</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">4.5</field>
            <field name="normal_max">8.0</field>
        </record>
        
        <!-- Rangos para Densidad de Orina -->
        <record id="range_urine_density" model="lims.parameter.range">
            <field name="parameter_id" ref="param_urine_density"/>
            <field name="name">Normal</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">1.003</field>
            <field name="normal_max">1.030</field>
        </record>
        
        <!-- Rangos para Leucocitos en Orina -->
        <record id="range_urine_leukocytes" model="lims.parameter.range">
            <field name="parameter_id" ref="param_urine_leukocytes"/>
            <field name="name">Normal</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">0</field>
            <field name="normal_max">5</field>
        </record>
        
        <!-- Rangos para Tiempo de Protrombina -->
        <record id="range_pt" model="lims.parameter.range">
            <field name="parameter_id" ref="param_pt"/>
            <field name="name">Normal</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">11</field>
            <field name="normal_max">13.5</field>
            <field name="critical_min">9</field>
            <field name="critical_max">30</field>
        </record>
        
        <!-- Rangos para INR -->
        <record id="range_inr_normal" model="lims.parameter.range">
            <field name="parameter_id" ref="param_inr"/>
            <field name="name">Sin anticoagulación</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">0.8</field>
            <field name="normal_max">1.2</field>
        </record>
        
        <!-- Rangos para TTP -->
        <record id="range_ptt" model="lims.parameter.range">
            <field name="parameter_id" ref="param_ptt"/>
            <field name="name">Normal</field>
            <field name="gender">both</field>
            <field name="age_min">0</field>
            <field name="age_max">99</field>
            <field name="normal_min">25</field>
            <field name="normal_max">35</field>
            <field name="critical_min">20</field>
            <field name="critical_max">70</field>
        </record>
        
    </data>
</odoo>