Esempio n. 1
0
def add_healthcare_service_unit_tree_root():
    record = [{
        "doctype": "Healthcare Service Unit",
        "healthcare_service_unit_name": "All Healthcare Service Units",
        "is_group": 1
    }]
    insert_record(record)
Esempio n. 2
0
def create_academic_sessions():
	data = [
		{"doctype": "Academic Year", "academic_year_name": "2015-16"},
		{"doctype": "Academic Year", "academic_year_name": "2016-17"},
		{"doctype": "Academic Year", "academic_year_name": "2017-18"},
		{"doctype": "Academic Year", "academic_year_name": "2018-19"},
		{"doctype": "Academic Term", "academic_year": "2016-17", "term_name": "Semester 1"},
		{"doctype": "Academic Term", "academic_year": "2016-17", "term_name": "Semester 2"},
		{"doctype": "Academic Term", "academic_year": "2017-18", "term_name": "Semester 1"},
		{"doctype": "Academic Term", "academic_year": "2017-18", "term_name": "Semester 2"}
	]
	insert_record(data)
Esempio n. 3
0
def create_healthcare_item_groups():
    records = [{
        'doctype': 'Item Group',
        'item_group_name': _('Laboratory'),
        'is_group': 0,
        'parent_item_group': _('All Item Groups')
    }, {
        'doctype': 'Item Group',
        'item_group_name': _('Drug'),
        'is_group': 0,
        'parent_item_group': _('All Item Groups')
    }]
    insert_record(records)
Esempio n. 4
0
def create_sensitivity():
    records = [{
        "doctype": "Sensitivity",
        "sensitivity": _("Low Sensitivity")
    }, {
        "doctype": "Sensitivity",
        "sensitivity": _("High Sensitivity")
    }, {
        "doctype": "Sensitivity",
        "sensitivity": _("Moderate Sensitivity")
    }, {
        "doctype": "Sensitivity",
        "sensitivity": _("Susceptible")
    }, {
        "doctype": "Sensitivity",
        "sensitivity": _("Resistant")
    }, {
        "doctype": "Sensitivity",
        "sensitivity": _("Intermediate")
    }]
    insert_record(records)
