Medical code of ethics of medical students with images

Reading File
Finding Sources
Searching the Web

medical code of ethics for medical students principles 2024

Reading File
Reading File
Reading File
Loading Image
Reading File
Reading File
Loading Image
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Generating Image

A professional medical ethics diagram showing the four core principles of biomedical ethics: Autonomy, Beneficence, Non-maleficence, and Justice. Each principle shown in a quadrant with icons and brief descriptions. Clean, educational style for medical students with a white coat and stethoscope visual element.

Finding Sources
Generating Image

Timeline infographic of medical ethics history: Hippocratic Oath ancient Greece, Declaration of Geneva 1948, Declaration of Helsinki 1964, AMA Code of Ethics, WMA International Code. Educational poster for medical students showing key milestones in medical ethics development.

I now have all the content needed. Let me compile the comprehensive response.

Medical Code of Ethics for Medical Students


1. What is Medical Ethics?

Medical ethics refers to the moral principles and code of conduct that govern medical professionals in their dealings with patients, colleagues, and the State. It is a self-imposed code designed to uphold the noble traditions of the medical profession. Violations, while not always legally punishable, are considered unprofessional and unethical.
Medical etiquette (distinct from ethics) refers to conventional courtesy among members of the same profession - how doctors treat each other.
The Essentials of Forensic Medicine and Toxicology, 36th edition (2026)

2. Historical Emergence of Medical Ethics

Timeline of Medical Ethics History

Ancient Origins

EraMilestone
1750 BCECode of Hammurabi (Babylonia) - earliest documented standards for medical practitioners
1500 BCESushruta's Oath (Sushruta Samhita) - Father of Indian Surgery, foundational ethical standards in ancient Indian medicine
200 BCECharaka's Oath (Charaka Samhita) - Father of Indian Medicine; in 2022, India's NMC introduced the Charaka Oath for the white coat ceremony
5th century BCEHippocratic Oath - attributed to Hippocrates (Father of Medicine and Medical Ethics), begins with invocations to Apollo and Asclepius

Modern Evolution

YearMilestone
1500University of Wittenberg (Germany) initiated oath-taking for graduating medical students
1803Thomas Percival (English physician) wrote the first "modern code of medical ethics" and coined the terms "medical ethics" and "medical jurisprudence"
1847American Medical Association (AMA) adopted its first code of ethics, based on Percival's work
1948Declaration of Geneva - WMA's modern iteration of the Hippocratic Oath
1949International Code of Medical Ethics - WMA, London
The Essentials of Forensic Medicine and Toxicology, 36th edition (2026)

3. The Hippocratic Oath

One of the oldest codes of medical ethics, its core pledges include:
  • "I will prescribe regimen for the good of my patients according to my ability and judgment and never do harm to anyone."
  • "To please no one will I prescribe a deadly drug, nor give advice which may cause his death."
  • "I will keep secret and will never reveal" information gained in the exercise of my profession.
  • "In every house where I come I will enter only for the good of my patients."
P.C. Dikshit Textbook of Forensic Medicine and Toxicology

4. Declaration of Geneva (1948, amended 1968, 1984, 1994, 2006, 2017)

The modern form of the Hippocratic Oath, administered to new MBBS students on their first day:
"I will solemnly pledge myself to consecrate my life to the service of humanity"
"I will practice my profession with conscience and dignity"
"The health of my patient will be my first consideration"
"I will respect the secrets which are confided in me, even after the patient has died"
"My colleagues will be my brothers"
"I will not permit considerations of religion, nationality, race, party politics or social standing to intervene between my duty and my patient"
"I will maintain the utmost respect for human life from the time of conception; even under threat, I will not use my medical knowledge contrary to the laws of humanity"
P.C. Dikshit Textbook of Forensic Medicine and Toxicology

5. The Four Core Principles of Medical Ethics (Beauchamp & Childress)

Four Principles of Medical Ethics
These four principles, developed by Beauchamp and Childress, have become the dominant paradigm in Western medical ethics - Scott-Brown's Otorhinolaryngology, Head & Neck Surgery:

1. Autonomy

  • Respect for the patient as an individual with the right to decide what happens to their own body
  • Requires full, honest information to empower the patient
  • Patient may opt out at any stage without duress
  • The degree to which this is possible depends on the quality of information provided

2. Beneficence

  • The principle of seeking to do good
  • Acting in the best interests of the patient
  • The physician facilitates healing and alleviates pain and suffering

3. Non-maleficence

  • Primum non nocere - "First, do no harm"
  • Seeking, overall, not to leave the patient in a worse condition than before treatment
  • Every intervention must weigh potential harm against benefit

4. Justice

  • Fairness for the patient in the context of available resources
  • Equity of access and opportunity
  • No discrimination based on religion, race, nationality, or social standing
Emery's Elements of Medical Genetics and Genomics; Tintinalli's Emergency Medicine

6. Key Practical Ethics for Medical Students

Informed Consent

As stated in medical law: "Every human being of adult years and sound mind has a right to determine what shall be done with his own body; and a surgeon who performs an operation without his patient's consent, commits an assault." (Judge Cardozo)
  • Must be obtained before any procedure or test
  • Patient must receive full explanation of risks, limitations, implications, and possible outcomes
  • For significant interventions, written consent is standard

Confidentiality

  • All information gained in the exercise of the profession must be kept secret
  • This obligation continues even after the patient's death
  • Exceptions apply where law requires disclosure (e.g., notifiable diseases)

