Source

health_thymbra / tryton / health_genetics / health_genetics_view.xml

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

<!-- Add Genetics icon -->

        <record model="ir.ui.icon" id="gnuhealth_dna_icon">
            <field name="name">icon-dna</field>
            <field name="path">icons/dna.svg</field>
        </record> 

        <menuitem name="Genetics" parent="health.gnuhealth_conf_menu"
            id="gnuhealth_conf_genetics" icon="icon-dna"/>


<!-- Genetic Risks -->

        <record model="ir.ui.view" id="gnuhealth_disease_gene_view">
            <field name="model">gnuhealth.disease.gene</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Medical Genetic Risks">
                    <label name="name"/>
                    <field name="name"/>
                    <label name="long_name"/>
                    <field name="long_name"/>
                    <newline/>
                    <label name="chromosome"/>
                    <field name="chromosome"/>
                    <label name="dominance"/>
                    <field name="dominance"/>
                    <label name="location"/>
                    <field name="location"/>
                    <label name="gene_id"/>
                    <field name="gene_id"/>
                    <newline/>
                    <field colspan="4" name="info"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="gnuhealth_disease_gene_tree">
            <field name="model">gnuhealth.disease.gene</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Disease Genes">
                    <field name="name"/>
                    <field name="long_name"/>
                    <field name="chromosome"/>
                    <field name="dominance"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.action.act_window" id="gnuhealth_action_disease_gene">
            <field name="name">Disease Genes</field>
            <field name="res_model">gnuhealth.disease.gene</field>
        </record>

        <record model="ir.action.act_window.view" id="act_disease_gene_list_view">
            <field name="sequence" eval="10"/>
            <field name="view" ref="gnuhealth_disease_gene_tree"/>
            <field name="act_window" ref="gnuhealth_action_disease_gene"/>
        </record>
        <record model="ir.action.act_window.view" id="act_disease_gene_form_view">
            <field name="sequence" eval="20"/>
            <field name="view" ref="gnuhealth_disease_gene_view"/>
            <field name="act_window" ref="gnuhealth_action_disease_gene"/>
        </record>

        <menuitem parent="gnuhealth_conf_genetics"
            action="gnuhealth_action_disease_gene"
            id="gnuhealth_conf_disease_genes"/>

<!-- Patient Genetic Risk -->

        <record model="ir.ui.view" id="gnuhealth_genetic_risk_view">
            <field name="model">gnuhealth.patient.genetic.risk</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Patient Genetic Risks">
                    <label name="patient"/>
                    <field name="patient"/>
                    <label name="disease_gene"/>
                    <field name="disease_gene"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="gnuhealth_genetic_risk_tree">
            <field name="model">gnuhealth.patient.genetic.risk</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Patient Genetic Risks">
                    <field name="patient"/>
                    <field name="disease_gene" expand="1"/>
                </tree>
                ]]>
            </field>
        </record>

<!-- Family Diseases -->

        <record model="ir.ui.view" id="gnuhealth_family_diseases_view">
            <field name="model">gnuhealth.patient.family.diseases</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Patient Genetic Family Diseases">
                    <label name="name"/>
                    <field name="name"/>
                    <label name="xory"/>
                    <field name="xory"/>
                    <newline/>
                    <label name="relative"/>
                    <field name="relative"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="gnuhealth_family_diseases_tree">
            <field name="model">gnuhealth.patient.family.diseases</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Genetic Family Diseases">
                    <field name="name"/>
                    <field name="xory"/>
                    <field name="relative" expand="1"/>
                </tree>
                ]]>
            </field>
        </record>

<!-- Include Family History and Genetic Risks on 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="Genetics" id="patient_genetics">
                            <field name="genetic_risks"/>
                            <field name="family_history"/>
                        </page>

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

    </data>
</tryton>