





















const db = require('../models');
const Users = db.users;






const Organizations = db.organizations;

const DoctorProfiles = db.doctor_profiles;

const PatientProfiles = db.patient_profiles;

const MedicalCamps = db.medical_camps;

const Appointments = db.appointments;

const Consultations = db.consultations;

const MedicalReports = db.medical_reports;

const Medicines = db.medicines;

const InventoryItems = db.inventory_items;

const Prescriptions = db.prescriptions;

const PrescriptionItems = db.prescription_items;

const MedicineDispatches = db.medicine_dispatches;

const Vaccinations = db.vaccinations;

const PatientVaccinations = db.patient_vaccinations;

const Reminders = db.reminders;

const ChatSessions = db.chat_sessions;

const Messages = db.messages;

const VideoCalls = db.video_calls;

const ChatbotInteractions = db.chatbot_interactions;

const Feedbacks = db.feedbacks;







const OrganizationsData = [
    
    {
    
        
        
            
                "name": "Alan Turing",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Grace Hopper",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Marie Curie",
            
        
    
    },
    
    {
    
        
        
            
                "name": "Ada Lovelace",
            
        
    
    },
    
];



const DoctorProfilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "doctor_type": "rural",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "medical_license_number": "PMC-CL-55821",
            
        
    
        
        
            
                "specialization": "Internal Medicine",
            
        
    
        
        
            
                "qualification": "MBBS, FCPS",
            
        
    
        
        
            
                "years_of_experience": 9,
            
        
    
        
        
            
                "availability_status": "offline",
            
        
    
        
        
            
                "consultation_fee_note": "Tele-consultation supported weekdays",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "doctor_type": "rural",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "medical_license_number": "PMC-RL-44109",
            
        
    
        
        
            
                "specialization": "Family Medicine",
            
        
    
        
        
            
                "qualification": "MBBS",
            
        
    
        
        
            
                "years_of_experience": 6,
            
        
    
        
        
            
                "availability_status": "busy",
            
        
    
        
        
            
                "consultation_fee_note": "Camp and clinic consultations",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "doctor_type": "city",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "medical_license_number": "PMC-CL-99901",
            
        
    
        
        
            
                "specialization": "Public Health",
            
        
    
        
        
            
                "qualification": "MBBS, MPH",
            
        
    
        
        
            
                "years_of_experience": 12,
            
        
    
        
        
            
                "availability_status": "offline",
            
        
    
        
        
            
                "consultation_fee_note": "Clinical oversight role",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "doctor_type": "rural",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "medical_license_number": "PMC-RL-88810",
            
        
    
        
        
            
                "specialization": "Community Medicine",
            
        
    
        
        
            
                "qualification": "MBBS",
            
        
    
        
        
            
                "years_of_experience": 8,
            
        
    
        
        
            
                "availability_status": "available",
            
        
    
        
        
            
                "consultation_fee_note": "Program coordination",
            
        
    
    },
    
];



const PatientProfilesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "patient_identifier": "PT-2026-00051",
            
        
    
        
        
            
                "gender": "unknown",
            
        
    
        
        
            
                "date_of_birth": new Date('1994-07-18T00:00:00Z'),
            
        
    
        
        
            
                "blood_group": "O+",
            
        
    
        
        
            
                "address_line": "Street 3, Village Topi",
            
        
    
        
        
            
                "village": "Topi",
            
        
    
        
        
            
                "district": "Swabi",
            
        
    
        
        
            
                "state": "Khyber Pakhtunkhwa",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "consent_for_telemedicine": true,
            
        
    
        
        
            
                "consent_for_notifications": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "patient_identifier": "PT-2026-00052",
            
        
    
        
        
            
                "gender": "female",
            
        
    
        
        
            
                "date_of_birth": new Date('1986-02-03T00:00:00Z'),
            
        
    
        
        
            
                "blood_group": "A+",
            
        
    
        
        
            
                "address_line": "Sector 5, North Karachi",
            
        
    
        
        
            
                "village": "North Karachi",
            
        
    
        
        
            
                "district": "Karachi Central",
            
        
    
        
        
            
                "state": "Sindh",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "consent_for_telemedicine": true,
            
        
    
        
        
            
                "consent_for_notifications": false,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "patient_identifier": "PT-2026-00053",
            
        
    
        
        
            
                "gender": "female",
            
        
    
        
        
            
                "date_of_birth": new Date('2001-11-09T00:00:00Z'),
            
        
    
        
        
            
                "blood_group": "B+",
            
        
    
        
        
            
                "address_line": "UC Gohati, Swabi",
            
        
    
        
        
            
                "village": "Gohati",
            
        
    
        
        
            
                "district": "Swabi",
            
        
    
        
        
            
                "state": "Khyber Pakhtunkhwa",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "consent_for_telemedicine": true,
            
        
    
        
        
            
                "consent_for_notifications": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "patient_identifier": "PT-2026-00054",
            
        
    
        
        
            
                "gender": "male",
            
        
    
        
        
            
                "date_of_birth": new Date('1978-09-22T00:00:00Z'),
            
        
    
        
        
            
                "blood_group": "AB+",
            
        
    
        
        
            
                "address_line": "Near RHC Topi",
            
        
    
        
        
            
                "village": "Topi",
            
        
    
        
        
            
                "district": "Swabi",
            
        
    
        
        
            
                "state": "Khyber Pakhtunkhwa",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "consent_for_telemedicine": false,
            
        
    
        
        
            
                "consent_for_notifications": true,
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MedicalCampsData = [
    
    {
    
        
        
            
                "camp_name": "Topi Wellness Camp March 2026",
            
        
    
        
        
            
                "camp_type": "vaccination_camp",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-03-10T08:00:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-03-10T14:00:00Z'),
            
        
    
        
        
            
                "location_label": "Topi Community Center",
            
        
    
        
        
            
                "address_line": "Near Main Market, Topi",
            
        
    
        
        
            
                "latitude": 34.0701,
            
        
    
        
        
            
                "longitude": 72.6199,
            
        
    
        
        
            
                "camp_status": "planned",
            
        
    
        
        
            
                "notes": "General screening and registration",
            
        
    
    },
    
    {
    
        
        
            
                "camp_name": "Swabi Vaccination Drive April 2026",
            
        
    
        
        
            
                "camp_type": "outreach_camp",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-04-05T08:30:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-04-05T13:30:00Z'),
            
        
    
        
        
            
                "location_label": "Swabi District School Ground",
            
        
    
        
        
            
                "address_line": "Near District Stadium",
            
        
    
        
        
            
                "latitude": 34.1215,
            
        
    
        
        
            
                "longitude": 72.4669,
            
        
    
        
        
            
                "camp_status": "completed",
            
        
    
        
        
            
                "notes": "Routine immunization and awareness",
            
        
    
    },
    
    {
    
        
        
            
                "camp_name": "RHC Topi Follow-up Camp",
            
        
    
        
        
            
                "camp_type": "vaccination_camp",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-03-28T09:00:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-03-28T15:00:00Z'),
            
        
    
        
        
            
                "location_label": "RHC Topi",
            
        
    
        
        
            
                "address_line": "Topi Bazar Road",
            
        
    
        
        
            
                "latitude": 34.0719,
            
        
    
        
        
            
                "longitude": 72.6215,
            
        
    
        
        
            
                "camp_status": "completed",
            
        
    
        
        
            
                "notes": "Follow-up for chronic patients",
            
        
    
    },
    
    {
    
        
        
            
                "camp_name": "Karachi Specialist Outreach Tele-Desk",
            
        
    
        
        
            
                "camp_type": "vaccination_camp",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "start_at": new Date('2026-03-29T10:00:00Z'),
            
        
    
        
        
            
                "end_at": new Date('2026-03-29T16:00:00Z'),
            
        
    
        
        
            
                "location_label": "City Hospital Telehealth Room 2",
            
        
    
        
        
            
                "address_line": "Main Shahrah-e-Faisal Road",
            
        
    
        
        
            
                "latitude": 24.8607,
            
        
    
        
        
            
                "longitude": 67.0011,
            
        
    
        
        
            
                "camp_status": "cancelled",
            
        
    
        
        
            
                "notes": "Remote consult support for rural cases",
            
        
    
    },
    
];



const AppointmentsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_start_at": new Date('2026-03-28T10:00:00Z'),
            
        
    
        
        
            
                "scheduled_end_at": new Date('2026-03-28T10:20:00Z'),
            
        
    
        
        
            
                "appointment_type": "in_person",
            
        
    
        
        
            
                "appointment_status": "no_show",
            
        
    
        
        
            
                "reason": "Follow-up for blood pressure review",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_start_at": new Date('2026-03-29T11:00:00Z'),
            
        
    
        
        
            
                "scheduled_end_at": new Date('2026-03-29T11:30:00Z'),
            
        
    
        
        
            
                "appointment_type": "chat",
            
        
    
        
        
            
                "appointment_status": "confirmed",
            
        
    
        
        
            
                "reason": "City specialist opinion for recurring gastritis",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_start_at": new Date('2026-04-05T09:15:00Z'),
            
        
    
        
        
            
                "scheduled_end_at": new Date('2026-04-05T09:25:00Z'),
            
        
    
        
        
            
                "appointment_type": "phone",
            
        
    
        
        
            
                "appointment_status": "in_progress",
            
        
    
        
        
            
                "reason": "Routine vaccination dose",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "scheduled_start_at": new Date('2026-04-12T10:30:00Z'),
            
        
    
        
        
            
                "scheduled_end_at": new Date('2026-04-12T11:00:00Z'),
            
        
    
        
        
            
                "appointment_type": "phone",
            
        
    
        
        
            
                "appointment_status": "requested",
            
        
    
        
        
            
                "reason": "Maternal health counseling and supplements",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ConsultationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-03-28T10:02:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-03-28T10:18:00Z'),
            
        
    
        
        
            
                "channel": "in_person",
            
        
    
        
        
            
                "consultation_status": "cancelled",
            
        
    
        
        
            
                "chief_complaint": "Headache and elevated blood pressure readings",
            
        
    
        
        
            
                "clinical_notes": "Patient reports intermittent headaches. BP measured at camp. Lifestyle advice given and medication adjusted.",
            
        
    
        
        
            
                "diagnosis_summary": "Primary hypertension, needs monitoring",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-03-29T11:05:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-03-29T11:28:00Z'),
            
        
    
        
        
            
                "channel": "video",
            
        
    
        
        
            
                "consultation_status": "closed",
            
        
    
        
        
            
                "chief_complaint": "Burning epigastric pain after meals",
            
        
    
        
        
            
                "clinical_notes": "Reviewed history and advised testing for H pylori. Provided diet guidance and short course therapy.",
            
        
    
        
        
            
                "diagnosis_summary": "Dyspepsia, rule out H pylori",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-04-05T09:16:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-04-05T09:22:00Z'),
            
        
    
        
        
            
                "channel": "phone",
            
        
    
        
        
            
                "consultation_status": "open",
            
        
    
        
        
            
                "chief_complaint": "Vaccination visit",
            
        
    
        
        
            
                "clinical_notes": "Screened for fever and contraindications. Vaccination administered. Observed briefly.",
            
        
    
        
        
            
                "diagnosis_summary": "Preventive immunization visit completed",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "started_at": new Date('2026-04-12T10:32:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-04-12T10:55:00Z'),
            
        
    
        
        
            
                "channel": "in_person",
            
        
    
        
        
            
                "consultation_status": "cancelled",
            
        
    
        
        
            
                "chief_complaint": "Questions about nutrition during pregnancy",
            
        
    
        
        
            
                "clinical_notes": "Diet plan shared, iron folate guidance, danger signs explained, follow-up recommended.",
            
        
    
        
        
            
                "diagnosis_summary": "Antenatal counseling provided",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MedicalReportsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_type": "lab_result",
            
        
    
        
        
            
                "report_date": new Date('2026-03-28T10:20:00Z'),
            
        
    
        
        
            
                "report_title": "BP Follow-up Summary",
            
        
    
        
        
            
                "report_notes": "BP reviewed and management plan updated. Patient advised home monitoring and low salt diet.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "qr_payload": "REPORT:PT-2026-00051:2026-03-28:BP-FU",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_type": "lab_result",
            
        
    
        
        
            
                "report_date": new Date('2026-03-28T12:22:00Z'),
            
        
    
        
        
            
                "report_title": "Diabetes Assessment Note",
            
        
    
        
        
            
                "report_notes": "Symptoms consistent with hyperglycemia. Labs recommended. Lifestyle counseling provided.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "qr_payload": "REPORT:PT-2026-00054:2026-03-28:DM-ASSESS",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_type": "other",
            
        
    
        
        
            
                "report_date": new Date('2026-03-29T11:30:00Z'),
            
        
    
        
        
            
                "report_title": "Gastritis Teleconsult Summary",
            
        
    
        
        
            
                "report_notes": "Recommended H pylori testing and dietary changes. Short course therapy discussed.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "qr_payload": "REPORT:PT-2026-00051:2026-03-29:GASTRO",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "report_type": "imaging",
            
        
    
        
        
            
                "report_date": new Date('2026-04-05T09:30:00Z'),
            
        
    
        
        
            
                "report_title": "Vaccination Record Update",
            
        
    
        
        
            
                "report_notes": "Vaccination administered at camp. Next due date scheduled in system.",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "qr_payload": "REPORT:PT-2026-00055:2026-04-05:VACC",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MedicinesData = [
    
    {
    
        
        
            
                "medicine_name": "Paracetamol",
            
        
    
        
        
            
                "generic_name": "Acetaminophen",
            
        
    
        
        
            
                "strength": "500 mg",
            
        
    
        
        
            
                "dosage_form": "drops",
            
        
    
        
        
            
                "manufacturer": "MedCare Pharma",
            
        
    
        
        
            
                "requires_prescription": false,
            
        
    
        
        
            
                "storage_instructions": "Store below 30C, keep dry",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "medicine_name": "Amoxicillin",
            
        
    
        
        
            
                "generic_name": "Amoxicillin",
            
        
    
        
        
            
                "strength": "500 mg",
            
        
    
        
        
            
                "dosage_form": "capsule",
            
        
    
        
        
            
                "manufacturer": "HealthNova Labs",
            
        
    
        
        
            
                "requires_prescription": true,
            
        
    
        
        
            
                "storage_instructions": "Store below 25C, protect from moisture",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "medicine_name": "Omeprazole",
            
        
    
        
        
            
                "generic_name": "Omeprazole",
            
        
    
        
        
            
                "strength": "20 mg",
            
        
    
        
        
            
                "dosage_form": "tablet",
            
        
    
        
        
            
                "manufacturer": "CityMeds",
            
        
    
        
        
            
                "requires_prescription": true,
            
        
    
        
        
            
                "storage_instructions": "Store at room temperature, protect from light",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "medicine_name": "Metformin",
            
        
    
        
        
            
                "generic_name": "Metformin Hydrochloride",
            
        
    
        
        
            
                "strength": "500 mg",
            
        
    
        
        
            
                "dosage_form": "ointment",
            
        
    
        
        
            
                "manufacturer": "GlucoWell Pharmaceuticals",
            
        
    
        
        
            
                "requires_prescription": true,
            
        
    
        
        
            
                "storage_instructions": "Store below 30C",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const InventoryItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "batch_code": "PCM-SW-2409A",
            
        
    
        
        
            
                "expiry_date": new Date('2027-09-30T00:00:00Z'),
            
        
    
        
        
            
                "quantity_on_hand": 4200,
            
        
    
        
        
            
                "reorder_level": 800,
            
        
    
        
        
            
                "unit_cost": 0.03,
            
        
    
        
        
            
                "stock_status": "quarantined",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "batch_code": "AMX-TOP-2411B",
            
        
    
        
        
            
                "expiry_date": new Date('2026-11-30T00:00:00Z'),
            
        
    
        
        
            
                "quantity_on_hand": 120,
            
        
    
        
        
            
                "reorder_level": 200,
            
        
    
        
        
            
                "unit_cost": 0.12,
            
        
    
        
        
            
                "stock_status": "out_of_stock",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "batch_code": "OMP-KHI-2501C",
            
        
    
        
        
            
                "expiry_date": new Date('2028-01-31T00:00:00Z'),
            
        
    
        
        
            
                "quantity_on_hand": 2600,
            
        
    
        
        
            
                "reorder_level": 500,
            
        
    
        
        
            
                "unit_cost": 0.1,
            
        
    
        
        
            
                "stock_status": "expired",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "batch_code": "MET-TOP-2403D",
            
        
    
        
        
            
                "expiry_date": new Date('2026-03-15T00:00:00Z'),
            
        
    
        
        
            
                "quantity_on_hand": 0,
            
        
    
        
        
            
                "reorder_level": 150,
            
        
    
        
        
            
                "unit_cost": 0.08,
            
        
    
        
        
            
                "stock_status": "quarantined",
            
        
    
    },
    
];



const PrescriptionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prescribed_at": new Date('2026-03-28T10:19:00Z'),
            
        
    
        
        
            
                "prescription_status": "fulfilled",
            
        
    
        
        
            
                "notes": "Take medications as directed and monitor BP daily",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prescribed_at": new Date('2026-03-29T11:29:00Z'),
            
        
    
        
        
            
                "prescription_status": "draft",
            
        
    
        
        
            
                "notes": "Short course therapy and dietary adjustments",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prescribed_at": new Date('2026-03-28T12:20:00Z'),
            
        
    
        
        
            
                "prescription_status": "issued",
            
        
    
        
        
            
                "notes": "Pending lab confirmation before initiating long-term therapy",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "prescribed_at": new Date('2026-04-12T10:58:00Z'),
            
        
    
        
        
            
                "prescription_status": "cancelled",
            
        
    
        
        
            
                "notes": "Supplements and nutrition plan; return in 4 weeks",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PrescriptionItemsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dose_instructions": "Take 1 tablet if headache occurs",
            
        
    
        
        
            
                "frequency": "as needed",
            
        
    
        
        
            
                "duration_days": 5,
            
        
    
        
        
            
                "quantity_prescribed": 10,
            
        
    
        
        
            
                "substitution_allowed": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dose_instructions": "Take 1 capsule 30 minutes before breakfast",
            
        
    
        
        
            
                "frequency": "once daily",
            
        
    
        
        
            
                "duration_days": 14,
            
        
    
        
        
            
                "quantity_prescribed": 14,
            
        
    
        
        
            
                "substitution_allowed": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dose_instructions": "Take 1 capsule after meals",
            
        
    
        
        
            
                "frequency": "twice daily",
            
        
    
        
        
            
                "duration_days": 7,
            
        
    
        
        
            
                "quantity_prescribed": 14,
            
        
    
        
        
            
                "substitution_allowed": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dose_instructions": "Start only if doctor confirms after labs",
            
        
    
        
        
            
                "frequency": "once daily",
            
        
    
        
        
            
                "duration_days": 30,
            
        
    
        
        
            
                "quantity_prescribed": 30,
            
        
    
        
        
            
                "substitution_allowed": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MedicineDispatchesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dispatched_at": new Date('2026-03-29T12:10:00Z'),
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-03-30T12:00:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "dispatch_status": "returned",
            
        
    
        
        
            
                "tracking_reference": "TRK-KHI-SW-90021",
            
        
    
        
        
            
                "last_known_latitude": 33.9952,
            
        
    
        
        
            
                "last_known_longitude": 71.4794,
            
        
    
        
        
            
                "delivery_notes": "Package handed to courier, en route to Swabi",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dispatched_at": new Date('2026-03-28T13:00:00Z'),
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-03-28T17:00:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2026-03-28T16:20:00Z'),
            
        
    
        
        
            
                "dispatch_status": "failed",
            
        
    
        
        
            
                "tracking_reference": "TRK-SW-TOP-12011",
            
        
    
        
        
            
                "last_known_latitude": 34.0719,
            
        
    
        
        
            
                "last_known_longitude": 72.6215,
            
        
    
        
        
            
                "delivery_notes": "Delivered at camp pickup point",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dispatched_at": new Date('2026-03-28T13:20:00Z'),
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-03-28T15:00:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "dispatch_status": "created",
            
        
    
        
        
            
                "tracking_reference": "TRK-SW-TOP-12012",
            
        
    
        
        
            
                "last_known_latitude": 34.1155,
            
        
    
        
        
            
                "last_known_longitude": 72.4822,
            
        
    
        
        
            
                "delivery_notes": "Cancelled pending lab confirmation",
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "dispatched_at": new Date('2026-04-12T12:05:00Z'),
            
        
    
        
        
            
                "expected_delivery_at": new Date('2026-04-12T16:00:00Z'),
            
        
    
        
        
            
                "delivered_at": new Date('2026-04-12T15:10:00Z'),
            
        
    
        
        
            
                "dispatch_status": "in_transit",
            
        
    
        
        
            
                "tracking_reference": "TRK-SW-GOH-44101",
            
        
    
        
        
            
                "last_known_latitude": 34.1322,
            
        
    
        
        
            
                "last_known_longitude": 72.4533,
            
        
    
        
        
            
                "delivery_notes": "Delivered during camp hours",
            
        
    
    },
    
];



