You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

283 lines
7.6 KiB

  1. from . import __version__ as app_version
  2. from frappe import _
  3. app_name = "healthcare"
  4. app_title = "Healthcare"
  5. app_publisher = "healthcare"
  6. app_description = "healthcare"
  7. app_icon = "octicon octicon-file-directory"
  8. app_color = "grey"
  9. app_email = "contact@frappe.io"
  10. app_license = "MIT"
  11. required_apps = ["erpnext"]
  12. # Includes in <head>
  13. # ------------------
  14. # include js, css files in header of desk.html
  15. # app_include_css = "/assets/healthcare/css/healthcare.css"
  16. # app_include_js = "/assets/healthcare/js/healthcare.js"
  17. # include js, css files in header of web template
  18. # web_include_css = "/assets/healthcare/css/healthcare.css"
  19. # web_include_js = "/assets/healthcare/js/healthcare.js"
  20. # include custom scss in every website theme (without file extension ".scss")
  21. # website_theme_scss = "healthcare/public/scss/website"
  22. # include js, css files in header of web form
  23. # webform_include_js = {"doctype": "public/js/doctype.js"}
  24. # webform_include_css = {"doctype": "public/css/doctype.css"}
  25. # include js in page
  26. # page_js = {"page" : "public/js/file.js"}
  27. # include js in doctype views
  28. doctype_js = {"Sales Invoice": "public/js/sales_invoice.js"}
  29. # doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
  30. # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
  31. # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
  32. # Home Pages
  33. # ----------
  34. # application home page (will override Website Settings)
  35. # home_page = "login"
  36. # website user home page (by Role)
  37. # role_home_page = {
  38. # "Role": "home_page"
  39. # }
  40. # Generators
  41. # ----------
  42. # automatically create page for each record of this doctype
  43. # website_generators = ["Web Page"]
  44. # Jinja
  45. # ----------
  46. # add methods and filters to jinja environment
  47. # jinja = {
  48. # "methods": "healthcare.utils.jinja_methods",
  49. # "filters": "healthcare.utils.jinja_filters"
  50. # }
  51. # Installation
  52. # ------------
  53. # before_install = "healthcare.install.before_install"
  54. after_install = "healthcare.setup.setup_healthcare"
  55. # Desk Notifications
  56. # ------------------
  57. # See frappe.core.notifications.get_notification_config
  58. # notification_config = "healthcare.notifications.get_notification_config"
  59. # Permissions
  60. # -----------
  61. # Permissions evaluated in scripted ways
  62. # permission_query_conditions = {
  63. # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
  64. # }
  65. #
  66. # has_permission = {
  67. # "Event": "frappe.desk.doctype.event.event.has_permission",
  68. # }
  69. # DocType Class
  70. # ---------------
  71. # Override standard doctype classes
  72. override_doctype_class = {
  73. "Sales Invoice": "healthcare.healthcare.custom_doctype.sales_invoice.HealthcareSalesInvoice",
  74. }
  75. # Document Events
  76. # ---------------
  77. # Hook on document methods and events
  78. doc_events = {
  79. "*": {
  80. "on_submit": "healthcare.healthcare.doctype.patient_history_settings.patient_history_settings.create_medical_record",
  81. "on_cancel": "healthcare.healthcare.doctype.patient_history_settings.patient_history_settings.delete_medical_record",
  82. "on_update_after_submit": "healthcare.healthcare.doctype.patient_history_settings.patient_history_settings.update_medical_record",
  83. },
  84. "Sales Invoice": {
  85. "on_submit": "healthcare.healthcare.utils.manage_invoice_submit_cancel",
  86. "on_cancel": "healthcare.healthcare.utils.manage_invoice_submit_cancel",
  87. },
  88. "Company": {
  89. "after_insert": "healthcare.healthcare.utils.create_healthcare_service_unit_tree_root"
  90. },
  91. }
  92. scheduler_events = {
  93. "all": [
  94. "healthcare.healthcare.doctype.patient_appointment.patient_appointment.send_appointment_reminder",
  95. ],
  96. "daily": [
  97. "healthcare.healthcare.doctype.patient_appointment.patient_appointment.update_appointment_status",
  98. ],
  99. }
  100. # Scheduled Tasks
  101. # ---------------
  102. # scheduler_events = {
  103. # "all": [
  104. # "healthcare.tasks.all"
  105. # ],
  106. # "daily": [
  107. # "healthcare.tasks.daily"
  108. # ],
  109. # "hourly": [
  110. # "healthcare.tasks.hourly"
  111. # ],
  112. # "weekly": [
  113. # "healthcare.tasks.weekly"
  114. # ],
  115. # "monthly": [
  116. # "healthcare.tasks.monthly"
  117. # ],
  118. # }
  119. # Testing
  120. # -------
  121. before_tests = "healthcare.healthcare.utils.before_tests"
  122. # Overriding Methods
  123. # ------------------------------
  124. #
  125. # override_whitelisted_methods = {
  126. # "frappe.desk.doctype.event.event.get_events": "healthcare.event.get_events"
  127. # }
  128. #
  129. # each overriding function accepts a `data` argument;
  130. # generated from the base implementation of the doctype dashboard,
  131. # along with any modifications made in other InfluxERP apps
  132. # override_doctype_dashboards = {
  133. # "Task": "healthcare.task.get_dashboard_data"
  134. # }
  135. # exempt linked doctypes from being automatically cancelled
  136. #
  137. auto_cancel_exempted_doctypes = [
  138. "Inpatient Medication Entry",
  139. ]
  140. # User Data Protection
  141. # --------------------
  142. # user_data_fields = [
  143. # {
  144. # "doctype": "{doctype_1}",
  145. # "filter_by": "{filter_by}",
  146. # "redact_fields": ["{field_1}", "{field_2}"],
  147. # "partial": 1,
  148. # },
  149. # {
  150. # "doctype": "{doctype_2}",
  151. # "filter_by": "{filter_by}",
  152. # "partial": 1,
  153. # },
  154. # {
  155. # "doctype": "{doctype_3}",
  156. # "strict": False,
  157. # },
  158. # {
  159. # "doctype": "{doctype_4}"
  160. # }
  161. # ]
  162. # Authentication and authorization
  163. # --------------------------------
  164. # auth_hooks = [
  165. # "healthcare.auth.validate"
  166. # ]
  167. global_search_doctypes = {
  168. "Healthcare": [
  169. {"doctype": "Patient", "index": 1},
  170. {"doctype": "Medical Department", "index": 2},
  171. {"doctype": "Vital Signs", "index": 3},
  172. {"doctype": "Healthcare Practitioner", "index": 4},
  173. {"doctype": "Patient Appointment", "index": 5},
  174. {"doctype": "Healthcare Service Unit", "index": 6},
  175. {"doctype": "Patient Encounter", "index": 7},
  176. {"doctype": "Antibiotic", "index": 8},
  177. {"doctype": "Diagnosis", "index": 9},
  178. {"doctype": "Lab Test", "index": 10},
  179. {"doctype": "Clinical Procedure", "index": 11},
  180. {"doctype": "Inpatient Record", "index": 12},
  181. {"doctype": "Sample Collection", "index": 13},
  182. {"doctype": "Patient Medical Record", "index": 14},
  183. {"doctype": "Appointment Type", "index": 15},
  184. {"doctype": "Fee Validity", "index": 16},
  185. {"doctype": "Practitioner Schedule", "index": 17},
  186. {"doctype": "Dosage Form", "index": 18},
  187. {"doctype": "Lab Test Sample", "index": 19},
  188. {"doctype": "Prescription Duration", "index": 20},
  189. {"doctype": "Prescription Dosage", "index": 21},
  190. {"doctype": "Sensitivity", "index": 22},
  191. {"doctype": "Complaint", "index": 23},
  192. {"doctype": "Medical Code", "index": 24},
  193. ]
  194. }
  195. domains = {
  196. "Healthcare": "healthcare.setup",
  197. }
  198. standard_portal_menu_items = [
  199. {
  200. "title": _("Personal Details"),
  201. "route": "/personal-details",
  202. "reference_doctype": "Patient",
  203. "role": "Patient",
  204. },
  205. {
  206. "title": _("Timesheets"),
  207. "route": "/timesheets",
  208. "reference_doctype": "Timesheet",
  209. "role": "Customer",
  210. },
  211. {
  212. "title": _("Lab Test"),
  213. "route": "/lab-test",
  214. "reference_doctype": "Lab Test",
  215. "role": "Patient",
  216. },
  217. {
  218. "title": _("Prescription"),
  219. "route": "/prescription",
  220. "reference_doctype": "Patient Encounter",
  221. "role": "Patient",
  222. },
  223. {
  224. "title": _("Patient Appointment"),
  225. "route": "/patient-appointments",
  226. "reference_doctype": "Patient Appointment",
  227. "role": "Patient",
  228. },
  229. ]
  230. has_website_permission = {
  231. "Issue": "erpnext.support.doctype.issue.issue.has_website_permission",
  232. "Timesheet": "erpnext.controllers.website_list_for_contact.has_website_permission",
  233. "Lab Test": "healthcare.healthcare.web_form.lab_test.lab_test.has_website_permission",
  234. "Patient Encounter": "healthcare.healthcare.web_form.prescription.prescription.has_website_permission",
  235. "Patient Appointment": "healthcare.healthcare.web_form.patient_appointments.patient_appointments.has_website_permission",
  236. "Patient": "healthcare.healthcare.web_form.personal_details.personal_details.has_website_permission",
  237. }
  238. standard_queries = {
  239. "Healthcare Practitioner": "healthcare.healthcare.doctype.healthcare_practitioner.healthcare_practitioner.get_practitioner_list"
  240. }