بوت

معتزمنذ 4 أيام

from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, KeepTogether
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib import colors

# تنزيل وإنشاء ملف الأسئلة
doc = SimpleDocTemplate("Final_Exam_Review.pdf", pagesize=letter, rightMargin=40, leftMargin=40, topMargin=40, bottomMargin=40)
story = []
styles = getSampleStyleSheet()

# إضافة التنسيقات
title_style = ParagraphStyle('Title', parent=styles['Heading1'], fontSize=20, leading=24, textColor=colors.HexColor('#1A365D'), alignment=1)
h2_style = ParagraphStyle('H2', parent=styles['Heading2'], fontSize=14, leading=18, textColor=colors.HexColor('#2C5282'), spaceBefore=12, spaceAfter=6)
body_style = ParagraphStyle('Body', parent=styles['Normal'], fontSize=11, leading=15, spaceAfter=8)

# محتوى الملف
story.append(Paragraph("<b>Final Exam Review: Professionalism & Ethics in Health Care</b>", title_style))
story.append(Spacer(1, 15))

# قسم الاختياري
story.append(Paragraph("<b>Part 1: Multiple Choice Questions (MCQs)</b>", h2_style))
mcqs = [
    "<b>1. Which of the following is a key characteristic of a profession compared to an occupation?</b><br/>A) Income generation only<br/>B) Requires specialized education and a code of ethics<br/>C) Does not interact with the environment<br/>D) Formed by sub-systems only<br/><i>Answer: B</i>",
    "<b>2. Giving the patient the right to make their own medical decisions is called:</b><br/>A) Beneficence<br/>B) Nonmaleficence<br/>C) Autonomy<br/>D) Veracity<br/><i>Answer: C</i>",
    "<b>3. Which of the following is NOT one of the '6 Rights of Medication'?</b><br/>A) Right Patient<br/>B) Right Dose<br/>C) Right Route<br/>D) Right Hospital<br/><i>Answer: D</i>",
    "<b>4. According to Maslow's Hierarchy, which needs must be satisfied first?</b><br/>A) Safety and Security<br/>B) Physiological Needs<br/>C) Self-Esteem<br/>D) Self-Actualization<br/><i>Answer: B</i>"
]
for q in mcqs:
    story.append(Paragraph(q, body_style))
    story.append(Spacer(1, 5))

# قسم المقالي
story.append(Spacer(1, 10))
story.append(Paragraph("<b>Part 2: High-Yield Essay Questions (Expected in Final)</b>", h2_style))

essay_1 = """<b>Essay 1: Patient Safety & Medication Administration</b><br/>
<b>Question:</b> Discuss the key areas of Patient Safety Standards and list the 6 Rights of Medication.<br/>
<b>Model Answer:</b><br/>
Patient Safety Standards aim to reduce harm and improve quality of care through 4 areas:<br/>
1. Clinical Guidelines & Protocols (Evidence-based & standardized practice).<br/>
2. Medication Safety (Reducing errors and proper reporting).<br/>
3. Infection Control (Hand hygiene & sterilization).<br/>
4. Communication & Collaboration (Effective handoff communication).<br/>
The 6 Rights of Medication that must be verified are: Right Patient, Right Drug, Right Dose, Right Time, Right Route, and Right Documentation."""

essay_2 = """<b>Essay 2: Teamwork Skills and Barriers</b><br/>
<b>Question:</b> Detail the importance of teamwork in healthcare and explain 4 major barriers that disrupt effective teamwork.<br/>
<b>Model Answer:</b><br/>
Teamwork is essential because it improves patient outcomes, enhances efficiency, improves planning, and leads to better decision-making. However, teamwork can be disrupted by 4 barriers:<br/>
1. Poor Communication (Misunderstandings and loss of critical updates).<br/>
2. Role Confusion (Lack of defined roles and responsibilities).<br/>
3. Lack of Trust (Reduces collaboration and psychological safety).<br/>
4. Stress (Leads to burnout and friction among team members)."""

story.append(Paragraph(essay_1, body_style))
story.append(Spacer(1, 10))
story.append(Paragraph(essay_2, body_style))

doc.build(story)
print("PDF Created Successfully as 'Final_Exam_Review.pdf'")

0
إعجاب
12
مشاهدات
0
مشاركة
1
متابع

التعليقات (0)

لايوجد لديك حساب في عالم البرمجة؟

تحب تنضم لعالم البرمجة؟ وتنشئ عالمك الخاص، تنشر المقالات، الدورات، تشارك المبرمجين وتساعد الآخرين، اشترك الآن بخطوات يسيرة !