const VaccinationsData = [
    
    {
    
        
        
            
                "vaccine_name": "BCG",
            
        
    
        
        
            
                "vaccine_code": "BCG",
            
        
    
        
        
            
                "recommended_min_age_days": 0,
            
        
    
        
        
            
                "recommended_max_age_days": 365,
            
        
    
        
        
            
                "description": "Protects against severe forms of tuberculosis",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "vaccine_name": "OPV",
            
        
    
        
        
            
                "vaccine_code": "OPV",
            
        
    
        
        
            
                "recommended_min_age_days": 0,
            
        
    
        
        
            
                "recommended_max_age_days": 1825,
            
        
    
        
        
            
                "description": "Oral polio vaccine schedule per national program",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "vaccine_name": "DTP",
            
        
    
        
        
            
                "vaccine_code": "DTP",
            
        
    
        
        
            
                "recommended_min_age_days": 42,
            
        
    
        
        
            
                "recommended_max_age_days": 1825,
            
        
    
        
        
            
                "description": "Diphtheria tetanus pertussis immunization series",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "vaccine_name": "Hepatitis B",
            
        
    
        
        
            
                "vaccine_code": "HEPB",
            
        
    
        
        
            
                "recommended_min_age_days": 0,
            
        
    
        
        
            
                "recommended_max_age_days": 3650,
            
        
    
        
        
            
                "description": "Hepatitis B vaccination series",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const PatientVaccinationsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "due_at": new Date('2026-04-05T09:15:00Z'),
            
        
    
        
        
            
                "administered_at": new Date('2026-04-05T09:18:00Z'),
            
        
    
        
        
            
                "vaccination_status": "missed",
            
        
    
        
        
            
                "administered_by": "Vaccination Team A",
            
        
    
        
        
            
                "notes": "No immediate adverse reaction observed",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "due_at": new Date('2026-04-05T09:15:00Z'),
            
        
    
        
        
            
                "administered_at": new Date('2026-04-05T09:19:00Z'),
            
        
    
        
        
            
                "vaccination_status": "scheduled",
            
        
    
        
        
            
                "administered_by": "Vaccination Team A",
            
        
    
        
        
            
                "notes": "Dose given as per schedule",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "due_at": new Date('2026-04-10T09:00:00Z'),
            
        
    
        
        
            
                "administered_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "vaccination_status": "cancelled",
            
        
    
        
        
            
                "administered_by": "Camp Nursing Desk",
            
        
    
        
        
            
                "notes": "Reminder to be sent one week prior",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "due_at": new Date('2026-05-12T10:00:00Z'),
            
        
    
        
        
            
                "administered_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "vaccination_status": "completed",
            
        
    
        
        
            
                "administered_by": "Camp Nursing Desk",
            
        
    
        
        
            
                "notes": "Schedule aligned with follow-up visit",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const RemindersData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reminder_type": "appointment",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-03-30T06:30:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2026-03-30T06:30:05Z'),
            
        
    
        
        
            
                "channel": "sms",
            
        
    
        
        
            
                "delivery_status": "failed",
            
        
    
        
        
            
                "message_text": "Reminder: Take Omeprazole once daily before breakfast",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reminder_type": "appointment",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-04-03T09:00:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2026-04-03T09:00:03Z'),
            
        
    
        
        
            
                "channel": "sms",
            
        
    
        
        
            
                "delivery_status": "failed",
            
        
    
        
        
            
                "message_text": "Vaccination due soon. Please visit the nearest camp on the scheduled date",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reminder_type": "appointment",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-04-12T09:30:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2026-04-12T09:30:02Z'),
            
        
    
        
        
            
                "channel": "email",
            
        
    
        
        
            
                "delivery_status": "pending",
            
        
    
        
        
            
                "message_text": "Appointment reminder: Maternal health chat consultation today at 10:30",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "reminder_type": "vaccination",
            
        
    
        
        
            
                "scheduled_at": new Date('2026-04-02T08:00:00Z'),
            
        
    
        
        
            
                "sent_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                "channel": "push",
            
        
    
        
        
            
                "delivery_status": "delivered",
            
        
    
        
        
            
                "message_text": "Follow-up: Please complete fasting labs and share results with your doctor",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ChatSessionsData = [
    
    {
    
        
        
            
                "session_type": "doctor_patient",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_status": "archived",
            
        
    
        
        
            
                "started_at": new Date('2026-03-27T18:00:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "session_type": "doctor_patient",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_status": "closed",
            
        
    
        
        
            
                "started_at": new Date('2026-03-28T09:40:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "session_type": "doctor_patient",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_status": "open",
            
        
    
        
        
            
                "started_at": new Date('2026-03-28T11:30:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2020-01-01T00:00:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                "session_type": "doctor_doctor",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "session_status": "archived",
            
        
    
        
        
            
                "started_at": new Date('2026-04-12T10:20:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-04-12T11:10:00Z'),
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const MessagesData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "user",
            
        
    
        
        
            
                "message_body": "I have a mild headache since yesterday. Should I come to the camp today",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "sent_at": new Date('2026-03-27T18:05:00Z'),
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "user",
            
        
    
        
        
            
                "message_body": "Please come for a BP check. Bring any previous prescriptions if available",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "sent_at": new Date('2026-03-27T18:07:00Z'),
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "chatbot",
            
        
    
        
        
            
                "message_body": "Need your input on patient with recurring gastritis symptoms. Planning teleconsult",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "sent_at": new Date('2026-03-28T09:42:00Z'),
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "sender_type": "user",
            
        
    
        
        
            
                "message_body": "Suggest H pylori testing and diet changes. If alarm symptoms present, refer for endoscopy",
            
        
    
        
        
            
                // type code here for "files" field
            
        
    
        
        
            
                "sent_at": new Date('2026-03-28T09:45:00Z'),
            
        
    
        
        
            
                "is_read": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const VideoCallsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "webrtc",
            
        
    
        
        
            
                "provider_room_name": "swajiva-room-tele-001",
            
        
    
        
        
            
                "provider_session_reference": "TW-SESSION-9A21",
            
        
    
        
        
            
                "started_at": new Date('2026-03-29T11:05:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-03-29T11:28:00Z'),
            
        
    
        
        
            
                "call_status": "ended",
            
        
    
        
        
            
                "call_notes": "Specialist consulted and plan recorded",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "twilio",
            
        
    
        
        
            
                "provider_room_name": "swajiva-room-bp-014",
            
        
    
        
        
            
                "provider_session_reference": "RTC-3F8B",
            
        
    
        
        
            
                "started_at": new Date('2026-03-28T10:02:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-03-28T10:18:00Z'),
            
        
    
        
        
            
                "call_status": "connected",
            
        
    
        
        
            
                "call_notes": "In-person session with quick video follow-up to explain plan",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "twilio",
            
        
    
        
        
            
                "provider_room_name": "swajiva-room-anc-003",
            
        
    
        
        
            
                "provider_session_reference": "TW-SESSION-7C10",
            
        
    
        
        
            
                "started_at": new Date('2026-04-12T10:32:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-04-12T10:55:00Z'),
            
        
    
        
        
            
                "call_status": "ringing",
            
        
    
        
        
            
                "call_notes": "Counseling completed and summary shared",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "provider": "webrtc",
            
        
    
        
        
            
                "provider_room_name": "swajiva-room-vacc-021",
            
        
    
        
        
            
                "provider_session_reference": "RTC-8D22",
            
        
    
        
        
            
                "started_at": new Date('2026-04-05T09:12:00Z'),
            
        
    
        
        
            
                "ended_at": new Date('2026-04-05T09:18:00Z'),
            
        
    
        
        
            
                "call_status": "failed",
            
        
    
        
        
            
                "call_notes": "Quick guardian guidance and post-vaccine instructions",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const ChatbotInteractionsData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "asked_at": new Date('2026-03-28T11:32:00Z'),
            
        
    
        
        
            
                "user_prompt": "I feel very thirsty and urinate frequently. What should I do next",
            
        
    
        
        
            
                "ai_response": "These symptoms can be linked to high blood sugar. Please arrange a fasting blood glucose test and consult your doctor. Seek urgent care if you have severe weakness, confusion, vomiting, or rapid breathing.",
            
        
    
        
        
            
                "model_name": "hf-med-assist-v1",
            
        
    
        
        
            
                "confidence_score": 0.71,
            
        
    
        
        
            
                "triage_level": "routine",
            
        
    
        
        
            
                "escalated_to_doctor": true,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "asked_at": new Date('2026-03-27T20:10:00Z'),
            
        
    
        
        
            
                "user_prompt": "Can I take paracetamol for headache today",
            
        
    
        
        
            
                "ai_response": "If you have no allergy and no contraindications, paracetamol may help for headache. Follow label dosing and avoid exceeding the daily limit. If headache is severe or persistent, consult a doctor.",
            
        
    
        
        
            
                "model_name": "hf-med-assist-v1",
            
        
    
        
        
            
                "confidence_score": 0.64,
            
        
    
        
        
            
                "triage_level": "emergency",
            
        
    
        
        
            
                "escalated_to_doctor": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "asked_at": new Date('2026-04-11T19:00:00Z'),
            
        
    
        
        
            
                "user_prompt": "What foods are good during pregnancy",
            
        
    
        
        
            
                "ai_response": "A balanced diet with fruits, vegetables, whole grains, protein sources, and iron rich foods is helpful. Discuss supplements with your clinician and attend scheduled antenatal visits.",
            
        
    
        
        
            
                "model_name": "hf-med-assist-v1",
            
        
    
        
        
            
                "confidence_score": 0.6,
            
        
    
        
        
            
                "triage_level": "self_care",
            
        
    
        
        
            
                "escalated_to_doctor": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "asked_at": new Date('2026-03-29T09:30:00Z'),
            
        
    
        
        
            
                "user_prompt": "Is spicy food causing my stomach pain",
            
        
    
        
        
            
                "ai_response": "Spicy foods can worsen reflux or gastritis symptoms for some people. Consider reducing spicy and acidic foods and consult your doctor for persistent pain or alarm symptoms.",
            
        
    
        
        
            
                "model_name": "hf-med-assist-v1",
            
        
    
        
        
            
                "confidence_score": 0.58,
            
        
    
        
        
            
                "triage_level": "urgent",
            
        
    
        
        
            
                "escalated_to_doctor": false,
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];



const FeedbacksData = [
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 5,
            
        
    
        
        
            
                "comments": "Doctor explained the plan clearly and the camp process was smooth",
            
        
    
        
        
            
                "submitted_at": new Date('2026-03-28T17:10:00Z'),
            
        
    
        
        
            
                "visibility": "private",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 4,
            
        
    
        
        
            
                "comments": "Teleconsultation was helpful. Would like quicker delivery updates",
            
        
    
        
        
            
                "submitted_at": new Date('2026-03-30T13:00:00Z'),
            
        
    
        
        
            
                "visibility": "public",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 5,
            
        
    
        
        
            
                "comments": "Counseling was respectful and easy to understand",
            
        
    
        
        
            
                "submitted_at": new Date('2026-04-12T17:30:00Z'),
            
        
    
        
        
            
                "visibility": "public",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
    {
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
        
        
            
                "rating": 4,
            
        
    
        
        
            
                "comments": "Staff was organized and provided good guidance",
            
        
    
        
        
            
                "submitted_at": new Date('2026-04-05T14:20:00Z'),
            
        
    
        
        
            
                "visibility": "private",
            
        
    
        
        
            
                // type code here for "relation_one" field
            
        
    
    },
    
];




    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            // Similar logic for "relation_many"
        
    
        
            
            async function associateUserWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User0 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (User0?.setOrganization)
                {
                    await
                    User0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User1 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (User1?.setOrganization)
                {
                    await
                    User1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User2 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (User2?.setOrganization)
                {
                    await
                    User2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const User3 = await Users.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (User3?.setOrganization)
                {
                    await
                    User3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
    
    
        
    

    
    
    
        
            
            async function associateDoctorProfileWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DoctorProfile0 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DoctorProfile0?.setUser)
                {
                    await
                    DoctorProfile0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DoctorProfile1 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DoctorProfile1?.setUser)
                {
                    await
                    DoctorProfile1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DoctorProfile2 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DoctorProfile2?.setUser)
                {
                    await
                    DoctorProfile2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const DoctorProfile3 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DoctorProfile3?.setUser)
                {
                    await
                    DoctorProfile3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
            
            async function associateDoctorProfileWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DoctorProfile0 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (DoctorProfile0?.setOrganization)
                {
                    await
                    DoctorProfile0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DoctorProfile1 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (DoctorProfile1?.setOrganization)
                {
                    await
                    DoctorProfile1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DoctorProfile2 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (DoctorProfile2?.setOrganization)
                {
                    await
                    DoctorProfile2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const DoctorProfile3 = await DoctorProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (DoctorProfile3?.setOrganization)
                {
                    await
                    DoctorProfile3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associatePatientProfileWithUser() {
            
                const relatedUser0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const PatientProfile0 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientProfile0?.setUser)
                {
                    await
                    PatientProfile0.
                    setUser(relatedUser0);
                }
            
                const relatedUser1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const PatientProfile1 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientProfile1?.setUser)
                {
                    await
                    PatientProfile1.
                    setUser(relatedUser1);
                }
            
                const relatedUser2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const PatientProfile2 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientProfile2?.setUser)
                {
                    await
                    PatientProfile2.
                    setUser(relatedUser2);
                }
            
                const relatedUser3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const PatientProfile3 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientProfile3?.setUser)
                {
                    await
                    PatientProfile3.
                    setUser(relatedUser3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePatientProfileWithRegistered_at_camp() {
            
                const relatedRegistered_at_camp0 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientProfile0 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientProfile0?.setRegistered_at_camp)
                {
                    await
                    PatientProfile0.
                    setRegistered_at_camp(relatedRegistered_at_camp0);
                }
            
                const relatedRegistered_at_camp1 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientProfile1 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientProfile1?.setRegistered_at_camp)
                {
                    await
                    PatientProfile1.
                    setRegistered_at_camp(relatedRegistered_at_camp1);
                }
            
                const relatedRegistered_at_camp2 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientProfile2 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientProfile2?.setRegistered_at_camp)
                {
                    await
                    PatientProfile2.
                    setRegistered_at_camp(relatedRegistered_at_camp2);
                }
            
                const relatedRegistered_at_camp3 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientProfile3 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientProfile3?.setRegistered_at_camp)
                {
                    await
                    PatientProfile3.
                    setRegistered_at_camp(relatedRegistered_at_camp3);
                }
            
        }
        
    
        
            
            async function associatePatientProfileWithPrimary_rural_doctor() {
            
                const relatedPrimary_rural_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const PatientProfile0 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientProfile0?.setPrimary_rural_doctor)
                {
                    await
                    PatientProfile0.
                    setPrimary_rural_doctor(relatedPrimary_rural_doctor0);
                }
            
                const relatedPrimary_rural_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const PatientProfile1 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientProfile1?.setPrimary_rural_doctor)
                {
                    await
                    PatientProfile1.
                    setPrimary_rural_doctor(relatedPrimary_rural_doctor1);
                }
            
                const relatedPrimary_rural_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const PatientProfile2 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientProfile2?.setPrimary_rural_doctor)
                {
                    await
                    PatientProfile2.
                    setPrimary_rural_doctor(relatedPrimary_rural_doctor2);
                }
            
                const relatedPrimary_rural_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const PatientProfile3 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientProfile3?.setPrimary_rural_doctor)
                {
                    await
                    PatientProfile3.
                    setPrimary_rural_doctor(relatedPrimary_rural_doctor3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associatePatientProfileWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientProfile0 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientProfile0?.setOrganization)
                {
                    await
                    PatientProfile0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientProfile1 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientProfile1?.setOrganization)
                {
                    await
                    PatientProfile1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientProfile2 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientProfile2?.setOrganization)
                {
                    await
                    PatientProfile2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientProfile3 = await PatientProfiles.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientProfile3?.setOrganization)
                {
                    await
                    PatientProfile3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
            
            async function associateMedicalCampWithOrganizer_organization() {
            
                const relatedOrganizer_organization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalCamp0 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalCamp0?.setOrganizer_organization)
                {
                    await
                    MedicalCamp0.
                    setOrganizer_organization(relatedOrganizer_organization0);
                }
            
                const relatedOrganizer_organization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalCamp1 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalCamp1?.setOrganizer_organization)
                {
                    await
                    MedicalCamp1.
                    setOrganizer_organization(relatedOrganizer_organization1);
                }
            
                const relatedOrganizer_organization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalCamp2 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalCamp2?.setOrganizer_organization)
                {
                    await
                    MedicalCamp2.
                    setOrganizer_organization(relatedOrganizer_organization2);
                }
            
                const relatedOrganizer_organization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalCamp3 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalCamp3?.setOrganizer_organization)
                {
                    await
                    MedicalCamp3.
                    setOrganizer_organization(relatedOrganizer_organization3);
                }
            
        }
        
    
        
            
            async function associateMedicalCampWithCamp_lead_doctor() {
            
                const relatedCamp_lead_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalCamp0 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalCamp0?.setCamp_lead_doctor)
                {
                    await
                    MedicalCamp0.
                    setCamp_lead_doctor(relatedCamp_lead_doctor0);
                }
            
                const relatedCamp_lead_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalCamp1 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalCamp1?.setCamp_lead_doctor)
                {
                    await
                    MedicalCamp1.
                    setCamp_lead_doctor(relatedCamp_lead_doctor1);
                }
            
                const relatedCamp_lead_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalCamp2 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalCamp2?.setCamp_lead_doctor)
                {
                    await
                    MedicalCamp2.
                    setCamp_lead_doctor(relatedCamp_lead_doctor2);
                }
            
                const relatedCamp_lead_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalCamp3 = await MedicalCamps.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalCamp3?.setCamp_lead_doctor)
                {
                    await
                    MedicalCamp3.
                    setCamp_lead_doctor(relatedCamp_lead_doctor3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associateAppointmentWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Appointment0 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Appointment0?.setPatient)
                {
                    await
                    Appointment0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Appointment1 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Appointment1?.setPatient)
                {
                    await
                    Appointment1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Appointment2 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Appointment2?.setPatient)
                {
                    await
                    Appointment2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Appointment3 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Appointment3?.setPatient)
                {
                    await
                    Appointment3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateAppointmentWithDoctor() {
            
                const relatedDoctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Appointment0 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Appointment0?.setDoctor)
                {
                    await
                    Appointment0.
                    setDoctor(relatedDoctor0);
                }
            
                const relatedDoctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Appointment1 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Appointment1?.setDoctor)
                {
                    await
                    Appointment1.
                    setDoctor(relatedDoctor1);
                }
            
                const relatedDoctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Appointment2 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Appointment2?.setDoctor)
                {
                    await
                    Appointment2.
                    setDoctor(relatedDoctor2);
                }
            
                const relatedDoctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Appointment3 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Appointment3?.setDoctor)
                {
                    await
                    Appointment3.
                    setDoctor(relatedDoctor3);
                }
            
        }
        
    
        
            
            async function associateAppointmentWithCamp() {
            
                const relatedCamp0 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Appointment0 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Appointment0?.setCamp)
                {
                    await
                    Appointment0.
                    setCamp(relatedCamp0);
                }
            
                const relatedCamp1 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Appointment1 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Appointment1?.setCamp)
                {
                    await
                    Appointment1.
                    setCamp(relatedCamp1);
                }
            
                const relatedCamp2 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Appointment2 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Appointment2?.setCamp)
                {
                    await
                    Appointment2.
                    setCamp(relatedCamp2);
                }
            
                const relatedCamp3 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Appointment3 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Appointment3?.setCamp)
                {
                    await
                    Appointment3.
                    setCamp(relatedCamp3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateAppointmentWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Appointment0 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Appointment0?.setOrganization)
                {
                    await
                    Appointment0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Appointment1 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Appointment1?.setOrganization)
                {
                    await
                    Appointment1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Appointment2 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Appointment2?.setOrganization)
                {
                    await
                    Appointment2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Appointment3 = await Appointments.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Appointment3?.setOrganization)
                {
                    await
                    Appointment3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateConsultationWithAppointment() {
            
                const relatedAppointment0 = await Appointments.findOne({
                    offset: Math.floor(Math.random() * (await Appointments.count())),
                });
                const Consultation0 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Consultation0?.setAppointment)
                {
                    await
                    Consultation0.
                    setAppointment(relatedAppointment0);
                }
            
                const relatedAppointment1 = await Appointments.findOne({
                    offset: Math.floor(Math.random() * (await Appointments.count())),
                });
                const Consultation1 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Consultation1?.setAppointment)
                {
                    await
                    Consultation1.
                    setAppointment(relatedAppointment1);
                }
            
                const relatedAppointment2 = await Appointments.findOne({
                    offset: Math.floor(Math.random() * (await Appointments.count())),
                });
                const Consultation2 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Consultation2?.setAppointment)
                {
                    await
                    Consultation2.
                    setAppointment(relatedAppointment2);
                }
            
                const relatedAppointment3 = await Appointments.findOne({
                    offset: Math.floor(Math.random() * (await Appointments.count())),
                });
                const Consultation3 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Consultation3?.setAppointment)
                {
                    await
                    Consultation3.
                    setAppointment(relatedAppointment3);
                }
            
        }
        
    
        
            
            async function associateConsultationWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Consultation0 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Consultation0?.setPatient)
                {
                    await
                    Consultation0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Consultation1 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Consultation1?.setPatient)
                {
                    await
                    Consultation1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Consultation2 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Consultation2?.setPatient)
                {
                    await
                    Consultation2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Consultation3 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Consultation3?.setPatient)
                {
                    await
                    Consultation3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateConsultationWithPrimary_doctor() {
            
                const relatedPrimary_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation0 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Consultation0?.setPrimary_doctor)
                {
                    await
                    Consultation0.
                    setPrimary_doctor(relatedPrimary_doctor0);
                }
            
                const relatedPrimary_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation1 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Consultation1?.setPrimary_doctor)
                {
                    await
                    Consultation1.
                    setPrimary_doctor(relatedPrimary_doctor1);
                }
            
                const relatedPrimary_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation2 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Consultation2?.setPrimary_doctor)
                {
                    await
                    Consultation2.
                    setPrimary_doctor(relatedPrimary_doctor2);
                }
            
                const relatedPrimary_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation3 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Consultation3?.setPrimary_doctor)
                {
                    await
                    Consultation3.
                    setPrimary_doctor(relatedPrimary_doctor3);
                }
            
        }
        
    
        
            
            async function associateConsultationWithSecondary_doctor() {
            
                const relatedSecondary_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation0 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Consultation0?.setSecondary_doctor)
                {
                    await
                    Consultation0.
                    setSecondary_doctor(relatedSecondary_doctor0);
                }
            
                const relatedSecondary_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation1 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Consultation1?.setSecondary_doctor)
                {
                    await
                    Consultation1.
                    setSecondary_doctor(relatedSecondary_doctor1);
                }
            
                const relatedSecondary_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation2 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Consultation2?.setSecondary_doctor)
                {
                    await
                    Consultation2.
                    setSecondary_doctor(relatedSecondary_doctor2);
                }
            
                const relatedSecondary_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Consultation3 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Consultation3?.setSecondary_doctor)
                {
                    await
                    Consultation3.
                    setSecondary_doctor(relatedSecondary_doctor3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateConsultationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Consultation0 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Consultation0?.setOrganization)
                {
                    await
                    Consultation0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Consultation1 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Consultation1?.setOrganization)
                {
                    await
                    Consultation1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Consultation2 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Consultation2?.setOrganization)
                {
                    await
                    Consultation2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Consultation3 = await Consultations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Consultation3?.setOrganization)
                {
                    await
                    Consultation3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMedicalReportWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicalReport0 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalReport0?.setPatient)
                {
                    await
                    MedicalReport0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicalReport1 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalReport1?.setPatient)
                {
                    await
                    MedicalReport1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicalReport2 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalReport2?.setPatient)
                {
                    await
                    MedicalReport2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicalReport3 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalReport3?.setPatient)
                {
                    await
                    MedicalReport3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateMedicalReportWithConsultation() {
            
                const relatedConsultation0 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const MedicalReport0 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalReport0?.setConsultation)
                {
                    await
                    MedicalReport0.
                    setConsultation(relatedConsultation0);
                }
            
                const relatedConsultation1 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const MedicalReport1 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalReport1?.setConsultation)
                {
                    await
                    MedicalReport1.
                    setConsultation(relatedConsultation1);
                }
            
                const relatedConsultation2 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const MedicalReport2 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalReport2?.setConsultation)
                {
                    await
                    MedicalReport2.
                    setConsultation(relatedConsultation2);
                }
            
                const relatedConsultation3 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const MedicalReport3 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalReport3?.setConsultation)
                {
                    await
                    MedicalReport3.
                    setConsultation(relatedConsultation3);
                }
            
        }
        
    
        
            
            async function associateMedicalReportWithAuthor_doctor() {
            
                const relatedAuthor_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalReport0 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalReport0?.setAuthor_doctor)
                {
                    await
                    MedicalReport0.
                    setAuthor_doctor(relatedAuthor_doctor0);
                }
            
                const relatedAuthor_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalReport1 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalReport1?.setAuthor_doctor)
                {
                    await
                    MedicalReport1.
                    setAuthor_doctor(relatedAuthor_doctor1);
                }
            
                const relatedAuthor_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalReport2 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalReport2?.setAuthor_doctor)
                {
                    await
                    MedicalReport2.
                    setAuthor_doctor(relatedAuthor_doctor2);
                }
            
                const relatedAuthor_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicalReport3 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalReport3?.setAuthor_doctor)
                {
                    await
                    MedicalReport3.
                    setAuthor_doctor(relatedAuthor_doctor3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMedicalReportWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalReport0 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicalReport0?.setOrganization)
                {
                    await
                    MedicalReport0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalReport1 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicalReport1?.setOrganization)
                {
                    await
                    MedicalReport1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalReport2 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicalReport2?.setOrganization)
                {
                    await
                    MedicalReport2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicalReport3 = await MedicalReports.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicalReport3?.setOrganization)
                {
                    await
                    MedicalReport3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMedicineWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Medicine0 = await Medicines.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Medicine0?.setOrganization)
                {
                    await
                    Medicine0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Medicine1 = await Medicines.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Medicine1?.setOrganization)
                {
                    await
                    Medicine1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Medicine2 = await Medicines.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Medicine2?.setOrganization)
                {
                    await
                    Medicine2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Medicine3 = await Medicines.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Medicine3?.setOrganization)
                {
                    await
                    Medicine3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateInventoryItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem0 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryItem0?.setOrganization)
                {
                    await
                    InventoryItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem1 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryItem1?.setOrganization)
                {
                    await
                    InventoryItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem2 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryItem2?.setOrganization)
                {
                    await
                    InventoryItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const InventoryItem3 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryItem3?.setOrganization)
                {
                    await
                    InventoryItem3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    
        
            
            async function associateInventoryItemWithMedicine() {
            
                const relatedMedicine0 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const InventoryItem0 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (InventoryItem0?.setMedicine)
                {
                    await
                    InventoryItem0.
                    setMedicine(relatedMedicine0);
                }
            
                const relatedMedicine1 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const InventoryItem1 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (InventoryItem1?.setMedicine)
                {
                    await
                    InventoryItem1.
                    setMedicine(relatedMedicine1);
                }
            
                const relatedMedicine2 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const InventoryItem2 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (InventoryItem2?.setMedicine)
                {
                    await
                    InventoryItem2.
                    setMedicine(relatedMedicine2);
                }
            
                const relatedMedicine3 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const InventoryItem3 = await InventoryItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (InventoryItem3?.setMedicine)
                {
                    await
                    InventoryItem3.
                    setMedicine(relatedMedicine3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
            
            async function associatePrescriptionWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Prescription0 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Prescription0?.setPatient)
                {
                    await
                    Prescription0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Prescription1 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Prescription1?.setPatient)
                {
                    await
                    Prescription1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Prescription2 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Prescription2?.setPatient)
                {
                    await
                    Prescription2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Prescription3 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Prescription3?.setPatient)
                {
                    await
                    Prescription3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associatePrescriptionWithConsultation() {
            
                const relatedConsultation0 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Prescription0 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Prescription0?.setConsultation)
                {
                    await
                    Prescription0.
                    setConsultation(relatedConsultation0);
                }
            
                const relatedConsultation1 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Prescription1 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Prescription1?.setConsultation)
                {
                    await
                    Prescription1.
                    setConsultation(relatedConsultation1);
                }
            
                const relatedConsultation2 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Prescription2 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Prescription2?.setConsultation)
                {
                    await
                    Prescription2.
                    setConsultation(relatedConsultation2);
                }
            
                const relatedConsultation3 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Prescription3 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Prescription3?.setConsultation)
                {
                    await
                    Prescription3.
                    setConsultation(relatedConsultation3);
                }
            
        }
        
    
        
            
            async function associatePrescriptionWithPrescribed_by_doctor() {
            
                const relatedPrescribed_by_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Prescription0 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Prescription0?.setPrescribed_by_doctor)
                {
                    await
                    Prescription0.
                    setPrescribed_by_doctor(relatedPrescribed_by_doctor0);
                }
            
                const relatedPrescribed_by_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Prescription1 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Prescription1?.setPrescribed_by_doctor)
                {
                    await
                    Prescription1.
                    setPrescribed_by_doctor(relatedPrescribed_by_doctor1);
                }
            
                const relatedPrescribed_by_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Prescription2 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Prescription2?.setPrescribed_by_doctor)
                {
                    await
                    Prescription2.
                    setPrescribed_by_doctor(relatedPrescribed_by_doctor2);
                }
            
                const relatedPrescribed_by_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Prescription3 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Prescription3?.setPrescribed_by_doctor)
                {
                    await
                    Prescription3.
                    setPrescribed_by_doctor(relatedPrescribed_by_doctor3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePrescriptionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Prescription0 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Prescription0?.setOrganization)
                {
                    await
                    Prescription0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Prescription1 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Prescription1?.setOrganization)
                {
                    await
                    Prescription1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Prescription2 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Prescription2?.setOrganization)
                {
                    await
                    Prescription2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Prescription3 = await Prescriptions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Prescription3?.setOrganization)
                {
                    await
                    Prescription3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePrescriptionItemWithPrescription() {
            
                const relatedPrescription0 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const PrescriptionItem0 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PrescriptionItem0?.setPrescription)
                {
                    await
                    PrescriptionItem0.
                    setPrescription(relatedPrescription0);
                }
            
                const relatedPrescription1 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const PrescriptionItem1 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PrescriptionItem1?.setPrescription)
                {
                    await
                    PrescriptionItem1.
                    setPrescription(relatedPrescription1);
                }
            
                const relatedPrescription2 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const PrescriptionItem2 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PrescriptionItem2?.setPrescription)
                {
                    await
                    PrescriptionItem2.
                    setPrescription(relatedPrescription2);
                }
            
                const relatedPrescription3 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const PrescriptionItem3 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PrescriptionItem3?.setPrescription)
                {
                    await
                    PrescriptionItem3.
                    setPrescription(relatedPrescription3);
                }
            
        }
        
    
        
            
            async function associatePrescriptionItemWithMedicine() {
            
                const relatedMedicine0 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const PrescriptionItem0 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PrescriptionItem0?.setMedicine)
                {
                    await
                    PrescriptionItem0.
                    setMedicine(relatedMedicine0);
                }
            
                const relatedMedicine1 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const PrescriptionItem1 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PrescriptionItem1?.setMedicine)
                {
                    await
                    PrescriptionItem1.
                    setMedicine(relatedMedicine1);
                }
            
                const relatedMedicine2 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const PrescriptionItem2 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PrescriptionItem2?.setMedicine)
                {
                    await
                    PrescriptionItem2.
                    setMedicine(relatedMedicine2);
                }
            
                const relatedMedicine3 = await Medicines.findOne({
                    offset: Math.floor(Math.random() * (await Medicines.count())),
                });
                const PrescriptionItem3 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PrescriptionItem3?.setMedicine)
                {
                    await
                    PrescriptionItem3.
                    setMedicine(relatedMedicine3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePrescriptionItemWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PrescriptionItem0 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PrescriptionItem0?.setOrganization)
                {
                    await
                    PrescriptionItem0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PrescriptionItem1 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PrescriptionItem1?.setOrganization)
                {
                    await
                    PrescriptionItem1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PrescriptionItem2 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PrescriptionItem2?.setOrganization)
                {
                    await
                    PrescriptionItem2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PrescriptionItem3 = await PrescriptionItems.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PrescriptionItem3?.setOrganization)
                {
                    await
                    PrescriptionItem3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMedicineDispatcheWithPrescription() {
            
                const relatedPrescription0 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const MedicineDispatche0 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicineDispatche0?.setPrescription)
                {
                    await
                    MedicineDispatche0.
                    setPrescription(relatedPrescription0);
                }
            
                const relatedPrescription1 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const MedicineDispatche1 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicineDispatche1?.setPrescription)
                {
                    await
                    MedicineDispatche1.
                    setPrescription(relatedPrescription1);
                }
            
                const relatedPrescription2 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const MedicineDispatche2 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicineDispatche2?.setPrescription)
                {
                    await
                    MedicineDispatche2.
                    setPrescription(relatedPrescription2);
                }
            
                const relatedPrescription3 = await Prescriptions.findOne({
                    offset: Math.floor(Math.random() * (await Prescriptions.count())),
                });
                const MedicineDispatche3 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicineDispatche3?.setPrescription)
                {
                    await
                    MedicineDispatche3.
                    setPrescription(relatedPrescription3);
                }
            
        }
        
    
        
            
            async function associateMedicineDispatcheWithFrom_organization() {
            
                const relatedFrom_organization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche0 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicineDispatche0?.setFrom_organization)
                {
                    await
                    MedicineDispatche0.
                    setFrom_organization(relatedFrom_organization0);
                }
            
                const relatedFrom_organization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche1 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicineDispatche1?.setFrom_organization)
                {
                    await
                    MedicineDispatche1.
                    setFrom_organization(relatedFrom_organization1);
                }
            
                const relatedFrom_organization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche2 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicineDispatche2?.setFrom_organization)
                {
                    await
                    MedicineDispatche2.
                    setFrom_organization(relatedFrom_organization2);
                }
            
                const relatedFrom_organization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche3 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicineDispatche3?.setFrom_organization)
                {
                    await
                    MedicineDispatche3.
                    setFrom_organization(relatedFrom_organization3);
                }
            
        }
        
    
        
            
            async function associateMedicineDispatcheWithTo_patient() {
            
                const relatedTo_patient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicineDispatche0 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicineDispatche0?.setTo_patient)
                {
                    await
                    MedicineDispatche0.
                    setTo_patient(relatedTo_patient0);
                }
            
                const relatedTo_patient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicineDispatche1 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicineDispatche1?.setTo_patient)
                {
                    await
                    MedicineDispatche1.
                    setTo_patient(relatedTo_patient1);
                }
            
                const relatedTo_patient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicineDispatche2 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicineDispatche2?.setTo_patient)
                {
                    await
                    MedicineDispatche2.
                    setTo_patient(relatedTo_patient2);
                }
            
                const relatedTo_patient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const MedicineDispatche3 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicineDispatche3?.setTo_patient)
                {
                    await
                    MedicineDispatche3.
                    setTo_patient(relatedTo_patient3);
                }
            
        }
        
    
        
            
            async function associateMedicineDispatcheWithTo_organization() {
            
                const relatedTo_organization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche0 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicineDispatche0?.setTo_organization)
                {
                    await
                    MedicineDispatche0.
                    setTo_organization(relatedTo_organization0);
                }
            
                const relatedTo_organization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche1 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicineDispatche1?.setTo_organization)
                {
                    await
                    MedicineDispatche1.
                    setTo_organization(relatedTo_organization1);
                }
            
                const relatedTo_organization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche2 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicineDispatche2?.setTo_organization)
                {
                    await
                    MedicineDispatche2.
                    setTo_organization(relatedTo_organization2);
                }
            
                const relatedTo_organization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const MedicineDispatche3 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicineDispatche3?.setTo_organization)
                {
                    await
                    MedicineDispatche3.
                    setTo_organization(relatedTo_organization3);
                }
            
        }
        
    
        
            
            async function associateMedicineDispatcheWithDispatched_by_doctor() {
            
                const relatedDispatched_by_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicineDispatche0 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (MedicineDispatche0?.setDispatched_by_doctor)
                {
                    await
                    MedicineDispatche0.
                    setDispatched_by_doctor(relatedDispatched_by_doctor0);
                }
            
                const relatedDispatched_by_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicineDispatche1 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (MedicineDispatche1?.setDispatched_by_doctor)
                {
                    await
                    MedicineDispatche1.
                    setDispatched_by_doctor(relatedDispatched_by_doctor1);
                }
            
                const relatedDispatched_by_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicineDispatche2 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (MedicineDispatche2?.setDispatched_by_doctor)
                {
                    await
                    MedicineDispatche2.
                    setDispatched_by_doctor(relatedDispatched_by_doctor2);
                }
            
                const relatedDispatched_by_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const MedicineDispatche3 = await MedicineDispatches.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (MedicineDispatche3?.setDispatched_by_doctor)
                {
                    await
                    MedicineDispatche3.
                    setDispatched_by_doctor(relatedDispatched_by_doctor3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    

    
    
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateVaccinationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Vaccination0 = await Vaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Vaccination0?.setOrganization)
                {
                    await
                    Vaccination0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Vaccination1 = await Vaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Vaccination1?.setOrganization)
                {
                    await
                    Vaccination1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Vaccination2 = await Vaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Vaccination2?.setOrganization)
                {
                    await
                    Vaccination2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Vaccination3 = await Vaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Vaccination3?.setOrganization)
                {
                    await
                    Vaccination3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associatePatientVaccinationWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const PatientVaccination0 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientVaccination0?.setPatient)
                {
                    await
                    PatientVaccination0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const PatientVaccination1 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientVaccination1?.setPatient)
                {
                    await
                    PatientVaccination1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const PatientVaccination2 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientVaccination2?.setPatient)
                {
                    await
                    PatientVaccination2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const PatientVaccination3 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientVaccination3?.setPatient)
                {
                    await
                    PatientVaccination3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associatePatientVaccinationWithVaccination() {
            
                const relatedVaccination0 = await Vaccinations.findOne({
                    offset: Math.floor(Math.random() * (await Vaccinations.count())),
                });
                const PatientVaccination0 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientVaccination0?.setVaccination)
                {
                    await
                    PatientVaccination0.
                    setVaccination(relatedVaccination0);
                }
            
                const relatedVaccination1 = await Vaccinations.findOne({
                    offset: Math.floor(Math.random() * (await Vaccinations.count())),
                });
                const PatientVaccination1 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientVaccination1?.setVaccination)
                {
                    await
                    PatientVaccination1.
                    setVaccination(relatedVaccination1);
                }
            
                const relatedVaccination2 = await Vaccinations.findOne({
                    offset: Math.floor(Math.random() * (await Vaccinations.count())),
                });
                const PatientVaccination2 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientVaccination2?.setVaccination)
                {
                    await
                    PatientVaccination2.
                    setVaccination(relatedVaccination2);
                }
            
                const relatedVaccination3 = await Vaccinations.findOne({
                    offset: Math.floor(Math.random() * (await Vaccinations.count())),
                });
                const PatientVaccination3 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientVaccination3?.setVaccination)
                {
                    await
                    PatientVaccination3.
                    setVaccination(relatedVaccination3);
                }
            
        }
        
    
        
            
            async function associatePatientVaccinationWithAdministered_at_camp() {
            
                const relatedAdministered_at_camp0 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientVaccination0 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientVaccination0?.setAdministered_at_camp)
                {
                    await
                    PatientVaccination0.
                    setAdministered_at_camp(relatedAdministered_at_camp0);
                }
            
                const relatedAdministered_at_camp1 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientVaccination1 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientVaccination1?.setAdministered_at_camp)
                {
                    await
                    PatientVaccination1.
                    setAdministered_at_camp(relatedAdministered_at_camp1);
                }
            
                const relatedAdministered_at_camp2 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientVaccination2 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientVaccination2?.setAdministered_at_camp)
                {
                    await
                    PatientVaccination2.
                    setAdministered_at_camp(relatedAdministered_at_camp2);
                }
            
                const relatedAdministered_at_camp3 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const PatientVaccination3 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientVaccination3?.setAdministered_at_camp)
                {
                    await
                    PatientVaccination3.
                    setAdministered_at_camp(relatedAdministered_at_camp3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associatePatientVaccinationWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientVaccination0 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (PatientVaccination0?.setOrganization)
                {
                    await
                    PatientVaccination0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientVaccination1 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (PatientVaccination1?.setOrganization)
                {
                    await
                    PatientVaccination1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientVaccination2 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (PatientVaccination2?.setOrganization)
                {
                    await
                    PatientVaccination2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const PatientVaccination3 = await PatientVaccinations.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (PatientVaccination3?.setOrganization)
                {
                    await
                    PatientVaccination3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateReminderWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Reminder0 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reminder0?.setPatient)
                {
                    await
                    Reminder0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Reminder1 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reminder1?.setPatient)
                {
                    await
                    Reminder1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Reminder2 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reminder2?.setPatient)
                {
                    await
                    Reminder2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Reminder3 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Reminder3?.setPatient)
                {
                    await
                    Reminder3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateReminderWithPrescription_item() {
            
                const relatedPrescription_item0 = await PrescriptionItems.findOne({
                    offset: Math.floor(Math.random() * (await PrescriptionItems.count())),
                });
                const Reminder0 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reminder0?.setPrescription_item)
                {
                    await
                    Reminder0.
                    setPrescription_item(relatedPrescription_item0);
                }
            
                const relatedPrescription_item1 = await PrescriptionItems.findOne({
                    offset: Math.floor(Math.random() * (await PrescriptionItems.count())),
                });
                const Reminder1 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reminder1?.setPrescription_item)
                {
                    await
                    Reminder1.
                    setPrescription_item(relatedPrescription_item1);
                }
            
                const relatedPrescription_item2 = await PrescriptionItems.findOne({
                    offset: Math.floor(Math.random() * (await PrescriptionItems.count())),
                });
                const Reminder2 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reminder2?.setPrescription_item)
                {
                    await
                    Reminder2.
                    setPrescription_item(relatedPrescription_item2);
                }
            
                const relatedPrescription_item3 = await PrescriptionItems.findOne({
                    offset: Math.floor(Math.random() * (await PrescriptionItems.count())),
                });
                const Reminder3 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Reminder3?.setPrescription_item)
                {
                    await
                    Reminder3.
                    setPrescription_item(relatedPrescription_item3);
                }
            
        }
        
    
        
            
            async function associateReminderWithPatient_vaccination() {
            
                const relatedPatient_vaccination0 = await PatientVaccinations.findOne({
                    offset: Math.floor(Math.random() * (await PatientVaccinations.count())),
                });
                const Reminder0 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reminder0?.setPatient_vaccination)
                {
                    await
                    Reminder0.
                    setPatient_vaccination(relatedPatient_vaccination0);
                }
            
                const relatedPatient_vaccination1 = await PatientVaccinations.findOne({
                    offset: Math.floor(Math.random() * (await PatientVaccinations.count())),
                });
                const Reminder1 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reminder1?.setPatient_vaccination)
                {
                    await
                    Reminder1.
                    setPatient_vaccination(relatedPatient_vaccination1);
                }
            
                const relatedPatient_vaccination2 = await PatientVaccinations.findOne({
                    offset: Math.floor(Math.random() * (await PatientVaccinations.count())),
                });
                const Reminder2 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reminder2?.setPatient_vaccination)
                {
                    await
                    Reminder2.
                    setPatient_vaccination(relatedPatient_vaccination2);
                }
            
                const relatedPatient_vaccination3 = await PatientVaccinations.findOne({
                    offset: Math.floor(Math.random() * (await PatientVaccinations.count())),
                });
                const Reminder3 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Reminder3?.setPatient_vaccination)
                {
                    await
                    Reminder3.
                    setPatient_vaccination(relatedPatient_vaccination3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateReminderWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reminder0 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Reminder0?.setOrganization)
                {
                    await
                    Reminder0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reminder1 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Reminder1?.setOrganization)
                {
                    await
                    Reminder1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reminder2 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Reminder2?.setOrganization)
                {
                    await
                    Reminder2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Reminder3 = await Reminders.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Reminder3?.setOrganization)
                {
                    await
                    Reminder3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
    
        
            
            async function associateChatSessionWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setPatient)
                {
                    await
                    ChatSession0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setPatient)
                {
                    await
                    ChatSession1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setPatient)
                {
                    await
                    ChatSession2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setPatient)
                {
                    await
                    ChatSession3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateChatSessionWithDoctor() {
            
                const relatedDoctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setDoctor)
                {
                    await
                    ChatSession0.
                    setDoctor(relatedDoctor0);
                }
            
                const relatedDoctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setDoctor)
                {
                    await
                    ChatSession1.
                    setDoctor(relatedDoctor1);
                }
            
                const relatedDoctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setDoctor)
                {
                    await
                    ChatSession2.
                    setDoctor(relatedDoctor2);
                }
            
                const relatedDoctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setDoctor)
                {
                    await
                    ChatSession3.
                    setDoctor(relatedDoctor3);
                }
            
        }
        
    
        
            
            async function associateChatSessionWithSecond_doctor() {
            
                const relatedSecond_doctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setSecond_doctor)
                {
                    await
                    ChatSession0.
                    setSecond_doctor(relatedSecond_doctor0);
                }
            
                const relatedSecond_doctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setSecond_doctor)
                {
                    await
                    ChatSession1.
                    setSecond_doctor(relatedSecond_doctor1);
                }
            
                const relatedSecond_doctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setSecond_doctor)
                {
                    await
                    ChatSession2.
                    setSecond_doctor(relatedSecond_doctor2);
                }
            
                const relatedSecond_doctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setSecond_doctor)
                {
                    await
                    ChatSession3.
                    setSecond_doctor(relatedSecond_doctor3);
                }
            
        }
        
    
        
            
            async function associateChatSessionWithCreated_by_user() {
            
                const relatedCreated_by_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setCreated_by_user)
                {
                    await
                    ChatSession0.
                    setCreated_by_user(relatedCreated_by_user0);
                }
            
                const relatedCreated_by_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setCreated_by_user)
                {
                    await
                    ChatSession1.
                    setCreated_by_user(relatedCreated_by_user1);
                }
            
                const relatedCreated_by_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setCreated_by_user)
                {
                    await
                    ChatSession2.
                    setCreated_by_user(relatedCreated_by_user2);
                }
            
                const relatedCreated_by_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setCreated_by_user)
                {
                    await
                    ChatSession3.
                    setCreated_by_user(relatedCreated_by_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
            
            async function associateChatSessionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession0 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatSession0?.setOrganization)
                {
                    await
                    ChatSession0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession1 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatSession1?.setOrganization)
                {
                    await
                    ChatSession1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession2 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatSession2?.setOrganization)
                {
                    await
                    ChatSession2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatSession3 = await ChatSessions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatSession3?.setOrganization)
                {
                    await
                    ChatSession3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateMessageWithChat_session() {
            
                const relatedChat_session0 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const Message0 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Message0?.setChat_session)
                {
                    await
                    Message0.
                    setChat_session(relatedChat_session0);
                }
            
                const relatedChat_session1 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const Message1 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Message1?.setChat_session)
                {
                    await
                    Message1.
                    setChat_session(relatedChat_session1);
                }
            
                const relatedChat_session2 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const Message2 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Message2?.setChat_session)
                {
                    await
                    Message2.
                    setChat_session(relatedChat_session2);
                }
            
                const relatedChat_session3 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const Message3 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Message3?.setChat_session)
                {
                    await
                    Message3.
                    setChat_session(relatedChat_session3);
                }
            
        }
        
    
        
            
            async function associateMessageWithSender_user() {
            
                const relatedSender_user0 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Message0 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Message0?.setSender_user)
                {
                    await
                    Message0.
                    setSender_user(relatedSender_user0);
                }
            
                const relatedSender_user1 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Message1 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Message1?.setSender_user)
                {
                    await
                    Message1.
                    setSender_user(relatedSender_user1);
                }
            
                const relatedSender_user2 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Message2 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Message2?.setSender_user)
                {
                    await
                    Message2.
                    setSender_user(relatedSender_user2);
                }
            
                const relatedSender_user3 = await Users.findOne({
                    offset: Math.floor(Math.random() * (await Users.count())),
                });
                const Message3 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Message3?.setSender_user)
                {
                    await
                    Message3.
                    setSender_user(relatedSender_user3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateMessageWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Message0 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Message0?.setOrganization)
                {
                    await
                    Message0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Message1 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Message1?.setOrganization)
                {
                    await
                    Message1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Message2 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Message2?.setOrganization)
                {
                    await
                    Message2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Message3 = await Messages.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Message3?.setOrganization)
                {
                    await
                    Message3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateVideoCallWithConsultation() {
            
                const relatedConsultation0 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const VideoCall0 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (VideoCall0?.setConsultation)
                {
                    await
                    VideoCall0.
                    setConsultation(relatedConsultation0);
                }
            
                const relatedConsultation1 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const VideoCall1 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (VideoCall1?.setConsultation)
                {
                    await
                    VideoCall1.
                    setConsultation(relatedConsultation1);
                }
            
                const relatedConsultation2 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const VideoCall2 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (VideoCall2?.setConsultation)
                {
                    await
                    VideoCall2.
                    setConsultation(relatedConsultation2);
                }
            
                const relatedConsultation3 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const VideoCall3 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (VideoCall3?.setConsultation)
                {
                    await
                    VideoCall3.
                    setConsultation(relatedConsultation3);
                }
            
        }
        
    
        
            
            async function associateVideoCallWithChat_session() {
            
                const relatedChat_session0 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const VideoCall0 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (VideoCall0?.setChat_session)
                {
                    await
                    VideoCall0.
                    setChat_session(relatedChat_session0);
                }
            
                const relatedChat_session1 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const VideoCall1 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (VideoCall1?.setChat_session)
                {
                    await
                    VideoCall1.
                    setChat_session(relatedChat_session1);
                }
            
                const relatedChat_session2 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const VideoCall2 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (VideoCall2?.setChat_session)
                {
                    await
                    VideoCall2.
                    setChat_session(relatedChat_session2);
                }
            
                const relatedChat_session3 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const VideoCall3 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (VideoCall3?.setChat_session)
                {
                    await
                    VideoCall3.
                    setChat_session(relatedChat_session3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateVideoCallWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const VideoCall0 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (VideoCall0?.setOrganization)
                {
                    await
                    VideoCall0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const VideoCall1 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (VideoCall1?.setOrganization)
                {
                    await
                    VideoCall1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const VideoCall2 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (VideoCall2?.setOrganization)
                {
                    await
                    VideoCall2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const VideoCall3 = await VideoCalls.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (VideoCall3?.setOrganization)
                {
                    await
                    VideoCall3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateChatbotInteractionWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatbotInteraction0 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatbotInteraction0?.setPatient)
                {
                    await
                    ChatbotInteraction0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatbotInteraction1 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatbotInteraction1?.setPatient)
                {
                    await
                    ChatbotInteraction1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatbotInteraction2 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatbotInteraction2?.setPatient)
                {
                    await
                    ChatbotInteraction2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const ChatbotInteraction3 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatbotInteraction3?.setPatient)
                {
                    await
                    ChatbotInteraction3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateChatbotInteractionWithChat_session() {
            
                const relatedChat_session0 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatbotInteraction0 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatbotInteraction0?.setChat_session)
                {
                    await
                    ChatbotInteraction0.
                    setChat_session(relatedChat_session0);
                }
            
                const relatedChat_session1 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatbotInteraction1 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatbotInteraction1?.setChat_session)
                {
                    await
                    ChatbotInteraction1.
                    setChat_session(relatedChat_session1);
                }
            
                const relatedChat_session2 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatbotInteraction2 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatbotInteraction2?.setChat_session)
                {
                    await
                    ChatbotInteraction2.
                    setChat_session(relatedChat_session2);
                }
            
                const relatedChat_session3 = await ChatSessions.findOne({
                    offset: Math.floor(Math.random() * (await ChatSessions.count())),
                });
                const ChatbotInteraction3 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatbotInteraction3?.setChat_session)
                {
                    await
                    ChatbotInteraction3.
                    setChat_session(relatedChat_session3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateChatbotInteractionWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotInteraction0 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (ChatbotInteraction0?.setOrganization)
                {
                    await
                    ChatbotInteraction0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotInteraction1 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (ChatbotInteraction1?.setOrganization)
                {
                    await
                    ChatbotInteraction1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotInteraction2 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (ChatbotInteraction2?.setOrganization)
                {
                    await
                    ChatbotInteraction2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const ChatbotInteraction3 = await ChatbotInteractions.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (ChatbotInteraction3?.setOrganization)
                {
                    await
                    ChatbotInteraction3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    

    
    
    
        
            
            async function associateFeedbackWithPatient() {
            
                const relatedPatient0 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Feedback0 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Feedback0?.setPatient)
                {
                    await
                    Feedback0.
                    setPatient(relatedPatient0);
                }
            
                const relatedPatient1 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Feedback1 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Feedback1?.setPatient)
                {
                    await
                    Feedback1.
                    setPatient(relatedPatient1);
                }
            
                const relatedPatient2 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Feedback2 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Feedback2?.setPatient)
                {
                    await
                    Feedback2.
                    setPatient(relatedPatient2);
                }
            
                const relatedPatient3 = await PatientProfiles.findOne({
                    offset: Math.floor(Math.random() * (await PatientProfiles.count())),
                });
                const Feedback3 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Feedback3?.setPatient)
                {
                    await
                    Feedback3.
                    setPatient(relatedPatient3);
                }
            
        }
        
    
        
            
            async function associateFeedbackWithDoctor() {
            
                const relatedDoctor0 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Feedback0 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Feedback0?.setDoctor)
                {
                    await
                    Feedback0.
                    setDoctor(relatedDoctor0);
                }
            
                const relatedDoctor1 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Feedback1 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Feedback1?.setDoctor)
                {
                    await
                    Feedback1.
                    setDoctor(relatedDoctor1);
                }
            
                const relatedDoctor2 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Feedback2 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Feedback2?.setDoctor)
                {
                    await
                    Feedback2.
                    setDoctor(relatedDoctor2);
                }
            
                const relatedDoctor3 = await DoctorProfiles.findOne({
                    offset: Math.floor(Math.random() * (await DoctorProfiles.count())),
                });
                const Feedback3 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Feedback3?.setDoctor)
                {
                    await
                    Feedback3.
                    setDoctor(relatedDoctor3);
                }
            
        }
        
    
        
            
            async function associateFeedbackWithConsultation() {
            
                const relatedConsultation0 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Feedback0 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Feedback0?.setConsultation)
                {
                    await
                    Feedback0.
                    setConsultation(relatedConsultation0);
                }
            
                const relatedConsultation1 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Feedback1 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Feedback1?.setConsultation)
                {
                    await
                    Feedback1.
                    setConsultation(relatedConsultation1);
                }
            
                const relatedConsultation2 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Feedback2 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Feedback2?.setConsultation)
                {
                    await
                    Feedback2.
                    setConsultation(relatedConsultation2);
                }
            
                const relatedConsultation3 = await Consultations.findOne({
                    offset: Math.floor(Math.random() * (await Consultations.count())),
                });
                const Feedback3 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Feedback3?.setConsultation)
                {
                    await
                    Feedback3.
                    setConsultation(relatedConsultation3);
                }
            
        }
        
    
        
            
            async function associateFeedbackWithCamp() {
            
                const relatedCamp0 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Feedback0 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Feedback0?.setCamp)
                {
                    await
                    Feedback0.
                    setCamp(relatedCamp0);
                }
            
                const relatedCamp1 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Feedback1 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Feedback1?.setCamp)
                {
                    await
                    Feedback1.
                    setCamp(relatedCamp1);
                }
            
                const relatedCamp2 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Feedback2 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Feedback2?.setCamp)
                {
                    await
                    Feedback2.
                    setCamp(relatedCamp2);
                }
            
                const relatedCamp3 = await MedicalCamps.findOne({
                    offset: Math.floor(Math.random() * (await MedicalCamps.count())),
                });
                const Feedback3 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Feedback3?.setCamp)
                {
                    await
                    Feedback3.
                    setCamp(relatedCamp3);
                }
            
        }
        
    
        
    
        
    
        
    
        
    
        
            
            async function associateFeedbackWithOrganization() {
            
                const relatedOrganization0 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Feedback0 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 0
                });
                if (Feedback0?.setOrganization)
                {
                    await
                    Feedback0.
                    setOrganization(relatedOrganization0);
                }
            
                const relatedOrganization1 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Feedback1 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 1
                });
                if (Feedback1?.setOrganization)
                {
                    await
                    Feedback1.
                    setOrganization(relatedOrganization1);
                }
            
                const relatedOrganization2 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Feedback2 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 2
                });
                if (Feedback2?.setOrganization)
                {
                    await
                    Feedback2.
                    setOrganization(relatedOrganization2);
                }
            
                const relatedOrganization3 = await Organizations.findOne({
                    offset: Math.floor(Math.random() * (await Organizations.count())),
                });
                const Feedback3 = await Feedbacks.findOne({
                    order: [['id', 'ASC']],
                    offset: 3
                });
                if (Feedback3?.setOrganization)
                {
                    await
                    Feedback3.
                    setOrganization(relatedOrganization3);
                }
            
        }
        
    