Doctor-Patient Relationship

  • Both patient and physician have rights and responsibilities
  • Honesty, disclosure, confidentiality, and informed consent form the foundation
  • A doctor must not take charge of a patient already under the care of another practitioner

7. Key WMA Declarations Medical Students Should Know

DeclarationYearSubject
Declaration of Helsinki1964Ethical principles for human experimentation
Declaration of Sydney1968Declaration of death and organ transplantation
Declaration of Oslo1970Therapeutic abortion
Declaration of Tokyo1975Torture (supplemented by Declaration of Hamburg, 1997)
Declaration of Venice1983Terminal illness
Declaration of Madrid1983Euthanasia is unethical
Declaration of Lisbon1981Rights of patients
Declaration of Malta1991Hunger strikers
Declaration of Ottawa1998Child's right to healthcare
The Essentials of Forensic Medicine and Toxicology, 36th edition (2026)

8. Professional Misconduct

Professional misconduct (also called "infamous conduct" or "disgraceful act") is improper conduct by a doctor in a professional capacity. The National Medical Commission (NMC) - India's apex medical regulator since 2020, replacing the 63-year-old Medical Council of India - maintains the Ethics and Medical Registration Board (EMRB) which:
  • Maintains the National Register of all licensed medical practitioners
  • Regulates professional conduct
  • Promotes medical ethics
  • Exercises appellate jurisdiction with respect to State Medical Council actions
Examples of professional misconduct include:
  • Advertising or self-promotion
  • Covering for unqualified practitioners
  • Refusing emergency care without just cause
  • Failing to report notifiable diseases
  • Breaching patient confidentiality without legal cause
  • Using the Red Cross emblem (prohibited under Geneva Convention Act 1960, Section 12)
P.C. Dikshit Textbook of Forensic Medicine and Toxicology; Parikh's Textbook of Medical Jurisprudence

9. Education in Medical Ethics

The Pond Report (Sir Desmond Pond, 1984, UK) reviewed teaching of medical ethics in UK medical schools. In 1993, the General Medical Council recommended integrating ethics and legal issues into medical curricula to ensure doctors are fully aware of their moral and ethical responsibilities in patient care. Today, medical ethics is a mandatory subject in the MBBS curriculum worldwide.

Summary Mnemonic for the 4 Principles: ABCJ

  • Autonomy - patient's right to decide
  • Beneficence - do good
  • Care (Non-maleficence) - do no harm
  • Justice - be fair to all
The AMA Code of Medical Ethics and the WMA International Code of Medical Ethics are the two most widely referenced global standards for medical professional conduct.

Generate pdf

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace

Running Command

mkdir -p /home/daytona/workspace/medical-ethics && python3 -c "import reportlab;…

Writing File

~/medical-ethics/generate_pdf.py

import requests
import os
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, Image, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import BalancedColumns
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor
from io import BytesIO

OUTPUT = "/home/daytona/workspace/medical-ethics/Medical_Code_of_Ethics.pdf"
IMG1_URL = "https://cdn.orris.care/image-gen/8f724b7e4117494b8c1193db21362e8f.png"
IMG2_URL = "https://cdn.orris.care/image-gen/efd925854e26423689f695cfad88c055.png"

# Download images
def get_image_bytes(url):
    try:
        r = requests.get(url, timeout=20)
        if r.status_code == 200:
            return BytesIO(r.content)
    except Exception as e:
        print(f"Image fetch failed: {e}")
    return None

img1_bytes = get_image_bytes(IMG1_URL)
img2_bytes = get_image_bytes(IMG2_URL)

# Color palette
DARK_BLUE  = HexColor("#1a3a5c")
MED_BLUE   = HexColor("#2563a8")
LIGHT_BLUE = HexColor("#dbeafe")
TEAL       = HexColor("#0d9488")
LIGHT_TEAL = HexColor("#ccfbf1")
GOLD       = HexColor("#d97706")
LIGHT_GOLD = HexColor("#fef3c7")
DARK_GRAY  = HexColor("#1f2937")
MID_GRAY   = HexColor("#6b7280")
LIGHT_GRAY = HexColor("#f3f4f6")
WHITE      = colors.white
RED_LIGHT  = HexColor("#fee2e2")
RED_DARK   = HexColor("#991b1b")

W, H = A4

# ── Page background / header / footer ──────────────────────────────────────
def on_page(canvas_obj, doc):
    canvas_obj.saveState()
    # Header bar
    canvas_obj.setFillColor(DARK_BLUE)
    canvas_obj.rect(0, H - 1.5*cm, W, 1.5*cm, fill=1, stroke=0)
    canvas_obj.setFillColor(WHITE)
    canvas_obj.setFont("Helvetica-Bold", 10)
    canvas_obj.drawString(1.5*cm, H - 1.1*cm, "MEDICAL CODE OF ETHICS FOR MEDICAL STUDENTS")
    canvas_obj.setFont("Helvetica", 9)
    canvas_obj.drawRightString(W - 1.5*cm, H - 1.1*cm, "Orris Medical Education")
    # Footer bar
    canvas_obj.setFillColor(DARK_BLUE)
    canvas_obj.rect(0, 0, W, 1.0*cm, fill=1, stroke=0)
    canvas_obj.setFillColor(WHITE)
    canvas_obj.setFont("Helvetica", 8)
    canvas_obj.drawString(1.5*cm, 0.35*cm, "Sources: Essentials of Forensic Medicine (2026) | P.C. Dikshit | Parikh's | Scott-Brown's | Emery's Genetics")
    canvas_obj.drawRightString(W - 1.5*cm, 0.35*cm, f"Page {doc.page}")
    canvas_obj.restoreState()

