Make it mbbs note with proper diagram
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
mkdir -p /home/daytona/workspace/pectoral-girdle-notes && ls /home/daytona/skills/docx/
# Download the diagram images cd /home/daytona/workspace/pectoral-girdle-notes curl -s -o sc_joint.png "https://cdn.orris.care/cdss_images/aa3cd5d76d65d5b85087fe84dfc3b45b78b6f88fce3ab9a013d9969dd66d7977.png" && echo "sc done" curl -s -o ac_joint.png "https://cdn.orris.care/cdss_images/3cb5320194a57ece1dde5c60d2e1a9428807bfc0e333073a3ea928ac49055505.png" && echo "ac done" ls -la *.png
~/pectoral-girdle-notes/create_note.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
ImageRun, AlignmentType, HeadingLevel, BorderStyle, WidthType,
LevelFormat, ShadingType, VerticalAlign, PageBreak, UnderlineType
} = require('docx');
const fs = require('fs');
// Load images
const scJointImg = fs.readFileSync('/home/daytona/workspace/pectoral-girdle-notes/sc_joint.png');
const acJointImg = fs.readFileSync('/home/daytona/workspace/pectoral-girdle-notes/ac_joint.png');
// Helper: bold heading paragraph
function h1(text) {
return new Paragraph({
children: [new TextRun({ text, bold: true, size: 32, font: "Arial", color: "1F3864" })],
spacing: { before: 280, after: 120 },
border: {
bottom: { style: BorderStyle.SINGLE, size: 8, color: "1F3864" }
}
});
}
function h2(text) {
return new Paragraph({
children: [new TextRun({ text, bold: true, size: 26, font: "Arial", color: "2E5FA3" })],
spacing: { before: 200, after: 80 }
});
}
function h3(text) {
return new Paragraph({
children: [new TextRun({ text, bold: true, size: 24, font: "Arial", color: "154360" })],
spacing: { before: 160, after: 60 }
});
}
function para(text, opts = {}) {
return new Paragraph({
children: [new TextRun({ text, font: "Arial", size: 22, ...opts })],
spacing: { before: 60, after: 60 }
});
}
function bullet(text, indent = 720) {
return new Paragraph({
numbering: { reference: "bullets", level: 0 },
children: [new TextRun({ text, font: "Arial", size: 22 })],
indent: { left: indent },
spacing: { before: 40, after: 40 }
});
}
function bullet2(text) {
return new Paragraph({
numbering: { reference: "bullets2", level: 0 },
children: [new TextRun({ text, font: "Arial", size: 22 })],
indent: { left: 1080 },
spacing: { before: 30, after: 30 }
});
}
function boldPara(label, text) {
return new Paragraph({
children: [
new TextRun({ text: label + ": ", bold: true, font: "Arial", size: 22 }),
new TextRun({ text, font: "Arial", size: 22 })
],
spacing: { before: 60, after: 60 }
});
}
function captionPara(text) {
return new Paragraph({
children: [new TextRun({ text, font: "Arial", size: 20, italics: true, color: "555555" })],
alignment: AlignmentType.CENTER,
spacing: { before: 40, after: 120 }
});
}
function divider() {
return new Paragraph({
children: [],
border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" } },
spacing: { before: 60, after: 60 }
});
}
function imgPara(imgData, w, h) {
return new Paragraph({
children: [new ImageRun({ data: imgData, transformation: { width: w, height: h } })],
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 40 }
});
}
// Title box using a single-cell table
function titleBox() {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [
new TableRow({
children: [
new TableCell({
shading: { fill: "1F3864", type: ShadingType.CLEAR, color: "auto" },
margins: { top: 200, bottom: 200, left: 300, right: 300 },
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "ANATOMY — PECTORAL GIRDLE & SHOULDER JOINTS", bold: true, color: "FFFFFF", size: 36, font: "Arial" })]
}),
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "MBBS Anatomy Notes | Upper Limb", color: "BDC3C7", size: 22, font: "Arial" })]
})
]
})
]
})
]
});
}
// Quick-reference summary table
function summaryTable() {
const headers = ["Feature", "Sternoclavicular Joint", "Acromioclavicular Joint"];
const rows = [
["Type", "Synovial — Saddle (modified)", "Synovial — Plane (gliding)"],
["Bones", "Clavicle (medial end) + Manubrium of sternum + 1st costal cartilage", "Clavicle (lateral end) + Acromion of scapula"],
["Articular disc", "Present — divides cavity into superomedial & inferolateral compartments", "May be present (incomplete/absent in adults)"],
["Capsular lig.", "Attached to peripheral margins of articulating bones", "Thickened superiorly to form AC ligament"],
["Key ligament", "Costoclavicular ligament (strongest stabilizer)", "Coracoclavicular ligament (conoid + trapezoid)"],
["Arterial supply", "Internal thoracic + Suprascapular arteries", "Suprascapular + Thoracoacromial arteries"],
["Nerve supply", "Medial supraclavicular nerve (C3, C4)", "Suprascapular + Lateral supraclavicular nerves"],
["Movements", "Elevation/Depression, Protraction/Retraction, Rotation of clavicle", "Gliding, rotation — transmits forces from scapula to clavicle"],
];
const headerRow = new TableRow({
tableHeader: true,
children: headers.map(h =>
new TableCell({
shading: { fill: "2E5FA3", type: ShadingType.CLEAR, color: "auto" },
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph({
children: [new TextRun({ text: h, bold: true, color: "FFFFFF", font: "Arial", size: 20 })],
alignment: AlignmentType.CENTER
})]
})
)
});
const dataRows = rows.map((row, i) =>
new TableRow({
children: row.map((cell, j) =>
new TableCell({
shading: j === 0
? { fill: "D6E4F0", type: ShadingType.CLEAR, color: "auto" }
: (i % 2 === 0 ? { fill: "FFFFFF", type: ShadingType.CLEAR, color: "auto" }
: { fill: "EAF4FC", type: ShadingType.CLEAR, color: "auto" }),
margins: { top: 60, bottom: 60, left: 120, right: 120 },
children: [new Paragraph({
children: [new TextRun({ text: cell, font: "Arial", size: 18, bold: j === 0 })]
})]
})
)
})
);
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
rows: [headerRow, ...dataRows]
});
}
const doc = new Document({
numbering: {
config: [
{
reference: "bullets",
levels: [{
level: 0, format: LevelFormat.BULLET, text: "\u2022",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } }
}]
},
{
reference: "bullets2",
levels: [{
level: 0, format: LevelFormat.BULLET, text: "\u25E6",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 1080, hanging: 360 } } }
}]
}
]
},
sections: [{
properties: {
page: {
size: { width: 11906, height: 16838 },
margin: { top: 1008, right: 1008, bottom: 1008, left: 1008 }
}
},
children: [
// TITLE
titleBox(),
new Paragraph({ children: [], spacing: { before: 200, after: 0 } }),
// ============================
// SECTION 1: OVERVIEW OF JOINTS
// ============================
h1("1. CLASSIFICATION OF JOINTS"),
para("Joints are classified based on their structure and the number of bones involved:"),
boldPara("Simple", "Between 2 bones (e.g., interphalangeal joints)"),
boldPara("Compound", "More than 2 bones (e.g., knee joint)"),
boldPara("Complex", "Contains an articular disc dividing the cavity (e.g., sternoclavicular joint — technically compound + disc)"),
new Paragraph({ spacing: { before: 80, after: 0 } }),
// Sub-classification
h2("Types by Mobility"),
bullet("Synarthrosis (fibrous) — immovable"),
bullet("Amphiarthrosis (cartilaginous) — slightly movable"),
bullet("Diarthrosis (synovial) — freely movable"),
bullet2("Plane, Hinge, Pivot, Condyloid, Saddle, Ball-and-socket"),
divider(),
// ============================
// SECTION 2: UPPER LIMB INTRO
// ============================
h1("2. UPPER LIMB — PECTORAL GIRDLE"),
para("The upper limb is built for prehension (grasping) and manipulation. The combined range of movements of different joints of the upper limb enhances the skill of the fingers."),
new Paragraph({ spacing: { before: 60, after: 0 } }),
h2("Joints of the Upper Limb"),
bullet("Pectoral (shoulder) girdle — Sternoclavicular joint, Acromioclavicular joint"),
bullet("Shoulder joint (glenohumeral)"),
bullet("Elbow joint"),
bullet("Radioulnar joints (proximal and distal)"),
bullet("Wrist and hand joints"),
new Paragraph({ spacing: { before: 60, after: 0 } }),
h2("Pectoral Girdle — Overview"),
para("The pectoral girdle connects the upper limb to the axial skeleton. It consists mostly of muscular attachment, with only two true bony joints:"),
bullet("Sternoclavicular joint — connects clavicle to manubrium of sternum (medially)"),
bullet("Acromioclavicular joint — connects clavicle to acromion of scapula (laterally)"),
new Paragraph({ spacing: { before: 40, after: 0 } }),
h3("Bones of the Pectoral Girdle"),
bullet("Clavicle — the only bony strut connecting the upper limb to the thorax"),
bullet("Sternum — manubrium articulates medially"),
bullet("Scapula — posterior; mainly held by muscles (serratus anterior, trapezius, rhomboids)"),
divider(),
// ============================
// SECTION 3: STERNOCLAVICULAR JOINT
// ============================
h1("3. STERNOCLAVICULAR JOINT"),
// Diagram
imgPara(scJointImg, 500, 420),
captionPara("Fig. 1 — Sternoclavicular Joint. (A) Bones & ligaments — articular disc, costoclavicular ligament, interclavicular ligament. (B) Volume-rendered CT reconstruction.\n[Source: Gray's Anatomy for Students]"),
h2("Type"),
para("Synovial — Saddle type (modified). The articular surface of this joint is concavo-convex."),
para("Note: It is classified as a complex joint because of the presence of an articular disc dividing the cavity into two compartments."),
h2("Bones Forming the Joint"),
bullet("Medial end of the clavicle"),
bullet("Clavicular notch of the manubrium of the sternum"),
bullet("Small part of the 1st costal cartilage"),
h2("Articular Disc"),
para("A fibrocartilaginous disc completely divides the joint cavity into:"),
bullet2("Superomedial compartment"),
bullet2("Inferolateral compartment"),
para("This disc acts as a shock absorber and prevents medial displacement of the clavicle."),
h2("Ligaments"),
h3("1. Capsular Ligament"),
para("Attached to the peripheral margins of the articulating bones (clavicle and manubrium). It surrounds the entire joint."),
h3("2. Anterior Sternoclavicular Ligament"),
para("Covers the anterior surface of the joint. Broad, flat fibrous band reinforcing the capsule anteriorly."),
h3("3. Posterior Sternoclavicular Ligament"),
para("Covers the posterior surface of the joint. Stronger than the anterior ligament. Prevents posterior dislocation of the clavicle."),
h3("4. Interclavicular Ligament"),
para("Stretches across the sternal notch connecting both clavicles to each other and to the superior surface of the manubrium. Resists downward displacement (depression) of the shoulder girdle."),
h3("5. Costoclavicular Ligament (Most Important)"),
para("Location: Lateral to the joint, between the proximal clavicle and the 1st rib + costal cartilage."),
bullet("Below: Attached to the 1st costal cartilage"),
bullet("Above: Attached to rough impression on inferior surface of clavicle (costoclavicular impression)"),
para("It is the strongest ligament of the SC joint and the primary restraint against upward displacement of the medial clavicle."),
h2("Neurovascular Supply"),
boldPara("Arterial supply", "Internal thoracic artery + Suprascapular artery"),
boldPara("Nerve supply", "Medial supraclavicular nerve (C3, C4)"),
h2("Movements at the SC Joint"),
bullet("Elevation and depression of the clavicle (e.g., shrugging)"),
bullet("Protraction and retraction (forward/backward movement)"),
bullet("Axial rotation of the clavicle (occurs during arm elevation above 90 degrees)"),
divider(),
// ============================
// SECTION 4: ACROMIOCLAVICULAR JOINT
// ============================
h1("4. ACROMIOCLAVICULAR JOINT"),
imgPara(acJointImg, 480, 380),
captionPara("Fig. 2 — Right Acromioclavicular Joint showing acromioclavicular ligament and coracoclavicular ligament (trapezoid + conoid parts).\n[Source: Gray's Anatomy for Students]"),
h2("Type"),
para("Synovial — Plane type (gliding joint)."),
h2("Bones Forming the Joint"),
bullet("Lateral end (acromial end) of the clavicle — oval facet on its inferior surface"),
bullet("Medial surface of the acromion of the scapula — matching oval facet"),
h2("Articular Disc"),
para("An incomplete fibrocartilaginous disc may be present. It often degenerates and disappears in adults."),
h2("Ligaments"),
h3("1. Fibrous Capsule"),
para("Surrounds the joint. It is thickened superiorly to form the acromioclavicular ligament."),
h3("2. Acromioclavicular Ligament"),
para("Thickened portion of the superior capsule. Provides horizontal stability (resists anteroposterior displacement)."),
h3("3. Coracoclavicular Ligament (Extrinsic — Most Important)"),
para("Not directly related to the joint capsule. Acts as the primary suspensory ligament of the scapula and upper limb from the clavicle. It has two parts:"),
bullet2("Conoid part (medial/posterior) — fan-shaped; attaches to conoid tubercle on inferior surface of clavicle; from the root of the coracoid process"),
bullet2("Trapezoid part (anterior/lateral) — quadrilateral; attaches to the trapezoid line on inferior surface of clavicle; from the upper surface of the coracoid process"),
para("The coracoclavicular ligament bears most of the weight of the upper limb transmitted through the scapula to the clavicle."),
h2("Neurovascular Supply"),
boldPara("Arterial supply", "Suprascapular artery + Thoracoacromial artery"),
boldPara("Nerve supply", "Suprascapular nerve + Lateral supraclavicular nerve"),
h2("Movements at the AC Joint"),
bullet("Gliding movements — allows scapula to rotate on the clavicle"),
bullet("Scapular rotation (upward) during arm elevation above 90 degrees"),
bullet("Minor anterior-posterior gliding"),
divider(),
// ============================
// SECTION 5: QUICK COMPARISON TABLE
// ============================
h1("5. QUICK COMPARISON TABLE"),
new Paragraph({ spacing: { before: 80, after: 80 } }),
summaryTable(),
new Paragraph({ spacing: { before: 120, after: 0 } }),
divider(),
// ============================
// SECTION 6: MOVEMENTS OF SHOULDER GIRDLE
// ============================
h1("6. MOVEMENTS OF THE SHOULDER GIRDLE"),
para("Movements of the shoulder girdle occur at the two joints simultaneously:"),
h2("At Both SC and AC Joints Together"),
bullet("Elevation — e.g., shrugging the shoulder (trapezius, levator scapulae)"),
bullet("Depression — e.g., pulling shoulders down (pectoralis minor, subclavius)"),
bullet("Protraction (forward / anterior movement) — e.g., pushing (serratus anterior)"),
bullet("Retraction (backward / posterior movement) — e.g., bracing (rhomboids, trapezius)"),
bullet("Rotation of scapula — upward rotation elevates the glenoid cavity, allowing full arm elevation"),
divider(),
// ============================
// SECTION 7: CLINICAL NOTES
// ============================
h1("7. CLINICAL CORRELATES (Exam High-Yield)"),
h2("SC Joint Dislocation"),
bullet("Uncommon but serious — posterior dislocation can compress trachea, esophagus, or great vessels"),
bullet("Anterior dislocation is more common and visible as a bump"),
bullet("MC cause: indirect force (fall on outstretched hand or lateral shoulder)"),
h2("AC Joint Injury (Shoulder Separation)"),
bullet("Common in contact sports and falls on the shoulder"),
bullet("Grades I-VI based on ligament damage (Rockwood classification)"),
bullet("Coracoclavicular ligament rupture (Grade III+) leads to downward displacement of the arm complex relative to the clavicle — the clavicle appears raised ('piano key sign')"),
h2("Clavicle Fracture"),
bullet("Most common fracture of the pectoral girdle"),
bullet("MC site: junction of middle and lateral third"),
bullet("Medial fragment pulled up by sternocleidomastoid; lateral fragment drops due to weight of arm"),
divider(),
// Footer note
new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({
text: "Sources: Gray's Anatomy for Students (9780323934237) | Campbell's Operative Orthopaedics 15e",
font: "Arial", size: 18, italics: true, color: "888888"
})],
spacing: { before: 120, after: 0 }
})
]
}]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync('/home/daytona/workspace/pectoral-girdle-notes/Pectoral_Girdle_Joints_MBBS.docx', buffer);
console.log('Document created successfully!');
});
cd /home/daytona/workspace/pectoral-girdle-notes && node create_note.js 2>&1
cd /home/daytona/workspace/pectoral-girdle-notes && python /home/daytona/skills/docx/scripts/office/validate.py Pectoral_Girdle_Joints_MBBS.docx 2>&1
ls -lh /home/daytona/workspace/pectoral-girdle-notes/Pectoral_Girdle_Joints_MBBS.docx
Pectoral Girdle Joints MBBS
Word Document · DOCX