module.exports = {
    up: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
                
                await Organizations.bulkCreate(OrganizationsData);
                
            
            
                
                await DoctorProfiles.bulkCreate(DoctorProfilesData);
                
            
            
                
                await PatientProfiles.bulkCreate(PatientProfilesData);
                
            
            
                
                await MedicalCamps.bulkCreate(MedicalCampsData);
                
            
            
                
                await Appointments.bulkCreate(AppointmentsData);
                
            
            
                
                await Consultations.bulkCreate(ConsultationsData);
                
            
            
                
                await MedicalReports.bulkCreate(MedicalReportsData);
                
            
            
                
                await Medicines.bulkCreate(MedicinesData);
                
            
            
                
                await InventoryItems.bulkCreate(InventoryItemsData);
                
            
            
                
                await Prescriptions.bulkCreate(PrescriptionsData);
                
            
            
                
                await PrescriptionItems.bulkCreate(PrescriptionItemsData);
                
            
            
                
                await MedicineDispatches.bulkCreate(MedicineDispatchesData);
                
            
            
                
                await Vaccinations.bulkCreate(VaccinationsData);
                
            
            
                
                await PatientVaccinations.bulkCreate(PatientVaccinationsData);
                
            
            
                
                await Reminders.bulkCreate(RemindersData);
                
            
            
                
                await ChatSessions.bulkCreate(ChatSessionsData);
                
            
            
                
                await Messages.bulkCreate(MessagesData);
                
            
            
                
                await VideoCalls.bulkCreate(VideoCallsData);
                
            
            
                
                await ChatbotInteractions.bulkCreate(ChatbotInteractionsData);
                
            
            
                
                await Feedbacks.bulkCreate(FeedbacksData);
                
            
            await Promise.all([
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        // Similar logic for "relation_many"
                    
                
                    
                        
                        await associateUserWithOrganization(),
                    
                
            
                
                
                
                
                    
                
            
                
                
                    
                        
                        await associateDoctorProfileWithUser(),
                    
                
                    
                
                    
                        
                        await associateDoctorProfileWithOrganization(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePatientProfileWithUser(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePatientProfileWithRegistered_at_camp(),
                    
                
                    
                        
                        await associatePatientProfileWithPrimary_rural_doctor(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePatientProfileWithOrganization(),
                    
                
            
                
                
                    
                
                    
                
                    
                        
                        await associateMedicalCampWithOrganizer_organization(),
                    
                
                    
                        
                        await associateMedicalCampWithCamp_lead_doctor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associateAppointmentWithPatient(),
                    
                
                    
                        
                        await associateAppointmentWithDoctor(),
                    
                
                    
                        
                        await associateAppointmentWithCamp(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateAppointmentWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateConsultationWithAppointment(),
                    
                
                    
                        
                        await associateConsultationWithPatient(),
                    
                
                    
                        
                        await associateConsultationWithPrimary_doctor(),
                    
                
                    
                        
                        await associateConsultationWithSecondary_doctor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateConsultationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMedicalReportWithPatient(),
                    
                
                    
                        
                        await associateMedicalReportWithConsultation(),
                    
                
                    
                        
                        await associateMedicalReportWithAuthor_doctor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMedicalReportWithOrganization(),
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMedicineWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateInventoryItemWithOrganization(),
                    
                
                    
                        
                        await associateInventoryItemWithMedicine(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                        
                        await associatePrescriptionWithPatient(),
                    
                
                    
                        
                        await associatePrescriptionWithConsultation(),
                    
                
                    
                        
                        await associatePrescriptionWithPrescribed_by_doctor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePrescriptionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePrescriptionItemWithPrescription(),
                    
                
                    
                        
                        await associatePrescriptionItemWithMedicine(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePrescriptionItemWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMedicineDispatcheWithPrescription(),
                    
                
                    
                        
                        await associateMedicineDispatcheWithFrom_organization(),
                    
                
                    
                        
                        await associateMedicineDispatcheWithTo_patient(),
                    
                
                    
                        
                        await associateMedicineDispatcheWithTo_organization(),
                    
                
                    
                        
                        await associateMedicineDispatcheWithDispatched_by_doctor(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateVaccinationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associatePatientVaccinationWithPatient(),
                    
                
                    
                        
                        await associatePatientVaccinationWithVaccination(),
                    
                
                    
                        
                        await associatePatientVaccinationWithAdministered_at_camp(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associatePatientVaccinationWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateReminderWithPatient(),
                    
                
                    
                        
                        await associateReminderWithPrescription_item(),
                    
                
                    
                        
                        await associateReminderWithPatient_vaccination(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateReminderWithOrganization(),
                    
                
            
                
                
                    
                
                    
                        
                        await associateChatSessionWithPatient(),
                    
                
                    
                        
                        await associateChatSessionWithDoctor(),
                    
                
                    
                        
                        await associateChatSessionWithSecond_doctor(),
                    
                
                    
                        
                        await associateChatSessionWithCreated_by_user(),
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateChatSessionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateMessageWithChat_session(),
                    
                
                    
                        
                        await associateMessageWithSender_user(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateMessageWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateVideoCallWithConsultation(),
                    
                
                    
                        
                        await associateVideoCallWithChat_session(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateVideoCallWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateChatbotInteractionWithPatient(),
                    
                
                    
                        
                        await associateChatbotInteractionWithChat_session(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateChatbotInteractionWithOrganization(),
                    
                
            
                
                
                    
                        
                        await associateFeedbackWithPatient(),
                    
                
                    
                        
                        await associateFeedbackWithDoctor(),
                    
                
                    
                        
                        await associateFeedbackWithConsultation(),
                    
                
                    
                        
                        await associateFeedbackWithCamp(),
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                        
                        await associateFeedbackWithOrganization(),
                    
                
            
            ]);
        
    },

    down: async (queryInterface, Sequelize) => {
        
            
            
            
            
            
            await queryInterface.bulkDelete('organizations', null, {});
            
            
            await queryInterface.bulkDelete('doctor_profiles', null, {});
            
            
            await queryInterface.bulkDelete('patient_profiles', null, {});
            
            
            await queryInterface.bulkDelete('medical_camps', null, {});
            
            
            await queryInterface.bulkDelete('appointments', null, {});
            
            
            await queryInterface.bulkDelete('consultations', null, {});
            
            
            await queryInterface.bulkDelete('medical_reports', null, {});
            
            
            await queryInterface.bulkDelete('medicines', null, {});
            
            
            await queryInterface.bulkDelete('inventory_items', null, {});
            
            
            await queryInterface.bulkDelete('prescriptions', null, {});
            
            
            await queryInterface.bulkDelete('prescription_items', null, {});
            
            
            await queryInterface.bulkDelete('medicine_dispatches', null, {});
            
            
            await queryInterface.bulkDelete('vaccinations', null, {});
            
            
            await queryInterface.bulkDelete('patient_vaccinations', null, {});
            
            
            await queryInterface.bulkDelete('reminders', null, {});
            
            
            await queryInterface.bulkDelete('chat_sessions', null, {});
            
            
            await queryInterface.bulkDelete('messages', null, {});
            
            
            await queryInterface.bulkDelete('video_calls', null, {});
            
            
            await queryInterface.bulkDelete('chatbot_interactions', null, {});
            
            
            await queryInterface.bulkDelete('feedbacks', null, {});
            
        
    },
};