def on_first_page(canvas_obj, doc):
    canvas_obj.saveState()
    # Full cover gradient background
    canvas_obj.setFillColor(DARK_BLUE)
    canvas_obj.rect(0, 0, W, H, fill=1, stroke=0)
    # Decorative stripe
    canvas_obj.setFillColor(MED_BLUE)
    canvas_obj.rect(0, H*0.38, W, H*0.42, fill=1, stroke=0)
    canvas_obj.setFillColor(TEAL)
    canvas_obj.rect(0, H*0.35, W, 0.6*cm, fill=1, stroke=0)
    canvas_obj.setFillColor(GOLD)
    canvas_obj.rect(0, H*0.80, W, 0.3*cm, fill=1, stroke=0)
    canvas_obj.restoreState()

# ── Styles ──────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

cover_title = ParagraphStyle("cover_title",
    fontSize=34, leading=42, textColor=WHITE,
    fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=6)

cover_sub = ParagraphStyle("cover_sub",
    fontSize=16, leading=22, textColor=LIGHT_BLUE,
    fontName="Helvetica", alignment=TA_CENTER, spaceAfter=4)

cover_note = ParagraphStyle("cover_note",
    fontSize=11, leading=15, textColor=HexColor("#93c5fd"),
    fontName="Helvetica-Oblique", alignment=TA_CENTER)

h1 = ParagraphStyle("h1",
    fontSize=16, leading=20, textColor=WHITE,
    fontName="Helvetica-Bold", alignment=TA_LEFT,
    spaceBefore=8, spaceAfter=4,
    backColor=DARK_BLUE, leftIndent=-14, rightIndent=-14,
    borderPadding=(5, 14, 5, 14))

h2 = ParagraphStyle("h2",
    fontSize=13, leading=17, textColor=DARK_BLUE,
    fontName="Helvetica-Bold", alignment=TA_LEFT,
    spaceBefore=10, spaceAfter=4,
    borderPadding=(0, 0, 2, 0))

body = ParagraphStyle("body",
    fontSize=10, leading=15, textColor=DARK_GRAY,
    fontName="Helvetica", alignment=TA_JUSTIFY,
    spaceAfter=5)

bullet = ParagraphStyle("bullet",
    fontSize=10, leading=15, textColor=DARK_GRAY,
    fontName="Helvetica", leftIndent=18, bulletIndent=6,
    spaceAfter=3)

italic_quote = ParagraphStyle("italic_quote",
    fontSize=10, leading=15, textColor=MED_BLUE,
    fontName="Helvetica-Oblique", leftIndent=20, rightIndent=20,
    spaceAfter=4, backColor=LIGHT_BLUE,
    borderPadding=(6, 10, 6, 10))

source_note = ParagraphStyle("source_note",
    fontSize=8, leading=11, textColor=MID_GRAY,
    fontName="Helvetica-Oblique", spaceAfter=6)

principle_title = ParagraphStyle("principle_title",
    fontSize=12, leading=16, textColor=WHITE,
    fontName="Helvetica-Bold", alignment=TA_CENTER)

principle_body = ParagraphStyle("principle_body",
    fontSize=9, leading=13, textColor=DARK_GRAY,
    fontName="Helvetica", alignment=TA_LEFT)

table_header = ParagraphStyle("table_header",
    fontSize=10, leading=14, textColor=WHITE,
    fontName="Helvetica-Bold")

table_cell = ParagraphStyle("table_cell",
    fontSize=9, leading=13, textColor=DARK_GRAY,
    fontName="Helvetica")

# ── Build story ─────────────────────────────────────────────────────────────
story = []

# ── COVER PAGE ───────────────────────────────────────────────────────────────
story.append(Spacer(1, 3.5*cm))
story.append(Paragraph("MEDICAL CODE OF ETHICS", cover_title))
story.append(Paragraph("FOR MEDICAL STUDENTS", cover_title))
story.append(Spacer(1, 0.8*cm))
story.append(Paragraph("A Comprehensive Reference Guide", cover_sub))
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph("Hippocratic Tradition · Bioethical Principles · Professional Standards", cover_note))
story.append(Spacer(1, 1.2*cm))

# Decorative line on cover
cover_rule = HRFlowable(width="70%", thickness=2, color=GOLD, spaceAfter=12)
story.append(cover_rule)
story.append(Spacer(1, 0.6*cm))
story.append(Paragraph("Based on authoritative medical textbooks including:", cover_note))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
    "Essentials of Forensic Medicine &amp; Toxicology (36th ed, 2026)  ·  P.C. Dikshit  ·  Parikh's Medical Jurisprudence<br/>"
    "Scott-Brown's Otorhinolaryngology  ·  Emery's Medical Genetics  ·  Tintinalli's Emergency Medicine",
    cover_note))
story.append(Spacer(1, 1.5*cm))
story.append(Paragraph("Compiled by Orris Medical Education", cover_note))
story.append(Paragraph("July 2026", cover_note))
story.append(PageBreak())

# ── SECTION 1: DEFINITION ────────────────────────────────────────────────────
story.append(Paragraph("1. WHAT IS MEDICAL ETHICS?", h1))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "<b>Medical Ethics</b> refers to the moral principles and code of conduct governing medical professionals "
    "in their dealings with patients, colleagues, and the State. It is a self-imposed code designed to uphold "
    "the noble traditions of the medical profession. Violations, while not always legally punishable, are "
    "considered unprofessional and unethical.",
    body))
