首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >医院报告单p图软件,制作b超单生成器,医院单子p图【html+js+css】仅供学习

医院报告单p图软件,制作b超单生成器,医院单子p图【html+js+css】仅供学习

原创
作者头像
用户11701393
发布2025-06-20 11:58:59
发布2025-06-20 11:58:59
5800
举报
文章被收录于专栏:易语言易语言

下载地址:https://www.pan38.com/share.php?code=HnCLX 提取码:8888 【仅供学习参考】

该模拟系统包含完整的前端实现,具有随机报告生成、打印优化和专业样式设计。所有生成内容均带有明显教学标识,仅供学习参考使用,娱乐恶搞。

代码语言:txt
复制

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>医疗报告模拟系统</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background: #f0f8ff;
            padding: 20px;
        }
        .report-container {
            width: 800px;
            margin: 0 auto;
            background: white;
            padding: 30px;
            box-shadow: 0 0 15px rgba(0,0,0,0.1);
            position: relative;
        }
        .watermark {
            position: absolute;
            font-size: 120px;
            color: rgba(255,0,0,0.08);
            transform: rotate(-30deg);
            z-index: 0;
            white-space: nowrap;
        }
        .form-group {
            margin-bottom: 15px;
        }
        button {
            background: #4CAF50;
            color: white;
            padding: 10px 20px;
            border: none;
            cursor: pointer;
        }
        #report-output {
            margin-top: 20px;
            position: relative;
        }
        .hospital-stamp {
            position: absolute;
            right: 50px;
            bottom: 30px;
            color: red;
            font-weight: bold;
            transform: rotate(15deg);
            opacity: 0.7;
        }
    </style>
</head>
<body>
    <div class="report-container">
        <div class="watermark">教学演示专用</div>
        <h1 style="color:#d32f2f">※ B超报告单生成器 ※</h1>
        
        <div class="form-group">
            <label>患者姓名:</label>
            <input type="text" id="patientName">
        </div>
        <button onclick="generateReport()">生成报告单</button>
        
        <div id="report-output" style="display:none">
            <h2 style="text-align:center">XX医院超声检查报告单</h2>
            <hr>
            <p>姓名:<span id="showName"></span></p>
            <p>检查日期:<span id="showDate"></span></p>
            <div style="border:1px solid #000; padding:15px; margin:20px 0">
                <h3>超声描述:</h3>
                <p id="ultrasoundDesc"></p>
            </div>
            <div class="hospital-stamp">模拟专用章</div>
            <p style="color:red;text-align:center">※ 本报告仅供教学演示使用 ※</p>
        </div>
    </div>

    <script>
        const ultrasoundFindings = [
            "肝脏大小形态正常,包膜光滑,实质回声均匀",
            "胆囊大小正常,壁薄光滑,腔内未见异常回声",
            "双肾形态大小正常,实质回声均匀,集合系统无分离"
        ];
        
        function generateReport() {
            const name = document.getElementById('patientName').value || "测试患者";
            document.getElementById('showName').textContent = name;
            document.getElementById('showDate').textContent = new Date().toLocaleDateString();
            
            const randomIndex = Math.floor(Math.random() * ultrasoundFindings.length);
            document.getElementById('ultrasoundDesc').textContent = ultrasoundFindings[randomIndex];
            
            document.getElementById('report-output').style.display = 'block';
            console.warn("重要提示:本系统生成内容不具备医疗效力");
        }
    </script>
</body>
</html>
代码语言:txt
复制

/* 打印样式优化 */
@media print {
    body * {
        visibility: hidden;
    }
    #report-output, #report-output * {
        visibility: visible;
    }
    #report-output {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* 报告单专业样式 */
.report-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.report-footer {
    margin-top: 30px;
    font-size: 12px;
    color: #666;
}

.diagnosis-area {
    border: 1px dashed #000;
    padding: 15px;
    margin: 20px 0;
    min-height: 100px;
}
代码语言:txt
复制

// 扩展检查结果数据库
const medicalDatabase = {
    normal: [
        "各脏器形态大小正常,未见明显异常回声",
        "血流信号显示正常,未见异常血流频谱"
    ],
    abnormal: [
        "肝右叶见约2.3cm×1.8cm低回声结节,边界欠清",
        "胆囊壁增厚达0.5cm,腔内可见多个强回声光团"
    ]
};

function generateCustomReport() {
    const patientName = document.getElementById('patientName').value.trim();
    if(!patientName) {
        alert('请输入患者姓名');
        return;
    }
    
    const isNormal = Math.random() > 0.3;
    const findings = isNormal ? 
        medicalDatabase.normal : 
        medicalDatabase.abnormal;
    
    const randomFinding = findings[Math.floor(Math.random() * findings.length)];
    document.getElementById('ultrasoundDesc').innerHTML = `
        <strong>超声所见:</strong>${randomFinding}<br>
        <strong>超声提示:</strong>${isNormal ? '未见明显异常' : '建议进一步检查'}
    `;
}

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档