-
Notifications
You must be signed in to change notification settings - Fork 4
/
doctor_view.xml
1709 lines (1552 loc) · 94.6 KB
/
doctor_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- doctor speciality Form View -->
<record model="ir.ui.view" id="view_doctor_speciality_form">
<field name="name">Doctor Speciality</field>
<field name="model">doctor.speciality</field>
<field name="arch" type="xml">
<form string="Doctor speciality" version="7.0">
<group>
<field name="code"/>
<field name="name"/>
</group>
</form>
</field>
</record>
<!-- doctor speciality Tree View -->
<record model="ir.ui.view" id="view_doctor_speciality_tree">
<field name="name">Doctor Speciality</field>
<field name="model">doctor.speciality</field>
<field name="arch" type="xml">
<tree string="Doctor speciality" version="7.0">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- doctor speciality Action -->
<record model="ir.actions.act_window" id="action_doctor_speciality">
<field name="name">Doctor Speciality</field>
<field name="res_model">doctor.speciality</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- doctor disability Form View -->
<record model="ir.ui.view" id="view_doctor_attentions_disability_form">
<field name="name">Incapacidad</field>
<field name="model">doctor.attentions.disability</field>
<field name="arch" type="xml">
<form string="Incapacidad" version="7.0">
<group>
<field name="disability_ids"/>
<field name="duration" string= "Duración (en días)"/>
</group>
</form>
</field>
</record>
<!-- doctor disability Form View -->
<record model="ir.ui.view" id="view_doctor_attentions_disability_tree">
<field name="name">Incapacidad</field>
<field name="model">doctor.attentions.disability</field>
<field name="arch" type="xml">
<tree string="Incapacidad" version="7.0" editable="bottom">
<field name="disability_ids"/>
<field name="duration" string= "Duración (en días)"/>
</tree>
</field>
</record>
<!-- doctor Menu -->
<menuitem id="menu_doctor" name="Doctor" />
<menuitem id="menu_doctor_config" name="Doctor Configuration" parent="menu_doctor" sequence="20"/>
<menuitem id="menu_doctor_speciality" name="Doctor speciality" parent="menu_doctor_config" action="doctor.action_doctor_speciality" groups="doctor.group_doctor_configuration"/>
<!-- healthcare professional Form View-->
<record model="ir.ui.view" id="view_doctor_professional_form">
<field name="name">Healthcare Professional</field>
<field name="model">doctor.professional</field>
<field name="arch" type="xml">
<form string="Healthcare Professional">
<group name="global">
<group>
<field name="professional" on_change="onchange_photo(professional,photo)"></field>
<field name="username" on_change="onchange_username(username)"></field>
<field name="speciality_id"></field>
<field name="professional_card"></field>
<field name="authority"></field>
<field name="work_phone"></field>
<field name="work_mobile"></field>
<field name="user_id" on_change="onchange_user(user_id)" string="Related User" domain="[('partner_id', '=', professional)]" />
<field name="work_email" widget="email"/>
<field name="active"></field>
</group>
<field name="photo" widget="image" nolabel='1'/>
</group>
<notebook colspan="4">
<page string="My procedures">
<field name="procedures_ids" nolabel='1'></field>
</page>
</notebook>
</form>
</field>
</record>
<!-- healthcare professional Tree View-->
<record model="ir.ui.view" id="view_doctor_professional_tree">
<field name="name">Healthcare Professional</field>
<field name="model">doctor.professional</field>
<field name="arch" type="xml">
<tree string='Healthcare Professional'>
<field name="professional"></field>
<field name="speciality_id"></field>
<field name="active"></field>
</tree>
</field>
</record>
<!-- healthcare professional Action -->
<record model="ir.actions.act_window" id="action_doctor_professional">
<field name="name">Healthcare Professional</field>
<field name="res_model">doctor.professional</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- healthcare professional Menu-->
<menuitem id="menu_doctor_professional" name="Healthcare professional" parent="menu_doctor_config" action="doctor.action_doctor_professional" groups="doctor.group_doctor_assistant"/>
<!-- doctor diseases Form View -->
<record model="ir.ui.view" id="view_doctor_diseases_form">
<field name="name">Diseases</field>
<field name="model">doctor.diseases</field>
<field name="arch" type="xml">
<form string="Diseases" version="7.0">
<group>
<field name="code"/>
<field name="name"/>
</group>
</form>
</field>
</record>
<!-- doctor diseases Tree View -->
<record model="ir.ui.view" id="view_doctor_diseases_tree">
<field name="name">Diseases</field>
<field name="model">doctor.diseases</field>
<field name="arch" type="xml">
<tree string="Diseases" version="7.0">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- doctor diseases Action -->
<record model="ir.actions.act_window" id="action_doctor_diseases">
<field name="name">Diseases</field>
<field name="res_model">doctor.diseases</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- diseases Menu -->
<menuitem id="menu_doctor_diseases" name="Diseases" parent="menu_doctor_config" action="doctor.action_doctor_diseases" groups="doctor.group_doctor_configuration"/>
<!-- patient Form View-->
<record model="ir.ui.view" id="view_doctor_patient_form">
<field name="name">Patient</field>
<field name="model">doctor.patient</field>
<field name="arch" type="xml">
<form string="Patient" version="7.0">
<div name="div_mensaje" class="oe_form_box_info oe_text_center" groups="doctor.group_doctor_inactivo,doctor.group_doctor_psicolog_inactivo">
<b> <span class="oe_e">c</span>Apreciado Usuario se han bloqueado las funcionalidades del portal. A la fecha no se ha registrado el pago.</b>
</div>
<field invisible="1" name="id"/>
<field invisible="1" name="get_professional_id"/>
<sheet>
<div name="div_atenderpaciente" class="oe_right oe_button_box">
<button class="oe_highlight" help="Atender Paciente." icon="terp-personal" name="doctor.action_patient2attention" string="Atender" type="action" groups="doctor.group_doctor_physician" context="{'patient' : patient, 'professional_id' : get_professional_id}"/>
</div>
<field class="oe_left oe_avatar" name="photo" options="{"size": [170, 150]}" widget="image" nolabel="1"/>
<div class="oe_title">
<group name="header" col="1" colspan="2">
<h1>
<label class="oe_edit_only" for="patient" string="Paciente" invisible="1"/>
<field name="patient" on_change="onchange_patient_data(patient,photo)" class="oe_inline" string="Paciente"></field>
</h1>
</group>
</div>
<br></br>
<group name="datos_personales_y_direccion">
<fieldset class="fieldset_margen">
<legend class="texto_legend">Datos Personales</legend>
<group name="datos_personales" col="2" >
<field name="birth_date" string="Fecha Nacimiento"/>
<field name="sex" string="Sexo"/>
</group>
<div>
<label for="blood_type" string="Tipo de sangre"/>
<field name="blood_type" class="left-margin" style="width: 15%%"></field>
<field name="rh" style="width: 15%%"></field>
</div>
</fieldset>
</group>
<group>
<fieldset class="fieldset_margen" >
<legend class="texto_legend">EPS</legend>
<group col="2" >
<field name="insurer"/>
</group>
</fieldset>
</group>
<group >
<field name="deceased" ></field>
<field name="death_cause" attrs="{'invisible':[('deceased', '!=', True)]}"></field>
<field name="death_date" attrs="{'invisible':[('deceased', '!=', True)]}"></field>
</group>
<notebook colspan="4">
<page string="Attentions">
<field name="attentions_ids" nolabel="1" readonly="1">
<tree string="Attentions" >
<field name="date_attention"/>
<field name="professional_id"/>
<field name="speciality"/>
<field name="state"/>
</tree>
<form string="Attentions" nolabel="1" readonly="1" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo">
<group>
<field name="date_attention"/>
<field name="number"/>
<field name="professional_id"/>
<field name="speciality"/>
<field name="origin"/>
<field name="state"/>
</group>
</form>
</field>
</page>
<page string="Appointments">
<field name="appointments_ids" nolabel="1" readonly="1">
<tree string="Appointments">
<field name="number"/>
<field name="schedule_id"/>
<field name="type_id"/>
<field name="state"/>
<field name="attended"/>
<field name="order_id"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<field invisible="1" name="patient"/>
</form>
</field>
</record>
<!-- patient Tree View-->
<record model="ir.ui.view" id="view_doctor_patient_tree">
<field name="name">Patient</field>
<field name="model">doctor.patient</field>
<field name="arch" type="xml">
<tree string='Patient'>
<field name="sex"></field>
<field name="birth_date" ></field>
<field name="insurer"/>
</tree>
</field>
</record>
<!-- patient Action -->
<record model="ir.actions.act_window" id="action_doctor_patient">
<field name="name">Patient</field>
<field name="res_model">doctor.patient</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record id="action_patient2attention" model="ir.actions.act_window">
<field name="name">Patient to Attention</field>
<field name="src_model">doctor.patient</field>
<field name="res_model">doctor.attentions</field>
<field name="view_mode">form</field>
<field name="context">{'default_patient_id': active_id, 'default_sent_from_button' : True}</field>
</record>
<!-- schedule Form View -->
<record model="ir.ui.view" id="view_doctor_schedule_form">
<field name="name">Schedule</field>
<field name="model">doctor.schedule</field>
<field name="arch" type="xml">
<form string="Schedule" version="7.0">
<div name="div_mensaje" class="oe_form_box_info oe_text_center" groups="doctor.group_doctor_inactivo,doctor.group_doctor_psicolog_inactivo">
<b> <span class="oe_e">c</span>Apreciado Usuario se han bloqueado las funcionalidades del portal. A la fecha no se ha registrado el pago.</b>
</div>
<group>
<field name="professional_id" attrs="{'readonly':[('patients_count','>','0')]}"/>
<field name="date_begin" attrs="{'readonly':[('patients_count','>','0')]}" on_change="onchange_start_date(date_begin,schedule_duration,date_end)"/>
<field name="schedule_duration" attrs="{'readonly':[('patients_count','>','0')]}" on_change="onchange_start_date(date_begin,schedule_duration,date_end)"/>
<field name="date_end" attrs="{'readonly':[('patients_count','>','0')]}"/>
<field name="patients_count"/>
</group>
<field invisible="1" name="id"/>
<group>
<button string="Próxima Cita" name="calcular_proxima_cita" type="object" groups="doctor.group_doctor_assistant" class="oe_highlight" attrs="{'invisible': [('id', '=', False)]}"/>
<div align="right">
<button string="Actualizar" name="refresh_espacios" type="object" groups="doctor.group_doctor_assistant" class="oe_highlight" attrs="{'invisible': [('id', '=', False)]}"/>
</div>
</group>
<notebook>
<page string="Appointment" >
<field name="appointment_ids" colspan="4" nolabel="1" context="{'schedule_id' : id}" >
<tree string="Appointment" create="false" edit="true" delete="false" domain="[('cita_eliminada', '=', False)]">
<field name="schedule_id" invisible="True" on_change="onchange_start_time(schedule_id, time_begin)"/>
<field name="patient_id" on_change="onchange_patient(patient_id, insurer_id)"/>
<field name="insurer_id" />
<field name="professional_id" invisible="True"/>
<field name="type_id" on_change="onchange_end_time(type_id, time_begin, time_end)"/>
<field name="time_begin" on_change="onchange_end_time(type_id, time_begin, time_end)"/>
<field name="time_end"/>
<field name="state"/>
<field name="attended" invisible="True"/>
<field name="appointment_today" invisible="True"/>
<button string="Confirm" name="button_confirm" states="draft" type="object" groups="doctor.group_doctor_assistant,doctor.group_doctor_asistente_admin" icon="gtk-apply"/>
<button string="Cancel" name="button_cancel" states="draft,confirm" type="object" groups="doctor.group_doctor_assistant,doctor.group_doctor_asistente_admin" icon="gtk-cancel"/>
<field name="aditional"/>
<button string="Eliminar" name="button_delete_appointment" type="object" icon="STOCK_UNDELETE" attrs="{'invisible': [('id', '=', False)]}" confirm="¿Esta seguro que desea eliminar esta cita?"/>
</tree>
</field>
</page>
</notebook>
</form>
</field>
</record>
<!-- schedule Tree View -->
<record model="ir.ui.view" id="view_doctor_schedule_tree">
<field name="name">Schedule</field>
<field name="model">doctor.schedule</field>
<field name="arch" type="xml">
<tree string="Schedule">
<field name="professional_id" string="Doctor"/>
<field name="date_begin"/>
<field name="date_end"/>
<field name="patients_count"/>
</tree>
</field>
</record>
<!-- schedule Calendar View -->
<record id="view_doctor_schedule_calendar" model="ir.ui.view">
<field name="name">Schedule</field>
<field name="model">doctor.schedule</field>
<field name="arch" type="xml">
<calendar color="professional_id" date_start="date_begin" date_stop="date_end" string="Schedule">
<field name="professional_id"/>
<field name="date_begin"/>
<field name="date_end"/>
</calendar>
</field>
</record>
<!-- schedule Action -->
<record model="ir.actions.act_window" id="action_doctor_schedule">
<field name="name">Schedule</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">doctor.schedule</field>
<field name="view_type">form</field>
<field name="view_mode">calendar,tree,form</field>
</record>
<!-- process Menu-->
<menuitem id="menu_doctor_process" name="Doctor Process" parent="menu_doctor" sequence="10"/>
<!-- patient Menu-->
<menuitem id="menu_doctor_patient" name="Patient" parent="menu_doctor_process" action="doctor.action_doctor_patient" sequence="30" />
<!-- schedule Menu -->
<menuitem name="Schedule" id="menu_doctor_schedule" action="doctor.action_doctor_schedule" parent="menu_doctor_process" sequence="20" />
<!--insurer Form View-->
<record model="ir.ui.view" id="view_doctor_insurer_form">
<field name="name">Insurer</field>
<field name="model">doctor.insurer</field>
<field name="arch" type="xml">
<form string="Insurer">
<group>
<field name="insurer"></field>
<field name="code"></field>
</group>
</form>
</field>
</record>
<!-- insurer Tree View-->
<record model="ir.ui.view" id="view_doctor_insurer_tree">
<field name="name">Insurer</field>
<field name="model">doctor.insurer</field>
<field name="arch" type="xml">
<tree string='Insurer'>
<field name="insurer"></field>
<field name="code"></field>
</tree>
</field>
</record>
<!-- insurer Action -->
<record model="ir.actions.act_window" id="action_doctor_insurer">
<field name="name">Insurer</field>
<field name="res_model">doctor.insurer</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- insurer Menu-->
<menuitem id="menu_doctor_insurer" name="Insurer" parent="doctor.menu_doctor_config" action="action_doctor_insurer"/>
<!-- appointment type Form View -->
<record model="ir.ui.view" id="view_doctor_appointment_type_form">
<field name="name">Appointment type</field>
<field name="model">doctor.appointment.type</field>
<field name="arch" type="xml">
<form string="Appointment type" version="7.0">
<group>
<field name="name" string="Type"/>
<field name="duration"/>
</group>
</form>
</field>
</record>
<!-- appointment type Tree View -->
<record model="ir.ui.view" id="view_doctor_appointment_type_tree">
<field name="name">Appointment type</field>
<field name="model">doctor.appointment.type</field>
<field name="arch" type="xml">
<tree string="Appointment type" version="7.0">
<field name="name" string="Type"/>
<field name="duration"/>
</tree>
</field>
</record>
<!-- appointment type Action -->
<record model="ir.actions.act_window" id="action_doctor_appointment_type">
<field name="name">Appointment type</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">doctor.appointment.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- appointmemnt type Menu-->
<menuitem id="menu_doctor_appointment_type" name="Appointment type" parent="menu_doctor_config" action="doctor.action_doctor_appointment_type"/>
<record id="appointmemnt_filter" model="ir.ui.view">
<field name="name">Appointmemnt</field>
<field name="model">doctor.appointment</field>
<field name="arch" type="xml">
<search string="Search Appointment" version="7.0">
<field name="patient_id"/>
<field name="appointment_today"/>
<field name="professional_id"/>
<field name="insurer_id"/>
<field name="number"/>
<field name="order_id"/>
<field name="attentiont_id"/>
<field name="aditional"/>
<field name="time_begin" filter_domain="[('time_begin','>=',((context_today()).strftime('%%Y-%%m-%%d')))]" />
<field name="time_end" filter_domain="[('time_end','<=',((context_today()).strftime('%%Y-%%m-%%d')))]" />
<separator/>
<filter string="Today" name="appointment_today" domain="[('appointment_today','=',True)]" help="Appointmemnt today"/>
<filter string="Próximas Citas" name="next_appointment" domain="[('time_begin','>=', (context_today()).strftime('%%Y-%%m-%%d'))]" help="Próximas Citas"/>
<separator/>
<filter string="Actives" name="appointment_actives" domain="[('state','!=','cancel')]" help="Appointmemnt actives"/>
<filter string="Citas Profesional" name="citas_profesional" domain="[]" help="Citas Profesional"/>
<separator/>
<filter name="cancel" string="Canceled" domain="[('state','=','cancel')]" help="Canceled" />
<filter name="draft" string="Unconfirmed" domain="[('state','=','draft')]" help="Unconfirmed" />
<filter name="confirm" string="" domain="[('state','=','confirm')]" help="Confirmed" />
<filter name="assists" string="Waiting" domain="[('state','=','assists')]" help="Waiting" />
<filter name="attending" string="In Attention" domain="[('state','=','attending')]" help="In attention" />
<filter name="invoiced" string="Invoiced" domain="[('state','=','invoiced')]" help="Invoiced" />
<group expand="0" string= "Group By...">
<filter string="Professional" domain="[]" context="{'group_by' : 'professional_id'}" />
<filter string="Patient" domain="[]" context="{'group_by' : 'patient_id'}" />
<filter string="Insurer" domain="[]" context="{'group_by' :'insurer_id'}" />
<filter string="Type" domain="[]" context="{'group_by' : 'type_id'}" />
</group>
</search>
</field>
</record>
<!-- appointment Form View-->
<record model="ir.ui.view" id="view_doctor_appointment_form">
<field name="name">Appointment</field>
<field name="model">doctor.appointment</field>
<field name="arch" type="xml">
<form string="Appointment" version="7.0">
<div name="div_mensaje" class="oe_form_box_info oe_text_center" groups="doctor.group_doctor_inactivo,doctor.group_doctor_psicolog_inactivo">
<b> <span class="oe_e">c</span>Apreciado Usuario se han bloqueado las funcionalidades del portal. A la fecha no se ha registrado el pago.</b>
</div>
<separator/>
<separator/>
<header>
<button string="Confirm" name="button_confirm" states="draft" type="object" groups="doctor.group_doctor_assistant,doctor.group_doctor_asistente_admin" class="oe_highlight"/>
<button string="Cancel" name="button_cancel" states="draft,confirm" type="object" groups="doctor.group_doctor_assistant,doctor.group_doctor_asistente_admin"/>
<button string="Assists" name="button_assists" type="object" class="oe_highlight" groups="doctor.group_doctor_assistant,doctor.group_doctor_asistente_admin" attrs="{'invisible':['|','|',('appointment_today','!=',True),('attended','=',True),('state','!=','confirm')]}"/>
<button string="Attend" name="generate_attentiont" type="object" class="oe_highlight" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo,doctor.group_doctor_odontologo" attrs="{'invisible':['|','|',('attended','=',True),('state','=','draft'),('appointment_today','!=',True)]}" context="{'patient_id' : patient_id}"/>
<button string="Generate order" name="generate_order" states="assists,attending" type="object" groups="doctor.group_doctor_assistant,doctor.group_doctor_asistente_admin" class="oe_highlight"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,assists,attending,invoiced"/>
</header>
<group>
<field name="schedule_id" domain="[('date_end','>=',time.strftime('%%Y-%%m-%%d %%H:%%M:%%S'))]" on_change="onchange_start_time(schedule_id, professional_id, time_begin)"/>
<field name="professional_id" invisible="True"/>
<field name="attended" invisible="True"/>
<field name="patient_id" on_change="onchange_patient(patient_id, insurer_id)"/>
<field name="insurer_id"/>
<field name="type_id" on_change="onchange_end_time(type_id, time_begin, time_end)"/>
<field name="appointment_today" invisible="True"/>
<group colspan='4' col='6'>
<field name="time_begin" on_change="onchange_end_time(type_id, time_begin, time_end)"/>
<field name="time_end"/>
<field name="aditional"/>
</group>
<group colspan='4' col='6'>
<field name="number" readonly="1"/>
<field name="order_id" readonly="1"/>
<field name="attentiont_id" readonly="1"/>
</group>
</group>
<notebook>
<page string="Health procedures" >
<field name="procedures_id" colspan="4" nolabel="1" context="{'professional_id' : professional_id}">
<tree string="Health procedures" editable="bottom">
<field name="professional_id" invisible="True"/>
<field name="procedures_id" domain="[('professional_ids', '=', professional_id)]"/>
<field name="quantity"/>
</tree>
</field>
</page>
</notebook>
</form>
</field>
</record>
<!-- appointment Tree View-->
<record model="ir.ui.view" id="view_doctor_appointment_tree">
<field name="name">Appointment</field>
<field name="model">doctor.appointment</field>
<field name="arch" type="xml">
<tree string='Appointment' version="7.0">
<field name="schedule_id"></field>
<field name="patient_id"></field>
<field name="insurer_id"></field>
<field name="type_id"></field>
<field name="time_begin"></field>
<field name="time_end"></field>
<field name="state"/>
<button string="Confirm" name="button_confirm" states="draft" type="object" groups="doctor.group_doctor_assistant" icon="gtk-apply"/>
<button string="Cancel" name="button_cancel" states="draft,confirm" type="object" groups="doctor.group_doctor_assistant" icon="gtk-cancel"/>
</tree>
</field>
</record>
<!-- Waiting room - Kanban View -->
<record model="ir.ui.view" id="waiting_room_kanban_view">
<field name="name">Waiting room</field>
<field name="model">doctor.appointment</field>
<field name="arch" type="xml">
<kanban version="7.0">
<field name="patient_id"/>
<field name="insurer_id"/>
<field name="professional_id"/>
<field name="type_id"/>
<field name="schedule_id"/>
<field name="state"/>
<field name="time_begin"/>
<field name="time_end"/>
<field name="number" readonly="1"/>
<field name="order_id" readonly="1"/>
<field name="attentiont_id" readonly="1"/>
<field name="attended" invisible="True"/>
<field name="appointment_today" invisible="True"/>
<field name="aditional"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_card oe_kanban_global_click ">
<a type="open">
<t >
<img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image"/>
</t>
</a>
<div class="oe_kanban_details">
<h4 class="oe_partner_heading"><a type="open"><field name="patient_id"/></a></h4>
<ul>
<li><field name="type_id"/></li>
<li><strong><field name="time_begin"/></strong></li>
<li><field name="time_end"/></li>
</ul>
<button string="Assists" name="button_assists" type="object" class="oe_highlight" groups="doctor.group_doctor_assistant" attrs="{'invisible':['|','|',('appointment_today','!=',True),('attended','=',True),('state','!=','confirm')]}" confirm="Patient in waiting room?">Assist</button>
<button string="Attend" name="generate_attentiont" type="object" class="oe_highlight" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo,doctor.group_doctor_odontologo" attrs="{'invisible':['|','|',('attended','=',True),('state','=','draft'),('appointment_today','!=',True)]}" confirm="Patient in waiting room?" >Attend</button>
</div>
<div class="oe_kanban_footer_left">
<span>
<span class="oe_e">N</span>
Dr. (a) - <span><field name="professional_id"/></span>
</span>
<br/>
<span>
<span class="oe_e">M</span>
<span><field name="insurer_id"/></span>
</span>
</div>
<div>
<span>
<ul>
<li><field name="state" /></li>
</ul>
</span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- appointment Action -->
<record model="ir.actions.act_window" id="action_doctor_appointment">
<field name="name">Appointment</field>
<field name="res_model">doctor.appointment</field>
<field name="view_type">form</field>
<field name="domain"></field>
<field name="view_mode">kanban,tree,form</field>
<field name="auto_refresh" eval="1" />
<field name="search_view_id" ref="appointmemnt_filter"/>
<field name="context">{'search_default_next_appointment': 1, 'search_default_assists': 1, 'search_default_citas_profesional': 1, 'search_default_invoiced': 1,}</field>
</record>
<!-- appointment update today -->
<record forcecreate="True" id="ir_cron_appointment_fine_action" model="ir.cron">
<field name="name">Run appointment update today</field>
<field name="active" eval="True"/>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">6</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True"/>
<field name="model" eval="'doctor.appointment'"/>
<field name="function" eval="'update_appointment_today'"/>
<field name="args" eval="'()'"/>
</record>
<!-- appointment Menu -->
<menuitem name="Waiting room" id="menu_doctor_appointment" action="doctor.action_doctor_appointment" parent="menu_doctor_process" sequence="10" />
<!-- attentions Form View-->
<record model="ir.ui.view" id="view_doctor_attentions_form">
<field name="name">Attentions</field>
<field name="model">doctor.attentions</field>
<field name="arch" type="xml">
<form string="Attentions" version="7.0" create="false">
<div name="div_mensaje" class="oe_form_box_info oe_text_center" groups="doctor.group_doctor_inactivo,doctor.group_doctor_psicolog_inactivo">
<b> <span class="oe_e">c</span>Apreciado Usuario se han bloqueado las funcionalidades del portal. A la fecha no se ha registrado el pago.</b>
</div>
<separator/>
<separator/>
<header>
<button string="Finish attention" name="button_closed" states="open" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar" statusbar_visible="open,closed"/>
</header>
<group colspan='4' col='4'>
<group colspan='4' col='2'>
<fieldset class="fieldset_margen">
<legend class="texto_legend">Patient</legend>
<group col='2'>
<field name='patient_photo' nolabel='1' widget="image" img_height="50" width="50" height="50"/>
<group col='1'>
<div>
<h3>
<field name='patient_id' nolabel='1' on_change="onchange_patient(patient_id)"/>
</h3>
</div>
<group col='2'>
<label string="Edad" nolabel="1" style="font-weight: bold"/>
<field name='age_patient_ymd' nolabel='1'/>
</group>
</group>
</group>
</fieldset>
<fieldset class="fieldset_margen">
<legend class="texto_legend">Physician</legend>
<group col='2'>
<field name='professional_photo' nolabel='1' widget="image" img_height="50" width="50" height="50"/>
<group col='1'>
<div>
<field name='professional_id' nolabel='1' on_change="onchange_professional(professional_id)"/>
</div>
<group col='1'>
<div>
<field name='speciality' domain="[('name', '=', speciality)]" style="width:70%%"/>
</div>
</group>
</group>
</group>
</fieldset>
</group>
<group colspan="4" col='6'>
<field name='date_attention' />
<field name="number"/>
<field name="origin"/>
</group>
<separator string="Health records" colspan="4" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo"/>
<notebook colspan="4" col='4'>
<page string="Anamnesis">
<notebook colspan="4" col='4'>
<page string="Motivo de Consulta y Enfermedad Actual">
<group colspan="2" col='1'>
<label for="reason_consultation" string="Reason consultation" invisible="True"/>
<field name='reason_consultation' nolabel="1" placeholder="Reason consultation" widget="many2many_tags" invisible="True"/>
</group>
<group colspan="2" col='1'>
<label for="actual_disease" string="Actual disease"/>
<field name='actual_disease' nolabel="1" placeholder="Actual_disease"/>
</group>
</page>
<page string="Revisión por Sistemas">
<field name="review_systems_id" nolabel="1">
<tree string="Review systems" editable="top">
<field name="system_category"/>
<field name="review_systems"/>
</tree>
<form string="Review systems">
<group>
<field name="system_category"/>
<field name="review_systems"/>
</group>
</form>
</field>
</page>
<page string="Antecedentes">
<notebook>
<page string="Past">
<field name="past_ids" nolabel="1" readonly="1" context="{'patient_id' : patient_id}">
<tree string="Past" editable="top">
<field name="attentiont_id" invisible="True" domain="[('attentiont_id', '<', active_id)]"/>
<field name="patient_id" invisible="True"/>
<field name="past_category"/>
<field name="past"/>
</tree>
<form string="Past">
<group>
<field name="attentiont_id" invisible="True" domain="[('attentiont_id', '<', active_id)]"/>
<field name="patient_id" invisible="True"/>
<field name="past_category"/>
<field name="past"/>
</group>
</form>
</field>
</page>
<page string="Add Past">
<field name="attentions_past_ids" nolabel="1" context="{'patient_id' : patient_id}">
<tree string="Add Past" editable="top">
<field name="patient_id" invisible="True"/>
<field name="past_category"/>
<field name="past"/>
</tree>
<form string="Add Past">
<group>
<field name="patient_id" invisible="True"/>
<field name="past_category"/>
<field name="past"/>
</group>
</form>
</field>
</page>
</notebook>
<page string="Antecedentes Patológicos y Farmacológicos">
<notebook colspan="2" col="4" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo">
<page string="Pathological past">
<field name="pathological_past_ids" nolabel="1" readonly="1" context="{'patient_id' : patient_id}">
<tree string="Pathological past" editable="top">
<field name="attentiont_id" invisible="True" domain="[('attentiont_id', '<', active_id)]"/>
<field name="patient_id" invisible="True"/>
<field name="diseases_id"/>
</tree>
<form string="Pathological past">
<group>
<field name="attentiont_id" invisible="True" domain="[('attentiont_id', '<', active_id)]"/>
<field name="patient_id" invisible="True"/>
<field name="diseases_id"/>
</group>
</form>
</field>
</page>
<page string="Add past">
<field name="pathological_past" nolabel="1" context="{'patient_id' : patient_id}">
<tree string="Add Past" editable="top">
<field name="patient_id" invisible="True"/>
<field name="diseases_id"/>
</tree>
<form string="Add Past">
<group>
<field name="patient_id" invisible="True"/>
<field name="diseases_id"/>
</group>
</form>
</field>
</page>
</notebook>
<notebook colspan="4" col="2" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo">
<page string="Drugs past">
<field name="drugs_past_ids" nolabel="1" readonly="1" context="{'patient_id' : patient_id}">
<tree string="Drugs past" editable="top">
<field name="attentiont_id" invisible="True" domain="[('attentiont_id', '<', active_id)]"/>
<field name="patient_id" invisible="True"/>
<field name="atc_id"/>
</tree>
<form string="Drugs past">
<group>
<field name="attentiont_id" invisible="True" domain="[('attentiont_id', '<', active_id)]"/>
<field name="patient_id" invisible="True"/>
<field name="atc_id"/>
</group>
</form>
</field>
</page>
<page string="Add Past">
<field name="drugs_past" nolabel="1" context="{'patient_id' : patient_id}">
<tree string="Add Past" editable="top">
<field name="patient_id" invisible="True"/>
<field name="atc_id"/>
</tree>
<form string="Add Past">
<group>
<field name="patient_id" invisible="True"/>
<field name="atc_id"/>
</group>
</form>
</field>
</page>
</notebook>
</page>
</page>
</notebook>
</page>
<page string="Examen Físico" groups="doctor.group_doctor_physician">
<notebook colspan="4" col='4'>
<page string="Vital signs">
<group colspan='4' col='3'>
<fieldset class="fieldset_margen">
<legend class="texto_legend">Height and weight</legend>
<group colspan='3' col='3'>
<label for="weight" string="Weight"/>
<field name='weight' nolabel='1' style="width:5%%"/>
<div>kg</div>
<label for="height" string="Height"/>
<field name='height' nolabel='1' style="width:5%%"/>
<field name='body_mass_index' nolabel='1' style="width:5%%"/>
</group>
</fieldset>
<fieldset class="fieldset_margen">
<legend class="texto_legend">Vital signs</legend>
<group colspan='4' col='3'>
<label for="heart_rate" string="Heart rate"/>
<field name='heart_rate' nolabel='1' style="width:5%%"/>
<div>L/min</div>
<label for="respiratory_rate" string="Respiratory"/>
<field name='respiratory_rate' nolabel='1' style="width:5%%"/>
<div>R/min</div>
</group>
</fieldset>
<fieldset class="fieldset_margen">
<legend class="texto_legend">Blood pressure</legend>
<group colspan='4' col='3'>
<label for="systolic" string="Systolic"/>
<field name='systolic' nolabel='1' style="width:5%%"/>
<div>mmHg</div>
<label for="diastolic" string="Diastolic"/>
<field name='diastolic' nolabel='1' style="width:5%%"/>
<div>mmHg</div>
</group>
</fieldset>
<fieldset class="fieldset_margen">
<legend class="texto_legend">Temperature</legend>
<group colspan='4' col='3'>
<label for="temperature" string="Temperature"/>
<field name='temperature' nolabel='1' style="width:5%%"/>
<div>°C</div>
</group>
</fieldset>
<fieldset class="fieldset_margen">
<legend class="texto_legend">SpO2</legend>
<group colspan='4' col='3'>
<label for="pulsioximetry" string="Pulsioximetry"/>
<field name='pulsioximetry' nolabel='1' style="width:5%%"/>
<div>%%</div>
</group>
</fieldset>
</group>
</page>
<page string="Exam">
<field name="attentions_exam_ids" nolabel="1">
<tree string="Exam" editable="top">
<field name="exam_category"/>
<field name="exam"/>
</tree>
<form string="Exam">
<group>
<field name="exam_category"/>
<field name="exam"/>
</group>
</form>
</field>
</page>
</notebook>
</page>
<page string="Paraclínicos" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo">
<group colspan="2" col='2' id="group_paraclinical">
</group>
</page>
<page string="Dx, Análisis y Conducta">
<group colspan='4' col='4'>
<group colspan="2" col='1' groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo">
<label for="analysis" string="Analysis"/>
<field name='analysis' nolabel="1" placeholder="Analysis" />
</group>
<group colspan="2" col='1' groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo" id="group_conduct">
<label for="conduct" string="Conduct"/>
<label for="conduct" string="Conducta(Plan de manejo)" groups="doctor.group_doctor_physician, doctor.group_doctor_psicologo, doctor.group_doctor_assistant, doctor.group_doctor_configuration"/>
<field name='conduct' nolabel="1" placeholder="Conduct" />
</group>
</group>
<group colspan='4' col='4'>
<notebook colspan="4" groups="doctor.group_doctor_physician,doctor.group_doctor_psicologo">
<page string="Diseases" >
<field name="diseases_ids" colspan="4" nolabel="1">
<tree string="Diseases" editable="bottom">
<field name="diseases_id" />
<field name="status"/>
<field name="diseases_type"/>
</tree>
<form string="Diseases">
<group>
<field name="diseases_id"/>
<field name="status"/>
<field name="diseases_type"/>
</group>
</form>
</field>
</page>
<page string="Drugs prescription" >
<field name="drugs_ids" colspan="4" nolabel="1" groups="doctor.group_doctor_physician">
<tree string="Drugs prescription">
<field name="drugs_id"/>
<field name="total_quantity"/>
<field name="measuring_unit_qt" string="Measuring unit"/>
<field name="administration_route_id" string="Route"/>