story.append(Paragraph(
    "<b>Medical Etiquette</b> (distinct from ethics) signifies conventional courtesy among members of the same "
    "profession — how doctors treat each other professionally.",
    body))
story.append(Spacer(1, 4))

def_table = Table([
    [Paragraph("<b>Ethics</b>", table_header), Paragraph("<b>Etiquette</b>", table_header)],
    [Paragraph("Moral principles governing doctor-patient and doctor-society relationships", table_cell),
     Paragraph("Conventional courtesies between members of the same profession", table_cell)],
    [Paragraph("Deals with patient welfare, confidentiality, informed consent", table_cell),
     Paragraph("Deals with collegial behavior, not charging fellow doctors' families", table_cell)],
    [Paragraph("Self-imposed; violations = unprofessional conduct", table_cell),
     Paragraph("Social norms; violations = breach of professional courtesy", table_cell)],
], colWidths=[8*cm, 8*cm])
def_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), DARK_BLUE),
    ("BACKGROUND", (0,1), (-1,1), LIGHT_BLUE),
    ("BACKGROUND", (0,2), (-1,2), WHITE),
    ("BACKGROUND", (0,3), (-1,3), LIGHT_BLUE),
    ("GRID", (0,0), (-1,-1), 0.5, MED_BLUE),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
]))
story.append(def_table)
story.append(Paragraph("Source: Essentials of Forensic Medicine and Toxicology, 36th edition (2026)", source_note))

# ── SECTION 2: HISTORY ────────────────────────────────────────────────────────
story.append(Spacer(1, 8))
story.append(Paragraph("2. HISTORICAL EMERGENCE OF MEDICAL ETHICS", h1))
story.append(Spacer(1, 4))

if img2_bytes:
    img2 = Image(img2_bytes, width=16*cm, height=7*cm)
    img2.hAlign = "CENTER"
    story.append(img2)
    story.append(Paragraph("Timeline of Medical Ethics History", source_note))
    story.append(Spacer(1, 6))

story.append(Paragraph("Ancient Origins", h2))
ancient_data = [
    [Paragraph("<b>Era</b>", table_header), Paragraph("<b>Milestone</b>", table_header)],
    [Paragraph("1750 BCE", table_cell), Paragraph("<b>Code of Hammurabi</b> (Babylonia) — earliest documented standards for medical practitioners", table_cell)],
    [Paragraph("1500 BCE", table_cell), Paragraph("<b>Sushruta's Oath</b> (Sushruta Samhita) — Father of Indian Surgery; foundational Indian medical ethics", table_cell)],
    [Paragraph("200 BCE", table_cell), Paragraph("<b>Charaka's Oath</b> (Charaka Samhita) — Father of Indian Medicine; NMC India adopted Charaka Oath for white coat ceremony (2022)", table_cell)],
    [Paragraph("5th Century BCE", table_cell), Paragraph("<b>Hippocratic Oath</b> — Father of Medicine (Hippocrates); begins with invocations to Apollo and Asclepius; core principles: beneficence, non-maleficence, justice", table_cell)],
]
ancient_table = Table(ancient_data, colWidths=[3.5*cm, 12.5*cm])
ancient_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), TEAL),
    ("BACKGROUND", (0,1), (-1,1), LIGHT_TEAL),
    ("BACKGROUND", (0,2), (-1,2), WHITE),
    ("BACKGROUND", (0,3), (-1,3), LIGHT_TEAL),
    ("BACKGROUND", (0,4), (-1,4), WHITE),
    ("GRID", (0,0), (-1,-1), 0.5, TEAL),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
]))
story.append(ancient_table)
story.append(Spacer(1, 8))

story.append(Paragraph("Modern Evolution", h2))
modern_data = [
    [Paragraph("<b>Year</b>", table_header), Paragraph("<b>Milestone</b>", table_header)],
    [Paragraph("1500", table_cell), Paragraph("University of Wittenberg (Germany) — first oath-taking for graduating medical students", table_cell)],
    [Paragraph("1803", table_cell), Paragraph("<b>Thomas Percival</b> (English physician) — wrote the first 'modern code of medical ethics'; coined terms 'medical ethics' and 'medical jurisprudence'", table_cell)],
    [Paragraph("1847", table_cell), Paragraph("<b>AMA</b> adopted its first Code of Ethics, based on Percival's work", table_cell)],
    [Paragraph("1948", table_cell), Paragraph("<b>Declaration of Geneva</b> — WMA's modern Hippocratic Oath; administered to new MBBS students on first day", table_cell)],
    [Paragraph("1949", table_cell), Paragraph("<b>International Code of Medical Ethics</b> — WMA, London; physician's duties to patients, sick, and colleagues", table_cell)],
    [Paragraph("2020", table_cell), Paragraph("<b>NMC (India)</b> — National Medical Commission replaced MCI as apex regulator of medical education and ethics", table_cell)],
]
modern_table = Table(modern_data, colWidths=[3.5*cm, 12.5*cm])
modern_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), MED_BLUE),
    ("BACKGROUND", (0,1), (-1,1), LIGHT_BLUE),
    ("BACKGROUND", (0,2), (-1,2), WHITE),
    ("BACKGROUND", (0,3), (-1,3), LIGHT_BLUE),
    ("BACKGROUND", (0,4), (-1,4), WHITE),
    ("BACKGROUND", (0,5), (-1,5), LIGHT_BLUE),
    ("BACKGROUND", (0,6), (-1,6), WHITE),
    ("GRID", (0,0), (-1,-1), 0.5, MED_BLUE),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
]))
story.append(modern_table)
story.append(Paragraph("Source: Essentials of Forensic Medicine and Toxicology, 36th edition (2026)", source_note))

