help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
healthcare-patients
RSK World
healthcare-patients
Healthcare Patients Dataset - Medical Analytics + Healthcare Data Science + Patient Data Analysis
healthcare-patients
  • visualizations
  • .gitignore785 B
  • ADVANCED_FEATURES.md5.8 KB
  • FILES_SUMMARY.md2.8 KB
  • GITHUB_PUSH_SUMMARY.md3.4 KB
  • IMAGE_DESCRIPTION.md1.6 KB
  • LICENSE1.2 KB
  • PROJECT_INFO.md2.2 KB
  • PROJECT_SUMMARY.md5.7 KB
  • QUICKSTART.md1.7 KB
  • README.md5.4 KB
  • RELEASE_NOTES.md7.4 KB
  • advanced_analysis.py13.7 KB
  • advanced_analysis_report.txt2.3 KB
  • analyze_patients.py13.8 KB
  • export_to_excel.py6 KB
  • export_to_json.py3.5 KB
  • healthcare_patients.csv6.5 KB
  • healthcare_patients.json27.2 KB
  • healthcare_patients.xlsx14.6 KB
  • index.html26 KB
  • requirements.txt578 B
  • validate_data.py6 KB
index.html
index.html
Raw Download
Find: Go to:
<!DOCTYPE html>
<html lang="en">
<head>
    <!--
    Healthcare Patient Dataset - Demo Page
    ======================================
    Author: RSK World
    Website: https://rskworld.in
    Email: help@rskworld.in
    Phone: +91 93305 39277
    -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Healthcare Patient Dataset - RSK World</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary-color: #ffc107;
            --secondary-color: #6c757d;
            --success-color: #28a745;
            --danger-color: #dc3545;
            --info-color: #17a2b8;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
        }
        
        .header {
            background: white;
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        
        .header h1 {
            color: #333;
            font-weight: 700;
            margin-bottom: 10px;
        }
        
        .header p {
            color: #666;
            font-size: 1.1rem;
        }
        
        .card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 25px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
        }
        
        .card:hover {
            transform: translateY(-5px);
        }
        
        .card-title {
            color: #333;
            font-weight: 600;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .card-title i {
            color: var(--primary-color);
            font-size: 1.5rem;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        }
        
        .stat-card h3 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 10px;
        }
        
        .stat-card p {
            font-size: 1rem;
            opacity: 0.9;
        }
        
        .table-responsive {
            border-radius: 10px;
            overflow: hidden;
        }
        
        .table {
            margin-bottom: 0;
        }
        
        .table thead {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .table thead th {
            border: none;
            padding: 15px;
            font-weight: 600;
        }
        
        .table tbody tr {
            transition: background-color 0.3s ease;
        }
        
        .table tbody tr:hover {
            background-color: #f8f9fa;
        }
        
        .badge-custom {
            padding: 8px 15px;
            border-radius: 20px;
            font-weight: 500;
        }
        
        .btn-custom {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-weight: 600;
            transition: transform 0.3s ease;
        }
        
        .btn-custom:hover {
            transform: scale(1.05);
            color: white;
        }
        
        .footer {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-top: 30px;
            text-align: center;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }
        
        .footer a {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
        }
        
        .footer a:hover {
            text-decoration: underline;
        }
        
        .filter-section {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 25px;
        }
        
        .chart-container {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1><i class="fas fa-heartbeat"></i> Healthcare Patient Dataset</h1>
            <p>Medical patient dataset with health records, diagnostic information, and treatment outcomes for healthcare analytics and predictive modeling.</p>
            <p class="mt-3"><small class="text-muted">Author: <a href="https://rskworld.in" target="_blank">RSK World</a> | Email: help@rskworld.in | Phone: +91 93305 39277</small></p>
        </div>
        
        <div class="stats-grid">
            <div class="stat-card">
                <h3 id="totalPatients">30</h3>
                <p><i class="fas fa-users"></i> Total Patients</p>
            </div>
            <div class="stat-card">
                <h3 id="avgAge">47</h3>
                <p><i class="fas fa-birthday-cake"></i> Average Age</p>
            </div>
            <div class="stat-card">
                <h3 id="avgStay">6.5</h3>
                <p><i class="fas fa-calendar-alt"></i> Avg Stay (days)</p>
            </div>
            <div class="stat-card">
                <h3 id="totalCharges">$425K</h3>
                <p><i class="fas fa-dollar-sign"></i> Total Charges</p>
            </div>
        </div>
        
        <div class="card">
            <h3 class="card-title">
                <i class="fas fa-info-circle"></i>
                Dataset Information
            </h3>
            <div class="row">
                <div class="col-md-6">
                    <h5><i class="fas fa-list"></i> Features</h5>
                    <ul class="list-group list-group-flush">
                        <li class="list-group-item"><i class="fas fa-check text-success"></i> Patient demographics</li>
                        <li class="list-group-item"><i class="fas fa-check text-success"></i> Medical history</li>
                        <li class="list-group-item"><i class="fas fa-check text-success"></i> Diagnostic tests</li>
                        <li class="list-group-item"><i class="fas fa-check text-success"></i> Treatment outcomes</li>
                        <li class="list-group-item"><i class="fas fa-check text-success"></i> HIPAA compliant format</li>
                    </ul>
                </div>
                <div class="col-md-6">
                    <h5><i class="fas fa-tools"></i> Technologies</h5>
                    <div class="d-flex flex-wrap gap-2">
                        <span class="badge bg-primary badge-custom">CSV</span>
                        <span class="badge bg-primary badge-custom">Excel</span>
                        <span class="badge bg-primary badge-custom">Pandas</span>
                        <span class="badge bg-primary badge-custom">NumPy</span>
                        <span class="badge bg-primary badge-custom">Python</span>
                        <span class="badge bg-primary badge-custom">Data Analysis</span>
                    </div>
                    <h5 class="mt-3"><i class="fas fa-signal"></i> Difficulty</h5>
                    <span class="badge bg-warning text-dark badge-custom">Advanced</span>
                </div>
            </div>
        </div>
        
        <div class="card">
            <h3 class="card-title">
                <i class="fas fa-filter"></i>
                Filter & Search
            </h3>
            <div class="filter-section">
                <div class="row">
                    <div class="col-md-4 mb-3">
                        <label class="form-label">Search Patient</label>
                        <input type="text" class="form-control" id="searchInput" placeholder="Search by name, diagnosis...">
                    </div>
                    <div class="col-md-4 mb-3">
                        <label class="form-label">Filter by Outcome</label>
                        <select class="form-select" id="outcomeFilter">
                            <option value="">All Outcomes</option>
                            <option value="Recovered">Recovered</option>
                            <option value="Improved">Improved</option>
                            <option value="Stable">Stable</option>
                        </select>
                    </div>
                    <div class="col-md-4 mb-3">
                        <label class="form-label">Filter by Treatment</label>
                        <select class="form-select" id="treatmentFilter">
                            <option value="">All Treatments</option>
                            <option value="Medication">Medication</option>
                            <option value="Surgery">Surgery</option>
                            <option value="Antibiotics">Antibiotics</option>
                            <option value="Therapy">Therapy</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="card">
            <h3 class="card-title">
                <i class="fas fa-table"></i>
                Patient Data
            </h3>
            <div class="table-responsive">
                <table class="table table-hover" id="patientTable">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Name</th>
                            <th>Age</th>
                            <th>Gender</th>
                            <th>Diagnosis</th>
                            <th>Treatment</th>
                            <th>Stay (days)</th>
                            <th>Outcome</th>
                            <th>Charges</th>
                        </tr>
                    </thead>
                    <tbody id="tableBody">
                        <!-- Data will be loaded here -->
                    </tbody>
                </table>
            </div>
        </div>
        
        <div class="card">
            <h3 class="card-title">
                <i class="fas fa-chart-line"></i>
                Advanced Analytics & Visualizations
            </h3>
            <div class="row">
                <div class="col-md-6 mb-4">
                    <canvas id="outcomeChart"></canvas>
                </div>
                <div class="col-md-6 mb-4">
                    <canvas id="treatmentChart"></canvas>
                </div>
                <div class="col-md-6 mb-4">
                    <canvas id="ageDistributionChart"></canvas>
                </div>
                <div class="col-md-6 mb-4">
                    <canvas id="chargesChart"></canvas>
                </div>
            </div>
        </div>
        
        <div class="card">
            <h3 class="card-title">
                <i class="fas fa-download"></i>
                Download Dataset
            </h3>
            <p>Download the complete healthcare patient dataset in various formats:</p>
            <div class="d-flex gap-3 flex-wrap">
                <a href="healthcare_patients.csv" class="btn btn-custom" download>
                    <i class="fas fa-file-csv"></i> Download CSV
                </a>
                <a href="healthcare_patients.xlsx" class="btn btn-custom" download>
                    <i class="fas fa-file-excel"></i> Download Excel
                </a>
                <button class="btn btn-custom" onclick="exportToJSON()">
                    <i class="fas fa-file-code"></i> Export to JSON
                </button>
                <a href="analyze_patients.py" class="btn btn-custom" download>
                    <i class="fas fa-file-code"></i> Analysis Script
                </a>
                <a href="advanced_analysis.py" class="btn btn-custom" download>
                    <i class="fas fa-brain"></i> Advanced Analysis
                </a>
            </div>
        </div>
        
        <div class="footer">
            <p>&copy; 2026 <a href="https://rskworld.in" target="_blank">RSK World</a>. All rights reserved.</p>
            <p class="mb-0">
                <small>
                    Website: <a href="https://rskworld.in" target="_blank">https://rskworld.in</a> | 
                    Email: <a href="mailto:help@rskworld.in">help@rskworld.in</a> | 
                    Phone: <a href="tel:+919330539277">+91 93305 39277</a>
                </small>
            </p>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
    <script>
        // Patient data (sample - in production, load from CSV)
        let patientData = [];
        let filteredData = [];
        
        // Load CSV data
        function loadCSVData() {
            Papa.parse('healthcare_patients.csv', {
                download: true,
                header: true,
                complete: function(results) {
                    patientData = results.data.filter(p => p.patient_id); // Filter empty rows
                    filteredData = patientData;
                    renderTable();
                    updateStats();
                    updateCharts();
                }
            });
        }
        
        // Render table
        function renderTable() {
            const tbody = document.getElementById('tableBody');
            tbody.innerHTML = '';
            
            filteredData.forEach(patient => {
                if (!patient.patient_id) return;
                
                const row = document.createElement('tr');
                const outcomeClass = getOutcomeClass(patient.outcome);
                
                row.innerHTML = `
                    <td>${patient.patient_id}</td>
                    <td>${patient.first_name} ${patient.last_name}</td>
                    <td>${patient.age}</td>
                    <td>${patient.gender}</td>
                    <td><small>${patient.diagnosis}</small></td>
                    <td>${patient.treatment_type}</td>
                    <td>${patient.length_of_stay}</td>
                    <td><span class="badge ${outcomeClass}">${patient.outcome}</span></td>
                    <td>$${parseFloat(patient.charges).toLocaleString()}</td>
                `;
                tbody.appendChild(row);
            });
        }
        
        function getOutcomeClass(outcome) {
            if (outcome === 'Recovered') return 'bg-success';
            if (outcome === 'Improved') return 'bg-info';
            if (outcome === 'Stable') return 'bg-warning';
            return 'bg-secondary';
        }
        
        // Update statistics
        function updateStats() {
            if (filteredData.length === 0) return;
            
            const totalPatients = filteredData.length;
            const avgAge = (filteredData.reduce((sum, p) => sum + parseInt(p.age), 0) / totalPatients).toFixed(0);
            const avgStay = (filteredData.reduce((sum, p) => sum + parseInt(p.length_of_stay), 0) / totalPatients).toFixed(1);
            const totalCharges = filteredData.reduce((sum, p) => sum + parseFloat(p.charges), 0);
            
            document.getElementById('totalPatients').textContent = totalPatients;
            document.getElementById('avgAge').textContent = avgAge;
            document.getElementById('avgStay').textContent = avgStay;
            document.getElementById('totalCharges').textContent = '$' + (totalCharges / 1000).toFixed(0) + 'K';
        }
        
        // Search functionality
        document.getElementById('searchInput').addEventListener('input', function(e) {
            const searchTerm = e.target.value.toLowerCase();
            applyFilters();
        });
        
        // Filter functionality
        document.getElementById('outcomeFilter').addEventListener('change', applyFilters);
        document.getElementById('treatmentFilter').addEventListener('change', applyFilters);
        
        function applyFilters() {
            const searchTerm = document.getElementById('searchInput').value.toLowerCase();
            const outcomeFilter = document.getElementById('outcomeFilter').value;
            const treatmentFilter = document.getElementById('treatmentFilter').value;
            
            filteredData = patientData.filter(patient => {
                if (!patient.patient_id) return false;
                
                const matchesSearch = !searchTerm || 
                    patient.first_name.toLowerCase().includes(searchTerm) ||
                    patient.last_name.toLowerCase().includes(searchTerm) ||
                    patient.diagnosis.toLowerCase().includes(searchTerm);
                
                const matchesOutcome = !outcomeFilter || patient.outcome === outcomeFilter;
                const matchesTreatment = !treatmentFilter || patient.treatment_type === treatmentFilter;
                
                return matchesSearch && matchesOutcome && matchesTreatment;
            });
            
            renderTable();
            updateStats();
            updateCharts();
        }
        
        // Export to Excel
        function exportToExcel() {
            const csv = Papa.unparse(filteredData.length > 0 ? filteredData : patientData);
            const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
            const link = document.createElement('a');
            const url = URL.createObjectURL(blob);
            link.setAttribute('href', url);
            link.setAttribute('download', 'healthcare_patients.csv');
            link.style.visibility = 'hidden';
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
        }
        
        // Chart instances
        let outcomeChart, treatmentChart, ageChart, chargesChart;
        
        // Initialize charts
        function initializeCharts() {
            if (filteredData.length === 0) return;
            
            // Outcome Distribution Chart
            const outcomeCounts = {};
            filteredData.forEach(p => {
                if (p.outcome) outcomeCounts[p.outcome] = (outcomeCounts[p.outcome] || 0) + 1;
            });
            
            const outcomeCtx = document.getElementById('outcomeChart').getContext('2d');
            if (outcomeChart) outcomeChart.destroy();
            outcomeChart = new Chart(outcomeCtx, {
                type: 'doughnut',
                data: {
                    labels: Object.keys(outcomeCounts),
                    datasets: [{
                        data: Object.values(outcomeCounts),
                        backgroundColor: ['#28a745', '#17a2b8', '#ffc107', '#dc3545']
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        title: {
                            display: true,
                            text: 'Patient Outcomes Distribution',
                            font: { size: 16, weight: 'bold' }
                        },
                        legend: { position: 'bottom' }
                    }
                }
            });
            
            // Treatment Type Chart
            const treatmentCounts = {};
            filteredData.forEach(p => {
                if (p.treatment_type) treatmentCounts[p.treatment_type] = (treatmentCounts[p.treatment_type] || 0) + 1;
            });
            
            const treatmentCtx = document.getElementById('treatmentChart').getContext('2d');
            if (treatmentChart) treatmentChart.destroy();
            treatmentChart = new Chart(treatmentCtx, {
                type: 'bar',
                data: {
                    labels: Object.keys(treatmentCounts),
                    datasets: [{
                        label: 'Number of Patients',
                        data: Object.values(treatmentCounts),
                        backgroundColor: '#667eea'
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        title: {
                            display: true,
                            text: 'Patients by Treatment Type',
                            font: { size: 16, weight: 'bold' }
                        }
                    },
                    scales: {
                        y: { beginAtZero: true }
                    }
                }
            });
            
            // Age Distribution Chart
            const ageGroups = {'<30': 0, '30-40': 0, '40-50': 0, '50-60': 0, '60+': 0};
            filteredData.forEach(p => {
                const age = parseInt(p.age) || 0;
                if (age < 30) ageGroups['<30']++;
                else if (age < 40) ageGroups['30-40']++;
                else if (age < 50) ageGroups['40-50']++;
                else if (age < 60) ageGroups['50-60']++;
                else ageGroups['60+']++;
            });
            
            const ageCtx = document.getElementById('ageDistributionChart').getContext('2d');
            if (ageChart) ageChart.destroy();
            ageChart = new Chart(ageCtx, {
                type: 'bar',
                data: {
                    labels: Object.keys(ageGroups),
                    datasets: [{
                        label: 'Number of Patients',
                        data: Object.values(ageGroups),
                        backgroundColor: '#764ba2'
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        title: {
                            display: true,
                            text: 'Age Distribution',
                            font: { size: 16, weight: 'bold' }
                        }
                    },
                    scales: {
                        y: { beginAtZero: true }
                    }
                }
            });
            
            // Charges Distribution Chart
            const charges = filteredData.map(p => parseFloat(p.charges) || 0).filter(c => c > 0);
            const chargesCtx = document.getElementById('chargesChart').getContext('2d');
            if (chargesChart) chargesChart.destroy();
            chargesChart = new Chart(chargesCtx, {
                type: 'line',
                data: {
                    labels: charges.map((_, i) => `Patient ${i+1}`),
                    datasets: [{
                        label: 'Charges ($)',
                        data: charges,
                        borderColor: '#dc3545',
                        backgroundColor: 'rgba(220, 53, 69, 0.1)',
                        fill: true,
                        tension: 0.4
                    }]
                },
                options: {
                    responsive: true,
                    plugins: {
                        title: {
                            display: true,
                            text: 'Charges Distribution',
                            font: { size: 16, weight: 'bold' }
                        }
                    },
                    scales: {
                        y: {
                            beginAtZero: true,
                            ticks: {
                                callback: function(value) {
                                    return '$' + value.toLocaleString();
                                }
                            }
                        }
                    }
                }
            });
        }
        
        // Export to JSON
        function exportToJSON() {
            const dataToExport = filteredData.length > 0 ? filteredData : patientData;
            const jsonStr = JSON.stringify(dataToExport, null, 2);
            const blob = new Blob([jsonStr], { type: 'application/json' });
            const link = document.createElement('a');
            const url = URL.createObjectURL(blob);
            link.setAttribute('href', url);
            link.setAttribute('download', 'healthcare_patients.json');
            link.style.visibility = 'hidden';
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
        }
        
        // Update charts when data changes
        function updateCharts() {
            initializeCharts();
        }
        
        // Initialize on page load
        window.addEventListener('DOMContentLoaded', function() {
            loadCSVData();
        });
    </script>
</body>
</html>

674 lines•26 KB
markup

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer