Fix: milestones copy-to-note auto-navigates; add 6-11y milestone data

- Copy to Note button now switches to Well Visit → Visit Note subtab
  automatically so user sees the result immediately
- Add complete AAP/Nelson developmental milestones for ages 6, 7, 8, 9,
  10, and 11 years (Gross Motor, Fine Motor, Language, Social/Emotional,
  Cognitive domains each)
- Add corresponding age options to ms-age-group select
This commit is contained in:
Daniel Onyejesi 2026-03-22 19:00:02 -04:00
parent 8ad9b52417
commit d44a23c7a7
3 changed files with 257 additions and 2 deletions

View file

@ -1013,6 +1013,12 @@
<option value="36 months">3 Years</option>
<option value="48 months">4 Years</option>
<option value="60 months">5 Years</option>
<option value="6 years">6 Years</option>
<option value="7 years">7 Years</option>
<option value="8 years">8 Years</option>
<option value="9 years">9 Years</option>
<option value="10 years">10 Years</option>
<option value="11 years">11 Years</option>
</select>
</div>
<div class="demo-field">

View file

@ -326,8 +326,17 @@
var wvMsEl = document.getElementById('wv-milestones-text');
if (msText && wvMsEl) {
var content = (msText.innerText || msText.textContent || '').trim();
if (content) { wvMsEl.value = content; showToast('Milestones copied to Visit Note', 'success'); }
else showToast('Generate a milestone assessment first', 'info');
if (content) {
wvMsEl.value = content;
showToast('Copied! Switching to Visit Note…', 'success');
// Navigate to well visit note subtab so user can see the result
if (typeof window.activateTab === 'function') window.activateTab('wellvisit');
if (typeof window.wvSwitchSubtab === 'function') {
setTimeout(function() { window.wvSwitchSubtab('note'); }, 50);
}
} else {
showToast('Generate a milestone assessment first', 'info');
}
}
}
// Settings button — refresh saved encounters list

View file