# ── SECTION 3: HIPPOCRATIC OATH ───────────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph("3. THE HIPPOCRATIC OATH", h1))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "The Hippocratic Oath is one of the oldest and most widely known codes of medical ethics. It was "
    "attributed to Hippocrates (5th century BCE), the 'Father of Medicine and Medical Ethics.' The modern "
    "iteration of this oath is the Declaration of Geneva.",
    body))
story.append(Spacer(1, 4))
story.append(Paragraph(
    '"I swear by Apollo the physician, by Aesculapius, Hygiea and Panacea... to keep according to my ability '
    'and judgment the following oath..."',
    italic_quote))

oath_points = [
    "To consider those who taught me this art as dear as my parents",
    "I will prescribe regimen for the good of my patients — never do harm to anyone",
    "To please no one will I prescribe a deadly drug, nor give advice which may cause death",
    "I will not give a woman a pessary to procure abortion",
    "In every house where I come, I will enter only for the good of my patients",
    "I will keep far from intentional ill-doing and seduction",
    "All that comes to my knowledge in the exercise of my profession — I will keep secret and never reveal",
    "If I keep this oath faithfully, may I enjoy my life and practice my art, respected by all",
]
for pt in oath_points:
    story.append(Paragraph(f"• {pt}", bullet))
story.append(Paragraph("Source: P.C. Dikshit Textbook of Forensic Medicine and Toxicology", source_note))

# ── SECTION 4: DECLARATION OF GENEVA ─────────────────────────────────────────
story.append(Spacer(1, 8))
story.append(Paragraph("4. DECLARATION OF GENEVA (1948, amended 1968, 1984, 1994, 2006, 2017)", h1))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "The Declaration of Geneva is the modern form of the Hippocratic Oath, adopted by the World Medical "
    "Association (WMA). It is typically administered to new MBBS students on their first day of admission. "
    "The WMA was founded on September 17, 1947, with headquarters in Paris, France.",
    body))
story.append(Spacer(1, 4))

geneva_pledges = [
    "I will solemnly pledge myself to consecrate my life to the service of humanity",
    "I will give to my teachers the respect and gratitude which is their due",
    "I will practice my profession with conscience and dignity",
    "The health of my patient will be my first consideration",
    "I will respect the secrets which are confided in me, even after the patient has died",
    "I will maintain by all means in my power the honour and noble traditions of the medical profession",
    "My colleagues will be my brothers",
    "I will not permit considerations of religion, nationality, race, party politics or social standing to intervene between my duty and my patient",
    "I will maintain the utmost respect for human life from the time of conception",
    "Even under threat, I will not use my medical knowledge contrary to the laws of humanity",
    "I make these promises solemnly, freely and upon my honour",
]
geneva_data = [[Paragraph(f"<b>Pledge {i+1}:</b> {p}", table_cell)] for i, p in enumerate(geneva_pledges)]
geneva_table = Table(geneva_data, colWidths=[16*cm])
bg_colors = []
for i in range(len(geneva_pledges)):
    bg = LIGHT_BLUE if i % 2 == 0 else WHITE
    bg_colors.append(("BACKGROUND", (0,i), (0,i), bg))
geneva_table.setStyle(TableStyle([
    ("GRID", (0,0), (-1,-1), 0.5, MED_BLUE),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 10),
] + bg_colors))
story.append(geneva_table)
story.append(Paragraph("Source: P.C. Dikshit Textbook of Forensic Medicine and Toxicology", source_note))

# ── SECTION 5: FOUR PRINCIPLES ────────────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph("5. THE FOUR CORE PRINCIPLES OF MEDICAL ETHICS", h1))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "Developed by <b>Beauchamp and Childress</b>, these four principles have become the dominant paradigm "
    "in Western medical ethics and are applied across all medical specialties and research.",
    body))
story.append(Spacer(1, 6))

if img1_bytes:
    img1 = Image(img1_bytes, width=16*cm, height=9*cm)
    img1.hAlign = "CENTER"
    story.append(img1)
    story.append(Spacer(1, 6))

principles = [
    ("AUTONOMY", MED_BLUE, LIGHT_BLUE, [
        "Respect for the patient as an individual with the right to decide about their own body",
        "Requires full, honest information to empower the patient",
        "Patient may opt out at any stage without duress",
        "Genes are shared; individual autonomy may need to be weighed against family interests (genetics context)",
        "Foundation of informed consent",
    ]),
    ("BENEFICENCE", TEAL, LIGHT_TEAL, [
        "The principle of seeking to do good",
        "Acting in the best interests of the patient",
        "The physician facilitates healing and alleviates pain and suffering",
        '"A physician shall act in the patient\'s best interests when providing medical care" (WMA)',
        "Doctors are \"assistants to a higher power\" in alleviating suffering",
    ]),
    ("NON-MALEFICENCE", HexColor("#b45309"), LIGHT_GOLD, [
        "Primum non nocere — 'First, do no harm'",
        "Seeking overall not to leave the patient in a worse condition than before treatment",
        "Every intervention must weigh potential harm against benefit",
        "Deadly drug must never be prescribed to harm the patient",
        "Applies to both actions AND omissions",
    ]),
    ("JUSTICE", HexColor("#7c3aed"), HexColor("#ede9fe"), [
        "Fairness for the patient in the context of available resources",
        "Equity of access and opportunity",
        "No discrimination based on religion, nationality, race, politics, or social standing",
        "Distributive justice: fair allocation of healthcare resources",
        "Applies equally in clinical practice and medical research",
    ]),
]

