Browse Source

[ADD] Initial Commit

pull/116/head
Ajmalcybrosys 6 years ago
parent
commit
d916a278f0
  1. 38
      medical_lab_management/README.rst
  2. 22
      medical_lab_management/__init__.py
  3. 55
      medical_lab_management/__manifest__.py
  4. 6
      medical_lab_management/doc/RELEASE_NOTES.md
  5. 19
      medical_lab_management/models/__init__.py
  6. 24
      medical_lab_management/models/account_invoice.py
  7. 179
      medical_lab_management/models/lab_appointment.py
  8. 65
      medical_lab_management/models/lab_patient.py
  9. 120
      medical_lab_management/models/lab_request.py
  10. 23
      medical_lab_management/models/lab_test_content_type.py
  11. 31
      medical_lab_management/models/lab_test_type.py
  12. 21
      medical_lab_management/models/physician_speciality.py
  13. 20
      medical_lab_management/models/res_partner.py
  14. 18
      medical_lab_management/models/testing_unit.py
  15. 60
      medical_lab_management/report/lab_patient_card.xml
  16. 54
      medical_lab_management/report/lab_test_report.xml
  17. 23
      medical_lab_management/report/report.xml
  18. 19
      medical_lab_management/security/ir.model.access.csv
  19. 17
      medical_lab_management/security/lab_users.xml
  20. BIN
      medical_lab_management/static/description/app.png
  21. BIN
      medical_lab_management/static/description/banner.jpg
  22. BIN
      medical_lab_management/static/description/card.png
  23. BIN
      medical_lab_management/static/description/content.png
  24. BIN
      medical_lab_management/static/description/cybro_logo.png
  25. BIN
      medical_lab_management/static/description/icon.png
  26. 474
      medical_lab_management/static/description/index.html
  27. BIN
      medical_lab_management/static/description/invoice.png
  28. BIN
      medical_lab_management/static/description/lab-management-cybrosys-1.png
  29. BIN
      medical_lab_management/static/description/lab-management-cybrosys-10.png
  30. BIN
      medical_lab_management/static/description/lab-management-cybrosys-11.png
  31. BIN
      medical_lab_management/static/description/lab-management-cybrosys-12.png
  32. BIN
      medical_lab_management/static/description/lab-management-cybrosys-13.png
  33. BIN
      medical_lab_management/static/description/lab-management-cybrosys-2.png
  34. BIN
      medical_lab_management/static/description/lab-management-cybrosys-3.png
  35. BIN
      medical_lab_management/static/description/lab-management-cybrosys-4.png
  36. BIN
      medical_lab_management/static/description/lab-management-cybrosys-5.png
  37. BIN
      medical_lab_management/static/description/lab-management-cybrosys-6.png
  38. BIN
      medical_lab_management/static/description/lab-management-cybrosys-7.png
  39. BIN
      medical_lab_management/static/description/lab-management-cybrosys-8.png
  40. BIN
      medical_lab_management/static/description/lab-management-cybrosys-9.png
  41. BIN
      medical_lab_management/static/description/mail.png
  42. BIN
      medical_lab_management/static/description/patient.png
  43. BIN
      medical_lab_management/static/description/phy.png
  44. BIN
      medical_lab_management/static/description/request1.png
  45. BIN
      medical_lab_management/static/description/request2.png
  46. BIN
      medical_lab_management/static/description/result.png
  47. BIN
      medical_lab_management/static/description/test.png
  48. BIN
      medical_lab_management/static/description/today.png
  49. BIN
      medical_lab_management/static/description/unit.png
  50. BIN
      medical_lab_management/static/description/user.png
  51. 30
      medical_lab_management/views/account_invoice.xml
  52. 232
      medical_lab_management/views/lab_appointment.xml
  53. 158
      medical_lab_management/views/lab_patient_view.xml
  54. 119
      medical_lab_management/views/lab_request.xml
  55. 72
      medical_lab_management/views/lab_test_content_type.xml
  56. 102
      medical_lab_management/views/lab_test_type.xml
  57. 25
      medical_lab_management/views/physician_details.xml
  58. 18
      medical_lab_management/views/physician_specialty.xml
  59. 22
      medical_lab_management/views/res_partner.xml
  60. 72
      medical_lab_management/views/test_unit_view.xml

38
medical_lab_management/README.rst

@ -0,0 +1,38 @@
==========================
Medical Lab Management v11
==========================
Helps You To Manage Medical Lab Operations.
Installation
============
Just install the module from apps list.
Configuration
=============
#1.Create test units for lab test.
#2.Create test contents for lab test.
#3.Create lab test, add the contents and their units and normal range for the contents.
#4.Create patients.
#5.When a particular patient comes first create the patient and from the
super button in the patient name called 'Lab Appointments' create the appointment for the patient.
#6.When we confirm the appointment an email will be sent to the patient with the appointment Details.
#7.When we click on 'Request LAb' button lab test request will be created.
#8.Select the particular lab request and add the result when we complete the test.
#9.The request tree view will show green color if the test state is in Sample collection or Test in progress.
#10.The request tree view will show grey color if the test is cancelled ,it show blue color if the request is in draft stage and
it show black color if the test is completed.
#11.When the test request are completed the Appointment state will be in 'Test Result' state .
#12.Create invoice for the lab test.
#13.There is two type of users 'Lab technician' and 'lab User'. Lab technician have the right to create,delete,read lab test unit,test content,lab test
while the lab user have only read permission on these records. The other rights are same to both the user.
Credits
=======
Anusha P P @ cybrosys
Niyas Raphy @ cybrosys
Author
=======
Cybrosys Techno Solutions www.cybrosys.com

22
medical_lab_management/__init__.py

