Source

health_thymbra / tryton / health_lifestyle / health_lifestyle_view.xml

Full commit
<?xml version="1.0"?>
<tryton>
    <data>

<!-- Recreational Drugs -->

        <record model="ir.ui.view" id="gnuhealth_drugs_recreational_view">
            <field name="model">gnuhealth.drugs_recreational</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Recreational Drugs">

                    <group string="General Information" id="group_general_info">
                        <label name="name"/>
                        <field name="name"/>
                        <label name="street_name"/>
                        <field name="street_name"/>
                        <newline/>
                        <label name="toxicity"/>
                        <field name="toxicity"/>
                        <label name="addiction_level"/>
                        <field name="addiction_level"/>
                        <label name="legal_status"/>
                        <field name="legal_status"/>
                        <label name="category"/>
                        <field name="category"/>
                    </group>
                    <newline/>

                    <separator colspan="4" string="DEA Schedule Level" id="separator_DEA"/>
                    <newline/>

                    <group col="10" id="group_dea">
                        <label name="dea_schedule_i"/>
                        <field name="dea_schedule_i"/>
                        <label name="dea_schedule_ii"/>
                        <field name="dea_schedule_ii"/>
                        <label name="dea_schedule_iii"/>
                        <field name="dea_schedule_iii"/>
                        <label name="dea_schedule_iv"/>
                        <field name="dea_schedule_iv"/>
                        <label name="dea_schedule_v"/>
                        <field name="dea_schedule_v"/>
                    </group>
                    <newline/>

                    <separator colspan="4" string="Henningfield Rating" id="separator_henningfield"/>
                    <newline/>

                    <group col="10" id="group_henningfield">
                        <label name="withdrawal_level"/>
                        <field name="withdrawal_level"/>
                        <label name="reinforcement_level"/>
                        <field name="reinforcement_level"/>
                        <label name="tolerance_level"/>
                        <field name="tolerance_level"/>
                        <label name="dependence_level"/>
                        <field name="dependence_level"/>
                        <field name="intoxication_level"/>
                    </group>

                    <separator colspan="4" string="Administration Routes" id="separator_admin_route"/>
                    <group colspan="4" id="group_admin_route">
                        <label name="route_oral"/>
                        <field name="route_oral"/>
                        <label name="route_inhaling"/>
                        <field name="route_inhaling"/>
                        <label name="route_popping"/>
                        <field name="route_popping"/>
                        <label name="route_sniffing"/>
                        <field name="route_sniffing"/>
                        <label name="route_injection"/>
                        <field name="route_injection"/>
                    </group>
                    <newline/>

                    <separator colspan="4" string="Additional Info and Effects" id="separator_additional_info"/>

                    <field name="info" colspan="4"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="gnuhealth_drugs_recreational_tree">
            <field name="model">gnuhealth.drugs_recreational</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Recreational Drugs">
                    <field name="name"/>
                    <field name="category"/>
                    <field name="toxicity"/>
                    <field name="addiction_level"/>
                    <field name="street_name"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="gnuhealth_action_drugs_recreational">
            <field name="name">Recreational Drugs</field>
            <field name="res_model">gnuhealth.drugs_recreational</field>
        </record>
        <record model="ir.action.act_window.view" id="act_drugs_recreational_list_view">
            <field name="sequence" eval="10"/>
            <field name="view" ref="gnuhealth_drugs_recreational_tree"/>
            <field name="act_window" ref="gnuhealth_action_drugs_recreational"/>
        </record>
        <record model="ir.action.act_window.view" id="act_drugs_recreational_form_view">
            <field name="sequence" eval="20"/>
            <field name="view" ref="gnuhealth_drugs_recreational_view"/>
            <field name="act_window" ref="gnuhealth_action_drugs_recreational"/>
        </record>

        <menuitem parent="health.gnuhealth_conf_misc"
            action="gnuhealth_action_drugs_recreational"
            id="gnuhealth_conf_drugs_recreational"/>

<!-- Patient use of Drugs -->

        <record model="ir.ui.view" id="gnuhealth_recreational_drugs_view">
            <field name="model">gnuhealth.patient.recreational_drugs</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Patient Recreational Drugs">
                    <label name="patient"/>
                    <field name="patient"/>
                    <label name="recreational_drug"/>
                    <field name="recreational_drug"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="gnuhealth_recreational_drugs_tree">
            <field name="model">gnuhealth.patient.recreational_drugs</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Patient Recreational Drugs">
                    <field name="patient"/>
                    <field name="recreational_drug" expand="1"/>
                </tree>
                ]]>
            </field>
        </record>

