Skip to content

Commit

Permalink
fix: rename dotypes, path for the same
Browse files Browse the repository at this point in the history
- Medical Code Stamdard to Code System
- Medical Code to Code Value

rename fields in liked documents
lab test remove link as codification table is persent
  • Loading branch information
akurungadam authored and akashkrishna619 committed Nov 8, 2023
1 parent 0765ebd commit fe102d5
Show file tree
Hide file tree
Showing 18 changed files with 415 additions and 205 deletions.
Original file line number Diff line number Diff line change
@@ -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', {
});
152 changes: 152 additions & 0 deletions healthcare/healthcare/doctype/code_system/code_system.json
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
from frappe.model.document import Document


class MedicalCodeStandard(Document):
class CodeSystem(Document):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
from frappe.tests.utils import FrappeTestCase


class TestMedicalCode(FrappeTestCase):
class TestCodeSystem(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -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', {
});
140 changes: 140 additions & 0 deletions healthcare/healthcare/doctype/code_value/code_value.json
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
from frappe.tests.utils import FrappeTestCase


class TestMedicalCodeStandard(FrappeTestCase):
class TestCodeValue(FrappeTestCase):
pass
Loading

0 comments on commit fe102d5

Please sign in to comment.