@ -0,0 +1,22 @@
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Anusha P P(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import models

55
medical_lab_management/__manifest__.py

@ -0,0 +1,55 @@
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Anusha P P(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': "Medical Lab Management",
'version': '11.0.1.0.0',
'summary': """Manage Medical Lab Operations.""",
'description': """Manage Medical Lab General Operations.""",
'author': "Cybrosys Techno Solutions",
'maintainer': 'Cybrosys Techno Solutions',
'company': "Cybrosys Techno Solutions",
'website': "https://www.cybrosys.com",
'category': 'Industries',
'depends': ['base', 'mail', 'account'],
'data': [
'security/lab_users.xml',
'security/ir.model.access.csv',
'views/res_partner.xml',
'views/lab_patient_view.xml',
'views/test_unit_view.xml',
'views/lab_test_type.xml',
'views/lab_test_content_type.xml',
'views/physician_specialty.xml',
'views/physician_details.xml',
'views/lab_request.xml',
'views/lab_appointment.xml',
'views/account_invoice.xml',
'report/report.xml',
'report/lab_test_report.xml',
'report/lab_patient_card.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': True,
}

6
medical_lab_management/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <medical_lab_management>
#### 24.04.2019
#### Version 11.0.1.0.0
##### ADD
- Initial commit

19
medical_lab_management/models/__init__.py

@ -0,0 +1,19 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from . import physician_speciality
from . import res_partner
from . import lab_patient
from . import testing_unit
from . import lab_test_type
from . import lab_test_content_type
from . import lab_appointment
from . import lab_request
from . import account_invoice

24
medical_lab_management/models/account_invoice.py

@ -0,0 +1,24 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
#############################################################################
from odoo import models, fields, api
class LabRequestInvoices(models.Model):
_inherit = 'account.invoice'
is_lab_invoice = fields.Boolean(string="Is Lab Invoice")
lab_request = fields.Many2one('lab.appointment', string="Lab Appointment", help="Source Document")
@api.multi
def action_invoice_paid(self):
res = super(LabRequestInvoices, self).action_invoice_paid()
lab_app_obj = self.env['lab.appointment'].search([('id', '=', self.lab_request.id)])
for obj in lab_app_obj:
obj.write({'state': 'invoiced'})
return res

179
medical_lab_management/models/lab_appointment.py

@ -0,0 +1,179 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
import datetime
from odoo.exceptions import UserError
from odoo import fields, models, api, _
class Appointment(models.Model):
_name = 'lab.appointment'
_inherit = ['mail.thread']
_rec_name = 'name'
_description = "Appointment"
_order = 'appointment_date'
user_id = fields.Many2one('res.users', 'Responsible', readonly=True)
patient_id = fields.Many2one('lab.patient', string='Patient', required=True, select=True,
help='Patient Name')
name = fields.Char(string='Appointment ID', readonly=True, default=lambda self: _('New'))
date = fields.Datetime(string='Requested Date', default=lambda s: fields.Datetime.now(),
help="This is the date in which patient appointment is noted")
appointment_date = fields.Datetime(string='Appointment Date', default=lambda s: fields.Datetime.now(),
help="This is the appointment date")
physician_id = fields.Many2one('res.partner', string='Referred By', select=True)
comment = fields.Text(string='Comments')
appointment_lines = fields.One2many('lab.appointment.lines', 'test_line_appointment', string="Test Request")
request_count = fields.Integer(compute="_compute_state", string='# of Requests', copy=False, default=0)
inv_count = fields.Integer(compute="_compute_state", string='# of Invoices', copy=False, default=0)
state = fields.Selection([
('draft', 'Draft'),
('confirm', 'Confirmed'),
('request_lab', 'Lab Requested'),
('completed', 'Test Result'),
('to_invoice', 'To Invoice'),
('invoiced', 'Done'),
('cancel', 'Cancelled'),
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft',
)
priority = fields.Selection([
('0', 'Low'),
('1', 'Normal'),
('2', 'High')
], size=1)
_defaults = {
'priority': '0',
}
@api.model
def create(self, vals):
if vals:
vals['name'] = self.env['ir.sequence'].next_by_code('lab.appointment') or _('New')
result = super(Appointment, self).create(vals)
return result
@api.multi
def _compute_state(self):
for obj in self:
obj.request_count = self.env['lab.request'].search_count([('app_id', '=', obj.id)])
obj.inv_count = self.env['account.invoice'].search_count([('lab_request', '=', obj.id)])
@api.multi
def create_invoice(self):
invoice_obj = self.env["account.invoice"]
invoice_line_obj = self.env["account.invoice.line"]
for lab in self:
lab.write({'state': 'to_invoice'})
if lab.patient_id:
curr_invoice = {
'partner_id': lab.patient_id.patient.id,
'account_id': lab.patient_id.patient.property_account_receivable_id.id,
'state': 'draft',
'type': 'out_invoice',
'date_invoice': datetime.datetime.now(),
'origin': "Lab Test# : " + lab.name,
'target': 'new',
'lab_request': lab.id,
'is_lab_invoice': True
}
inv_ids = invoice_obj.create(curr_invoice)
inv_id = inv_ids.id
if inv_ids:
journal = self.env['account.journal'].search([('type', '=', 'sale')], limit=1)
prd_account_id = journal.default_credit_account_id.id
if lab.appointment_lines:
for line in lab.appointment_lines:
curr_invoice_line = {
'name': line.lab_test.lab_test,
'price_unit': line.cost or 0,
'quantity': 1.0,
'account_id': prd_account_id,
'invoice_id': inv_id,
}
invoice_line_obj.create(curr_invoice_line)
# self.write({'state': 'invoiced'})
view_id = self.env.ref('account.invoice_form').id
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'account.invoice',
'view_id': view_id,
'type': 'ir.actions.act_window',
'name': _('Lab Invoices'),
'res_id': inv_id
}
@api.multi
def action_request(self):
if self.appointment_lines:
for line in self.appointment_lines:
data = self.env['lab.test'].search([('lab_test', '=', line.lab_test.lab_test)])
self.env['lab.request'].create({'lab_request_id': self.name,
'app_id': self.id,
'lab_requestor': self.patient_id.id,
'lab_requesting_date': self.appointment_date,
'test_request': line.lab_test.id,
'request_line': [(6, 0, [x.id for x in data.test_lines])],
})
self.state = 'request_lab'
else:
raise UserError(_('Please Select Lab Test.'))
@api.multi
def confirm_appointment(self):
message_body = "Dear " + self.patient_id.patient.name + "," + "<br>Your Appointment Has been Confirmed " \
+ "<br>Appointment ID : " + self.name + "<br>Date : " + self.appointment_date + \
'<br><br>Thank you'
template_obj = self.env['mail.mail']
template_data = {
'subject': 'Appointment Confirmation',
'body_html': message_body,
'email_from': self.env.user.company_id.email,
'email_to': self.patient_id.email
}
template_id = template_obj.create(template_data)
template_obj.send(template_id)
self.write({'state': 'confirm'})
@api.multi
def cancel_appointment(self):
return self.write({'state': 'cancel'})
class LabAppointmentLines(models.Model):
_name = 'lab.appointment.lines'
lab_test = fields.Many2one('lab.test', string="Test")
cost = fields.Char(string="Cost")
requesting_date = fields.Date(string="Date")
test_line_appointment = fields.Many2one('lab.appointment', string="Appointment")
@api.onchange('lab_test')
def cost_update(self):
if self.lab_test:
self.cost = self.lab_test.test_cost
class LabPatientInherit(models.Model):
_inherit = 'lab.patient'
app_count = fields.Integer(compute="_compute_state", string='# of Appointments', copy=False, default=0)
@api.multi
def _compute_state(self):
for obj in self:
obj.app_count = self.env['lab.appointment'].search_count([('patient_id', '=', obj.id)])

65
medical_lab_management/models/lab_patient.py

@ -0,0 +1,65 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from dateutil.relativedelta import relativedelta
from odoo import models, fields, api, _
class LabPatient(models.Model):
_name = 'lab.patient'
_rec_name = 'patient'
_description = 'Patient'
patient = fields.Many2one('res.partner', string='Partner', required=True)
patient_image = fields.Binary(string='Photo')
patient_id = fields.Char(string='Patient ID', readonly=True)
name = fields.Char(string='Patient ID', default=lambda self: _('New'))
title = fields.Selection([
('ms', 'Miss'),
('mister', 'Mister'),
('mrs', 'Mrs'),
], string='Title', default='mister', required=True)
emergency_contact = fields.Many2one(
'res.partner', string='Emergency Contact')
gender = fields.Selection(
[('m', 'Male'), ('f', 'Female'),
('ot', 'Other')], 'Gender', required=True)
dob = fields.Date(string='Date Of Birth', required=True)
age = fields.Char(string='Age', compute='compute_age')
blood_group = fields.Selection(
[('A+', 'A+ve'), ('B+', 'B+ve'), ('O+', 'O+ve'), ('AB+', 'AB+ve'),
('A-', 'A-ve'), ('B-', 'B-ve'), ('O-', 'O-ve'), ('AB-', 'AB-ve')],
'Blood Group')
visa_info = fields.Char(string='Visa Info', size=64)
id_proof_number = fields.Char(string='ID Proof Number')
note = fields.Text(string='Note')
date = fields.Datetime(string='Date Requested', default=lambda s: fields.Datetime.now(), invisible=True)
phone = fields.Char(string="Phone", required=True)
email = fields.Char(string="Email", required=True)
@api.multi
def compute_age(self):
for data in self:
if data.dob:
dob = fields.Datetime.from_string(data.dob)
date = fields.Datetime.from_string(data.date)
delta = relativedelta(date, dob)
data.age = str(delta.years) + ' years'
@api.model
def create(self, vals):
sequence = self.env['ir.sequence'].next_by_code('lab.patient')
vals['name'] = sequence or _('New')
result = super(LabPatient, self).create(vals)
return result
@api.onchange('patient')
def detail_get(self):
self.phone = self.patient.phone
self.email = self.patient.email

120
medical_lab_management/models/lab_request.py

@ -0,0 +1,120 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
import datetime
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
class LabRequest(models.Model):
_name = 'lab.request'
_inherit = ['mail.thread']
_rec_name = 'lab_request_id'
_description = 'Lab Request'
name = fields.Char(string='Lab Test', size=16, readonly=True, required=True, help="Lab result ID", default=lambda *a: '#')
lab_request_id = fields.Char(string='Appointment ID', help="Lab appointment ID")
app_id = fields.Many2one('lab.appointment', string='Appointment')
lab_requestor = fields.Many2one('lab.patient', string='Patient', required=True, select=True,
help='Patient Name')
test_request = fields.Many2one('lab.test', string='Test')
lab_requesting_date = fields.Datetime(string='Requested Date')
comment = fields.Text('Comment')
request_line = fields.One2many('lab.test.attribute', 'test_request_reverse', string="Test Lines")
state = fields.Selection([
('draft', 'Draft'),
('sample_collection', 'Sample Collected'),
('test_in_progress', 'Test In Progress'),
('completed', 'Completed'),
('cancel', 'Cancelled'),
], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft')
@api.model
def create(self, vals):
sequence = self.env['ir.sequence'].next_by_code('lab.request')
vals['name'] = sequence or '/'
return super(LabRequest, self).create(vals)
@api.multi
def set_to_sample_collection(self):
return self.write({'state': 'sample_collection'})
@api.multi
def set_to_test_in_progress(self):
return self.write({'state': 'test_in_progress'})
@api.multi
def cancel_lab_test(self):
return self.write({'state': 'cancel'})
@api.multi
def set_to_test_completed(self):
if not self.request_line:
raise ValidationError(_("No Result Lines Entered !"))
req_obj = self.env['lab.request'].search_count([('app_id', '=', self.app_id.id),
('id', '!=', self.id)])
req_obj_count = self.env['lab.request'].search_count([('app_id', '=', self.app_id.id),
('id', '!=', self.id),
('state', '=', 'completed')])
if req_obj == req_obj_count:
app_obj = self.env['lab.appointment'].search([('id', '=', self.app_id.id)])
app_obj.write({'state': 'completed'})
return self.write({'state': 'completed'})
@api.multi
def print_lab_test(self):
return self.env.ref('medical_lab_management.print_lab_test').report_action(self)
@api.multi
def lab_invoice_create(self):
invoice_obj = self.env["account.invoice"]
invoice_line_obj = self.env["account.invoice.line"]
for lab in self:
if lab.lab_requestor:
curr_invoice = {
'partner_id': lab.lab_requestor.patient.id,
'account_id': lab.lab_requestor.patient.property_account_receivable_id.id,
'state': 'draft',
'type': 'out_invoice',
'date_invoice': datetime.datetime.now(),
'origin': "Lab Test# : " + lab.name,
'target': 'new',
'lab_request': lab.id,
'is_lab_invoice': True
}
inv_ids = invoice_obj.create(curr_invoice)
inv_id = inv_ids.id
if inv_ids:
journal = self.env['account.journal'].search([('type', '=', 'sale')], limit=1)
prd_account_id = journal.default_credit_account_id.id
if lab.test_request:
curr_invoice_line = {
'name': "Charge for lab test",
'price_unit': lab.test_request.test_cost or 0,
'quantity': 1.0,
'account_id': prd_account_id,
'invoice_id': inv_id,
}
invoice_line_obj.create(curr_invoice_line)
self.write({'state': 'invoiced'})
form_view_ref = self.env.ref('account.invoice_form', False)
tree_view_ref = self.env.ref('account.invoice_tree', False)
return {
'domain': "[('id', '=', " + str(inv_id) + ")]",
'name': 'Lab Invoices',
'view_mode': 'form',
'res_model': 'account.invoice',
'type': 'ir.actions.act_window',
'views': [(tree_view_ref.id, 'tree'), (form_view_ref.id, 'form')],
}

23
medical_lab_management/models/lab_test_content_type.py

@ -0,0 +1,23 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from odoo import models, fields
class LabTestContentType(models.Model):
_name = 'lab.test.content_type'
_rec_name = 'content_type_name'
_description = "Content"
content_type_name = fields.Char(string="Name", required=True, help="Content type name")
content_type_code = fields.Char(string="Code")
parent_test = fields.Many2one('lab.test', string="Test Category")

31
medical_lab_management/models/lab_test_type.py

@ -0,0 +1,31 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from odoo import models, fields
class LabTestType(models.Model):
_name = 'lab.test'
_rec_name = 'lab_test'
_inherit = ['mail.thread']
lab_test = fields.Char(string="Test Name", required=True, help="Name of lab test ")
lab_test_code = fields.Char(string="Test Code", required=True)
test_lines = fields.One2many('lab.test.attribute', 'test_line_reverse', string="Attribute")
test_cost = fields.Integer(string="Cost", required=True)
class LabTestAttribute(models.Model):
_name = 'lab.test.attribute'
test_content = fields.Many2one('lab.test.content_type', string="Content")
result = fields.Char(string="Result")
unit = fields.Many2one('test.unit', string="Unit")
interval = fields.Char(string="Reference Intervals")
test_line_reverse = fields.Many2one('lab.test', string="Attribute")
test_request_reverse = fields.Many2one('lab.request', string="Request")

21
medical_lab_management/models/physician_speciality.py

@ -0,0 +1,21 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from odoo import models, fields
class PhysicianSpeciality(models.Model):
_name = 'physician.speciality'
_description = 'Medical Specialty'
code = fields.Char(string='ID')
name = fields.Char(string='Specialty', help='Name of the specialty', required=True)
_sql_constraints = [
('name_uniq', 'UNIQUE(name)', 'Name must be unique!'),
]

20
medical_lab_management/models/res_partner.py

@ -0,0 +1,20 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from odoo import models, fields
class ResPartnerPatient(models.Model):
_inherit = 'res.partner'
is_patient = fields.Boolean(string='Is Patient')
is_physician = fields.Boolean(string='Is Physician')
speciality = fields.Many2one('physician.speciality', string='Speciality')
hospital = fields.Many2one('res.partner', string='Hospital')

18
medical_lab_management/models/testing_unit.py

@ -0,0 +1,18 @@
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>)
#
##############################################################################
from odoo import models, fields
class TestingUnit(models.Model):
_name = 'test.unit'
_rec_name = 'code'
_description = "Test Unit"
unit = fields.Char(string="Unit", required=True)
code = fields.Char(string="code", required=True)

60
medical_lab_management/report/lab_patient_card.xml

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="report_patient_label">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<div class="page">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-2" style="margin:auto;">
</div>
<center>
<div class="col-xs-8" style="margin:auto">
<table class="table table-condensed" style="border: 3px solid black !important;">
<tr>
<td width="40%">
<p style="text-align:center;padding-top:10px;">
<img t-if="not o.patient_image" t-att-src="'/web/static/src/img/placeholder.png'" height="120" border="1" width="120"/>
<img t-if="o.patient_image" t-att-src="'data:image/png;base64,%s' %o.patient_image" height="120" border="1" width="120"/>
</p>
<p style="text-align:center;">
<strong><span t-field="o.patient.name"/></strong>
</p>
</td>
<td width="60%">
<table>
<tr>
<td>
<p style="text-align:right;padding-top:30px;"><strong>Patient ID : </strong></p>
<p style="text-align:right;"><strong>Sex : </strong></p>
<p style="text-align:right;"><strong>Age : </strong></p>
</td>
<td>
<p style="text-align:left;padding-top:30px;padding-left:10px;" t-field="o.name"/>
<t t-if="o.gender=='m'">
<p style="text-align:left;padding-left:10px;">Male</p>
</t>
<t t-if="o.gender=='ot'">
<p style="text-align:left;padding-left:10px;">Other</p>
</t>
<t t-if="o.gender=='f'">
<p style="text-align:left;padding-left:10px;">Female</p>
</t>
<p style="text-align:left;padding-left:10px;" t-field="o.age"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</center>
</div>
</div>
<p style="page-break-after:always"></p>
</t>
</t>
</template>
</data>
</odoo>

54
medical_lab_management/report/lab_test_report.xml

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_patient_labtest">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"> </t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"> </t>
</t>
<h3 style="text-decoration:underline;text-align:center;"><b>Lab Test Report</b></h3>
<br/>
<br/>
<table width="99%" style="margin-left:50px;margin-top:5px;border: None solid black;">
<tr>
<td style="width:50px;height:25px" ><span>Patient: </span><span t-att-style="style" t-esc="o.lab_requestor.patient.name"/></td>
<td style="width:50px;height:25px" ><span>Test : </span><span t-att-style="style" t-esc="o.test_request.lab_test"/></td>
<td style="width:50px;height:25px" ><span>Date: </span><span t-att-style="style" t-esc="o.lab_requesting_date"/></td>
</tr>
</table>
<br/>
<br/>
<br/>
<br/>
<table width="99%" style="border:1px solid black;padding-left:1.16cm;">
<thead>
<th style="border:1px solid black;text-align:center;" width="13%" class="td4">Content</th>
<th style="border:1px solid black;text-align:center;" width="13%" class="td4">Unit</th>
<th style="border:1px solid black;text-align:center;" width="13%" class="td4">Normal Range</th>
<th style="border:1px solid black;text-align:center;" width="13%" class="td4">Result</th>
</thead>
<tbody>
<t t-foreach="o.request_line" t-as="l">
<tr style="border:1px solid black">
<td style="border:1px solid black;text-align:center;"><span t-esc="l.test_content.content_type_name" style="font-size:16px;"/></td>
<td style="border:1px solid black;text-align:center;"><span t-esc="l.unit.code" style="font-size:16px;"/></td>
<td style="border:1px solid black;text-align:center;"><span t-esc="l.interval" style="font-size:16px;"/></td>
<td style="border:1px solid black;text-align:center;"><span t-esc="l.result" style="font-size:16px;"/></td>
</tr>
</t>
</tbody>
</table>
<br/>
<br/>
</div>
<p style="page-break-after:always"></p>
</t>
</t>
</template>
</data>
</openerp>

23
medical_lab_management/report/report.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<report
string="Lab Test Result"
id="print_lab_test"
model="lab.request"
report_type="qweb-pdf"
name="medical_lab_management.report_patient_labtest"
file="medical_lab_management.report_patient_labtest"
/>
<report
string="Patient Card"
id="action_report_patient_label"
model="lab.patient"
report_type="qweb-pdf"
name="medical_lab_management.report_patient_label"
file="medical_lab_management.report_patient_label"
/>
</data>
</odoo>

19
medical_lab_management/security/ir.model.access.csv

@ -0,0 +1,19 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_lab_request_user,lab.request,model_lab_request,group_lab_management_user,1,1,1,1
access_lab_patient_user,lab.patient,model_lab_patient,group_lab_management_user,1,1,1,1
access_lab_appointment_user,lab.appointment,model_lab_appointment,group_lab_management_user,1,1,1,1
access_test_unit_user,test.unit,model_test_unit,group_lab_management_user,1,0,0,0
access_lab_physician_user,physician.speciality,model_physician_speciality,group_lab_management_user,1,1,1,1
access_lab_test_user,lab.test,model_lab_test,group_lab_management_user,1,0,0,0
access_lab_appointment_line_user,lab.appointment.lines,model_lab_appointment_lines,group_lab_management_user,1,1,1,1
access_lab_test_content_type_user,lab.test.content_type,model_lab_test_content_type,group_lab_management_user,1,0,0,0
access_lab_test_attribute_user,lab.test.attribute,model_lab_test_attribute,group_lab_management_user,1,1,1,1
access_lab_request_technician,lab.request,model_lab_request,group_lab_management_technician,1,1,1,1
access_lab_patient_technician,lab.patient,model_lab_patient,group_lab_management_technician,1,1,1,1
access_lab_appointment_technician,lab.appointment,model_lab_appointment,group_lab_management_technician,1,1,1,1
access_test_unit_technician,test.unit,model_test_unit,group_lab_management_technician,1,1,1,1
access_lab_physician_technician,physician.speciality,model_physician_speciality,group_lab_management_technician,1,0,0,0
access_lab_test_technician,lab.test,model_lab_test,group_lab_management_technician,1,1,1,1
access_lab_test_content_type_technician,lab.test.content_type,model_lab_test_content_type,group_lab_management_technician,1,1,1,1
access_lab_appointment_line_technician,lab.appointment.lines,model_lab_appointment_lines,group_lab_management_technician,1,1,1,1
access_lab_test_attribute_technician,lab.test.attribute,model_lab_test_attribute,group_lab_management_technician,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_lab_request_user lab.request model_lab_request group_lab_management_user 1 1 1 1
3 access_lab_patient_user lab.patient model_lab_patient group_lab_management_user 1 1 1 1
4 access_lab_appointment_user lab.appointment model_lab_appointment group_lab_management_user 1 1 1 1
5 access_test_unit_user test.unit model_test_unit group_lab_management_user 1 0 0 0
6 access_lab_physician_user physician.speciality model_physician_speciality group_lab_management_user 1 1 1 1
7 access_lab_test_user lab.test model_lab_test group_lab_management_user 1 0 0 0
8 access_lab_appointment_line_user lab.appointment.lines model_lab_appointment_lines group_lab_management_user 1 1 1 1
9 access_lab_test_content_type_user lab.test.content_type model_lab_test_content_type group_lab_management_user 1 0 0 0
10 access_lab_test_attribute_user lab.test.attribute model_lab_test_attribute group_lab_management_user 1 1 1 1
11 access_lab_request_technician lab.request model_lab_request group_lab_management_technician 1 1 1 1
12 access_lab_patient_technician lab.patient model_lab_patient group_lab_management_technician 1 1 1 1
13 access_lab_appointment_technician lab.appointment model_lab_appointment group_lab_management_technician 1 1 1 1
14 access_test_unit_technician test.unit model_test_unit group_lab_management_technician 1 1 1 1
15 access_lab_physician_technician physician.speciality model_physician_speciality group_lab_management_technician 1 0 0 0
16 access_lab_test_technician lab.test model_lab_test group_lab_management_technician 1 1 1 1
17 access_lab_test_content_type_technician lab.test.content_type model_lab_test_content_type group_lab_management_technician 1 1 1 1
18 access_lab_appointment_line_technician lab.appointment.lines model_lab_appointment_lines group_lab_management_technician 1 1 1 1
19 access_lab_test_attribute_technician lab.test.attribute model_lab_test_attribute group_lab_management_technician 1 1 1 1

17
medical_lab_management/security/lab_users.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.module.category" id="module_category_lab_management">
<field name="name">Lab Management</field>
</record>
<record id="group_lab_management_technician" model="res.groups">
<field name="name">Lab Technician</field>
<field name="category_id" ref="module_category_lab_management"/>
</record>
<record id="group_lab_management_user" model="res.groups">
<field name="name">Lab User</field>
<field name="category_id" ref="module_category_lab_management"/>
</record>
</odoo>

BIN
medical_lab_management/static/description/app.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
medical_lab_management/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
medical_lab_management/static/description/card.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
medical_lab_management/static/description/content.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
medical_lab_management/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
medical_lab_management/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

474
medical_lab_management/static/description/index.html

@ -0,0 +1,474 @@
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-header-banner.png);background-repeat:no-repeat;background-size:100%;padding: 4% 0% 2% 15%;background-position-y: -107px;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="font-size: 35px;color: #fff;font-weight: 900;text-transform: uppercase;text-align: left;margin: 0;margin-bottom: 16px;">
Medical Lab Management
</h2>
<h3 class="oe_slogan" style="font-size: 25px;color: #fff;font-weight: 600;text-align: left;opacity: 1;margin: 0 !important;">
Manage Lab Activities
</h3>
<h5 class="oe_slogan" style="text-align: left;background: #fff;width: 293px;padding: 10px;color: #080808 !important;opacity: 1 !important;font-weight: 600;font-size: 20px;">
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">Cybrosys Technologies</a>
</h5>
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">
<div style="width: 215px;margin-left: 57%;text-align: center;background: #ffffff;height: 215px;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0 0 12px 4px #00000059;">
<img src="https://www.cybrosys.com/images/cybro-logo-oca.png" alt="cybrosys technologies" style="width: 180px;"/>
</div>
</a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 3% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Overview
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
This app helps the user to systematically perform the activities of a Medical Laboratory.
The app simplifies the activities like Patient Management, Appointment Management, Test Requests Management, Lab Results Management, and so on.
</h3>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-banner.png); background-repeat:no-repeat; background-size:cover;padding: 10% 0% 25% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Features
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Manage Patients
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Issue Patient Card
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Manage Referrals of Patients
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Manage Appointments
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Mail Notification For Appointments
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Manage Lab Requests
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Print Lab Test Result Of Patient
</h3>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-banner.png); background-repeat:no-repeat; background-size:cover;padding: 10% 0% 25% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Features
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Managing Documents of Employees
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Documents Types
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Expiry Date for Documents
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Validation for Expiry Date
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<img src="https://www.cybrosys.com/images/ico-tick.png">
Mail Notification Based on Expiry Date
</h3>
</div>
</section>
<section class="oe_container" style="padding: 3% 0% 0% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Screenshots
</h2>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div>
<img src="https://www.cybrosys.com/images/ico-tick.png">
Create patients.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-1.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div>
<img src="https://www.cybrosys.com/images/ico-tick.png">
Go to Laboratory -> Patient -> Print -> Patient Card.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-2.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Go to Laboratory -> Appointments->Create Appointments.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-3.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
When we confirm the appointment the appointment details will be sent through E-Mail.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-4.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Lab Request
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-5.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Lab Test Result
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-6.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Create invoice for lab test.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-7.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
You can see today's appointments here.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-8.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Go to Laboratory -> Configuration -> Lab test.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-9.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Go to Laboratory -> Configuration -> Test Contents.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-10.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
Go to Laboratory -> Configuration -> Testing Unit.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-11.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
We can add referral physician details.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-12.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><img src="https://www.cybrosys.com/images/ico-tick.png">
There are two type <users class=""></users>
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="lab-management-cybrosys-13.png" alt="" style="width: 95%;"/>
</div>
</div>
</section>
<section class="oe_container" style="padding: 7px 0% 0% 3%;">
<div class="oe_row oe_spaced">
<a style="color: #080808 !important;" href="https://apps.odoo.com/apps/modules/browse?search=cybrosys" target="_blank"><img src="https://www.cybrosys.com/images/view-more-apps.jpg" alt="cybrosys technologies" style="width: 100%;margin-bottom: 50px;"/></a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Services
</h2>
<div style="display:flex;padding-top: 20px;justify-content: space-between;">
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-customization.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
Odoo Customization
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-implementation.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
Odoo Implementation </a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-integration.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
Odoo Integration
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-support.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
Odoo Support</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
<img src="https://www.cybrosys.com/images/hire-odoo-developer.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
Hire Odoo Developers</a>
</h3>
</a>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Industries
</h2>
<div style="display:flex;justify-content: space-between;flex-wrap:wrap;">
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
Trading
</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easily procure and sell your products.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-2.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
Manufacturing</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Plan, track and schedule your operations.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
Restaurant</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Run your bar or restaurant methodical.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
POS</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easy configuring and convivial selling.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
E-commerce & Website</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Mobile friendly, awe-inspiring product pages.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
Hotel Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
An all-inclusive hotel management application.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
Education</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
A Collaborative platform for educational management.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
Service Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Keep track of services and invoice accordingly.
</h3>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-footer-bg.png); background-repeat:no-repeat; background-size:100%;padding: 13% 0% 6% 0%;">
<div class="oe_slogan" style="margin-top:10px !important;margin-bottom: 0px;">
<div>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="mailto:odoo@cybrosys.com"><i class="fa fa-envelope"></i> Email us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-phone"></i> Contact Us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px; ;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
</div>
</div>
</section>

