Learn by Directing AI
All materials

record.html

htmlrecord.html
<!DOCTYPE html>
<html>
<head>
    <title>RSN EHR - Patient Record</title>
    <style>
        body { font-family: Arial, sans-serif; margin: 20px; }
        .info { background: #f9f9f9; padding: 15px; border-radius: 4px; margin-bottom: 20px; }
        .note { background: #fff; border: 1px solid #ddd; padding: 10px; margin: 10px 0; border-radius: 4px; }
        .note-meta { color: #666; font-size: 0.9em; }
        textarea { width: 100%; height: 80px; }
        button { padding: 8px 16px; background: #2c3e50; color: white; border: none; cursor: pointer; }
        a { color: #2c3e50; }
    </style>
</head>
<body>
    <p><a href="/patients">Back to Patients</a></p>
    {% if patient %}
    <h1>{{ patient.name }}</h1>
    <div class="info">
        <p><strong>Date of Birth:</strong> {{ patient.date_of_birth }}</p>
        <p><strong>Clinic:</strong> {{ patient.clinic }}</p>
        <p><strong>Diagnosis:</strong> {{ patient.diagnosis }}</p>
        <p><strong>Last Visit:</strong> {{ patient.last_visit }}</p>
        <p><strong>Phone:</strong> {{ patient.phone }}</p>
    </div>

    <h2>Clinical Notes</h2>
    {% for note in notes %}
    <div class="note">
        <div class="note-meta">{{ note.author }} - {{ note.created_at }}</div>
        <div>{{ note.content | safe }}</div>
    </div>
    {% endfor %}

    <h3>Add Note</h3>
    <form method="POST" action="/records/{{ patient.id }}/add_note">
        <textarea name="note" placeholder="Enter clinical note..."></textarea><br>
        <button type="submit">Add Note</button>
    </form>
    {% else %}
    <p>Patient not found.</p>
    {% endif %}
</body>
</html>