diff --git a/healthcare/healthcare/doctype/medical_code/__init__.py b/healthcare/healthcare/doctype/code_system/__init__.py similarity index 100% rename from healthcare/healthcare/doctype/medical_code/__init__.py rename to healthcare/healthcare/doctype/code_system/__init__.py diff --git a/healthcare/healthcare/doctype/medical_code/medical_code.js b/healthcare/healthcare/doctype/code_system/code_system.js similarity index 77% rename from healthcare/healthcare/doctype/medical_code/medical_code.js rename to healthcare/healthcare/doctype/code_system/code_system.js index 0422d77435..d93c317f86 100644 --- a/healthcare/healthcare/doctype/medical_code/medical_code.js +++ b/healthcare/healthcare/doctype/code_system/code_system.js @@ -1,5 +1,5 @@ // Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.ui.form.on('Medical Code', { +frappe.ui.form.on('Code System', { }); diff --git a/healthcare/healthcare/doctype/code_system/code_system.json b/healthcare/healthcare/doctype/code_system/code_system.json new file mode 100644 index 0000000000..7f14803da0 --- /dev/null +++ b/healthcare/healthcare/doctype/code_system/code_system.json @@ -0,0 +1,152 @@ +{ + "actions": [], + "allow_import": 1, + "autoname": "field:code_system", + "creation": "2017-06-21 13:07:00.463176", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "disabled", + "section_break_zyqx", + "code_system", + "uri", + "description", + "column_break_ijhv", + "is_fhir_defined", + "oid" + ], + "fields": [ + { + "allow_in_quick_entry": 1, + "fieldname": "uri", + "fieldtype": "Data", + "in_list_view": 1, + "label": "URI", + "no_copy": 1, + "reqd": 1, + "unique": 1 + }, + { + "depends_on": "eval:!doc.is_fhir_defined", + "fieldname": "oid", + "fieldtype": "Data", + "label": "OID", + "mandatory_depends_on": "eval:!doc.is_fhir_defined", + "no_copy": 1, + "read_only_depends_on": "eval:doc.is_fhir_defined", + "unique": 1 + }, + { + "allow_in_quick_entry": 1, + "fieldname": "description", + "fieldtype": "Small Text", + "label": "Description" + }, + { + "fieldname": "column_break_ijhv", + "fieldtype": "Column Break" + }, + { + "allow_in_quick_entry": 1, + "fieldname": "code_system", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Code System", + "reqd": 1, + "unique": 1 + }, + { + "default": "0", + "depends_on": "eval:!doc.__islocal", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled", + "search_index": 1 + }, + { + "fieldname": "section_break_zyqx", + "fieldtype": "Section Break" + }, + { + "allow_in_quick_entry": 1, + "default": "1", + "fieldname": "is_fhir_defined", + "fieldtype": "Check", + "in_list_view": 1, + "label": "Is FHIR Defined", + "no_copy": 1 + } + ], + "links": [ + { + "link_doctype": "Code Value", + "link_fieldname": "code_system" + } + ], + "modified": "2023-11-04 15:05:21.980203", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Code System", + "naming_rule": "By fieldname", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Physician", + "share": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Nursing User", + "share": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Healthcare Administrator", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "restrict_to_domain": "Healthcare", + "search_fields": "code_system, uri", + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "title_field": "code_system", + "track_changes": 1 +} \ No newline at end of file diff --git a/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.py b/healthcare/healthcare/doctype/code_system/code_system.py similarity index 84% rename from healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.py rename to healthcare/healthcare/doctype/code_system/code_system.py index c6558823b9..461232c9dc 100644 --- a/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.py +++ b/healthcare/healthcare/doctype/code_system/code_system.py @@ -6,5 +6,5 @@ from frappe.model.document import Document -class MedicalCodeStandard(Document): +class CodeSystem(Document): pass diff --git a/healthcare/healthcare/doctype/medical_code/test_medical_code.py b/healthcare/healthcare/doctype/code_system/test_code_system.py similarity index 81% rename from healthcare/healthcare/doctype/medical_code/test_medical_code.py rename to healthcare/healthcare/doctype/code_system/test_code_system.py index eaeb1cd744..d1af90f133 100644 --- a/healthcare/healthcare/doctype/medical_code/test_medical_code.py +++ b/healthcare/healthcare/doctype/code_system/test_code_system.py @@ -6,5 +6,5 @@ from frappe.tests.utils import FrappeTestCase -class TestMedicalCode(FrappeTestCase): +class TestCodeSystem(FrappeTestCase): pass diff --git a/healthcare/healthcare/doctype/medical_code_standard/__init__.py b/healthcare/healthcare/doctype/code_value/__init__.py similarity index 100% rename from healthcare/healthcare/doctype/medical_code_standard/__init__.py rename to healthcare/healthcare/doctype/code_value/__init__.py diff --git a/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.js b/healthcare/healthcare/doctype/code_value/code_value.js similarity index 73% rename from healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.js rename to healthcare/healthcare/doctype/code_value/code_value.js index 4bf6d3ea16..708e3b4d7a 100644 --- a/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.js +++ b/healthcare/healthcare/doctype/code_value/code_value.js @@ -1,5 +1,5 @@ // Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.ui.form.on('Medical Code Standard', { +frappe.ui.form.on('Code Value', { }); diff --git a/healthcare/healthcare/doctype/code_value/code_value.json b/healthcare/healthcare/doctype/code_value/code_value.json new file mode 100644 index 0000000000..59263ed6cb --- /dev/null +++ b/healthcare/healthcare/doctype/code_value/code_value.json @@ -0,0 +1,140 @@ +{ + "actions": [], + "allow_import": 1, + "creation": "2017-06-21 13:02:56.122897", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "section_break_mygg", + "code_system", + "system_uri", + "code_value", + "display", + "column_break_cmkw", + "definition" + ], + "fields": [ + { + "allow_in_quick_entry": 1, + "fieldname": "code_system", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Code System", + "options": "Code System", + "reqd": 1, + "search_index": 1 + }, + { + "allow_in_quick_entry": 1, + "fieldname": "display", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Display", + "no_copy": 1, + "search_index": 1 + }, + { + "fieldname": "column_break_cmkw", + "fieldtype": "Column Break", + "no_copy": 1 + }, + { + "allow_in_quick_entry": 1, + "bold": 1, + "fieldname": "definition", + "fieldtype": "Small Text", + "ignore_xss_filter": 1, + "in_list_view": 1, + "label": "Definition", + "no_copy": 1 + }, + { + "fieldname": "section_break_mygg", + "fieldtype": "Section Break" + }, + { + "allow_in_quick_entry": 1, + "fieldname": "code_value", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Code Value", + "no_copy": 1, + "reqd": 1, + "unique": 1 + }, + { + "fetch_from": "code_system.uri", + "fieldname": "system_uri", + "fieldtype": "Data", + "label": "System URI", + "no_copy": 1, + "read_only": 1, + "search_index": 1 + } + ], + "links": [], + "modified": "2023-11-04 17:11:03.579052", + "modified_by": "Administrator", + "module": "Healthcare", + "name": "Code Value", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Physician", + "share": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Nursing User", + "share": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Healthcare Administrator", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "restrict_to_domain": "Healthcare", + "search_fields": "code_value, code_system, definition", + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "title_field": "display", + "track_changes": 1 +} \ No newline at end of file diff --git a/healthcare/healthcare/doctype/medical_code/medical_code.py b/healthcare/healthcare/doctype/code_value/code_value.py similarity index 70% rename from healthcare/healthcare/doctype/medical_code/medical_code.py rename to healthcare/healthcare/doctype/code_value/code_value.py index 269cc000ff..dd2a497f71 100644 --- a/healthcare/healthcare/doctype/medical_code/medical_code.py +++ b/healthcare/healthcare/doctype/code_value/code_value.py @@ -6,6 +6,6 @@ from frappe.model.document import Document -class MedicalCode(Document): +class CodeValue(Document): def autoname(self): - self.name = self.medical_code_standard + " " + self.code + self.name = f"{self.code_value}-{self.code_system}" diff --git a/healthcare/healthcare/doctype/medical_code_standard/test_medical_code_standard.py b/healthcare/healthcare/doctype/code_value/test_code_value.py similarity index 78% rename from healthcare/healthcare/doctype/medical_code_standard/test_medical_code_standard.py rename to healthcare/healthcare/doctype/code_value/test_code_value.py index 2ef0db9bac..c512ecefbd 100644 --- a/healthcare/healthcare/doctype/medical_code_standard/test_medical_code_standard.py +++ b/healthcare/healthcare/doctype/code_value/test_code_value.py @@ -6,5 +6,5 @@ from frappe.tests.utils import FrappeTestCase -class TestMedicalCodeStandard(FrappeTestCase): +class TestCodeValue(FrappeTestCase): pass diff --git a/healthcare/healthcare/doctype/codification_table/codification_table.json b/healthcare/healthcare/doctype/codification_table/codification_table.json index 1df41dc5f8..6ff59db17d 100644 --- a/healthcare/healthcare/doctype/codification_table/codification_table.json +++ b/healthcare/healthcare/doctype/codification_table/codification_table.json @@ -6,71 +6,102 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "medical_code", - "medical_code_standard", - "column_break_3", + "code_system", "system", + "is_fhir_defined", + "oid", + "column_break_3", + "code_value", "code", + "display", "section_break_5", - "description" + "definition" ], "fields": [ { - "fieldname": "medical_code", + "columns": 2, + "fieldname": "code_value", "fieldtype": "Link", "ignore_user_permissions": 1, "in_list_view": 1, - "label": "Medical Code", - "options": "Medical Code", + "label": "Code Value", + "options": "Code Value", "reqd": 1 }, { - "fetch_from": "medical_code.code", + "columns": 2, + "fetch_from": "code_value.code_value", "fieldname": "code", "fieldtype": "Data", "ignore_xss_filter": 1, "in_list_view": 1, "label": "Code", - "read_only": 1 + "read_only": 1, + "reqd": 1 }, { - "fetch_from": "medical_code.description", - "fieldname": "description", - "fieldtype": "Small Text", - "ignore_xss_filter": 1, - "in_list_view": 1, - "label": "Description", + "fieldname": "column_break_3", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_5", + "fieldtype": "Section Break" + }, + { + "columns": 2, + "fetch_from": "code_system.uri", + "fieldname": "system", + "fieldtype": "Data", + "label": "System", "read_only": 1 }, { - "fetch_from": "medical_code.medical_code_standard", - "fieldname": "medical_code_standard", + "columns": 2, + "fieldname": "code_system", "fieldtype": "Link", "in_list_view": 1, - "label": "Medical Code Standard", - "options": "Medical Code Standard", - "read_only_depends_on": "medical_code", + "label": "Code System", + "options": "Code System", + "read_only_depends_on": "code_value", "reqd": 1 }, { - "fieldname": "column_break_3", - "fieldtype": "Column Break" + "columns": 2, + "fetch_from": "code_value.definition", + "fieldname": "definition", + "fieldtype": "Small Text", + "ignore_xss_filter": 1, + "in_list_view": 1, + "label": "Definition", + "read_only": 1 }, { - "fieldname": "section_break_5", - "fieldtype": "Section Break" + "columns": 2, + "fetch_from": "code_value.display", + "fieldname": "display", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Display", + "read_only": 1 }, { - "fetch_from": "medical_code_standard.uri", - "fieldname": "system", + "default": "0", + "fieldname": "is_fhir_defined", + "fieldtype": "Check", + "label": "Is FHIR Defined", + "read_only": 1 + }, + { + "fetch_from": "code_system.oid", + "fieldname": "oid", "fieldtype": "Data", - "label": "System", + "label": "OID", "read_only": 1 } ], "istable": 1, "links": [], - "modified": "2023-02-23 11:17:39.669181", + "modified": "2023-11-03 13:28:04.445778", "modified_by": "Administrator", "module": "Healthcare", "name": "Codification Table", diff --git a/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.js b/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.js index 96b9813333..b9b1593f0b 100644 --- a/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.js +++ b/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.js @@ -30,6 +30,13 @@ frappe.ui.form.on('Healthcare Settings', { } }; }); + frm.set_query('default_code_system', function(doc) { + return { + filters: { + 'is_fhir_defined': false + } + }; + }); set_query_service_item(frm, 'inpatient_visit_charge_item'); set_query_service_item(frm, 'op_consulting_charge_item'); set_query_service_item(frm, 'clinical_procedure_consumable_item'); @@ -53,6 +60,11 @@ frappe.tour['Healthcare Settings'] = [ title: __('Link Customer to Patient'), description: __('If checked, a customer will be created for every Patient. Patient Invoices will be created against this Customer. You can also select existing Customer while creating a Patient. This field is checked by default.') }, + { + fieldname: 'default_code_system', + title: __('Default Code System'), + description: __('Will be set as the default Code System selected in the Codification Table') + }, { fieldname: 'default_google_calendar', title: __('Default Google Calendar'), diff --git a/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.json b/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.json index 99d3ad9365..d160cb50fb 100644 --- a/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.json +++ b/healthcare/healthcare/doctype/healthcare_settings/healthcare_settings.json @@ -9,7 +9,7 @@ "sb_op_settings", "patient_name_by", "link_customer_to_patient", - "default_medical_code_standard", + "default_code_system", "validate_nursing_checklists", "default_google_calendar", "column_break_9", @@ -64,12 +64,6 @@ "fieldtype": "Section Break", "label": "Outpatient Settings" }, - { - "fieldname": "default_medical_code_standard", - "fieldtype": "Link", - "label": "Default Medical Code Standard", - "options": "Medical Code Standard" - }, { "fieldname": "column_break_9", "fieldtype": "Column Break" @@ -376,11 +370,17 @@ "fieldname": "create_observation_on_si_submit", "fieldtype": "Check", "label": "Create Observation(s) on Sales Invoice Submission" + }, + { + "fieldname": "default_code_system", + "fieldtype": "Link", + "label": "Default Code System", + "options": "Code System" } ], "issingle": 1, "links": [], - "modified": "2023-10-24 05:59:06.422559", + "modified": "2023-11-03 12:58:54.795803", "modified_by": "Administrator", "module": "Healthcare", "name": "Healthcare Settings", diff --git a/healthcare/healthcare/doctype/lab_test_template/lab_test_template.json b/healthcare/healthcare/doctype/lab_test_template/lab_test_template.json index 2c604bdb02..53bf34d952 100644 --- a/healthcare/healthcare/doctype/lab_test_template/lab_test_template.json +++ b/healthcare/healthcare/doctype/lab_test_template/lab_test_template.json @@ -57,9 +57,10 @@ "result_legend_section", "legend_print_position", "result_legend", - "service_order_defaults_section", + "service_request_defaults_section", "patient_care_type", "staff_role", + "column_break_34", "change_in_item" ], "fields": [ @@ -143,25 +144,6 @@ "label": "Rate", "mandatory_depends_on": "eval:doc.is_billable && !doc.link_existing_item" }, - { - "collapsible": 1, - "fieldname": "medical_coding_section", - "fieldtype": "Section Break", - "label": "Medical Coding" - }, - { - "fieldname": "medical_code_standard", - "fieldtype": "Link", - "label": "Medical Code Standard", - "options": "Medical Code Standard" - }, - { - "depends_on": "medical_code_standard", - "fieldname": "medical_code", - "fieldtype": "Link", - "label": "Medical Code", - "options": "Medical Code" - }, { "depends_on": "eval:doc.lab_test_template_type == 'Single'", "fieldname": "section_break_normal", @@ -424,12 +406,12 @@ "fieldtype": "Column Break" }, { - "fieldname": "column_break_buub", + "fieldname": "column_break_buub", "fieldtype": "Column Break" } ], "links": [], - "modified": "2023-02-23 12:14:27.297802", + "modified": "2023-11-03 15:28:04.801812", "modified_by": "Administrator", "module": "Healthcare", "name": "Lab Test Template", diff --git a/healthcare/healthcare/doctype/medical_code/medical_code.json b/healthcare/healthcare/doctype/medical_code/medical_code.json deleted file mode 100644 index 3e2a13b9be..0000000000 --- a/healthcare/healthcare/doctype/medical_code/medical_code.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "actions": [], - "allow_copy": 1, - "allow_import": 1, - "allow_rename": 1, - "beta": 0, - "creation": "2017-06-21 13:02:56.122897", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "medical_code_standard", - "code", - "uri", - "description" - ], - "fields": [ - { - "fieldname": "medical_code_standard", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Medical Code Standard", - "options": "Medical Code Standard", - "reqd": 1 - }, - { - "fieldname": "code", - "fieldtype": "Data", - "ignore_xss_filter": 1, - "in_list_view": 1, - "label": "Code", - "reqd": 1, - "unique": 1 - }, - { - "bold": 1, - "fieldname": "description", - "fieldtype": "Small Text", - "ignore_xss_filter": 1, - "in_list_view": 1, - "label": "Description" - }, - { - "fetch_from": "medical_code_standard.uri", - "fieldname": "uri", - "fieldtype": "Data", - "label": "URI", - "read_only": 1 - } - ], - "links": [], - "modified": "2022-01-25 17:31:24.713454", - "modified_by": "Administrator", - "module": "Healthcare", - "name": "Medical Code", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Physician", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "restrict_to_domain": "Healthcare", - "search_fields": "code, description", - "sort_field": "modified", - "sort_order": "DESC", - "states": [], - "track_changes": 1 -} \ No newline at end of file diff --git a/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.json b/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.json deleted file mode 100644 index 4d942ba17a..0000000000 --- a/healthcare/healthcare/doctype/medical_code_standard/medical_code_standard.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:medical_code", - "beta": 0, - "creation": "2017-06-21 13:07:00.463176", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "medical_code", - "uri" - ], - "fields": [ - { - "fieldname": "medical_code", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Medical Code", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "uri", - "fieldtype": "Data", - "label": "URI", - "unique": 1 - } - ], - "links": [], - "modified": "2022-01-25 16:58:15.589029", - "modified_by": "Administrator", - "module": "Healthcare", - "name": "Medical Code Standard", - "naming_rule": "By fieldname", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Physician", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "restrict_to_domain": "Healthcare", - "sort_field": "modified", - "sort_order": "DESC", - "states": [], - "track_changes": 1 -} \ No newline at end of file diff --git a/healthcare/patches.txt b/healthcare/patches.txt index a845a1b8ed..af2d9c685f 100644 --- a/healthcare/patches.txt +++ b/healthcare/patches.txt @@ -4,6 +4,7 @@ healthcare.patches.v0_0.set_medical_code_from_field_to_codification_table healthcare.patches.v0_0.setup_service_request healthcare.patches.v15_0.create_custom_fields_in_sales_invoice_item healthcare.patches.v15_0.rename_automate_appointment_invoicing +healthcare.patches.v15_0.rename_medical_code_standard_and_medical_code [post_model_sync] healthcare.patches.v15_0.rename_field_medical_department_in_appoitment_type_service_item diff --git a/healthcare/patches/v15_0/rename_medical_code_standard_and_medical_code.py b/healthcare/patches/v15_0/rename_medical_code_standard_and_medical_code.py new file mode 100644 index 0000000000..3df7f1b223 --- /dev/null +++ b/healthcare/patches/v15_0/rename_medical_code_standard_and_medical_code.py @@ -0,0 +1,32 @@ +import frappe +from frappe.model.utils.rename_field import rename_field + + +def execute(): + doctypes = { + "Medical Code Standard": "Code System", + "Medical Code": "Code Value", + } + for old, new in doctypes.items(): + if frappe.db.exists("DocType", old) and not frappe.db.exists("DocType", new): + frappe.rename_doc("DocType", old, new, force=True) + frappe.reload_doc("healthcare", "doctype", new) + + try: + rename_field("Code System", "medical_code", "code_system") + + rename_field("Code Value", "medical_code_standard", "code_system") + rename_field("Code Value", "code", "code_value") + rename_field("Code Value", "description", "definition") + + frappe.reload_doc("healthcare", "doctype", "Codification Table") + rename_field("Codification Table", "medical_code_standard", "code_system") + rename_field("Codification Table", "medical_code", "code_value") + rename_field("Codification Table", "description", "definition") + + frappe.reload_doc("healthcare", "doctype", "Healthcare Settings") + rename_field("Healthcare Settings", "default_medical_code_standard", "default_code_system") + + except Exception as e: + if e.args[0] != 1054: + raise