BIN
medical_lab_management/static/description/invoice.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
medical_lab_management/static/description/lab-management-cybrosys-9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
medical_lab_management/static/description/mail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
medical_lab_management/static/description/patient.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
medical_lab_management/static/description/phy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
medical_lab_management/static/description/request1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
medical_lab_management/static/description/request2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
medical_lab_management/static/description/result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
medical_lab_management/static/description/test.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
medical_lab_management/static/description/today.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
medical_lab_management/static/description/unit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
medical_lab_management/static/description/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

30
medical_lab_management/views/account_invoice.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="lab_invoice_cust_invoice_view" model="ir.ui.view">
<field name="name">account.invoice.cust.invoice_form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date_invoice']" position="after">
<field name="is_lab_invoice" invisible="1"/>
<field name="lab_request" />
</xpath>
</field>
</record>
<record id="lab_invoice_cust_invoice_filter_view" model="ir.ui.view">
<field name="name">account.invoice.cust.invoice_filter_form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="after">
<field name="lab_request"/>
</xpath>
<xpath expr="//group/filter[@name='status']" position="after">
<filter string="Appointment" domain="[]" context="{'group_by':'lab_request'}"/>
</xpath>
</field>
</record>
</data>
</odoo>

232
medical_lab_management/views/lab_appointment.xml

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record model="ir.actions.act_window" id="lab_invoice_action">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban,calendar,graph,pivot</field>
<field name="view_id" ref="account.invoice_tree"/>
<field name="domain">[('is_lab_invoice','=',True)]</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Invoices.
</p>
</field>
</record>
<record id="lab_invoice_action_view_tree" model="ir.actions.act_window.view">
<field name="sequence">1</field>
<field name="view_mode">tree</field>
<field name="act_window_id" ref="medical_lab_management.lab_invoice_action"/>
</record>
<record id="lab_invoice_view_form" model="ir.actions.act_window.view">
<field name="sequence">2</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account.invoice_form"/>
<field name="act_window_id" ref="medical_lab_management.lab_invoice_action"/>
</record>
<record model="ir.ui.view" id="kanban_view_lab_appointment">
<field name="name">Appointment Kanban</field>
<field name="model">lab.appointment</field>
<field name="arch" type="xml">
<kanban>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="oe_kanban_details">
<strong>
<ul>
<li>Name :<field name="patient_id"/></li>
<li>Lab Request ID :<field name="name"/></li>
<li>Appointment Date :<field name="appointment_date"/></li>
</ul>
</strong>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_lab_appointment_tree" model="ir.ui.view">
<field name="name">lab.appointment.tree</field>
<field name="model">lab.appointment</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Appointments" colors="blue:state in ('sample_collection','test_in_progress');black:state == 'draft';gray:state in ('invoiced','cancelled');green:state == 'completed'">
<field name="patient_id" />
<field name="name" />
<field name="state" />
</tree>
</field>
</record>
<record id="view_lab_appointment_form" model="ir.ui.view">
<field name="name">lab.appointment.form</field>
<field name="model">lab.appointment</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Appointment">
<header>
<button name="confirm_appointment" states="draft" string="Confirm" type="object" class="oe_highlight" />
<button name="action_request" states="confirm" string="Request Lab" type="object" class="oe_highlight" />
<button name="create_invoice" states="completed" string="Create Invoice" type="object" class="oe_highlight"/>
<button name="cancel_appointment" states="draft,confirm" string="Cancelled" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,request_lab,completed,to_invoice,invoiced"
/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="%(act_open_lab_request_view)d"
type="action"
class="oe_stat_button"
icon="fa-building-o"
context = "{'search_default_app_id': [active_id]}"
attrs="{'invisible': [('request_count', '=', 0)]}">
<field name="request_count" widget="statinfo" string="Lab Requests"/>
</button>
<button name="%(lab_invoice_action)d"
type="action"
class="oe_stat_button"
icon="fa-pencil-square-o"
context = "{'search_default_lab_request': [active_id]}"
attrs="{'invisible': [('inv_count', '=', 0)]}">
<field name="inv_count" widget="statinfo" string="Lab Invoice"/>
</button>
</div>
<group>
<group col="4" colspan="4">
<field name="patient_id" />
<field name="priority" widget="priority"/>
<field name="name" />
<field name="date" />
<field name="appointment_date" />
<field name="physician_id" domain="[('is_physician','=',True)]" context="{'search_default_is_physician':1, 'default_is_physician':1}"/>
</group>
</group>
<notebook colspan="4">
<page string="Lab Requests">
<field name="appointment_lines">
<tree string="Lab Request" editable="bottom">
<field name="lab_test"/>
<field name="cost"/>
</tree>
</field>
</page>
<page name="Note"
string="Note">
<field name="comment"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_lab_appointment_search" model="ir.ui.view">
<field name="name">lab.appointment.search</field>
<field name="model">lab.appointment</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<search string="Appointment">
<field name="patient_id" />
<field name="date" />
<field name="name" />
<field name="physician_id" />
<newline />
<group expand="0" string="Group By...">
<filter name="patient_id" string="Patient"
domain="[]" context="{'group_by':'patient_id'}" />
<filter name="date" string="Date"
domain="[]" context="{'group_by':'date'}" />
<filter name="appointment_date" string="Appointment date"
domain="[]" context="{'group_by':'appointment_date'}" />
<filter name="physician_id" string="Physician"
domain="[]" context="{'group_by':'physician_id'}" />
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_appointment_view">
<field name="name">Appointments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.appointment</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban</field>
<field name="search_view_id" ref="view_lab_appointment_search" />
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Appointments.
</p>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_appointment_view_2">
<field name="name">Appointments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.appointment</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_lab_appointment_search" />
<field name="domain">[('appointment_date', '&gt;=',((datetime.date.today()- datetime.timedelta(days=0)).strftime('%Y-%m-%d 00:00:00'))),
('appointment_date', '&lt;=',((datetime.date.today()- datetime.timedelta(days=0)).strftime('%Y-%m-%d 23:59:59')))]
</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Appointments.
</p>
</field>
</record>
<record model="ir.sequence" id="seq_lab_appointment">
<field name="name">Appointment </field>
<field name="code">lab.appointment</field>
<field name="prefix">ID</field>
<field name="padding">3</field>
<field name="company_id" eval="False" />
</record>
<menuitem id="menu_lab_appointment" name="Appointments" sequence="11"
parent="menu_root_lab"/>
<menuitem id="menu_lab_appointment_child" name="Appointments" sequence="10"
parent="menu_lab_appointment" action="act_open_lab_appointment_view"/>
<menuitem id="menu_lab_appointment_child_2" name=" Today's Appointments" sequence="11"
parent="menu_lab_appointment" action="act_open_lab_appointment_view_2"/>
<record id="view_lab_patient_form_inherit" model="ir.ui.view">
<field name="name">lab.patient.form</field>
<field name="model">lab.patient</field>
<field name="inherit_id" ref="medical_lab_management.view_lab_patient_form" />
<field name="arch" type="xml">
<data>
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(act_open_lab_appointment_view)d"
type="action"
class="oe_stat_button"
icon="fa-building-o"
context = "{'search_default_patient_id': [active_id], 'default_patient_id':[active_id]}" >
<field name="app_count" widget="statinfo" string="Appointments"/>
</button>
</xpath>
</data>
</field>
</record>
</data>
</odoo>

