clinic/netforce_clinic/layouts/clinic_visit_form.xml

66 lines
3.1 KiB
XML

<form model="clinic.visit" attrs='{"readonly":[["state","in",["treatment"]]]}' show_company="1">
<head>
<field name="state"/>
<button string="Print" icon="print" action="report_visit_form"/>
<button string="Options" dropdown="1">
<item string="Copy" method="copy"/>
<item string="Create Dialyzer" method="create_dialyzer"/>
</button>
</head>
<tabs>
<tab string="General">
<group span="6" columns="1">
<field name="number"/>
<field name="date_visit" onchange="onchange_date_visit"/>
<field name="cycle"/>
</group>
<group span="6" columns="1">
<field name="patient_id" onchange="onchange_patient"/>
<field name="doctor_id" attrs='{"required":[["state","=","waiting_treatment"]]}'/>
<field name="nurse_id" attrs='{"required":[["state","=","waiting_treatment"]]}'/>
<field name="department_id"/>
</group>
</tab>
<tab string="Planing">
<field name="time_start" attrs='{"required":[["state","=","waiting_treatment"]]}'/>
<field name="time_stop" attrs='{"required":[["state","=","waiting_treatment"]]}'/>
<field name="time_use" onchange="onchange_timeuse"/>
<separator string="Next Visit"/>
<field name="planes" nolabel="1">
<list>
<field name="date" onchange="onchange_dateplane"/>
<field name="time_start"/>
<field name="time_stop"/>
<field name="state"/>
</list>
</field>
</tab>
</tabs>
<group attrs='{"invisible": [["state","not in",["waiting_treatment"]]]}'>
<separator string="Select Dialyzer -> Click Do Treatment"/>
<field name="dialyzers" nolabel="1" count="3">
<list>
<field name="dialyzer_id" domain="[['state','=','active'],['patient_id','=',parent.patient_id]]" onchange="onchange_dialyzer"/>
<field name="description"/>
<field name="use_time"/>
<field name="max_use_time"/>
<field name="member_type"/>
<field name="dialyzer_type"/>
<field name="bid_flow_rate"/>
<field name="ultrafittration"/>
<field name="state"/>
</list>
</field>
</group>
<foot>
<button string="Confirm" type="success" method="confirm" states="draft" />
<button string="Do Treatment" type="success" method="do_treatment" icon="arrow-right" states="waiting_treatment" />
<button string="Dicard" type="warning" icon="trash" method="discard" states="waiting_treatment" confirm="Are you sure to cancel HD case?"/>
<button string="Re Visit" type="default" attrs='{"invisible":[["state","=","treatment"]]}' icon="repeat" method="reopen" states="cancelled" />
</foot>
<related>
<field name="hd_cases" readonly="1"/>
<field name="comments"/>
</related>
</form>