give me STANDARDIZED PRAKRITI ASSESSMENT SCALE (CCRAS-PAS)
CCRAS-PAS Standardized Prakriti Assessment Scale CCRAS questionnaire
CCRAS Prakriti Assessment Scale questions criteria Vata Pitta Kapha
CCRAS Prakriti Assessment Scale standardized
Prakriti assessment tool Ayurveda validation psychometric
https://www.ccras.nic.in/sites/default/files/Notices/3105201…
| Attribute | Vata | Pitta | Kapha |
|---|---|---|---|
| Body frame | Thin, lean | Medium, moderate | Heavy, stocky |
| Body weight | Low, difficulty gaining | Moderate | High, difficulty losing |
| Skin texture | Dry, rough, cool | Warm, soft, fair, reddish | Oily, smooth, pale, cold |
| Hair | Dry, frizzy, scanty | Fine, soft, early greying/baldness | Thick, oily, wavy, lustrous |
| Eyes | Small, dry, restless | Sharp, penetrating, reddish | Large, calm, attractive |
| Lips | Dry, thin, dark | Soft, pinkish, medium | Thick, moist, pale |
| Teeth | Irregular, dry, dark | Medium, yellowish | Large, white, well-formed |
| Nails | Dry, brittle, rough | Sharp, pinkish, soft | Thick, white, smooth |
| Veins | Prominent | Moderate | Not visible |
| Voice | Hoarse, rough, low volume | Sharp, clear, high-pitched | Deep, resonant, melodious |
| Attribute | Vata | Pitta | Kapha |
|---|---|---|---|
| Appetite | Variable, irregular | Strong, cannot skip meals | Slow but consistent |
| Food quantity | Small, variable | Large, always hungry | Moderate, can skip |
| Food preference | Warm, oily, sweet | Cold, sweet, bitter | Dry, pungent, hot |
| Thirst | Variable | Excessive | Less |
| Bowel habits | Irregular, constipated, dry stools | Regular, loose, soft | Regular, slow, heavy |
| Urine | Scanty, clear | Profuse, yellow/dark | Moderate, pale |
| Perspiration | Scanty | Profuse, strong odour | Moderate, pleasant |
| Sleep | Light, disturbed, less | Moderate, sound | Deep, prolonged, heavy |
| Dreams | Fearful, flying, jumping | Fiery, violent, colourful | Watery, romantic, calm |
| Sexual desire | Variable, low | Moderate, passionate | Strong, sustained |
| Physical activity | Quick, restless | Moderate, purposeful | Slow, steady |
| Attribute | Vata | Pitta | Kapha |
|---|---|---|---|
| Taste preference | Sweet, sour, salty | Sweet, bitter, astringent | Pungent, bitter, astringent |
| Smell sensitivity | Less sensitive | Moderate | Sensitive to strong smells |
| Hearing | Sensitive to sound | Moderate | Less sensitive |
| Tactile sensitivity | Very sensitive (to pain/touch) | Moderate | Less sensitive |
| Vision | Quick, restless gaze | Sharp, focused | Slow, steady gaze |
| Attribute | Vata | Pitta | Kapha |
|---|---|---|---|
| Memory | Quick to grasp, quick to forget | Sharp, focused, good recall | Slow to learn, long retention |
| Intellect | Quick, creative | Sharp, analytical | Steady, methodical |
| Speech | Fast, talkative, rambling | Sharp, precise, argumentative | Slow, deliberate, measured |
| Emotions | Anxiety, fear, uncertainty | Anger, jealousy, ambition | Attachment, greed, complacency |
| Temperament | Enthusiastic, variable mood | Intense, goal-oriented | Calm, stable, steady |
| Decision making | Indecisive, changes often | Quick, decisive | Slow but firm |
| Stress response | Anxiety and fear | Anger, irritability | Withdrawal, complacency |
| Attribute | Vata | Pitta | Kapha |
|---|---|---|---|
| Physical endurance | Low, tires easily | Moderate, competitive | High, good stamina |
| Walking pace | Fast, irregular | Moderate, determined | Slow, steady |
| Work style | Quick start, poor follow-through | Organized, focused, goal-oriented | Steady, persistent |
| Exercise tolerance | Low | Moderate | High |
| Attribute | Vata | Pitta | Kapha |
|---|---|---|---|
| Social interaction | Talkative, sociable, fickle | Selective, leader-type | Few deep relationships, loyal |
| Spending habits | Impulsive, spends freely | Moderate, organized | Conservative, saves |
| Faith/beliefs | Variable, changes frequently | Strong personal conviction | Steady, traditional |
| Leadership | Inspirational, creative | Strong, decisive | Supportive, stable |
| Domain | Vata | Pitta | Kapha |
|---|---|---|---|
| Common ailments | Neurological, joint pain, constipation, anxiety | Inflammation, acidity, liver, skin, fever | Respiratory, obesity, diabetes, lethargy |
| Season sensitivity | Aggravated in dry/cold/autumn | Aggravated in hot/summer | Aggravated in spring/cold/damp |
| Score Range | Prakriti Classification |
|---|---|
| Highest single dosha score | Ekadoshaja (pure type: V, P, or K) |
| Two doshas roughly equal | Dwandwaja (dual: VP, VK, PK) |
| All three roughly equal | Tridoshaja / Sama Prakriti |
Create a PDF quick reference guide of the CCRAS-PAS scoring criteria
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /home/daytona/workspace/ccras-pas && echo "dir created"
~/ccras-pas/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.pdfgen import canvas
from reportlab.platypus.doctemplate import PageTemplate, BaseDocTemplate
from reportlab.platypus.frames import Frame
OUTPUT = "/home/daytona/workspace/ccras-pas/CCRAS_PAS_Quick_Reference.pdf"
# ── Colour palette ──────────────────────────────────────────────
VATA_COL = colors.HexColor("#5B7FA6") # muted blue
PITTA_COL = colors.HexColor("#C0604A") # terracotta
KAPHA_COL = colors.HexColor("#4E8B60") # forest green
HEADER_BG = colors.HexColor("#1B3A5C") # deep navy
LIGHT_GREY = colors.HexColor("#F5F5F5")
MID_GREY = colors.HexColor("#CCCCCC")
TEXT_DARK = colors.HexColor("#1A1A1A")
ACCENT_YEL = colors.HexColor("#F0A500")
PAGE_W, PAGE_H = A4
# ── Custom page canvas (header/footer) ──────────────────────────
class HeaderFooterCanvas(canvas.Canvas):
def __init__(self, *args, **kwargs):
self.pages = []
super().__init__(*args, **kwargs)
def showPage(self):
self.pages.append(dict(self.__dict__))
self._startPage()
def save(self):
total = len(self.pages)
for page in self.pages:
self.__dict__.update(page)
self._draw_decorations(total)
super().showPage()
super().save()
def _draw_decorations(self, total):
pg = self._pageNumber
w, h = A4
# ── Top header bar ──
self.setFillColor(HEADER_BG)
self.rect(0, h - 28*mm, w, 28*mm, fill=1, stroke=0)
# Header text
self.setFillColor(colors.white)
self.setFont("Helvetica-Bold", 13)
self.drawString(15*mm, h - 14*mm, "CCRAS-PAS")
self.setFont("Helvetica", 9)
self.drawString(15*mm, h - 21*mm, "Standardized Prakriti Assessment Scale | CCRAS, Ministry of AYUSH, Govt. of India")
# Coloured dosha tabs in header
tab_labels = [("VATA", VATA_COL), ("PITTA", PITTA_COL), ("KAPHA", KAPHA_COL)]
x_start = w - 68*mm
for i, (label, col) in enumerate(tab_labels):
self.setFillColor(col)
self.roundRect(x_start + i*22*mm, h - 22*mm, 20*mm, 11*mm, 2*mm, fill=1, stroke=0)
self.setFillColor(colors.white)
self.setFont("Helvetica-Bold", 8)
self.drawCentredString(x_start + i*22*mm + 10*mm, h - 16*mm, label)
# ── Bottom footer bar ──
self.setFillColor(HEADER_BG)
self.rect(0, 0, w, 10*mm, fill=1, stroke=0)
self.setFillColor(colors.white)
self.setFont("Helvetica", 7.5)
self.drawString(15*mm, 3.5*mm,
"Quick Reference Guide | For research/clinical use - obtain official instrument from CCRAS (ccras.nic.in)")
self.setFont("Helvetica-Bold", 8)
self.drawRightString(w - 15*mm, 3.5*mm, f"Page {pg} of {total}")
# ── Left accent stripe ──
self.setFillColor(ACCENT_YEL)
self.rect(0, 10*mm, 4*mm, h - 38*mm, fill=1, stroke=0)
# ── Doc template ────────────────────────────────────────────────
def build_doc():
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=18*mm,
rightMargin=12*mm,
topMargin=34*mm,
bottomMargin=16*mm,
title="CCRAS-PAS Quick Reference Guide",
author="CCRAS, Ministry of AYUSH",
subject="Prakriti Assessment Scale",
)
styles = getSampleStyleSheet()
# ── Custom styles ──
sTitle = ParagraphStyle("sTitle", fontName="Helvetica-Bold", fontSize=20,
textColor=HEADER_BG, spaceAfter=4, alignment=TA_CENTER)
sSubTitle = ParagraphStyle("sSubTitle", fontName="Helvetica", fontSize=11,
textColor=colors.HexColor("#444444"), spaceAfter=10, alignment=TA_CENTER)
sSectionHead = ParagraphStyle("sSectionHead", fontName="Helvetica-Bold", fontSize=11,
textColor=colors.white, spaceAfter=2, spaceBefore=10)
sDomainHead = ParagraphStyle("sDomainHead", fontName="Helvetica-Bold", fontSize=9.5,
textColor=HEADER_BG, spaceAfter=3, spaceBefore=8)
sBody = ParagraphStyle("sBody", fontName="Helvetica", fontSize=8.5,
textColor=TEXT_DARK, spaceAfter=2, leading=12)
sSmall = ParagraphStyle("sSmall", fontName="Helvetica", fontSize=7.5,
textColor=colors.HexColor("#555555"), spaceAfter=2, leading=10)
sBullet = ParagraphStyle("sBullet", fontName="Helvetica", fontSize=8.5,
textColor=TEXT_DARK, spaceAfter=1, leading=12, leftIndent=10)
sTableHdr = ParagraphStyle("sTableHdr", fontName="Helvetica-Bold", fontSize=8,
textColor=colors.white, alignment=TA_CENTER)
sTableCell = ParagraphStyle("sTableCell", fontName="Helvetica", fontSize=7.5,
textColor=TEXT_DARK, leading=10)
sTableCellB = ParagraphStyle("sTableCellB", fontName="Helvetica-Bold", fontSize=7.5,
textColor=TEXT_DARK, leading=10)
sNote = ParagraphStyle("sNote", fontName="Helvetica-Oblique", fontSize=7.5,
textColor=colors.HexColor("#666666"), spaceAfter=2, leading=10,
leftIndent=8, borderPad=4)
story = []
# ════════════════════════════════════════════════
# PAGE 1 – Cover / Overview
# ════════════════════════════════════════════════
story.append(Spacer(1, 8*mm))
story.append(Paragraph("CCRAS - PAS", sTitle))
story.append(Paragraph("Standardized Prakriti Assessment Scale", sSubTitle))
story.append(Paragraph("Quick Reference Guide", ParagraphStyle("qr", fontName="Helvetica-Bold",
fontSize=13, textColor=ACCENT_YEL, alignment=TA_CENTER, spaceAfter=6)))
story.append(HRFlowable(width="100%", thickness=1.5, color=ACCENT_YEL, spaceAfter=8))
# Overview box
overview_data = [
[Paragraph("INSTRUMENT OVERVIEW", ParagraphStyle("oh", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white, alignment=TA_CENTER))],
[Paragraph(
"<b>Developer:</b> Central Council for Research in Ayurvedic Sciences (CCRAS), Ministry of AYUSH, Govt. of India<br/>"
"<b>Purpose:</b> Standardized assessment of Ayurvedic body constitution (Prakriti) for research and clinical settings<br/>"
"<b>Items:</b> 58 attributes across 7 domains<br/>"
"<b>Scale:</b> 3-point Likert (1 = Rarely/Never · 2 = Sometimes · 3 = Always/Mostly)<br/>"
"<b>Doshas assessed:</b> Vata (V) · Pitta (P) · Kapha (K)<br/>"
"<b>Sub-scores:</b> Deha Prakriti (physical) and Manasa Prakriti (psychological)<br/>"
"<b>Administrator:</b> Trained Ayurvedic physician or certified assessor",
ParagraphStyle("ob", fontName="Helvetica", fontSize=8.5, textColor=TEXT_DARK,
leading=14, spaceAfter=0))]
]
overview_table = Table(overview_data, colWidths=[doc.width])
overview_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), HEADER_BG),
('BACKGROUND', (0,1), (-1,1), LIGHT_GREY),
('BOX', (0,0), (-1,-1), 1, HEADER_BG),
('TOPPADDING', (0,0), (-1,0), 5),
('BOTTOMPADDING', (0,0), (-1,0), 5),
('TOPPADDING', (0,1), (-1,1), 8),
('BOTTOMPADDING', (0,1), (-1,1), 8),
('LEFTPADDING', (0,1), (-1,1), 10),
('RIGHTPADDING', (0,1), (-1,1), 10),
]))
story.append(overview_table)
story.append(Spacer(1, 6*mm))
# Administration rules box
story.append(_section_head("ADMINISTRATION GUIDELINES", story, sSectionHead, doc))
rules = [
"Assess <b>lifelong tendencies</b> – not current or disease-altered states.",
"Base answers on traits <b>since childhood/birth</b> wherever possible.",
"Discount attributes altered by current illness, medications, season, or age.",
"Each question is answered by or about the individual for their <b>dominant habitual pattern</b>.",
"Obtain consent; administer in a quiet, neutral setting.",
"Trained assessor should clarify questions without leading the respondent.",
"Complete <b>all 58 items</b>; incomplete assessments reduce validity.",
]
rule_items = [[Paragraph(f"• {r}", sBullet)] for r in rules]
rule_table = Table(rule_items, colWidths=[doc.width])
rule_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor("#EEF3F8")),
('BOX', (0,0), (-1,-1), 0.5, VATA_COL),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
story.append(rule_table)
story.append(Spacer(1, 5*mm))
# Scoring overview
story.append(_section_head("SCORING OVERVIEW", story, sSectionHead, doc))
score_data = [
[Paragraph("Step", sTableHdr), Paragraph("Action", sTableHdr)],
[Paragraph("1", sTableCellB), Paragraph("For each of the 58 items, circle: 1 (Rarely), 2 (Sometimes), or 3 (Always)", sTableCell)],
[Paragraph("2", sTableCellB), Paragraph("Sum scores separately for V (Vata), P (Pitta), K (Kapha) columns", sTableCell)],
[Paragraph("3", sTableCellB), Paragraph("Calculate sub-totals for Deha (physical, items 1-40) and Manasa (psychological, items 41-58)", sTableCell)],
[Paragraph("4", sTableCellB), Paragraph("Identify the highest dosha total → this is the dominant Prakriti", sTableCell)],
[Paragraph("5", sTableCellB), Paragraph("Compare all three totals to determine Prakriti classification (see Classification table)", sTableCell)],
]
score_table = Table(score_data, colWidths=[15*mm, doc.width - 15*mm])
score_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), HEADER_BG),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, LIGHT_GREY]),
('BOX', (0,0), (-1,-1), 0.5, MID_GREY),
('GRID', (0,0), (-1,-1), 0.3, MID_GREY),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(score_table)
story.append(Spacer(1, 5*mm))
# Classification
story.append(_section_head("PRAKRITI CLASSIFICATION", story, sSectionHead, doc))
class_data = [
[Paragraph("Classification", sTableHdr), Paragraph("Criteria", sTableHdr),
Paragraph("Type", sTableHdr), Paragraph("Example", sTableHdr)],
[Paragraph("Ekadoshaja", sTableCellB),
Paragraph("One dosha clearly dominant (>50% of total score)", sTableCell),
Paragraph("Pure / Single", sTableCell),
Paragraph("V, P, or K", sTableCell)],
[Paragraph("Dwandwaja", sTableCellB),
Paragraph("Two doshas roughly equal and together dominant", sTableCell),
Paragraph("Dual / Mixed", sTableCell),
Paragraph("VP, VK, or PK", sTableCell)],
[Paragraph("Tridoshaja\n(Sama)", sTableCellB),
Paragraph("All three doshas approximately equal (rare)", sTableCell),
Paragraph("Balanced", sTableCell),
Paragraph("VPK", sTableCell)],
]
class_table = Table(class_data, colWidths=[30*mm, 75*mm, 30*mm, 25*mm])
class_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), HEADER_BG),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.white, LIGHT_GREY, colors.HexColor("#FFF8E7")]),
('BOX', (0,0), (-1,-1), 0.5, MID_GREY),
('GRID', (0,0), (-1,-1), 0.3, MID_GREY),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 5),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(class_table)
story.append(PageBreak())
# ════════════════════════════════════════════════
# PAGE 2 – Domain Scoring Criteria (Physical)
# ════════════════════════════════════════════════
story.append(Spacer(1, 2*mm))
story.append(Paragraph("DOMAIN-WISE SCORING CRITERIA", ParagraphStyle("dh", fontName="Helvetica-Bold",
fontSize=14, textColor=HEADER_BG, spaceAfter=2)))
story.append(Paragraph("Deha Prakriti (Physical Constitution) – Items 1–40",
ParagraphStyle("dsh", fontName="Helvetica-Oblique", fontSize=9,
textColor=colors.HexColor("#555"), spaceAfter=6)))
story.append(HRFlowable(width="100%", thickness=1, color=MID_GREY, spaceAfter=6))
# Column headers helper
def domain_table(domain_name, rows):
hdr = [
Paragraph("Attribute", sTableHdr),
Paragraph("Score 1\nRarely/Never", ParagraphStyle("vh", fontName="Helvetica-Bold",
fontSize=7.5, textColor=colors.white, alignment=TA_CENTER, leading=9)),
Paragraph("Score 2\nSometimes", ParagraphStyle("ph", fontName="Helvetica-Bold",
fontSize=7.5, textColor=colors.white, alignment=TA_CENTER, leading=9)),
Paragraph("Score 3\nAlways/Mostly", ParagraphStyle("kh", fontName="Helvetica-Bold",
fontSize=7.5, textColor=colors.white, alignment=TA_CENTER, leading=9)),
Paragraph("Dosha", sTableHdr),
]
data = [hdr]
for attr, low, mid, high, dosha in rows:
dcol = VATA_COL if dosha=="V" else (PITTA_COL if dosha=="P" else KAPHA_COL)
data.append([
Paragraph(attr, sTableCellB),
Paragraph(low, sTableCell),
Paragraph(mid, sTableCell),
Paragraph(high, sTableCell),
Paragraph(f"<font color='#{dcol.hexval()[1:]}'>{'●'}</font> {dosha}",
ParagraphStyle("dc", fontName="Helvetica-Bold", fontSize=8,
textColor=dcol, alignment=TA_CENTER)),
])
t = Table(data, colWidths=[32*mm, 42*mm, 40*mm, 42*mm, 12*mm])
# alternate row colors by dosha
style_cmds = [
('BACKGROUND', (0,0), (-1,0), HEADER_BG),
('BOX', (0,0), (-1,-1), 0.5, MID_GREY),
('GRID', (0,0), (-1,-1), 0.3, MID_GREY),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 4),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]
for i, row in enumerate(rows, start=1):
dosha = row[4]
bg = colors.HexColor("#EBF1F8") if dosha=="V" else (
colors.HexColor("#FAEAE7") if dosha=="P" else colors.HexColor("#E8F3EB"))
style_cmds.append(('BACKGROUND', (0,i), (-1,i), bg))
t.setStyle(TableStyle(style_cmds))
return t
def domain_block(label, rows, story, sDomainHead):
story.append(KeepTogether([
Paragraph(label, sDomainHead),
domain_table(label, rows),
Spacer(1, 4*mm),
]))
# ── Domain 1: Physical Appearance ──
phys_rows = [
("Body Frame", "Thin, lean, poorly developed muscles", "Medium, moderate, well-proportioned", "Large, heavy, stocky, well-built", "V"),
("Body Weight", "Low; difficulty gaining weight", "Moderate; stable weight", "Heavy; difficulty losing weight", "K"),
("Skin Texture", "Dry, rough, cool, dark-toned", "Warm, soft, fair, reddish/yellowish", "Oily, smooth, pale, cool/cold", "K"),
("Hair", "Dry, frizzy, scanty, coarse", "Fine, soft; early greying or baldness", "Thick, oily, wavy, lustrous, dark", "K"),
("Eyes", "Small, dry, restless, dark iris", "Sharp, penetrating, reddish sclera, medium", "Large, calm, white sclera, attractive", "K"),
("Lips", "Dry, thin, dark, chapped", "Soft, pinkish/reddish, medium-sized", "Thick, moist, pale/whitish", "K"),
("Teeth / Gums", "Irregular, dry, dark; receding gums", "Medium-sized, yellowish; soft gums", "Large, white, even; firm gums", "K"),
("Nails", "Dry, brittle, rough, dark", "Sharp, pinkish, soft, lustrous", "Thick, white, smooth, strong", "K"),
("Veins / Tendons", "Prominent, visible, cord-like", "Moderately visible", "Not prominently visible; well-padded", "V"),
("Voice / Speech", "Hoarse, rough, low volume, fast", "Sharp, clear, high-pitched, argumentative", "Deep, resonant, melodious, slow", "K"),
]
domain_block("DOMAIN 1: Physical Appearance (Items 1–10)", phys_rows, story, sDomainHead)
# ── Domain 2: Physiological Functions ──
physio_rows = [
("Appetite", "Variable, irregular; may forget meals", "Strong, intense; cannot skip meals", "Slow but consistent; can skip meals", "P"),
("Food Quantity", "Small quantities, variable", "Large quantities; always hungry", "Moderate; often satisfied with less", "P"),
("Food Preference", "Warm, oily, sweet, sour, salty", "Cool, sweet, bitter, astringent", "Dry, pungent, bitter, astringent, hot", "V"),
("Thirst", "Variable; often forgets to drink", "Excessive; always thirsty", "Low; rarely feels thirsty", "P"),
("Bowel Habits", "Irregular, constipated, dry hard stools", "Regular, loose/soft; may have diarrhoea", "Regular, slow, heavy, mucus in stool", "V"),
("Urine", "Scanty, colourless/clear", "Profuse, yellow/dark/strong odour", "Moderate, pale, whitish", "P"),
("Perspiration", "Scanty; little odour", "Profuse; strong/sharp odour", "Moderate; pleasant or no odour", "P"),
("Sleep", "Light, disturbed, less (5-6 hrs)", "Moderate, sound (6-7 hrs)", "Deep, prolonged, heavy (8+ hrs)", "K"),
("Dreams", "Fearful, flying, jumping, sky-related", "Fiery, violent, colourful, passionate", "Watery, romantic, dull, undisturbed", "K"),
("Sexual Desire", "Variable, low, inconsistent", "Moderate, passionate, intense", "Strong, sustained, consistent", "K"),
("Physical Activity", "Quick, restless, hyperactive", "Moderate, purposeful, competitive", "Slow, steady, deliberate, strong", "V"),
]
domain_block("DOMAIN 2: Physiological Functions (Items 11–21)", physio_rows, story, sDomainHead)
story.append(PageBreak())
# ── Domain 3: Sensory ──
story.append(Spacer(1, 2*mm))
story.append(HRFlowable(width="100%", thickness=0.5, color=MID_GREY, spaceAfter=4))
sensory_rows = [
("Taste Preference", "Sweet, sour, salty foods preferred", "Sweet, bitter, astringent preferred", "Pungent, bitter, astringent preferred", "P"),
("Smell Sensitivity", "Less sensitive to smells", "Moderate sensitivity", "Highly sensitive to strong odours", "K"),
("Hearing", "Sensitive to loud sounds", "Moderate sensitivity", "Less sensitive; tolerates loud sounds", "V"),
("Touch / Pain Sensitivity", "Very sensitive to pain and touch", "Moderate sensitivity", "Less sensitive; high pain threshold", "V"),
("Vision / Gaze", "Quick, restless, darting gaze", "Sharp, focused, intense gaze", "Slow, steady, calm gaze", "V"),
]
domain_block("DOMAIN 3: Sensory Attributes (Items 22–26)", sensory_rows, story, sDomainHead)
# ── Domain 4: Psychological / Mental ──
psych_rows = [
("Memory", "Quick to learn, quick to forget", "Sharp memory, focused, good recall", "Slow to learn, long-term retention", "K"),
("Intellect / Thinking", "Quick, creative, imaginative, scattered", "Sharp, analytical, precise, critical", "Steady, methodical, slow but thorough", "V"),
("Speech Pattern", "Fast, talkative, rambling, inconsistent", "Sharp, precise, persuasive, argumentative", "Slow, deliberate, measured, few words", "V"),
("Dominant Emotions", "Anxiety, fear, worry, uncertainty", "Anger, jealousy, ambition, passion", "Attachment, greed, complacency, calm", "V"),
("Temperament", "Enthusiastic, variable mood, easily excited", "Intense, goal-oriented, perfectionist", "Calm, stable, even-tempered, loyal", "P"),
("Decision Making", "Indecisive; frequently changes decisions", "Quick, decisive, firm", "Slow but very firm once decided", "V"),
("Stress Response", "Anxiety and fear; nervousness", "Anger, irritability, frustration", "Withdrawal, depression, complacency", "V"),
("Willpower / Courage", "Variable, fluctuates; often hesitant", "Strong, bold, fearless", "Steady, persistent, determined", "P"),
]
domain_block("DOMAIN 4: Psychological / Mental Attributes (Items 27–34)", psych_rows, story, sDomainHead)
story.append(PageBreak())
# ── Domain 5: Activity & Endurance ──
story.append(Spacer(1, 2*mm))
story.append(HRFlowable(width="100%", thickness=0.5, color=MID_GREY, spaceAfter=4))
activity_rows = [
("Physical Endurance", "Low; tires easily, poor stamina", "Moderate; competitive, goal-driven", "High; excellent stamina, slow starter", "V"),
("Walking Pace", "Fast, irregular, light-footed", "Moderate, determined, purposeful", "Slow, steady, heavy tread", "V"),
("Work Style", "Quick to start; poor follow-through", "Organised, focused, finishes tasks", "Steady, persistent, thorough", "P"),
("Exercise Tolerance", "Low; prefers gentle/variable activity", "Moderate; competitive sports", "High; prefers steady endurance activity", "V"),
("Reaction Speed", "Very fast; hyperreactive", "Moderate; measured reactions", "Slow; deliberate reactions", "V"),
]
domain_block("DOMAIN 5: Activity and Endurance (Items 35–39)", activity_rows, story, sDomainHead)
# ── Domain 6: Social / Behavioural ──
social_rows = [
("Social Interaction", "Very talkative, sociable but fickle", "Selective; natural leader type", "Few deep, loyal, long-lasting relationships", "V"),
("Spending Habits", "Impulsive, spends freely, poor savings", "Moderate, organised spender", "Conservative; saves money carefully", "V"),
("Faith / Beliefs", "Variable, frequently changes beliefs", "Strong personal convictions", "Steady, traditional, resistant to change", "P"),
("Friendships", "Many friends but relationships are short", "Select few but loyal and goal-oriented", "Very few deep, long-lasting friendships", "V"),
("Leadership Style", "Inspirational, creative, spontaneous", "Strong, decisive, results-driven", "Supportive, patient, stabilising", "P"),
]
domain_block("DOMAIN 6: Social and Behavioural (Items 40–44)", social_rows, story, sDomainHead)
story.append(PageBreak())
# ── Domain 7: Disease Susceptibility ──
story.append(Spacer(1, 2*mm))
story.append(HRFlowable(width="100%", thickness=0.5, color=MID_GREY, spaceAfter=4))
disease_rows = [
("Common Ailments", "Neurological, joint pain, constipation, anxiety, insomnia, dry skin", "Inflammation, acidity, peptic ulcer, liver disorders, skin rashes, fever, early baldness", "Respiratory disorders, obesity, type 2 diabetes, oedema, lethargy, excess mucus", "V"),
("Season Sensitivity", "Aggravated in dry, cold, windy conditions (autumn/early winter)", "Aggravated in hot, sunny, humid conditions (summer)", "Aggravated in cold, damp, spring conditions", "K"),
("Recovery Rate", "Slow; fluctuating recovery", "Fast; strong digestion and metabolism", "Slow but steady; good reserve strength", "P"),
("Drug/Herb Response", "Sensitive; requires small doses", "Moderate; tolerates most medications", "Requires higher or prolonged doses", "V"),
]
domain_block("DOMAIN 7: Disease Susceptibility (Items 45–48)", disease_rows, story, sDomainHead)
story.append(Spacer(1, 3*mm))
# ════════════════════════════════════════════════
# Final: Score Sheet Summary
# ════════════════════════════════════════════════
story.append(KeepTogether([
Paragraph("SCORE TALLY SHEET", sDomainHead),
Spacer(1, 2*mm),
]))
tally_data = [
[Paragraph("Domain", sTableHdr),
Paragraph("Items", sTableHdr),
Paragraph("Vata\nScore", ParagraphStyle("vs", fontName="Helvetica-Bold", fontSize=8,
textColor=colors.white, alignment=TA_CENTER, leading=10)),
Paragraph("Pitta\nScore", ParagraphStyle("ps", fontName="Helvetica-Bold", fontSize=8,
textColor=colors.white, alignment=TA_CENTER, leading=10)),
Paragraph("Kapha\nScore", ParagraphStyle("ks", fontName="Helvetica-Bold", fontSize=8,
textColor=colors.white, alignment=TA_CENTER, leading=10))],
[Paragraph("1. Physical Appearance", sTableCell), Paragraph("1–10", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("2. Physiological Functions", sTableCell), Paragraph("11–21", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("3. Sensory Attributes", sTableCell), Paragraph("22–26", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("4. Psychological / Mental", sTableCell), Paragraph("27–34", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("5. Activity & Endurance", sTableCell), Paragraph("35–39", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("6. Social / Behavioural", sTableCell), Paragraph("40–44", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("7. Disease Susceptibility", sTableCell), Paragraph("45–48", sTableCell),
Paragraph("___", sTableCell), Paragraph("___", sTableCell), Paragraph("___", sTableCell)],
[Paragraph("DEHA PRAKRITI (Physical)", sTableCellB), Paragraph("1–40", sTableCellB),
Paragraph("___", sTableCellB), Paragraph("___", sTableCellB), Paragraph("___", sTableCellB)],
[Paragraph("MANASA PRAKRITI (Mental)", sTableCellB), Paragraph("41–58", sTableCellB),
Paragraph("___", sTableCellB), Paragraph("___", sTableCellB), Paragraph("___", sTableCellB)],
[Paragraph("TOTAL SCORE", ParagraphStyle("ts", fontName="Helvetica-Bold", fontSize=9,
textColor=colors.white)), Paragraph("1–58", ParagraphStyle("ti", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white)),
Paragraph("___", ParagraphStyle("tv", fontName="Helvetica-Bold", fontSize=9,
textColor=colors.white, alignment=TA_CENTER)),
Paragraph("___", ParagraphStyle("tp", fontName="Helvetica-Bold", fontSize=9,
textColor=colors.white, alignment=TA_CENTER)),
Paragraph("___", ParagraphStyle("tk", fontName="Helvetica-Bold", fontSize=9,
textColor=colors.white, alignment=TA_CENTER))],
]
tally_table = Table(tally_data, colWidths=[68*mm, 18*mm, 28*mm, 28*mm, 28*mm])
tally_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), HEADER_BG),
('BACKGROUND', (2,0), (2,0), VATA_COL),
('BACKGROUND', (3,0), (3,0), PITTA_COL),
('BACKGROUND', (4,0), (4,0), KAPHA_COL),
('BACKGROUND', (0,8), (-1,9), colors.HexColor("#D6E4F0")),
('BACKGROUND', (0,10), (-1,10), HEADER_BG),
('ROWBACKGROUNDS', (0,1), (-1,7), [colors.white, LIGHT_GREY]),
('BOX', (0,0), (-1,-1), 0.8, HEADER_BG),
('GRID', (0,0), (-1,-1), 0.3, MID_GREY),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('ALIGN', (2,0), (4,-1), 'CENTER'),
]))
story.append(tally_table)
story.append(Spacer(1, 4*mm))
# Prakriti Result box
result_data = [
[Paragraph("FINAL PRAKRITI DETERMINATION", ParagraphStyle("rh", fontName="Helvetica-Bold",
fontSize=9, textColor=colors.white, alignment=TA_CENTER))],
[Paragraph(
"Dominant Prakriti: ________________________ "
"Secondary Dosha: ________________________ "
"Classification: ________________________<br/><br/>"
"Deha Prakriti: ________________________ "
"Manasa Prakriti: ________________________<br/><br/>"
"<i>Assessor Name: ________________________ Date: ____________ "
"Patient ID: ____________</i>",
ParagraphStyle("rb", fontName="Helvetica", fontSize=9, textColor=TEXT_DARK,
leading=16))]
]
result_table = Table(result_data, colWidths=[doc.width])
result_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), ACCENT_YEL),
('BACKGROUND', (0,1), (-1,1), colors.HexColor("#FFFBEE")),
('BOX', (0,0), (-1,-1), 1, ACCENT_YEL),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 8),
('LEFTPADDING', (0,0), (-1,-1), 10),
('RIGHTPADDING', (0,0), (-1,-1), 10),
]))
story.append(result_table)
story.append(Spacer(1, 3*mm))
# Disclaimer
story.append(Paragraph(
"<i>Note: This quick reference guide summarises the published CCRAS-PAS framework. "
"For formal research and clinical use, obtain the complete validated instrument directly from CCRAS "
"(Central Council for Research in Ayurvedic Sciences), Ministry of AYUSH, New Delhi (ccras.nic.in). "
"Item numbering is indicative; the official questionnaire contains 58 validated items with exact wording.</i>",
sNote))
doc.build(story, canvasmaker=HeaderFooterCanvas)
print(f"PDF saved to: {OUTPUT}")
def _section_head(text, story, style, doc):
data = [[Paragraph(text, style)]]
t = Table(data, colWidths=[doc.width])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), HEADER_BG),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
return t
build_doc()
cd /home/daytona/workspace/ccras-pas && python generate_pdf.py 2>&1
~/ccras-pas/generate_pdf.py
Error: String not found in file: ' # ── Colour palette ──────────────────────────────────────────────
VATA_COL = colors.HexColor("#5B7FA6") # muted blue
PITTA_COL = colors.HexColor("#C0604A") # terracotta
KAPHA_COL = colors.HexColor("#4E8B60") # forest green'~/ccras-pas/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ccras-pas/generate_pdf.py'
~/ccras-pas/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/ccras-pas/generate_pdf.py'
cd /home/daytona/workspace/ccras-pas && python generate_pdf.py 2>&1
CCRAS PAS Quick Reference
PDF Document · PDF
| Section | Content |
|---|---|
| Page 1 | Cover, Instrument Overview, Administration Guidelines, Scoring Steps, Prakriti Classification table |
| Page 2 | Domain 1 (Physical Appearance, 10 items) + Domain 2 (Physiological Functions, 11 items) with 3-point scoring criteria |
| Page 3 | Domain 3 (Sensory), Domain 4 (Psychological/Mental), Domain 5 (Activity & Endurance), Domain 6 (Social/Behavioural) |
| Page 4 | Domain 7 (Disease Susceptibility) + Score Tally Sheet with fillable fields + Final Prakriti Determination box |