158
medical_lab_management/views/lab_patient_view.xml

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<menuitem id="menu_root_lab" name="Laboratory" sequence="40"/>
<record model="ir.ui.view" id="kanban_view_patient">
<field name="name">Patient Kanban</field>
<field name="model">lab.patient</field>
<field name="arch" type="xml">
<kanban>
<field name='id'/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
<img t-att-src="kanban_image('lab.patient', 'patient_image', record.id.value)"/>
</div>
<div class="oe_kanban_details">
<strong>
<ul>
<li>Name :<field name="patient"/></li>
<li>Patient ID :<field name="name"/></li>
</ul>
</strong>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_lab_patient_tree" model="ir.ui.view">
<field name="name">lab.patient.tree</field>
<field name="model">lab.patient</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Patient">
<field name="title" />
<field name="patient" />
<field name="name" />
<field name="phone"/>
<field name="email"/>
</tree>
</field>
</record>
<record id="view_lab_patient_form" model="ir.ui.view">
<field name="name">lab.patient.form</field>
<field name="model">lab.patient</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Patient">
<sheet>
<div class="oe_button_box" name="button_box">
</div>
<field name="patient_image" widget="image" class="oe_avatar"/>
<div name="title_name" class="oe_title">
<h3>
<field name="title"
style="width: 30%%" />
</h3>
<h1>
<table>
<tr>
<td>
<field name="patient"
required="1"
placeholder="FullName"
style="padding-right:10px"
domain="[('is_patient','=',True)]" context="{'search_default_is_patient':1, 'default_is_patient':1, 'default_customer':1}"
/>
</td>
</tr>
</table>
</h1>
</div>
<group>
<group>
<field name="name" />
<field name="gender" />
<field name="dob" />
<field name="age"/>
<field name="phone"/>
</group>
<group>
<field name="visa_info"/>
<field name="id_proof_number"/>
<field name="date" invisible="1"/>
<field name="blood_group"/>
<field name="email"/>
</group>
</group>
<notebook>
<page string="Note">
<group>
<field name="note"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_lab_patient_search" model="ir.ui.view">
<field name="name">lab.patient.search</field>
<field name="model">lab.patient</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<search string="Patient">
<field name="patient" />
<field name="blood_group" />
<field name="name" />
<newline />
<group expand="0" string="Group By...">
<filter name="blood_group" string="Blood Group"
domain="[]" context="{'group_by':'blood_group'}" />
<filter name="name" string="Patient ID"
domain="[]" context="{'group_by':'name'}" />
<filter name="patient" string="Patient"
domain="[]" context="{'group_by':'patient'}" />
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_patient_view">
<field name="name">Patients</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.patient</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="view_lab_patient_search" />
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Patients.
</p>
</field>
</record>
<record model="ir.sequence" id="seq_lab_patient">
<field name="name">Patient</field>
<field name="code">lab.patient</field>
<field name="prefix">PID</field>
<field name="padding">3</field>
<field name="company_id" eval="False" />
</record>
<menuitem id="menu_lab_patient" name="Patient" sequence="10"
parent="menu_root_lab"/>
<menuitem id="menu_lab_patient_child" name="Patient" sequence="10"
parent="menu_lab_patient" action="act_open_lab_patient_view"/>
</data>
</odoo>