@ -431,6 +431,246 @@ var MILESTONES_DATA = {
"Draws a person with at least six body parts",
"Prints some letters or numbers"
]
},
"6 years": {
"Gross Motor": [
"Rides a bicycle without training wheels",
"Skips and runs with good coordination",
"Kicks and catches a ball reliably",
"Jumps rope",
"Balances on one foot for several seconds"
],
"Fine Motor": [
"Writes name and simple words legibly",
"Colors within lines",
"Cuts along straight and curved lines with scissors",
"Ties shoelaces independently",
"Draws a recognizable person with details"
],
"Language": [
"Uses 5- to 8-word sentences routinely",
"Reads simple words and short sentences",
"Tells connected stories about events",
"Understands and follows three-step instructions",
"Articulates clearly; speech understood by all"
],
"Social/Emotional": [
"Prefers same-sex friends but plays with both",
"Rule-oriented; upset when rules are broken",
"Enjoys cooperative play and group games",
"Begins to understand others' perspectives",
"May show competitive behavior",
"Seeks adult approval; eager to please"
],
"Cognitive": [
"Counts reliably to 100; adds and subtracts single digits",
"Distinguishes left from right on self",
"Understands concept of time (days weeks months)",
"Names days of the week in order",
"Classifies objects by two attributes (color and shape)",
"Reads simple books with help"
]
},
"7 years": {
"Gross Motor": [
"Rides a bicycle with control and speed",
"Swims basic strokes with instruction",
"Performs organized sports skills (kicking passing)",
"Skips smoothly and gallops",
"Broad jumps and hops on either foot"
],
"Fine Motor": [
"Writes letters and numbers with good legibility",
"Draws detailed pictures with background",
"Uses tools (ruler compass) with guidance",
"Cuts complex shapes accurately",
"Prints and begins to learn cursive"
],
"Language": [
"Reads independently at grade level",
"Explains the reason for rules and events",
"Vocabulary of 2,000+ words in use",
"Tells jokes and riddles; understands puns",
"Distinguishes fantasy from reality verbally"
],
"Social/Emotional": [
"Increasing importance of peer acceptance",
"Aware of self in relation to peers",
"May be critical of self or others",
"Better emotional regulation than at 6",
"Begins to keep secrets",
"Enjoys team activities and group projects"
],
"Cognitive": [
"Reads chapter books independently",
"Adds and subtracts two-digit numbers",
"Understands concept of multiplication",
"Remembers the order of daily activities",
"Can focus on tasks for 2030 minutes",
"Understands conservation of number and mass"
]
},
"8 years": {
"Gross Motor": [
"Participates in organized team sports",
"Demonstrates smooth and rhythmic movement",
"Increased stamina and speed",
"Performs complex physical tasks (gymnastics swimming)",
"Coordinates movements for ball sports"
],
"Fine Motor": [
"Writes in cursive or print with ease",
"Uses keyboard with increasing speed",
"Constructs detailed models and crafts",
"Draws in proportion with perspective",
"Handles small tools (compass protractor) independently"
],
"Language": [
"Reads fluently with comprehension",
"Writes simple paragraphs and stories",
"Understands figurative language (metaphors similes)",
"Engages in debate and argument",
"Extensive vocabulary; enjoys word games"
],
"Social/Emotional": [
"Strong peer relationships; friendship very important",
"Understands fairness and reciprocity",
"Increases independence from parents",
"More aware of social norms and fitting in",
"Can experience peer pressure",
"Develops sense of personal competence"
],
"Cognitive": [
"Multiplication and division of single digits",
"Reads and writes well independently",
"Can focus on single task for 4560 minutes",
"Understands cause and effect in social situations",
"Begins basic scientific reasoning",
"Uses internet and technology with guidance"
]
},
"9 years": {
"Gross Motor": [
"Highly coordinated in sports and physical activities",
"Sustained participation in team or individual sports",
"Increasing strength and endurance",
"Performs complex gymnastic or athletic maneuvers",
"Competes in races or organized games"
],
"Fine Motor": [
"Writes in legible cursive for extended periods",
"Creates detailed artwork with perspective",
"Proficient with tools requiring precision",
"Types efficiently on keyboard",
"Complex crafts (knitting sewing model-building)"
],
"Language": [
"Reads chapter books independently for pleasure",
"Writes multi-paragraph essays and reports",
"Understands and uses complex grammar",
"Can summarize and explain what was read",
"Participates in formal discussions and debates"
],
"Social/Emotional": [
"Best-friend relationships central",
"Sensitive to criticism from peers",
"Increasing desire for privacy",
"Understands others' complex feelings",
"May show early concern about body image",
"Appreciates humor and sarcasm"
],
"Cognitive": [
"Multiplies and divides multi-digit numbers",
"Understands fractions and decimals",
"Uses logical reasoning to solve problems",
"Plans multi-step projects",
"Aware of abstract concepts (justice democracy)",
"Can memorize facts systematically"
]
},
"10 years": {
"Gross Motor": [
"Skilled and competitive in preferred sports",
"Strong endurance for prolonged physical activity",
"Good gross motor skills approaching adult patterns",
"Enjoys recreational and competitive athletics",
"Participates in organized leagues or clubs"
],
"Fine Motor": [
"Near-adult level fine motor precision",
"Plays musical instrument with practice",
"Produces polished written and artistic work",
"Efficient and comfortable with keyboard",
"Complex craft work with minimal guidance"
],
"Language": [
"Reading at or above grade level",
"Writes organized multi-paragraph compositions",
"Uses sophisticated vocabulary in writing and speech",
"Can write a coherent argument or persuasive essay",
"Understands complex figurative language"
],
"Social/Emotional": [
"Peer opinions very important; social conformity increases",
"Beginning awareness of romantic attraction possible",
"Understands nuance in social situations",
"Stronger sense of personal identity",
"May question family values or rules",
"Can delay gratification effectively"
],
"Cognitive": [
"Beginning of formal operational thinking (Piaget)",
"Understands fractions percentages and ratios",
"Thinks about hypothetical situations",
"Can plan and prioritize independently",
"Understands multiple perspectives simultaneously",
"Increasing interest in logic puzzles and strategy"
]
},
"11 years": {
"Gross Motor": [
"Physical activity preferences clearly established",
"May be entering puberty; growth spurt possible",
"Excellent coordination in practiced skills",
"Varies widely by individual based on puberty timing",
"Participates in physical education and sports"
],
"Fine Motor": [
"Adult-level fine motor skills in practiced areas",
"Skilled at digital technology use",
"Sophisticated artwork and craftsmanship",
"Writes fluidly and legibly for extended periods",
"Performs complex manual tasks independently"
],
"Language": [
"Reading comprehension approaching adult level",
"Writes research reports and persuasive essays",
"Understands sarcasm irony and double meaning",
"Expresses nuanced opinions in writing and speech",
"Vocabulary approaching 50,000+ words receptively"
],
"Social/Emotional": [
"Peer relationships may become central to identity",
"May experiment with social roles and identity",
"Possible early signs of puberty-related mood variability",
"Greater capacity for empathy and perspective-taking",
"Interest in romantic relationships may emerge",
"Begins to develop adult moral reasoning"
],
"Cognitive": [
"Abstract reasoning develops steadily",
"Can think through complex hypothetical problems",
"Understands scientific method and experiment design",
"Increased metacognition (thinking about thinking)",
"Can plan and self-regulate over longer time horizons",
"Interested in fairness justice and ethics"
]
}
};