for pname, color, bg, pts in principles:
    p_title = Table([[Paragraph(pname, principle_title)]], colWidths=[16*cm])
    p_title.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (0,0), color),
        ("TOPPADDING", (0,0), (0,0), 7),
        ("BOTTOMPADDING", (0,0), (0,0), 7),
        ("LEFTPADDING", (0,0), (0,0), 12),
    ]))
    story.append(p_title)
    bullet_rows = [[Paragraph(f"• {pt}", principle_body)] for pt in pts]
    p_body = Table(bullet_rows, colWidths=[16*cm])
    p_body.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (0,-1), bg),
        ("GRID", (0,0), (-1,-1), 0.3, color),
        ("TOPPADDING", (0,0), (0,-1), 4),
        ("BOTTOMPADDING", (0,0), (0,-1), 4),
        ("LEFTPADDING", (0,0), (0,-1), 14),
    ]))
    story.append(p_body)
    story.append(Spacer(1, 6))

story.append(Paragraph(
    "Source: Emery's Elements of Medical Genetics and Genomics | Scott-Brown's Otorhinolaryngology | "
    "Tintinalli's Emergency Medicine | Essentials of Forensic Medicine and Toxicology (2026)",
    source_note))

# ── SECTION 6: PRACTICAL ETHICS ───────────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph("6. KEY PRACTICAL ETHICS FOR MEDICAL STUDENTS", h1))
story.append(Spacer(1, 4))

story.append(Paragraph("Informed Consent", h2))
story.append(Paragraph(
    "As stated in medical law (Judge Cardozo): <i>\"Every human being of adult years and sound mind has "
    "a right to determine what shall be done with his own body; and a surgeon who performs an operation "
    "without his patient's consent, commits an assault.\"</i>",
    italic_quote))
consent_pts = [
    "Must be obtained BEFORE any procedure or test",
    "Patient must receive a full, honest explanation of risks, limitations, implications, and possible outcomes",
    "No duress should be applied; the clinician should have no vested interest in any particular outcome",
    "For significant interventions, written consent is standard",
    "Patient is entitled to full information about ALL options, including the option of not participating",
    "Signed consent forms are now standard for every significant action (Emery's Genetics)",
]
for pt in consent_pts:
    story.append(Paragraph(f"• {pt}", bullet))

story.append(Spacer(1, 6))
story.append(Paragraph("Confidentiality", h2))
conf_pts = [
    "All information gained in the exercise of the profession must be kept secret",
    "This obligation continues even after the patient's death (Declaration of Geneva)",
    "Exceptions apply where law requires disclosure (e.g., notifiable diseases, public health emergencies)",
    "Patient's right to privacy must be respected within constraints of the law",
    "Local laws affecting minors' rights to consent must be followed",
]
for pt in conf_pts:
    story.append(Paragraph(f"• {pt}", bullet))

story.append(Spacer(1, 6))
story.append(Paragraph("Doctor-Patient Relationship", h2))
dp_pts = [
    "Both patient and physician have rights and responsibilities",
    "Honesty, disclosure, confidentiality, and informed consent form the foundation",
    "A doctor must NOT take charge of a patient already under the care of another practitioner",
    "Must not refuse professional service on religious grounds",
    "Duty to report notifiable diseases to the State",
    "Must provide emergency care on humanitarian grounds",
    "Philosophically, a physician is an 'assistant to a higher power' in alleviating pain and suffering",
]
for pt in dp_pts:
    story.append(Paragraph(f"• {pt}", bullet))

story.append(Paragraph(
    "Source: Scott-Brown's Otorhinolaryngology | Berek & Novak's Gynecology | Parikh's Medical Jurisprudence",
    source_note))

# ── SECTION 7: WMA DECLARATIONS ───────────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph("7. KEY WMA DECLARATIONS", h1))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "The World Medical Association (WMA), founded September 17, 1947, Paris, is a global confederation "
    "of national medical associations. It has issued numerous declarations addressing ethical aspects of "
    "medical practice that medical students must know.",
    body))
story.append(Spacer(1, 6))

decl_data = [
    [Paragraph("<b>Declaration</b>", table_header), Paragraph("<b>Year</b>", table_header), Paragraph("<b>Subject</b>", table_header)],
    [Paragraph("Geneva", table_cell), Paragraph("1948", table_cell), Paragraph("Modern Hippocratic Oath; physician's pledge to humanity", table_cell)],
    [Paragraph("Helsinki", table_cell), Paragraph("1964", table_cell), Paragraph("Ethical principles for human experimentation / research", table_cell)],
    [Paragraph("Sydney", table_cell), Paragraph("1968", table_cell), Paragraph("Declaration of death and organ harvesting for transplantation", table_cell)],
    [Paragraph("Oslo", table_cell), Paragraph("1970", table_cell), Paragraph("Therapeutic abortion", table_cell)],
    [Paragraph("Tokyo", table_cell), Paragraph("1975", table_cell), Paragraph("Torture — physicians must not participate; supplemented by Hamburg (1997)", table_cell)],
    [Paragraph("Lisbon", table_cell), Paragraph("1981", table_cell), Paragraph("Rights of patients", table_cell)],
    [Paragraph("Venice", table_cell), Paragraph("1983", table_cell), Paragraph("Terminal illness", table_cell)],
    [Paragraph("Madrid", table_cell), Paragraph("1983", table_cell), Paragraph("Euthanasia is unethical", table_cell)],
    [Paragraph("Malta", table_cell), Paragraph("1991", table_cell), Paragraph("Doctor's role with hunger strikers", table_cell)],
    [Paragraph("Ottawa", table_cell), Paragraph("1998", table_cell), Paragraph("Child's right to healthcare", table_cell)],
    [Paragraph("Taipei", table_cell), Paragraph("2002", table_cell), Paragraph("Ethical considerations for biobanks", table_cell)],
    [Paragraph("Delhi", table_cell), Paragraph("2009", table_cell), Paragraph("Health effects of global climate change", table_cell)],
    [Paragraph("Chicago", table_cell), Paragraph("2017", table_cell), Paragraph("Quality assurance in the medical profession", table_cell)],
]
decl_table = Table(decl_data, colWidths=[4*cm, 2.5*cm, 9.5*cm])
decl_bg = [("BACKGROUND", (0,0), (-1,0), DARK_BLUE)]
for i in range(1, len(decl_data)):
    bg = LIGHT_BLUE if i % 2 == 1 else WHITE
    decl_bg.append(("BACKGROUND", (0,i), (-1,i), bg))
decl_table.setStyle(TableStyle([
    ("GRID", (0,0), (-1,-1), 0.5, MED_BLUE),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
] + decl_bg))
story.append(decl_table)
story.append(Paragraph("Source: Essentials of Forensic Medicine and Toxicology, 36th edition (2026)", source_note))

# ── SECTION 8: PROFESSIONAL MISCONDUCT ────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph("8. PROFESSIONAL MISCONDUCT", h1))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "Professional misconduct (also called 'infamous conduct' or 'disgraceful act') is improper conduct by "
    "a doctor in a professional capacity. The National Medical Commission (NMC) — India's apex medical "
    "regulator since September 25, 2020 (replacing the 63-year-old MCI) — governs professional conduct "
    "through the Ethics and Medical Registration Board (EMRB).",
    body))
story.append(Spacer(1, 6))

misc_data = [
    [Paragraph("<b>Category</b>", table_header), Paragraph("<b>Examples</b>", table_header)],
    [Paragraph("Patient Care Violations", table_cell), Paragraph("Refusing emergency care without just cause; covering for unqualified practitioners; operating without consent", table_cell)],
    [Paragraph("Confidentiality Breach", table_cell), Paragraph("Revealing patient information without legal cause; discussing patients in public settings", table_cell)],
    [Paragraph("Professional Misconduct", table_cell), Paragraph("Advertising or self-promotion; issuing false certificates; taking advantage of professional position", table_cell)],
    [Paragraph("Regulatory Violations", table_cell), Paragraph("Failing to report notifiable diseases; using the Red Cross Emblem (prohibited under Geneva Convention Act 1960, Section 12)", table_cell)],
    [Paragraph("Financial Misconduct", table_cell), Paragraph("Charging excessive fees; 'medical kidnapping' — unnecessary admissions or ICU stays for billing purposes", table_cell)],
]
misc_table = Table(misc_data, colWidths=[5*cm, 11*cm])
misc_bg = [("BACKGROUND", (0,0), (-1,0), RED_DARK)]
for i in range(1, len(misc_data)):
    bg = RED_LIGHT if i % 2 == 1 else WHITE
    misc_bg.append(("BACKGROUND", (0,i), (-1,i), bg))
misc_table.setStyle(TableStyle([
    ("GRID", (0,0), (-1,-1), 0.5, RED_DARK),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
] + misc_bg))
story.append(misc_table)
story.append(Paragraph("Source: P.C. Dikshit Textbook of Forensic Medicine and Toxicology | Parikh's Medical Jurisprudence", source_note))

# ── SECTION 9: BIOETHICS ──────────────────────────────────────────────────────
story.append(Spacer(1, 8))
story.append(Paragraph("9. BIOETHICS AND MEDICAL ETHICS", h1))
story.append(Spacer(1, 4))

bioethics_data = [
    [Paragraph("<b>Term</b>", table_header), Paragraph("<b>Definition</b>", table_header)],
    [Paragraph("Ethics", table_cell), Paragraph("The study of moral behaviour, guiding actions based on values like truth, justice, integrity, and honesty", table_cell)],
    [Paragraph("Bioethics", table_cell), Paragraph("Coined by Fritz Jahr (1927). A broad field encompassing ethics related to biological research (non-human organisms) and medical research (humans). Includes animal ethics, environmental ethics, and medical ethics", table_cell)],
    [Paragraph("Medical Ethics", table_cell), Paragraph("Refers to the moral principles or code of conduct governing medical professionals' interactions with patients, colleagues, and the State. A self-imposed code to uphold noble traditions of the profession", table_cell)],
]
bio_table = Table(bioethics_data, colWidths=[4*cm, 12*cm])
bio_table.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), TEAL),
    ("BACKGROUND", (0,1), (-1,1), LIGHT_TEAL),
    ("BACKGROUND", (0,2), (-1,2), WHITE),
    ("BACKGROUND", (0,3), (-1,3), LIGHT_TEAL),
    ("GRID", (0,0), (-1,-1), 0.5, TEAL),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
]))
story.append(bio_table)
story.append(Paragraph("Source: Essentials of Forensic Medicine and Toxicology, 36th edition (2026)", source_note))