119
medical_lab_management/views/lab_request.xml

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="view_lab_request_tree" model="ir.ui.view">
<field name="name">lab.request.tree</field>
<field name="model">lab.request</field>
<field name="arch" type="xml">
<tree string="Lab Request" colors="green:state in ('sample_collection','test_in_progress');black:state == 'completed';gray:state == 'cancelled';blue:state == 'draft'">
<field name="name" />
<field name="lab_requestor" />
<field name="lab_request_id" />
<field name="test_request" />
<field name="state" />
</tree>
</field>
</record>
<record id="view_lab_reques_form" model="ir.ui.view">
<field name="name">lab.request.form</field>
<field name="model">lab.request</field>
<field name="arch" type="xml">
<form string="Lab Request">
<header>
<button name="set_to_sample_collection" states="draft" string="Sample Collection" type="object" class="oe_highlight"/>
<button name="set_to_test_in_progress" states="sample_collection" string="Test In Progress" type="object" class="oe_highlight"/>
<button name="set_to_test_completed" states="test_in_progress" string="Complete Test" type="object" class="oe_highlight"/>
<button name="print_lab_test" states="completed,invoiced" string="Print Lab Test" type="object" class="oe_highlight"/>
<button name="cancel_lab_test" states="draft" string="Cancel" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,sample_collection,test_in_progress,completed" statusbar_colors='{"Completed":"blue","Test In Progress":"red","Invoiced":"grey"}'/>
</header>
<sheet>
<div class="oe_left" style="width: 500px;">
<div class="oe_title" style="width: 390px;">
<label class="oe_edit_only" for="name"/>
<h1><field name="name" class="oe_inline"/></h1>
</div>
</div>
<group>
<group col="4" colspan="4">
<field name="lab_requestor" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="lab_request_id"/>
<field name="lab_requesting_date" />
<field name="test_request"/>
<field name="app_id" invisible="1"/>
</group>
</group>
<notebook colspan="4">
<page string="Test lines">
<field name="request_line">
<tree string="Test lines" editable="bottom">
<field name="test_content" />
<field name="unit"/>
<field name="interval"/>
<field name="result"/>
</tree>
</field>
</page>
<page name="Note"
string="Note">
<field name="comment"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_lab_requester_search" model="ir.ui.view">
<field name="name">lab.request.search</field>
<field name="model">lab.request</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<search string="Lab Request">
<field name="lab_requestor" />
<field name="lab_request_id" />
<field name="app_id" />
<newline />
<group expand="0" string="Group By...">
<filter name="lab_requestor" string="Patient"
domain="[]" context="{'group_by':'lab_requestor'}" />
<filter name="lab_request_id" string="Date"
domain="[]" context="{'group_by':'lab_request_id'}" />
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_request_view">
<field name="name">Lab Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.request</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_lab_requester_search" />
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Lab request.
</p>
</field>
</record>
<record model="ir.sequence" id="seq_lab_request">
<field name="name">Lab Request</field>
<field name="code">lab.request</field>
<field name="prefix">LR</field>
<field name="padding">3</field>
<field name="company_id" eval="False" />
</record>
<menuitem id="menu_lab_request" name="Lab Request" sequence="12"
parent="menu_root_lab"/>
<menuitem id="menu_lab_request_child" name="Lab Request" sequence="10"
parent="menu_lab_request" action="act_open_lab_request_view"/>
</data>
</odoo>

