Add medicine management functionality with UI and data handling
- Implemented MedicineManagementWindow for adding, editing, and removing medicines. - Created MedicineManager to handle medicine configurations, including loading and saving to JSON. - Updated UIManager to dynamically generate medicine-related UI components based on the MedicineManager. - Enhanced test suite with mock objects for MedicineManager to ensure proper functionality in DataManager tests. - Added validation for medicine input fields in the UI. - Introduced default medicine configurations for initial setup.
This commit is contained in:
62
medicines.json
Normal file
62
medicines.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"medicines": [
|
||||
{
|
||||
"key": "bupropion",
|
||||
"display_name": "Bupropion",
|
||||
"dosage_info": "150/300 mg",
|
||||
"quick_doses": [
|
||||
"150",
|
||||
"300"
|
||||
],
|
||||
"color": "#FF6B6B",
|
||||
"default_enabled": true
|
||||
},
|
||||
{
|
||||
"key": "hydroxyzine",
|
||||
"display_name": "Hydroxyzine",
|
||||
"dosage_info": "25 mg",
|
||||
"quick_doses": [
|
||||
"25",
|
||||
"50"
|
||||
],
|
||||
"color": "#4ECDC4",
|
||||
"default_enabled": false
|
||||
},
|
||||
{
|
||||
"key": "gabapentin",
|
||||
"display_name": "Gabapentin",
|
||||
"dosage_info": "100 mg",
|
||||
"quick_doses": [
|
||||
"100",
|
||||
"300",
|
||||
"600"
|
||||
],
|
||||
"color": "#45B7D1",
|
||||
"default_enabled": false
|
||||
},
|
||||
{
|
||||
"key": "propranolol",
|
||||
"display_name": "Propranolol",
|
||||
"dosage_info": "10 mg",
|
||||
"quick_doses": [
|
||||
"10",
|
||||
"20",
|
||||
"40"
|
||||
],
|
||||
"color": "#96CEB4",
|
||||
"default_enabled": true
|
||||
},
|
||||
{
|
||||
"key": "quetiapine",
|
||||
"display_name": "Quetiapine",
|
||||
"dosage_info": "25 mg",
|
||||
"quick_doses": [
|
||||
"25",
|
||||
"50",
|
||||
"100"
|
||||
],
|
||||
"color": "#FFEAA7",
|
||||
"default_enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user