Esempio n. 5
0
def create_agriculture_data():
    records = [
        dict(doctype='Item Group',
             item_group_name='Fertilizer',
             is_group=0,
             parent_item_group=_('All Item Groups')),
        dict(doctype='Item Group',
             item_group_name='Seed',
             is_group=0,
             parent_item_group=_('All Item Groups')),
        dict(doctype='Item Group',
             item_group_name='By-product',
             is_group=0,
             parent_item_group=_('All Item Groups')),
        dict(doctype='Item Group',
             item_group_name='Produce',
             is_group=0,
             parent_item_group=_('All Item Groups')),
        dict(doctype='Agriculture Analysis Criteria',
             title='Nitrogen Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Phosphorous Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Potassium Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Calcium Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Sulphur Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Magnesium Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Iron Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Copper Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Zinc Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Boron Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Manganese Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Chlorine Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Molybdenum Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Sodium Content',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Humic Acid',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Fulvic Acid',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Inert',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Others',
             standard=1,
             linked_doctype='Fertilizer'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Nitrogen',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Phosphorous',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Potassium',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Calcium',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Magnesium',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Sulphur',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Boron',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Copper',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Iron',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Manganese',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Zinc',
             standard=1,
             linked_doctype='Plant Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Depth (in cm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Soil pH',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Salt Concentration (%)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Organic Matter (%)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='CEC (Cation Exchange Capacity) (MAQ/100mL)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Potassium Saturation (%)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Calcium Saturation (%)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Manganese Saturation (%)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Nirtogen (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Phosphorous (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Potassium (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Calcium (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Magnesium (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Sulphur (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Copper (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Iron (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Manganese (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Zinc (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Aluminium (ppm)',
             standard=1,
             linked_doctype='Soil Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Water pH',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Conductivity (mS/cm)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Hardness (mg/CaCO3)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Turbidity (NTU)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Odor',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Color',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Nitrate (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Nirtite (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Calcium (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Magnesium (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Sulphate (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Boron (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Copper (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Iron (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Manganese (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Zinc (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Chlorine (mg/L)',
             standard=1,
             linked_doctype='Water Analysis'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Bulk Density',
             standard=1,
             linked_doctype='Soil Texture'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Field Capacity',
             standard=1,
             linked_doctype='Soil Texture'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Wilting Point',
             standard=1,
             linked_doctype='Soil Texture'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Hydraulic Conductivity',
             standard=1,
             linked_doctype='Soil Texture'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Organic Matter',
             standard=1,
             linked_doctype='Soil Texture'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Temperature High',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Temperature Low',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Temperature Average',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Dew Point',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Precipitation Received',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Humidity',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Pressure',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Insolation/ PAR (Photosynthetically Active Radiation)',
             standard=1,
             linked_doctype='Weather'),
        dict(doctype='Agriculture Analysis Criteria',
             title='Degree Days',
             standard=1,
             linked_doctype='Weather')
    ]
    insert_record(records)
Esempio n. 6
0
def create_lab_test_uom():
    records = [{
        "doctype": "Lab Test UOM",
        "name": "umol/L",
        "lab_test_uom": "umol/L",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "mg/L",
        "lab_test_uom": "mg/L",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "mg / dl",
        "lab_test_uom": "mg / dl",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "pg / ml",
        "lab_test_uom": "pg / ml",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "U/ml",
        "lab_test_uom": "U/ml",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "/HPF",
        "lab_test_uom": "/HPF",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "Million Cells / cumm",
        "lab_test_uom": "Million Cells / cumm",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "Lakhs Cells / cumm",
        "lab_test_uom": "Lakhs Cells / cumm",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "U / L",
        "lab_test_uom": "U / L",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "g / L",
        "lab_test_uom": "g / L",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "IU / ml",
        "lab_test_uom": "IU / ml",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "gm %",
        "lab_test_uom": "gm %",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "Microgram",
        "lab_test_uom": "Microgram",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "Micron",
        "lab_test_uom": "Micron",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "Cells / cumm",
        "lab_test_uom": "Cells / cumm",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "%",
        "lab_test_uom": "%",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "mm / dl",
        "lab_test_uom": "mm / dl",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "mm / hr",
        "lab_test_uom": "mm / hr",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "ulU / ml",
        "lab_test_uom": "ulU / ml",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "ng / ml",
        "lab_test_uom": "ng / ml",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "ng / dl",
        "lab_test_uom": "ng / dl",
        "uom_description": None
    }, {
        "doctype": "Lab Test UOM",
        "name": "ug / dl",
        "lab_test_uom": "ug / dl",
        "uom_description": None
    }]

    insert_record(records)
Esempio n. 7
0
def create_dosage():
    records = [{
        "doctype":
        "Prescription Dosage",
        "name":
        "1-1-1-1",
        "dosage":
        "1-1-1-1",
        "dosage_strength": [{
            "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"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "0-0-1",
        "dosage":
        "0-0-1",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "21:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "1-0-0",
        "dosage":
        "1-0-0",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "9:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "0-1-0",
        "dosage":
        "0-1-0",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "14:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "1-1-1",
        "dosage":
        "1-1-1",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "9:00:00"
        }, {
            "strength": "1.0",
            "strength_time": "14:00:00"
        }, {
            "strength": "1.0",
            "strength_time": "21:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "1-0-1",
        "dosage":
        "1-0-1",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "9:00:00"
        }, {
            "strength": "1.0",
            "strength_time": "21:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "Once Bedtime",
        "dosage":
        "Once Bedtime",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "21:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "5 times a day",
        "dosage":
        "5 times a day",
        "dosage_strength": [{
            "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"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "QID",
        "dosage":
        "QID",
        "dosage_strength": [{
            "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"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "TID",
        "dosage":
        "TID",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "9:00:00"
        }, {
            "strength": "1.0",
            "strength_time": "14:00:00"
        }, {
            "strength": "1.0",
            "strength_time": "21:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "BID",
        "dosage":
        "BID",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "9:00:00"
        }, {
            "strength": "1.0",
            "strength_time": "21:00:00"
        }]
    }, {
        "doctype":
        "Prescription Dosage",
        "name":
        "Once Daily",
        "dosage":
        "Once Daily",
        "dosage_strength": [{
            "strength": "1.0",
            "strength_time": "9:00:00"
        }]
    }]
    insert_record(records)
Esempio n. 8
0
def create_duration():
    records = [{
        "doctype": "Prescription Duration",
        "name": "3 Month",
        "number": "3",
        "period": "Month"
    }, {
        "doctype": "Prescription Duration",
        "name": "2 Month",
        "number": "2",
        "period": "Month"
    }, {
        "doctype": "Prescription Duration",
        "name": "1 Month",
        "number": "1",
        "period": "Month"
    }, {
        "doctype": "Prescription Duration",
        "name": "12 Hour",
        "number": "12",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "11 Hour",
        "number": "11",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "10 Hour",
        "number": "10",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "9 Hour",
        "number": "9",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "8 Hour",
        "number": "8",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "7 Hour",
        "number": "7",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "6 Hour",
        "number": "6",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "5 Hour",
        "number": "5",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "4 Hour",
        "number": "4",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "3 Hour",
        "number": "3",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "2 Hour",
        "number": "2",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "1 Hour",
        "number": "1",
        "period": "Hour"
    }, {
        "doctype": "Prescription Duration",
        "name": "5 Week",
        "number": "5",
        "period": "Week"
    }, {
        "doctype": "Prescription Duration",
        "name": "4 Week",
        "number": "4",
        "period": "Week"
    }, {
        "doctype": "Prescription Duration",
        "name": "3 Week",
        "number": "3",
        "period": "Week"
    }, {
        "doctype": "Prescription Duration",
        "name": "2 Week",
        "number": "2",
        "period": "Week"
    }, {
        "doctype": "Prescription Duration",
        "name": "1 Week",
        "number": "1",
        "period": "Week"
    }, {
        "doctype": "Prescription Duration",
        "name": "6 Day",
        "number": "6",
        "period": "Day"
    }, {
        "doctype": "Prescription Duration",
        "name": "5 Day",
        "number": "5",
        "period": "Day"
    }, {
        "doctype": "Prescription Duration",
        "name": "4 Day",
        "number": "4",
        "period": "Day"
    }, {
        "doctype": "Prescription Duration",
        "name": "3 Day",
        "number": "3",
        "period": "Day"
    }, {
        "doctype": "Prescription Duration",
        "name": "2 Day",
        "number": "2",
        "period": "Day"
    }, {
        "doctype": "Prescription Duration",
        "name": "1 Day",
        "number": "1",
        "period": "Day"
    }]
    insert_record(records)