72
medical_lab_management/views/lab_test_content_type.xml

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="view_lab_content_tree" model="ir.ui.view">
<field name="name">lab.test.content_type.tree</field>
<field name="model">lab.test.content_type</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Contents">
<field name="content_type_name" />
<field name="content_type_code" />
</tree>
</field>
</record>
<record id="view_lab_content_form" model="ir.ui.view">
<field name="name">lab.test.content_type.form</field>
<field name="model">lab.test.content_type</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Contents">
<sheet>
<group>
<group col="4" colspan="4">
<field name="content_type_name" />
<field name="content_type_code" />
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_lab_content_search" model="ir.ui.view">
<field name="name">lab.test.content_type.search</field>
<field name="model">lab.test.content_type</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<search string="Test Content">
<field name="content_type_name" />
<field name="content_type_code" />
<newline />
<group expand="0" string="Group By...">
<filter name="content_type_name" string="Content"
domain="[]" context="{'group_by':'content_type_name'}" />
<filter name="content_type_code" string="Content Code"
domain="[]" context="{'group_by':'content_type_code'}" />
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_content_view">
<field name="name">Test Contents</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.test.content_type</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="search_view_id" ref="view_lab_content_search" />
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Test Contents.
</p>
</field>
</record>
<menuitem id="menu_lab_content" name="Test Content" sequence="10"
parent="configuration_id" action="act_open_lab_content_view"/>
</data>
</odoo>