<!-- Include the Lifestyle page into the Patient Chart -->

        <record model="ir.ui.view" id="gnuhealth_patient_view">
            <field name="model">gnuhealth.patient</field>
            <field name="inherit" ref="health.gnuhealth_patient_view_form" />
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <data>
                    <xpath
                        expr="/form/notebook/page[@id=&quot;patient_diseases&quot;]"
                        position="after">

                        <page string="Lifestyle" id="patient_lifestyle">
                            <notebook>
                                <page string="Diet and Exersice" id="diet_and_exercise">

                                    <group colspan="4" id="group_holder1">
                                        <group col="4" string="Physical Exercise" id="physical_exercise">
                                            <label name="exercise"/>
                                            <field name="exercise"/>
                                            <label name="exercise_minutes_day"/>
                                            <field name="exercise_minutes_day"/>
                                        </group>

                                        <group col="4" string="Sleep" id="group_sleep">
                                            <label name="sleep_hours"/>
                                            <field name="sleep_hours"/>
                                            <label name="sleep_during_daytime"/>
                                            <field name="sleep_during_daytime"/>
                                        </group>
                                        <newline/>
                                        <group id="group_diet">
                                            <label name="number_of_meals"/>
                                            <field name="number_of_meals"/>
                                            <label name="eats_alone"/>
                                            <field name="eats_alone"/>
                                            <label name="coffee"/>
                                            <field name="coffee"/>
                                            <label name="coffee_cups"/>
                                            <field name="coffee_cups"/>
                                            <label name="soft_drinks"/>
                                            <field name="soft_drinks"/>
                                            <label name="salt"/>
                                            <field name="salt"/>
                                            <label name="diet"/>
                                            <field name="diet"/>
                                            <label name="diet_info"/>
                                            <field name="diet_info"/>
                                        </group>
                                        <group col="2" id="group_lifestyle">
                                            <field name="lifestyle_info"/>
                                        </group>

                                    </group>

                                </page>

                                <page string="Addictions" id="page_addictions">
                                    <notebook>
                                        <page string="Main" id="page_addictions_main">

                                            <group colspan="4" col="8" id="group_addictions_main">
                                                <label name="smoking"/>
                                                <field name="smoking"/>
                                                <label name="smoking_number"/>
                                                <field name="smoking_number"/>
                                                <label name="ex_smoker"/>
                                                <field name="ex_smoker"/>
                                                <label name="second_hand_smoker"/>
                                                <field name="second_hand_smoker"/>
                                                <label name="age_start_smoking"/>
                                                <field name="age_start_smoking"/>
                                                <label name="age_quit_smoking"/>
                                                <field name="age_quit_smoking"/>
                                                <label name="alcohol" />
                                                <field name="alcohol" />
                                                <label name="ex_alcoholic" />
                                                <field name="ex_alcoholic" />
                                                <label name="age_start_drinking"/>
                                                <field name="age_start_drinking"/>
                                                <label name="age_quit_drinking"/>
                                                <field name="age_quit_drinking"/>
                                                <label name="alcohol_beer_number"/>
                                                <field name="alcohol_beer_number"/>
                                                <label name="alcohol_wine_number"/>
                                                <field name="alcohol_wine_number"/>
    
                                                <label name="alcohol_liquor_number"/>
                                                <field name="alcohol_liquor_number"/>
                                                <label name="drug_usage"/>
                                                <field name="drug_usage"/>
                                                <label name="drug_iv"/>
                                                <field name="drug_iv"/>
                                                <label name="ex_drug_addict"/>
                                                <field name="ex_drug_addict"/>
                                                <label name="age_start_drugs"/>
                                                <field name="age_start_drugs"/>
    
                                                <label name="age_quit_drugs"/>
                                                <field name="age_quit_drugs"/>
    
                                            </group>
                                        </page>
                                        <page string="Recreational Drugs" id="page_recreational_drugs">
                                            <group colspan="4" id="group_recreational_drugs">
                                                <field name="recreational_drugs"/>
                                            </group>
                                        </page>
                                    </notebook>
                                </page>

                                <page string="Sexuality" id="page_sexuality">
                                    <group colspan="4" col="12" id="group_sexuality">
                                        <label name="sexual_preferences"/>
                                        <field name="sexual_preferences"/>
                                        <label name="sexual_partners"/>
                                        <field name="sexual_partners"/>
                                        <label name="sexual_partners_number"/>
                                        <field name="sexual_partners_number"/>
                                        <newline/>
                                        <label name="first_sexual_encounter"/>
                                        <field name="first_sexual_encounter"/>
                                        <label name="sexual_practices"/>
                                        <field name="sexual_practices"/>
                                        <label name="anticonceptive"/>
                                        <field name="anticonceptive"/>
                                    </group>
                                    <newline/>
                                    <group colspan="2" string="Sexual practices" id="group_other_sexual_practices">
                                        <group id="group_sexual_holder">
                                            <label name="sex_oral"/>
                                            <field name="sex_oral"/>
                                            <newline/>
                                            <label name="sex_anal"/>
                                            <field name="sex_anal"/>
                                        </group>
                                        <group string="Prostitution" id="group_prostitution">
                                            <label name="prostitute"/>
                                            <field name="prostitute"/>
                                            <newline/>
                                            <label name="sex_with_prostitutes"/>
                                            <field name="sex_with_prostitutes"/>
                                        </group>
                                    </group>

                                    <group colspan="2" string="Notes" id="group_sexuality_notes">
                                        <field name="sexuality_info"/>
                                    </group>
                                </page>

                                <page string="Safety" id="page_safety">

                                    <group string="Drive and Home Safety" id="group_drive_and_safety">
                                        <label name="motorcycle_rider"/>
                                        <field name="motorcycle_rider"/>
                                        <label name="helmet"/>
                                        <field name="helmet"/>
                                        <label name="traffic_laws"/>
                                        <field name="traffic_laws"/>
                                        <label name="car_revision"/>
                                        <field name="car_revision"/>
                                        <label name="car_seat_belt"/>
                                        <field name="car_seat_belt"/>
                                        <label name="car_child_safety"/>
                                        <field name="car_child_safety"/>
                                        <label name="home_safety"/>
                                        <field name="home_safety"/>
                                    </group>

                                </page>

                            </notebook>
                        </page>

                    </xpath>
                </data>
                ]]>
            </field>
        </record>

    </data>
</tryton>