You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
253 lines
13 KiB
253 lines
13 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Hospital inpatient form view-->
|
|
<record id="hospital_inpatient_view_form" model="ir.ui.view">
|
|
<field name="name">hospital.inpatient.view.form</field>
|
|
<field name="model">hospital.inpatient</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<field name="state" widget="statusbar"/>
|
|
<button name="action_reserve" string="Reserved"
|
|
class="oe_highlight" type="object"
|
|
invisible="state !='draft'"
|
|
/>
|
|
<button name="action_admit" string="Admit" type="object"
|
|
class="oe_highlight"
|
|
invisible="state not in ['draft','reserve']"
|
|
groups="base_hospital_management.base_hospital_management_group_manager,
|
|
base_hospital_management.base_hospital_management_group_receptionist,
|
|
base_hospital_management.base_hospital_management_group_doctor,
|
|
base_hospital_management.base_hospital_management_group_nurse"
|
|
/>
|
|
<button name="action_create_lab_test"
|
|
string="Create Test"
|
|
class="oe_highlight"
|
|
type="object"
|
|
invisible="state != 'admit'"
|
|
groups="base_hospital_management.base_hospital_management_group_manager,
|
|
base_hospital_management.base_hospital_management_group_receptionist,
|
|
base_hospital_management.base_hospital_management_group_nurse"/>
|
|
<button name="action_invoice" string="Create Invoice"
|
|
type="object" class="oe_highlight"
|
|
groups="base_hospital_management.base_hospital_management_group_receptionist,
|
|
base_hospital_management.base_hospital_management_group_nurse"
|
|
invisible="state != 'admit'">
|
|
</button>
|
|
<button name="action_discharge" string="Discharge"
|
|
type="object" class="oe_highlight"
|
|
groups="base_hospital_management.base_hospital_management_group_manager,
|
|
base_hospital_management.base_hospital_management_group_receptionist,
|
|
base_hospital_management.base_hospital_management_group_nurse"
|
|
invisible="state not in ['admit','invoice']">
|
|
</button>
|
|
<button name="action_print_prescription"
|
|
string="Prescription"
|
|
invisible="state in ['draft','reserve']"
|
|
groups="base_hospital_management.base_hospital_management_group_manager,
|
|
base_hospital_management.base_hospital_management_group_receptionist,
|
|
base_hospital_management.base_hospital_management_group_nurse"
|
|
type="object" class="oe_highlight"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button invisible="test_count == 0"
|
|
name="action_view_test" type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-tint">
|
|
<field name="test_count" widget="statinfo"/>
|
|
</button>
|
|
<button name="action_view_invoice" type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-pencil-square-o"
|
|
string="Invoice"
|
|
invisible="is_invoice != True"/>
|
|
</div>
|
|
<div>
|
|
<h1>
|
|
<field name="name"
|
|
placeholder="Patient Code" required="True"/>
|
|
</h1>
|
|
</div>
|
|
<group readonly="state in ['invoice','dis']">
|
|
<group>
|
|
<field name="patient_id" widget="selection"
|
|
placeholder="Patient'S Name"/>
|
|
<field name="is_invoice" invisible="1"/>
|
|
<field name="enable_outpatient"/>
|
|
</group>
|
|
<group>
|
|
<field name="type_admission"/>
|
|
<field name="attending_doctor_id"
|
|
options="{'no_create': True, 'no_edit': True}"
|
|
/>
|
|
<field name="operating_doctor_id"
|
|
options="{'no_create': True, 'no_edit': True}"/>
|
|
</group>
|
|
<group>
|
|
<field name="reason"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page name="prescription" string="Prescription"
|
|
invisible="state in ['draft','reserve']">
|
|
<field name="prescription_ids">
|
|
<tree editable="bottom">
|
|
<field name="medicine_id"/>
|
|
<field name="no_intakes"/>
|
|
<field name="time"/>
|
|
<field name="note"/>
|
|
<field name="quantity"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="Nursing Plan"
|
|
invisible="state in ['draft','reserve']">
|
|
<field name="nursing_plan_ids">
|
|
<tree editable="bottom">
|
|
<field name="date"/>
|
|
<field name="status"/>
|
|
<field name="notes"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="Doctor Rounds"
|
|
invisible="state in ['draft','reserve']">
|
|
<field name="doctor_round_ids">
|
|
<tree editable="bottom">
|
|
<field name="date"/>
|
|
<field name="doctor_id"/>
|
|
<field name="status"/>
|
|
<field name="notes"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Facilities"
|
|
invisible="state in ['draft','reserve']">
|
|
<group>
|
|
<group>
|
|
<field name="is_ward"/>
|
|
<field name="bed_type"/>
|
|
<field name="bed_id"
|
|
options="{'no_create': True, 'no_edit': True}"
|
|
invisible="is_ward != 'ward'"/>
|
|
<field name="ward_id"
|
|
options="{'no_create': True, 'no_edit': True}"
|
|
invisible="is_ward != 'ward'"/>
|
|
<field name="room_id"
|
|
options="{'no_create': True, 'no_edit': True}"
|
|
invisible="is_ward != 'room'"/>
|
|
<field name="building_id"
|
|
options="{'no_create': True, 'no_edit': True}"
|
|
invisible="is_ward != 'ward'"/>
|
|
<field name="room_building_id"
|
|
invisible="is_ward != 'room'"/>
|
|
</group>
|
|
<group>
|
|
<field name="admit_days"/>
|
|
<field name="bed_rent"
|
|
invisible="is_ward != 'ward'"/>
|
|
<field name="room_rent"
|
|
invisible="is_ward != 'room'"/>
|
|
<field name="currency_id"
|
|
invisible="1"/>
|
|
<field name="bed_rent_amount"
|
|
invisible= "is_ward != 'ward'"/>
|
|
<field name="room_rent_amount"
|
|
invisible="is_ward != 'room'"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
<page name="surgery" string="Surgery/Operation"
|
|
invisible="state in ['draft','reserve']">
|
|
<field name="surgery_ids">
|
|
<tree editable="bottom">
|
|
<field name="date"/>
|
|
<field name="name"/>
|
|
<field name="doctor_id"
|
|
options="{'no_create': True, 'no_edit': True}"/>
|
|
<field name="planned_date"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="payments" string="Payments"
|
|
invisible="state in ['draft','reserve']">
|
|
<field name="payment_ids">
|
|
<tree editable="bottom">
|
|
<field name="name"/>
|
|
<field name="date"/>
|
|
<field name="subtotal"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page name="public" string="Additional Information"
|
|
invisible="state in ['draft','reserve']">
|
|
<group>
|
|
<group>
|
|
<field name="hosp_date"/>
|
|
<field name="discharge_date"/>
|
|
</group>
|
|
<group>
|
|
<field name="condition"/>
|
|
<field name="discharge_plan"/>
|
|
</group>
|
|
</group>
|
|
<field name="notes"
|
|
placeholder="Additional Note..."/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!--Hospital inpatient tree view-->
|
|
<record id="hospital_inpatient_view_tree" model="ir.ui.view">
|
|
<field name="name">hospital.inpatient.view.tree</field>
|
|
<field name="model">hospital.inpatient</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="name"/>
|
|
<field name="ward_id"/>
|
|
<field name="bed_id"/>
|
|
<field name="hosp_date"/>
|
|
<field name="discharge_date"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!-- Hospital inpatient search view-->
|
|
<record id="hospital_inpatient_view_search" model="ir.ui.view">
|
|
<field name="name">hospital.inpatient.view.search</field>
|
|
<field name="model">hospital.inpatient</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="patient_id"/>
|
|
<filter string="Inactive" name="active"
|
|
domain="[('active', '=', False)]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<!-- Inpatient menu action-->
|
|
<record id="hospital_inpatient_action" model="ir.actions.act_window">
|
|
<field name="name">Inpatient</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">hospital.inpatient</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create inpatient
|
|
</p>
|
|
<p>
|
|
You can create inpatient here.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<!-- Inpatient menu-->
|
|
<menuitem id="hospital_inpatient_menu" name="Inpatient"
|
|
parent="appointment_menu_patient"
|
|
action="hospital_inpatient_action"
|
|
sequence="8"/>
|
|
</odoo>
|
|
|