102
medical_lab_management/views/lab_test_type.xml

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="view_lab_test_tree" model="ir.ui.view">
<field name="name">lab.test.tree</field>
<field name="model">lab.test</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Lab Test">
<field name="lab_test" />
<field name="lab_test_code" />
<field name="test_cost" />
</tree>
</field>
</record>
<record id="view_lab_test_form" model="ir.ui.view">
<field name="name">lab.test.form</field>
<field name="model">lab.test</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Lab Test">
<sheet>
<group>
<group col="4" colspan="4">
<field name="lab_test" />
<field name="lab_test_code"/>
<field name="test_cost" />
</group>
</group>
<notebook>
<page string="Lab Test Type" style="overflow-x:scroll;">
<group>
<field name="test_lines" nolabel="1">
<tree string="Lab Test Type" editable="bottom">
<field name="test_content" />
<field name="unit"/>
<field name="interval"/>
</tree>
</field>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_lab_test_search" model="ir.ui.view">
<field name="name">lab.test.search</field>
<field name="model">lab.test</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<search string="Lab Test">
<field name="lab_test" />
<newline />
<group expand="0" string="Group By...">
<filter name="lab_test" string="Test"
domain="[]" context="{'group_by':'lab_test'}" />
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_test_view">
<field name="name">Lab Test</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.test</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_lab_test_search" />
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Lab Tests.
</p>
</field>
</record>
<menuitem id="menu_lab_test" name="Lab Test" sequence="1"
parent="configuration_id" action="act_open_lab_test_view"/>
<record id="view_lab_test_attribute_form" model="ir.ui.view">
<field name="name">lab.test.attribute.form</field>
<field name="model">lab.test.attribute</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Lab Test Type Attribute">
<group>
<group col="4" colspan="4">
<field name="test_content" />
<field name="result"/>
<field name="unit" />
<field name="interval"/>
</group>
</group>
</form>
</field>
</record>
</data>
</odoo>