Ok create
Pectoral Girdle Joints MBBS
Word Document · DOCX
Write here
| Type | Definition | Example |
|---|---|---|
| Simple | 2 bones | Interphalangeal joint |
| Compound | >2 bones | Knee joint |
| Complex | Articular disc present | Sternoclavicular joint |

Synovial — Saddle type (concavo-convex articular surface) Also classified as Complex due to articular disc dividing the cavity.
| # | Ligament | Attachment | Function |
|---|---|---|---|
| 1 | Capsular ligament | Peripheral margins of articulating bones | Encloses the joint |
| 2 | Anterior SC ligament | Anterior surface of joint | Reinforces capsule anteriorly |
| 3 | Posterior SC ligament | Posterior surface of joint | Prevents posterior dislocation |
| 4 | Interclavicular ligament | Connects both clavicles across sternal notch | Resists depression of shoulder |
| 5 | Costoclavicular ligament ⭐ | Below: 1st rib + costal cartilage; Above: inferior surface of clavicle | Strongest — resists upward displacement |

Synovial — Plane type (gliding joint)
| # | Ligament | Details |
|---|---|---|
| 1 | Fibrous capsule | Surrounds joint; thickened superiorly to form AC ligament |
| 2 | Acromioclavicular ligament | Thickened superior capsule; resists anteroposterior displacement |
| 3 | Coracoclavicular ligament ⭐ | Extrinsic; primary suspensory ligament of scapula/upper limb from clavicle |
Coracoclavicular Ligament
├── Conoid part (medial/posterior)
│ ├── Origin: Root of coracoid process
│ └── Insertion: Conoid tubercle on inferior clavicle
└── Trapezoid part (anterior/lateral)
├── Origin: Upper surface of coracoid process
└── Insertion: Trapezoid line on inferior clavicle
| Feature | SC Joint | AC Joint |
|---|---|---|
| Type | Synovial — Saddle (Complex) | Synovial — Plane |
| Bones | Clavicle + Manubrium + 1st costal cartilage | Lateral clavicle + Acromion |
| Articular disc | Present (complete) | Incomplete / absent |
| Strongest ligament | Costoclavicular | Coracoclavicular |
| Capsular ligament | Present | Present (thickened = AC ligament) |
| Articular surface | Concavo-convex (saddle) | Flat (plane) |
| Arterial supply | Internal thoracic + Suprascapular | Suprascapular + Thoracoacromial |
| Nerve supply | Medial supraclavicular (C3, C4) | Suprascapular + Lateral supraclavicular |
| Movement | Muscles |
|---|---|
| Elevation (shrugging) | Trapezius, Levator scapulae |
| Depression | Pectoralis minor, Subclavius |
| Protraction (forward/pushing) | Serratus anterior, Pectoralis minor |
| Retraction (bracing backward) | Rhomboids, Trapezius (middle) |
| Upward rotation of scapula | Serratus anterior + Trapezius (together) |
| Downward rotation | Rhomboids, Pectoralis minor |