# ── SECTION 10: QUICK SUMMARY ─────────────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph("10. QUICK REVISION SUMMARY", h1))
story.append(Spacer(1, 6))

summary_data = [
    [Paragraph("<b>Topic</b>", table_header), Paragraph("<b>Key Point</b>", table_header)],
    [Paragraph("Oldest Ethics Code", table_cell), Paragraph("Hippocratic Oath (5th century BCE) → modernized as Declaration of Geneva (1948)", table_cell)],
    [Paragraph("First 'Modern' Code", table_cell), Paragraph("Thomas Percival, 1803 — coined 'medical ethics' and 'medical jurisprudence'", table_cell)],
    [Paragraph("AMA Code", table_cell), Paragraph("First adopted 1847 based on Percival's work; updated continuously", table_cell)],
    [Paragraph("4 Principles (Beauchamp)", table_cell), Paragraph("Autonomy, Beneficence, Non-maleficence (primum non nocere), Justice", table_cell)],
    [Paragraph("Declaration of Helsinki", table_cell), Paragraph("1964 — ethical principles for human research / experimentation", table_cell)],
    [Paragraph("Declaration of Geneva", table_cell), Paragraph("1948 — recited by new MBBS students; modern Hippocratic Oath", table_cell)],
    [Paragraph("Informed Consent", table_cell), Paragraph("Foundation of autonomy; required before any procedure; written for significant interventions", table_cell)],
    [Paragraph("Confidentiality", table_cell), Paragraph("Extends beyond patient's death; exceptions for notifiable diseases and legal requirements", table_cell)],
    [Paragraph("India's NMC", table_cell), Paragraph("Replaced MCI in 2020; Ethics and Medical Registration Board (EMRB) governs professional conduct", table_cell)],
    [Paragraph("Bioethics Coined", table_cell), Paragraph("Fritz Jahr, 1927 — broader than medical ethics, includes animal and environmental ethics", table_cell)],
    [Paragraph("ICMR", table_cell), Paragraph("Indian Council of Medical Research — guidelines on ethical considerations in human research", table_cell)],
]
sum_table = Table(summary_data, colWidths=[5*cm, 11*cm])
sum_bg = [("BACKGROUND", (0,0), (-1,0), DARK_BLUE)]
for i in range(1, len(summary_data)):
    bg = LIGHT_GOLD if i % 2 == 1 else WHITE
    sum_bg.append(("BACKGROUND", (0,i), (-1,i), bg))
sum_table.setStyle(TableStyle([
    ("GRID", (0,0), (-1,-1), 0.5, GOLD),
    ("VALIGN", (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING", (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 6),
    ("LEFTPADDING", (0,0), (-1,-1), 8),
] + sum_bg))
story.append(sum_table)

story.append(Spacer(1, 12))
story.append(HRFlowable(width="100%", thickness=2, color=DARK_BLUE))
story.append(Spacer(1, 6))
mnemonic = Table([[Paragraph(
    "<b>MNEMONIC — ABCJ:</b>  "
    "<b>A</b>utonomy (patient decides)  ·  <b>B</b>eneficence (do good)  ·  "
    "<b>C</b>are / Non-maleficence (do no harm)  ·  <b>J</b>ustice (be fair to all)",
    ParagraphStyle("mnemo", fontSize=11, textColor=DARK_BLUE,
        fontName="Helvetica-Bold", alignment=TA_CENTER))
]], colWidths=[16*cm])
mnemonic.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (0,0), LIGHT_GOLD),
    ("BOX", (0,0), (0,0), 2, GOLD),
    ("TOPPADDING", (0,0), (0,0), 10),
    ("BOTTOMPADDING", (0,0), (0,0), 10),
    ("LEFTPADDING", (0,0), (0,0), 12),
]))
story.append(mnemonic)

# ── BUILD PDF ────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=1.5*cm,
    rightMargin=1.5*cm,
    topMargin=2*cm,
    bottomMargin=1.5*cm,
    title="Medical Code of Ethics for Medical Students",
    author="Orris Medical Education",
    subject="Medical Ethics",
)
doc.build(story, onFirstPage=on_first_page, onLaterPages=on_page)
print(f"PDF generated: {OUTPUT}")
Running Command

cd /home/daytona/workspace/medical-ethics && python3 generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/medical-ethics/Medical_Code_of_Ethics.pdf

Your PDF is ready! Here's the download link:

Medical Code of Ethics

PDF Document · PDF

What's inside (3.9 MB, multi-page A4):
SectionContent
Cover PageStyled title page with decorative design
Section 1Definition — Medical Ethics vs. Medical Etiquette (comparison table)
Section 2Historical timeline — Hammurabi → Charaka → Hippocrates → Percival → AMA → Geneva (with infographic image)
Section 3Full Hippocratic Oath text with key pledges
Section 4Declaration of Geneva — all 11 pledges in formatted table
Section 5Four Core Principles (Beauchamp & Childress) — Autonomy, Beneficence, Non-maleficence, Justice with color-coded detail (with diagram image)
Section 6Practical Ethics — Informed Consent, Confidentiality, Doctor-Patient Relationship
Section 7All 14 WMA Declarations with years and subjects
Section 8Professional Misconduct — categories and examples
Section 9Bioethics definitions
Section 10Quick Revision Summary table + ABCJ Mnemonic
This is a shared conversation. Sign in to Orris to start your own chat.