25
medical_lab_management/views/physician_details.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.actions.act_window" id="action_physician">
<field name="name">Physician</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('is_physician','=',1)]</field>
<field name="context">{'default_customer':0, 'default_supplier':0 , 'default_is_physician':1}</field>
<field name="filter" eval="True"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add physician.
</p>
</field>
</record>
<menuitem id="menu_physician" name="Referrals From" sequence="18"
parent="menu_root_lab"/>
<menuitem id="menu_physician_child" name="Physician" sequence="1"
parent="menu_physician" action="action_physician"/>
</data>
</odoo>

18
medical_lab_management/views/physician_specialty.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="physician_speciality_view_form" model="ir.ui.view">
<field name="name">physician.speciality.form</field>
<field name="model">physician.speciality</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Specialty">
<group>
<field name="code" />
<field name="name" />
</group>
</form>
</field>
</record>
</data>
</odoo>

22
medical_lab_management/views/res_partner.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="view_res_partner_inherit" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Lab" groups="base.group_user">
<group>
<field name="is_patient"/>
<field name="is_physician"/>
<field name="speciality" attrs="{'invisible': [('is_physician', '=', False)]}"/>
<field name="hospital" attrs="{'invisible': [('is_physician', '=', False)]}"/>
</group>
</page>
</notebook>
</field>
</record>
</data>
</odoo>

72
medical_lab_management/views/test_unit_view.xml

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="view_test_unit_tree" model="ir.ui.view">
<field name="name">test.unit.tree</field>
<field name="model">test.unit</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<tree string="Test Unit">
<field name="unit" />
<field name="code" />
</tree>
</field>
</record>
<record id="view_test_unit_form" model="ir.ui.view">
<field name="name">test.unit.form</field>
<field name="model">test.unit</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<form string="Test Unit">
<sheet>
<group>
<group>
<field name="unit" />
</group>
<group>
<field name="code" />
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_test_unit_search" model="ir.ui.view">
<field name="name">test.unit.search</field>
<field name="model">test.unit</field>
<field name="priority" eval="8" />
<field name="arch" type="xml">
<search string="Testing Unit">
<field name="unit" />
<group expand="0" string="Group By...">
<filter name="unit" string="Blood Group"></filter>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_test_unit_view">
<field name="name">Testing Units</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">test.unit</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_test_unit_search" />
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Testing Units.
</p>
</field>
</record>
<menuitem id="configuration_id"
name="Configuration"
parent="menu_root_lab"
sequence="100"/>
<menuitem name="Testing Unit"
id="test_unit_conf"
parent="configuration_id"
action="act_open_test_unit_view"
sequence="20" />
</data>
</odoo>
Loading…
Cancel
Save