Overview: MediTrack aims to enhance patient safety by preventing medication errors, including drug interactions and incorrect dosages. Using a simple JavaScript-based system, healthcare professionals can verify if a prescribed medication is safe for a patient, considering their current prescriptions, medical conditions, and dosage guidelines.
The primary technology used: JavaScript/Node.js: For developing the core application logic. Notebook LLM Integration: If the doctor made a mistake in the prescription, the AI can check and offer safe alternatives based on the patient's allergy history, medication taken and other factors. We inputted to the Notebook drug usage guides and safe prescription of medication. NotebookLM Patient Data Collection:
- patientRecords: This is an object that stores the profile of each patient. Each record includes age, sex, weight, current medications, allergies, and any health conditions. In the future, it could include other variables to make it more detailed and able to encompass more cases. Example patient data: const patientRecords = { patient_1: { age: 65, sex: "Female", weight_kg: 70, current_medications: ["aspirin", "metformin"], allergies: ["penicillin"], health_conditions: ["diabetes", "hypertension"] } }; The data will eventually be pulled from a database or an input form, allowing doctors to add and modify patient information and allowing more privacy. Mongodb will be used in the future to allow doctors to add multiple data while safeguarding their patients' privacy. Medication Interaction Check: drugInteractions: This part of the code contains known drug-drug interactions. It checks if any of the patient's current medications interact negatively with the new medication that is being prescribed. This could later include a wider range of drugs and their possible interactions. Interaction Logic: The function checkInteractions() loops through the patient's current medications to see if any of them interact with the newly prescribed medication. If there is a match, it returns a warning message. This could later include color signs to convey urgency. A red alert would signal to the doctor that the medication prescribed or dosage is dangerous to the patient, an orange alert would mean mild danger which signifies that the medication or dosage is not very suitable but it is not harmful. We could later tie it to technology like NotebookLM to suggest other medication options. Example interaction: const drugInteractions = { aspirin: ["ibuprofen"], // Aspirin interacts with ibuprofen metformin: ["contrast dye"] // Metformin interacts with contrast dye used in imaging }; Dosage Validation: dosageGuidelines: The system includes dosage guidelines for different age groups to ensure safe prescription practices. Dosages are adjusted for seniors, who may require lower doses. Validation Logic: The system checks the prescribed dosage against recommended minimum and maximum dosages based on the patient’s age. Example dosage guideline: const dosageGuidelines = { aspirin: { adult: { min_dose_mg: 50, max_dose_mg: 1000 }, senior: { min_dose_mg: 50, max_dose_mg: 300 } // Lower dose for seniors } }; Medication & Dosage Check Function: checkInteractions(patient, newMedication): This is the main function that checks for potential drug interactions. Process: For each medication in the patient's current list, it checks against the new medication to see if there is a known interaction. If an interaction is found, it returns a warning message. If no issues are detected, the system proceeds to dosage validation and allergy checks. Example use: const interactionResult = checkInteractions("patient_1", "ibuprofen"); console.log(interactionResult); // Outputs warning if interaction is found Future features: Look-alike medication separation: Design the system to separate medications with similar names or packaging to minimize confusion and protect patients from medical errors.