DH | Medical MDT

Framework Compatibility

DH Medical MDT scriptworks for TMC Only

SQL


CREATE TABLE IF NOT EXISTS `medical_incidents` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `patient_csn` VARCHAR(20) NOT NULL,
    `patient_name` VARCHAR(100) NOT NULL,
    `incident_date` DATETIME NOT NULL,
    `incident_type` VARCHAR(50) NOT NULL,
    `title` VARCHAR(100) NOT NULL,
    `description` TEXT NOT NULL,
    `medication_given` TEXT NULL,
    `injuries_found` TEXT NULL,
    `treatments_done` TEXT NULL,
    `involved_paramedics` TEXT NOT NULL,
    `incident_location` VARCHAR(255) NULL,
    `incident_severity` ENUM('Minor', 'Moderate', 'Severe', 'Critical') DEFAULT 'Minor',
    `status` ENUM('Open', 'In Progress', 'Completed', 'Closed') DEFAULT 'Open',
    `created_by` VARCHAR(50) NOT NULL,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    INDEX `idx_patient_csn` (`patient_csn`),
    INDEX `idx_incident_date` (`incident_date`),
    INDEX `idx_incident_type` (`incident_type`)
);


CREATE TABLE IF NOT EXISTS `patient_notes` (
  `id` varchar(50) NOT NULL,
  `patient_csn` varchar(50) NOT NULL,
  `title` varchar(255) NOT NULL,
  `category` varchar(50) NOT NULL DEFAULT 'general',
  `priority` varchar(20) NOT NULL DEFAULT 'medium',
  `content` text NOT NULL,
  `created_by` varchar(50) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `patient_csn` (`patient_csn`),
  KEY `created_by` (`created_by`),
  KEY `priority` (`priority`),
  KEY `category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


CREATE TABLE IF NOT EXISTS `medical_appointments` (
  `id` varchar(50) NOT NULL PRIMARY KEY,
  `patient_csn` varchar(50) NOT NULL,
  `patient_name` varchar(100) NOT NULL,
  `doctor_csn` varchar(50) NOT NULL,
  `doctor_name` varchar(100) NOT NULL,
  `appointment_note` text,
  `appointment_datetime` datetime NOT NULL,
  `appointment_duration` int DEFAULT 30, 
  `appointment_status` enum('scheduled', 'completed', 'cancelled', 'no_show') DEFAULT 'scheduled',
  `created_date` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_date` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  
  INDEX `idx_patient_csn` (`patient_csn`),
  INDEX `idx_doctor_csn` (`doctor_csn`),
  INDEX `idx_appointment_date` (`appointment_datetime`)
);

Radial Menu:

Add this to your radial menu as sub-menu to medical-actions.

    ['hanssen:showMdt'] = {
        title = "Open MDT",
        icon = 'tablet-screen',
        iconCategory = 'solid',
        functionName = 'DHMdt:Client:OpenMDT',
        enableMenu = function()
            return curJob == 'medical' and not isDead 
        end,
        
    },


Last updated