-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] dental: enhance patient module and portal views
- Added DentalPortal controller for managing dental records via the portal. - Implemented routes for patient details, medical history, medical aid, and dental history. - Updated `portal_my_home` with a dedicated Dental section for easy access. - Enhanced templates for a user-friendly experience in managing and viewing dental records.
- Loading branch information
Showing
44 changed files
with
603 additions
and
942 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,87 @@ | ||
from odoo import models, fields,api | ||
from odoo import models, fields | ||
from datetime import date | ||
|
||
class DentalMedicalHistory(models.Model): | ||
|
||
class DentalPatientHistory(models.Model): | ||
_name = 'dental.medical.history' | ||
_description = 'Dental Medical History' | ||
_description = 'Dental Patient History' | ||
|
||
history_id = fields.Many2one('dental.patient', string="History") | ||
name = fields.Char(string="Name", store=True) | ||
patient_id = fields.Many2one('dental.patient', string="Patient", required=True) | ||
responsible_id = fields.Many2one('res.users', string="Responsible", default=lambda self: self.env.user) | ||
date = fields.Date(string="Date", default=date.today()) | ||
name = fields.Char(string="Title", required=True) | ||
description = fields.Text(string="Description") | ||
did_not_attend = fields.Boolean(string="Did not attend", required=True) | ||
company_id = fields.Many2one('res.company', string="Company", default=lambda self: self.env.company) | ||
patient_id = fields.Many2one('dental.patient', string="Patient", required=True) | ||
date = fields.Date(string="Date", default=date.today(), required=True) | ||
main_complaint = fields.Text(string="Main Complaint") | ||
teeth_history = fields.Text(string="History") | ||
history = fields.Text(string="History") | ||
company_id = fields.Many2one('res.company', string='Company') | ||
did_not_attend = fields.Boolean(string="Did Not Attend") | ||
tags = fields.Char(string="Tags") | ||
|
||
xray_file_1 = fields.Binary(string="X-ray File 1") | ||
xray_file_2 = fields.Binary(string="X-ray File 2") | ||
clear_aligner_file_1 = fields.Binary(string="Clear Aligner File 1") | ||
clear_aligner_file_2 = fields.Binary(string="Clear Aligner File 2") | ||
|
||
habits = fields.Text(string="Habits") | ||
extra_oral_observation = fields.Text(string="Extra-Oral Observation") | ||
xray_file_1 = fields.Image(string="X-ray file 1") | ||
xray_file_2 = fields.Image(string="X-ray file 2") | ||
clear_align_file_1 = fields.Binary(string="Clear Aligner File 1") | ||
clear_align_file_2 = fields.Binary(string="Clear Aligner File 2") | ||
|
||
|
||
# Billing Fileds | ||
|
||
teeth_chart = fields.Char(string="Teeth Chart") | ||
|
||
treatment_notes = fields.Text(string="Treatment Notes") | ||
|
||
consultation_type = fields.Selection([ | ||
('full', 'Full consultation with bite-wings and scan'), | ||
('basic', 'Basic consultation'), | ||
('none', 'No consultation') | ||
('full_consultation', 'Full Consultation with Bitewings and Scan'), | ||
('basic_consultation', 'Basic Consultation'), | ||
('no_consultation', 'No Consultation') | ||
], string="Consultation Type") | ||
|
||
call_out = fields.Boolean(string="Call Out") | ||
scale_and_polish = fields.Boolean(string="Scale and Polish") | ||
fluoride = fields.Boolean(string="Fluoride") | ||
|
||
filling_description = fields.Text(string="Filling Description") | ||
|
||
aligner_delivery = fields.Boolean(string="Aligner delivery and attachment placed") | ||
aligner_delivery = fields.Boolean( | ||
string="Aligner Delivery and Attachment Placed") | ||
whitening = fields.Boolean(string="Whitening") | ||
fissure_sealant_qty = fields.Float(string="Fissure Sealant - Quantity", digits=(6, 2)) | ||
|
||
fissure_sealant_qty = fields.Float( | ||
string="Fissure Sealant Quantity", digits=(6, 2)) | ||
|
||
attachments_removed = fields.Boolean(string="Attachments Removed") | ||
aligner_follow_up_scan = fields.Boolean(string="Aligner Follow-up Scan") | ||
aligner_followup_scan = fields.Boolean(string="Aligner Follow-up Scan") | ||
|
||
other_description = fields.Text(string="Other") | ||
notes = fields.Text(string="Notes") | ||
other_notes = fields.Text(string="Other Notes") | ||
upper_18_staining = fields.Boolean(string='18 Staining') | ||
upper_17_staining = fields.Boolean(string='17 Staining') | ||
upper_16_staining = fields.Boolean(string='16 Staining') | ||
upper_15_staining = fields.Boolean(string='15 Staining') | ||
upper_14_staining = fields.Boolean(string='14 Staining') | ||
upper_13_staining = fields.Boolean(string='13 Staining') | ||
upper_12_staining = fields.Boolean(string='12 Staining') | ||
upper_11_staining = fields.Boolean(string='11 Staining') | ||
upper_28_staining = fields.Boolean(string='28 Staining') | ||
upper_27_staining = fields.Boolean(string='27 Staining') | ||
upper_26_staining = fields.Boolean(string='26 Staining') | ||
upper_25_staining = fields.Boolean(string='25 Staining') | ||
upper_24_staining = fields.Boolean(string='24 Staining') | ||
upper_23_staining = fields.Boolean(string='23 Staining') | ||
upper_22_staining = fields.Boolean(string='22 Staining') | ||
upper_21_staining = fields.Boolean(string='21 Staining') | ||
lower_31_staining = fields.Boolean(string='31 Staining') | ||
lower_32_staining = fields.Boolean(string='32 Staining') | ||
lower_33_staining = fields.Boolean(string='33 Staining') | ||
lower_34_staining = fields.Boolean(string='34 Staining') | ||
lower_35_staining = fields.Boolean(string='35 Staining') | ||
lower_36_staining = fields.Boolean(string='36 Staining') | ||
lower_37_staining = fields.Boolean(string='37 Staining') | ||
lower_38_staining = fields.Boolean(string='38 Staining') | ||
lower_41_staining = fields.Boolean(string='41 Staining') | ||
lower_42_staining = fields.Boolean(string='42 Staining') | ||
lower_43_staining = fields.Boolean(string='43 Staining') | ||
lower_44_staining = fields.Boolean(string='44 Staining') | ||
lower_45_staining = fields.Boolean(string='45 Staining') | ||
lower_46_staining = fields.Boolean(string='46 Staining') | ||
lower_47_staining = fields.Boolean(string='47 Staining') | ||
lower_48_staining = fields.Boolean(string='48 Staining') | ||
|
||
@api.depends('patient_id', 'date') | ||
def _compute_name(self): | ||
for record in self: | ||
record.name = f"{record.patient_id.name} - {record.date}" if record.patient_id and record.date else "New History" | ||
notes = fields.Text(string="Additional Notes") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
from odoo import models, fields | ||
|
||
|
||
class Habits(models.Model): | ||
_name = 'dental.habit.substance.abuse' | ||
_description = 'Habits' | ||
_inherit = ['mail.thread', 'mail.activity.mixin'] | ||
_order = 'sequence, name' | ||
|
||
sequence = fields.Integer(string="Sequence") | ||
name = fields.Char(string="Name") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.