blob: 1dd88040b3a1af4b62f1da1354691dd47156d243 [file] [log] [blame]
Rushabh Mehtaf0569742017-09-13 12:52:30 +05301from __future__ import unicode_literals
2import frappe
Rushabh Mehtaf0569742017-09-13 12:52:30 +05303
4from frappe import _
Manas Solanki966f1412017-11-23 15:22:10 +05305from erpnext.setup.utils import insert_record
Rushabh Mehtaf0569742017-09-13 12:52:30 +05306
7def setup_healthcare():
Rushabh Mehtabc4e2cd2017-10-17 12:30:34 +05308 if frappe.db.exists('Medical Department', 'Cardiology'):
9 # already setup
10 return
Rushabh Mehtaf0569742017-09-13 12:52:30 +053011 create_medical_departments()
12 create_antibiotics()
13 create_test_uom()
14 create_duration()
15 create_dosage()
16 create_healthcare_item_groups()
17 create_lab_test_items()
18 create_lab_test_template()
19 create_sensitivity()
Jamsheer0cde6ae2018-05-16 10:54:00 +053020 add_healthcare_service_unit_tree_root()
Rushabh Mehtaf0569742017-09-13 12:52:30 +053021
22def create_medical_departments():
mbauskaree9da672017-10-10 12:15:48 +053023 departments = [
24 "Accident And Emergency Care" ,"Anaesthetics", "Biochemistry", "Cardiology", "Dermatology",
25 "Diagnostic Imaging", "ENT", "Gastroenterology", "General Surgery", "Gynaecology",
26 "Haematology", "Maternity", "Microbiology", "Nephrology", "Neurology", "Oncology",
27 "Orthopaedics", "Pathology", "Physiotherapy", "Rheumatology", "Serology", "Urology"
28 ]
29 for department in departments:
Rushabh Mehtaf0569742017-09-13 12:52:30 +053030 mediacal_department = frappe.new_doc("Medical Department")
mbauskaree9da672017-10-10 12:15:48 +053031 mediacal_department.department = _(department)
Rushabh Mehtaf0569742017-09-13 12:52:30 +053032 try:
33 mediacal_department.save()
34 except frappe.DuplicateEntryError:
35 pass
36
37def create_antibiotics():
mbauskaree9da672017-10-10 12:15:48 +053038 abt = [
39 "Amoxicillin", "Ampicillin", "Bacampicillin", "Carbenicillin", "Cloxacillin", "Dicloxacillin",
40 "Flucloxacillin", "Mezlocillin", "Nafcillin", "Oxacillin", "Penicillin G", "Penicillin V",
41 "Piperacillin", "Pivampicillin", "Pivmecillinam", "Ticarcillin", "Cefacetrile (cephacetrile)",
42 "Cefadroxil (cefadroxyl)", "Cefalexin (cephalexin)", "Cefaloglycin (cephaloglycin)",
43 "Cefalonium (cephalonium)", "Cefaloridine (cephaloradine)", "Cefalotin (cephalothin)",
44 "Cefapirin (cephapirin)", "Cefatrizine", "Cefazaflur", "Cefazedone", "Cefazolin (cephazolin)",
45 "Cefradine (cephradine)", "Cefroxadine", "Ceftezole", "Cefaclor", "Cefamandole", "Cefmetazole",
46 "Cefonicid", "Cefotetan", "Cefoxitin", "Cefprozil (cefproxil)", "Cefuroxime", "Cefuzonam",
47 "Cefcapene", "Cefdaloxime", "Cefdinir", "Cefditoren", "Cefetamet", "Cefixime", "Cefmenoxime",
48 "Cefodizime", "Cefotaxime", "Cefpimizole", "Cefpodoxime", "Cefteram", "Ceftibuten", "Ceftiofur",
49 "Ceftiolene", "Ceftizoxime", "Ceftriaxone", "Cefoperazone", "Ceftazidime", "Cefclidine", "Cefepime",
50 "Cefluprenam", "Cefoselis", "Cefozopran", "Cefpirome", "Cefquinome", "Ceftobiprole", "Ceftaroline",
51 "Cefaclomezine","Cefaloram", "Cefaparole", "Cefcanel", "Cefedrolor", "Cefempidone", "Cefetrizole",
52 "Cefivitril", "Cefmatilen", "Cefmepidium", "Cefovecin", "Cefoxazole", "Cefrotil", "Cefsumide",
53 "Cefuracetime", "Ceftioxide", "Ceftazidime/Avibactam", "Ceftolozane/Tazobactam", "Aztreonam",
54 "Imipenem", "Imipenem/cilastatin", "Doripenem", "Meropenem", "Ertapenem", "Azithromycin",
55 "Erythromycin", "Clarithromycin", "Dirithromycin", "Roxithromycin", "Telithromycin", "Clindamycin",
56 "Lincomycin", "Pristinamycin", "Quinupristin/dalfopristin", "Amikacin", "Gentamicin", "Kanamycin",
57 "Neomycin", "Netilmicin", "Paromomycin", "Streptomycin", "Tobramycin", "Flumequine", "Nalidixic acid",
58 "Oxolinic acid", "Piromidic acid", "Pipemidic acid", "Rosoxacin", "Ciprofloxacin", "Enoxacin",
59 "Lomefloxacin", "Nadifloxacin", "Norfloxacin", "Ofloxacin", "Pefloxacin", "Rufloxacin", "Balofloxacin",
60 "Gatifloxacin", "Grepafloxacin", "Levofloxacin", "Moxifloxacin", "Pazufloxacin", "Sparfloxacin",
61 "Temafloxacin", "Tosufloxacin", "Besifloxacin", "Clinafloxacin", "Gemifloxacin",
62 "Sitafloxacin", "Trovafloxacin", "Prulifloxacin", "Sulfamethizole", "Sulfamethoxazole",
63 "Sulfisoxazole", "Trimethoprim-Sulfamethoxazole", "Demeclocycline", "Doxycycline", "Minocycline",
64 "Oxytetracycline", "Tetracycline", "Tigecycline", "Chloramphenicol", "Metronidazole",
65 "Tinidazole", "Nitrofurantoin", "Vancomycin", "Teicoplanin", "Telavancin", "Linezolid",
66 "Cycloserine 2", "Rifampin", "Rifabutin", "Rifapentine", "Rifalazil", "Bacitracin", "Polymyxin B",
67 "Viomycin", "Capreomycin"
68 ]
69
Rushabh Mehtaf0569742017-09-13 12:52:30 +053070 for a in abt:
71 antibiotic = frappe.new_doc("Antibiotic")
72 antibiotic.antibiotic_name = a
73 try:
74 antibiotic.save()
75 except frappe.DuplicateEntryError:
76 pass
77
78def create_test_uom():
79 records = [
80 {"doctype": "Lab Test UOM", "name": "umol/L", "test_uom": "umol/L", "uom_description": None },
81 {"doctype": "Lab Test UOM", "name": "mg/L", "test_uom": "mg/L", "uom_description": None },
82 {"doctype": "Lab Test UOM", "name": "mg / dl", "test_uom": "mg / dl", "uom_description": None },
83 {"doctype": "Lab Test UOM", "name": "pg / ml", "test_uom": "pg / ml", "uom_description": None },
84 {"doctype": "Lab Test UOM", "name": "U/ml", "test_uom": "U/ml", "uom_description": None },
85 {"doctype": "Lab Test UOM", "name": "/HPF", "test_uom": "/HPF", "uom_description": None },
86 {"doctype": "Lab Test UOM", "name": "Million Cells / cumm", "test_uom": "Million Cells / cumm", "uom_description": None },
87 {"doctype": "Lab Test UOM", "name": "Lakhs Cells / cumm", "test_uom": "Lakhs Cells / cumm", "uom_description": None },
88 {"doctype": "Lab Test UOM", "name": "U / L", "test_uom": "U / L", "uom_description": None },
89 {"doctype": "Lab Test UOM", "name": "g / L", "test_uom": "g / L", "uom_description": None },
90 {"doctype": "Lab Test UOM", "name": "IU / ml", "test_uom": "IU / ml", "uom_description": None },
91 {"doctype": "Lab Test UOM", "name": "gm %", "test_uom": "gm %", "uom_description": None },
92 {"doctype": "Lab Test UOM", "name": "Microgram", "test_uom": "Microgram", "uom_description": None },
93 {"doctype": "Lab Test UOM", "name": "Micron", "test_uom": "Micron", "uom_description": None },
94 {"doctype": "Lab Test UOM", "name": "Cells / cumm", "test_uom": "Cells / cumm", "uom_description": None },
95 {"doctype": "Lab Test UOM", "name": "%", "test_uom": "%", "uom_description": None },
96 {"doctype": "Lab Test UOM", "name": "mm / dl", "test_uom": "mm / dl", "uom_description": None },
97 {"doctype": "Lab Test UOM", "name": "mm / hr", "test_uom": "mm / hr", "uom_description": None },
98 {"doctype": "Lab Test UOM", "name": "ulU / ml", "test_uom": "ulU / ml", "uom_description": None },
99 {"doctype": "Lab Test UOM", "name": "ng / ml", "test_uom": "ng / ml", "uom_description": None },
100 {"doctype": "Lab Test UOM", "name": "ng / dl", "test_uom": "ng / dl", "uom_description": None },
101 {"doctype": "Lab Test UOM", "name": "ug / dl", "test_uom": "ug / dl", "uom_description": None }
102 ]
103
104 insert_record(records)
105
106def create_duration():
107 records = [
108 {"doctype": "Prescription Duration", "name": "3 Month", "number": "3", "period": "Month" },
109 {"doctype": "Prescription Duration", "name": "2 Month", "number": "2", "period": "Month" },
110 {"doctype": "Prescription Duration", "name": "1 Month", "number": "1", "period": "Month" },
111 {"doctype": "Prescription Duration", "name": "12 Hour", "number": "12", "period": "Hour" },
112 {"doctype": "Prescription Duration", "name": "11 Hour", "number": "11", "period": "Hour" },
113 {"doctype": "Prescription Duration", "name": "10 Hour", "number": "10", "period": "Hour" },
114 {"doctype": "Prescription Duration", "name": "9 Hour", "number": "9", "period": "Hour" },
115 {"doctype": "Prescription Duration", "name": "8 Hour", "number": "8", "period": "Hour" },
116 {"doctype": "Prescription Duration", "name": "7 Hour", "number": "7", "period": "Hour" },
117 {"doctype": "Prescription Duration", "name": "6 Hour", "number": "6", "period": "Hour" },
118 {"doctype": "Prescription Duration", "name": "5 Hour", "number": "5", "period": "Hour" },
119 {"doctype": "Prescription Duration", "name": "4 Hour", "number": "4", "period": "Hour" },
120 {"doctype": "Prescription Duration", "name": "3 Hour", "number": "3", "period": "Hour" },
121 {"doctype": "Prescription Duration", "name": "2 Hour", "number": "2", "period": "Hour" },
122 {"doctype": "Prescription Duration", "name": "1 Hour", "number": "1", "period": "Hour" },
123 {"doctype": "Prescription Duration", "name": "5 Week", "number": "5", "period": "Week" },
124 {"doctype": "Prescription Duration", "name": "4 Week", "number": "4", "period": "Week" },
125 {"doctype": "Prescription Duration", "name": "3 Week", "number": "3", "period": "Week" },
126 {"doctype": "Prescription Duration", "name": "2 Week", "number": "2", "period": "Week" },
127 {"doctype": "Prescription Duration", "name": "1 Week", "number": "1", "period": "Week" },
128 {"doctype": "Prescription Duration", "name": "6 Day", "number": "6", "period": "Day" },
129 {"doctype": "Prescription Duration", "name": "5 Day", "number": "5", "period": "Day" },
130 {"doctype": "Prescription Duration", "name": "4 Day", "number": "4", "period": "Day" },
131 {"doctype": "Prescription Duration", "name": "3 Day", "number": "3", "period": "Day" },
132 {"doctype": "Prescription Duration", "name": "2 Day", "number": "2", "period": "Day" },
133 {"doctype": "Prescription Duration", "name": "1 Day", "number": "1", "period": "Day" }
134 ]
135 insert_record(records)
136
137def create_dosage():
138 records = [
139 {"doctype": "Prescription Dosage", "name": "1-1-1-1", "dosage": "1-1-1-1","dosage_strength":
140 [{"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "13:00:00"},{"strength": "1.0","strength_time": "17:00:00"},{"strength": "1.0","strength_time": "21:00:00"}]
141 },
142 {"doctype": "Prescription Dosage", "name": "0-0-1", "dosage": "0-0-1","dosage_strength":
143 [{"strength": "1.0","strength_time": "21:00:00"}]
144 },
145 {"doctype": "Prescription Dosage", "name": "1-0-0", "dosage": "1-0-0","dosage_strength":
146 [{"strength": "1.0","strength_time": "9:00:00"}]
147 },
148 {"doctype": "Prescription Dosage", "name": "0-1-0", "dosage": "0-1-0","dosage_strength":
149 [{"strength": "1.0","strength_time": "14:00:00"}]
150 },
151 {"doctype": "Prescription Dosage", "name": "1-1-1", "dosage": "1-1-1","dosage_strength":
152 [{"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "14:00:00"},{"strength": "1.0","strength_time": "21:00:00"}]
153 },
154 {"doctype": "Prescription Dosage", "name": "1-0-1", "dosage": "1-0-1","dosage_strength":
155 [{"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "21:00:00"}]
156 },
157 {"doctype": "Prescription Dosage", "name": "Once Bedtime", "dosage": "Once Bedtime","dosage_strength":
158 [{"strength": "1.0","strength_time": "21:00:00"}]
159 },
160 {"doctype": "Prescription Dosage", "name": "5 times a day", "dosage": "5 times a day","dosage_strength":
161 [{"strength": "1.0","strength_time": "5:00:00"}, {"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "13:00:00"},{"strength": "1.0","strength_time": "17:00:00"},{"strength": "1.0","strength_time": "21:00:00"}]
162 },
163 {"doctype": "Prescription Dosage", "name": "QID", "dosage": "QID","dosage_strength":
164 [{"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "13:00:00"},{"strength": "1.0","strength_time": "17:00:00"},{"strength": "1.0","strength_time": "21:00:00"}]
165 },
166 {"doctype": "Prescription Dosage", "name": "TID", "dosage": "TID","dosage_strength":
167 [{"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "14:00:00"},{"strength": "1.0","strength_time": "21:00:00"}]
168 },
169 {"doctype": "Prescription Dosage", "name": "BID", "dosage": "BID","dosage_strength":
170 [{"strength": "1.0","strength_time": "9:00:00"}, {"strength": "1.0","strength_time": "21:00:00"}]
171 },
172 {"doctype": "Prescription Dosage", "name": "Once Daily", "dosage": "Once Daily","dosage_strength":
173 [{"strength": "1.0","strength_time": "9:00:00"}]
174 }
175 ]
176 insert_record(records)
177
178def create_healthcare_item_groups():
179 records = [
180 {'doctype': 'Item Group', 'item_group_name': _('Laboratory'),
181 'is_group': 0, 'parent_item_group': _('All Item Groups') },
182 {'doctype': 'Item Group', 'item_group_name': _('Drug'),
183 'is_group': 0, 'parent_item_group': _('All Item Groups') }
184 ]
185 insert_record(records)
186
187def create_lab_test_items():
188 records = [
mbauskaree9da672017-10-10 12:15:48 +0530189 {"doctype": "Item", "item_code": "MCH", "item_name": "MCH", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530190 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
191 "item_defaults": [{
192 "company": "_Test Company",
193 "default_warehouse": "_Test Warehouse - _TC",
194 "expense_account": "_Test Account Cost for Goods Sold - _TC",
195 "buying_cost_center": "_Test Cost Center - _TC",
196 "selling_cost_center": "_Test Cost Center - _TC",
197 "income_account": "Sales - _TC"
198 }]
199 },
mbauskaree9da672017-10-10 12:15:48 +0530200 {"doctype": "Item", "item_code": "LDL", "item_name": "LDL", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530201 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
202 "item_defaults": [{
203 "company": "_Test Company",
204 "default_warehouse": "_Test Warehouse - _TC",
205 "expense_account": "_Test Account Cost for Goods Sold - _TC",
206 "buying_cost_center": "_Test Cost Center - _TC",
207 "selling_cost_center": "_Test Cost Center - _TC",
208 "income_account": "Sales - _TC"
209 }]
210 },
mbauskaree9da672017-10-10 12:15:48 +0530211 {"doctype": "Item", "item_code": "GTT", "item_name": "GTT", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530212 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
213 "item_defaults": [{
214 "company": "_Test Company",
215 "default_warehouse": "_Test Warehouse - _TC",
216 "expense_account": "_Test Account Cost for Goods Sold - _TC",
217 "buying_cost_center": "_Test Cost Center - _TC",
218 "selling_cost_center": "_Test Cost Center - _TC",
219 "income_account": "Sales - _TC"
220 }]
221 },
mbauskaree9da672017-10-10 12:15:48 +0530222 {"doctype": "Item", "item_code": "HDL", "item_name": "HDL", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530223 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
224 "item_defaults": [{
225 "company": "_Test Company",
226 "default_warehouse": "_Test Warehouse - _TC",
227 "expense_account": "_Test Account Cost for Goods Sold - _TC",
228 "buying_cost_center": "_Test Cost Center - _TC",
229 "selling_cost_center": "_Test Cost Center - _TC",
230 "income_account": "Sales - _TC"
231 }]
232 },
mbauskaree9da672017-10-10 12:15:48 +0530233 {"doctype": "Item", "item_code": "BILT", "item_name": "BILT", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530234 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
235 "item_defaults": [{
236 "company": "_Test Company",
237 "default_warehouse": "_Test Warehouse - _TC",
238 "expense_account": "_Test Account Cost for Goods Sold - _TC",
239 "buying_cost_center": "_Test Cost Center - _TC",
240 "selling_cost_center": "_Test Cost Center - _TC",
241 "income_account": "Sales - _TC"
242 }]
243 },
mbauskaree9da672017-10-10 12:15:48 +0530244 {"doctype": "Item", "item_code": "BILD", "item_name": "BILD", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530245 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
246 "item_defaults": [{
247 "company": "_Test Company",
248 "default_warehouse": "_Test Warehouse - _TC",
249 "expense_account": "_Test Account Cost for Goods Sold - _TC",
250 "buying_cost_center": "_Test Cost Center - _TC",
251 "selling_cost_center": "_Test Cost Center - _TC",
252 "income_account": "Sales - _TC"
253 }]
254 },
mbauskaree9da672017-10-10 12:15:48 +0530255 {"doctype": "Item", "item_code": "BP", "item_name": "BP", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530256 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
257 "item_defaults": [{
258 "company": "_Test Company",
259 "default_warehouse": "_Test Warehouse - _TC",
260 "expense_account": "_Test Account Cost for Goods Sold - _TC",
261 "buying_cost_center": "_Test Cost Center - _TC",
262 "selling_cost_center": "_Test Cost Center - _TC",
263 "income_account": "Sales - _TC"
264 }]
265 },
mbauskaree9da672017-10-10 12:15:48 +0530266 {"doctype": "Item", "item_code": "BS", "item_name": "BS", "item_group": _("Laboratory"),
rohitwaghchaure8fc64a92018-06-08 14:43:50 +0530267 "stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1,
268 "item_defaults": [{
269 "company": "_Test Company",
270 "default_warehouse": "_Test Warehouse - _TC",
271 "expense_account": "_Test Account Cost for Goods Sold - _TC",
272 "buying_cost_center": "_Test Cost Center - _TC",
273 "selling_cost_center": "_Test Cost Center - _TC",
274 "income_account": "Sales - _TC"
275 }]
276 }
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530277 ]
278 insert_record(records)
279
280def create_lab_test_template():
281 records = [
282 {"doctype": "Lab Test Template", "name": "MCH","test_name": "MCH","test_code": "MCH",
mbauskaree9da672017-10-10 12:15:48 +0530283 "test_group": _("Laboratory"),"department": _("Haematology"),"item": "MCH",
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530284 "test_template_type": "Single","is_billable": 1,"test_rate": 0.0,"test_uom": "Microgram",
285 "test_normal_range": "27 - 32 Microgram",
286 "sensitivity": 0,"test_description": "Mean Corpuscular Hemoglobin"},
287 {"doctype": "Lab Test Template", "name": "LDL","test_name": "LDL (Serum)","test_code": "LDL",
mbauskaree9da672017-10-10 12:15:48 +0530288 "test_group": _("Laboratory"),"department": _("Biochemistry"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530289 "item": "LDL","test_template_type": "Single",
290 "is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "70 - 160 mg/dlLow-density Lipoprotein (LDL)",
291 "sensitivity": 0,"test_description": "Low-density Lipoprotein (LDL)"},
292 {"doctype": "Lab Test Template", "name": "GTT","test_name": "GTT","test_code": "GTT",
mbauskaree9da672017-10-10 12:15:48 +0530293 "test_group": _("Laboratory"),"department": _("Haematology"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530294 "item": "GTT","test_template_type": "Single",
295 "is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "Less than 85 mg/dl",
296 "sensitivity": 0,"test_description": "Glucose Tolerance Test"},
297 {"doctype": "Lab Test Template", "name": "HDL","test_name": "HDL (Serum)","test_code": "HDL",
mbauskaree9da672017-10-10 12:15:48 +0530298 "test_group": _("Laboratory"),"department": _("Biochemistry"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530299 "item": "HDL","test_template_type": "Single",
300 "is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "35 - 65 mg/dl",
301 "sensitivity": 0,"test_description": "High-density Lipoprotein (HDL)"},
302 {"doctype": "Lab Test Template", "name": "BILT","test_name": "Bilirubin Total","test_code": "BILT",
mbauskaree9da672017-10-10 12:15:48 +0530303 "test_group": _("Laboratory"),"department": _("Biochemistry"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530304 "item": "BILT","test_template_type": "Single",
305 "is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "0.2 - 1.2 mg / dl",
306 "sensitivity": 0,"test_description": "Bilirubin Total"},
307 {"doctype": "Lab Test Template", "name": "BILD","test_name": "Bilirubin Direct","test_code": "BILD",
mbauskaree9da672017-10-10 12:15:48 +0530308 "test_group": _("Laboratory"),"department": _("Biochemistry"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530309 "item": "BILD","test_template_type": "Single",
310 "is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "0.4 mg / dl",
311 "sensitivity": 0,"test_description": "Bilirubin Direct"},
312
313 {"doctype": "Lab Test Template", "name": "BP","test_name": "Bile Pigment","test_code": "BP",
mbauskaree9da672017-10-10 12:15:48 +0530314 "test_group": _("Laboratory"),"department": _("Pathology"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530315 "item": "BP","test_template_type": "Single",
316 "is_billable": 1,"test_rate": 0.0,"test_uom": "","test_normal_range": "",
317 "sensitivity": 0,"test_description": "Bile Pigment"},
318 {"doctype": "Lab Test Template", "name": "BS","test_name": "Bile Salt","test_code": "BS",
mbauskaree9da672017-10-10 12:15:48 +0530319 "test_group": _("Laboratory"),"department": _("Pathology"),
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530320 "item": "BS","test_template_type": "Single",
321 "is_billable": 1,"test_rate": 0.0,"test_uom": "","test_normal_range": "",
322 "sensitivity": 0,"test_description": "Bile Salt"}
323 ]
324 insert_record(records)
325
326def create_sensitivity():
327 records = [
mbauskaree9da672017-10-10 12:15:48 +0530328 {"doctype": "Sensitivity", "sensitivity": _("Low Sensitivity")},
329 {"doctype": "Sensitivity", "sensitivity": _("High Sensitivity")},
330 {"doctype": "Sensitivity", "sensitivity": _("Moderate Sensitivity")},
331 {"doctype": "Sensitivity", "sensitivity": _("Susceptible")},
332 {"doctype": "Sensitivity", "sensitivity": _("Resistant")},
333 {"doctype": "Sensitivity", "sensitivity": _("Intermediate")}
Rushabh Mehtaf0569742017-09-13 12:52:30 +0530334 ]
335 insert_record(records)
Jamsheer0cde6ae2018-05-16 10:54:00 +0530336
337def add_healthcare_service_unit_tree_root():
338 record = [
339 {
340 "doctype": "Healthcare Service Unit",
341 "healthcare_service_unit_name": "All Healthcare Service Unit",
342 "is_group": 1
343 }
344 ]
345 insert_record(record)