feat: add medical coding fields to Healthcare DocTypes (#22501)
* feat: add medical coding fields to templates * feat: fetch medical codes from templates in forms * fix: codacy issues Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
parent
e0ff0cfcb9
commit
45b01d2c02
@ -11,6 +11,7 @@
|
||||
"title",
|
||||
"appointment",
|
||||
"procedure_template",
|
||||
"medical_code",
|
||||
"column_break_30",
|
||||
"company",
|
||||
"invoiced",
|
||||
@ -290,11 +291,19 @@
|
||||
"no_copy": 1,
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fetch_from": "procedure_template.medical_code",
|
||||
"fieldname": "medical_code",
|
||||
"fieldtype": "Link",
|
||||
"label": "Medical Code",
|
||||
"options": "Medical Code",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-04-27 21:36:23.796924",
|
||||
"modified": "2020-06-29 14:28:11.779815",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Clinical Procedure",
|
||||
|
@ -30,6 +30,16 @@ frappe.ui.form.on('Clinical Procedure Template', {
|
||||
mark_change_in_item(frm);
|
||||
},
|
||||
|
||||
medical_code: function(frm) {
|
||||
frm.set_query("medical_code", function() {
|
||||
return {
|
||||
filters: {
|
||||
medical_code_standard: frm.doc.medical_code_standard
|
||||
}
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
frm.fields_dict['items'].grid.set_column_disp('barcode', false);
|
||||
frm.fields_dict['items'].grid.set_column_disp('batch_no', false);
|
||||
|
@ -21,6 +21,9 @@
|
||||
"is_billable",
|
||||
"rate",
|
||||
"medical_department",
|
||||
"medical_coding_section",
|
||||
"medical_code_standard",
|
||||
"medical_code",
|
||||
"consumables",
|
||||
"consume_stock",
|
||||
"items",
|
||||
@ -46,7 +49,6 @@
|
||||
"fieldname": "item_code",
|
||||
"fieldtype": "Data",
|
||||
"label": "Item Code",
|
||||
"options": "Item",
|
||||
"read_only_depends_on": "eval: !doc.__islocal ",
|
||||
"reqd": 1
|
||||
},
|
||||
@ -173,10 +175,29 @@
|
||||
"no_copy": 1,
|
||||
"options": "Item",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-02-28 14:16:13.184981",
|
||||
"modified": "2020-06-29 14:12:27.158130",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Clinical Procedure Template",
|
||||
|
@ -33,9 +33,10 @@
|
||||
"user",
|
||||
"invoiced",
|
||||
"sb_first",
|
||||
"template",
|
||||
"lab_test_name",
|
||||
"column_break_26",
|
||||
"template",
|
||||
"medical_code",
|
||||
"lab_test_group",
|
||||
"sb_normal",
|
||||
"normal_test_items",
|
||||
@ -424,11 +425,19 @@
|
||||
"print_hide": 1,
|
||||
"read_only": 1,
|
||||
"report_hide": 1
|
||||
},
|
||||
{
|
||||
"fetch_from": "template.medical_code",
|
||||
"fieldname": "medical_code",
|
||||
"fieldtype": "Link",
|
||||
"label": "Medical Code",
|
||||
"options": "Medical Code",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-04-04 19:16:29.131168",
|
||||
"modified": "2020-06-29 14:24:26.509721",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Lab Test",
|
||||
|
@ -8,7 +8,7 @@ frappe.ui.form.on("Lab Test Template",{
|
||||
if (!frm.doc.lab_test_description)
|
||||
frm.set_value("lab_test_description", frm.doc.lab_test_name);
|
||||
},
|
||||
refresh : function(frm) {
|
||||
refresh: function(frm) {
|
||||
// Restrict Special, Grouped type templates in Child TestGroups
|
||||
frm.set_query("lab_test_template", "lab_test_groups", function() {
|
||||
return {
|
||||
@ -17,6 +17,15 @@ frappe.ui.form.on("Lab Test Template",{
|
||||
}
|
||||
};
|
||||
});
|
||||
},
|
||||
medical_code: function(frm) {
|
||||
frm.set_query("medical_code", function() {
|
||||
return {
|
||||
filters: {
|
||||
medical_code_standard: frm.doc.medical_code_standard
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -19,6 +19,9 @@
|
||||
"disabled",
|
||||
"is_billable",
|
||||
"lab_test_rate",
|
||||
"medical_coding_section",
|
||||
"medical_code_standard",
|
||||
"medical_code",
|
||||
"section_break_normal",
|
||||
"lab_test_uom",
|
||||
"lab_test_normal_range",
|
||||
@ -237,10 +240,29 @@
|
||||
"fieldtype": "Text",
|
||||
"ignore_xss_filter": 1,
|
||||
"label": "Collection Details"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "medical_coding_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Medical Coding"
|
||||
},
|
||||
{
|
||||
"depends_on": "medical_code_standard",
|
||||
"fieldname": "medical_code",
|
||||
"fieldtype": "Link",
|
||||
"label": "Medical Code",
|
||||
"options": "Medical Code"
|
||||
},
|
||||
{
|
||||
"fieldname": "medical_code_standard",
|
||||
"fieldtype": "Link",
|
||||
"label": "Medical Code Standard",
|
||||
"options": "Medical Code Standard"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-03-25 16:53:01.740103",
|
||||
"modified": "2020-06-29 14:07:20.772219",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Lab Test Template",
|
||||
|
@ -1,156 +1,69 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_copy": 1,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"beta": 1,
|
||||
"creation": "2017-06-21 13:02:56.122897",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"medical_code_standard",
|
||||
"code",
|
||||
"description"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "medical_code_standard",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Medical Code Standard",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Medical Code Standard",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 1,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Code",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 1,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 1,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Description",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"label": "Description"
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-10-04 17:08:11.053418",
|
||||
"links": [],
|
||||
"modified": "2020-06-29 14:02:30.980032",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Medical Code",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Physician",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Healthcare",
|
||||
"search_fields": "code, description",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_changes": 1
|
||||
}
|
@ -19,6 +19,7 @@
|
||||
"practitioner",
|
||||
"department",
|
||||
"details_section",
|
||||
"medical_code",
|
||||
"duration",
|
||||
"rate",
|
||||
"location",
|
||||
@ -206,11 +207,19 @@
|
||||
"fieldtype": "Data",
|
||||
"label": "Patient Name",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fetch_from": "therapy_type.medical_code",
|
||||
"fieldname": "medical_code",
|
||||
"fieldtype": "Link",
|
||||
"label": "Medical Code",
|
||||
"options": "Medical Code",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-04-29 16:49:16.286006",
|
||||
"modified": "2020-06-29 14:33:34.836594",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Therapy Session",
|
||||
|
@ -45,6 +45,16 @@ frappe.ui.form.on('Therapy Type', {
|
||||
|
||||
medical_department: function(frm) {
|
||||
mark_change_in_item(frm);
|
||||
},
|
||||
|
||||
medical_code: function(frm) {
|
||||
frm.set_query("medical_code", function() {
|
||||
return {
|
||||
filters: {
|
||||
medical_code_standard: frm.doc.medical_code_standard
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -22,6 +22,9 @@
|
||||
"item_group",
|
||||
"column_break_12",
|
||||
"description",
|
||||
"medical_coding_section",
|
||||
"medical_code_standard",
|
||||
"medical_code",
|
||||
"section_break_18",
|
||||
"therapy_for",
|
||||
"add_exercises",
|
||||
@ -160,10 +163,30 @@
|
||||
{
|
||||
"fieldname": "section_break_18",
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"collapsible": 1,
|
||||
"fieldname": "medical_coding_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Medical Coding",
|
||||
"options": "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"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-04-21 13:09:04.006289",
|
||||
"modified": "2020-06-29 14:18:50.669951",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Therapy Type",
|
||||
|
Loading…
x
Reference in New Issue
Block a user