Widget:520FamilyFeud: Difference between revisions

From Doc-Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 3: Line 3:


== Usage ==
== Usage ==
<pre>{{#widget:520FamilyFeud}}</pre>
<pre>{{#widget:FamilyFeudNursing}}</pre>
</noinclude><includeonly><html>
</noinclude><includeonly><html>
<div class="family-feud-nursing-game">
<div class="family-feud-nursing-game">
Line 330: Line 330:
     var questions = [
     var questions = [
         { category: "CARDIOVASCULAR PHARMACOLOGY", question: "Name a common side effect of beta-blockers that nurses should monitor.", answers: [
         { category: "CARDIOVASCULAR PHARMACOLOGY", question: "Name a common side effect of beta-blockers that nurses should monitor.", answers: [
             { text: "Bradycardia", points: 35, keywords: ["brady", "slow heart", "heart rate", "pulse"] },
             { text: "Bradycardia", points: 35, keywords: ["bradycardia", "brady", "slow heart rate", "slow pulse", "low heart rate"] },
             { text: "Hypotension", points: 25, keywords: ["hypo", "low blood", "pressure", "bp"] },
             { text: "Hypotension", points: 25, keywords: ["hypotension", "low blood pressure", "low bp", "decreased bp"] },
             { text: "Fatigue", points: 15, keywords: ["tired", "fatigue", "weak", "energy"] },
             { text: "Fatigue", points: 15, keywords: ["fatigue", "tired", "tiredness", "weakness", "lethargy"] },
             { text: "Bronchospasm", points: 12, keywords: ["bronch", "wheez", "breathing", "lung"] },
             { text: "Bronchospasm", points: 12, keywords: ["bronchospasm", "bronchoconstriction", "wheezing", "breathing difficulty"] },
             { text: "Depression", points: 8, keywords: ["depress", "mood", "sad"] },
             { text: "Depression", points: 8, keywords: ["depression", "depressed", "mood changes"] },
             { text: "Cold Extremities", points: 5, keywords: ["cold", "extrem", "hands", "feet"] }
             { text: "Cold Extremities", points: 5, keywords: ["cold extremities", "cold hands", "cold feet", "peripheral vasoconstriction"] }
         ]},
         ]},
         { category: "PAIN MANAGEMENT", question: "Name a NON-drug intervention for pain.", answers: [
         { category: "PAIN MANAGEMENT", question: "Name a NON-drug intervention for pain.", answers: [
             { text: "Heat/Cold Therapy", points: 30, keywords: ["heat", "cold", "ice", "warm", "compress"] },
             { text: "Heat/Cold Therapy", points: 30, keywords: ["heat therapy", "cold therapy", "ice pack", "warm compress", "heating pad", "cryotherapy"] },
             { text: "Massage", points: 22, keywords: ["massage", "rub", "touch"] },
             { text: "Massage", points: 22, keywords: ["massage", "massage therapy", "therapeutic touch", "rubbing"] },
             { text: "Distraction", points: 18, keywords: ["distract", "music", "tv", "talk"] },
             { text: "Distraction", points: 18, keywords: ["distraction", "music therapy", "television", "talking", "diversion"] },
             { text: "Positioning", points: 12, keywords: ["position", "elevat", "pillow", "move"] },
             { text: "Positioning", points: 12, keywords: ["positioning", "repositioning", "elevation", "elevate", "pillow support"] },
             { text: "Deep Breathing", points: 10, keywords: ["breath", "relax", "deep"] },
             { text: "Deep Breathing", points: 10, keywords: ["deep breathing", "breathing exercises", "relaxation", "relaxation techniques"] },
             { text: "Guided Imagery", points: 8, keywords: ["imager", "visual", "meditat"] }
             { text: "Guided Imagery", points: 8, keywords: ["guided imagery", "visualization", "meditation", "imagery"] }
         ]},
         ]},
         { category: "GERIATRIC NURSING", question: "Name an age-related change affecting drug metabolism.", answers: [
         { category: "GERIATRIC NURSING", question: "Name an age-related change affecting drug metabolism.", answers: [
             { text: "Decreased Liver Function", points: 32, keywords: ["liver", "hepat"] },
             { text: "Decreased Liver Function", points: 32, keywords: ["decreased liver", "liver function", "hepatic function", "reduced liver"] },
             { text: "Reduced Kidney Function", points: 28, keywords: ["kidney", "renal", "gfr"] },
             { text: "Reduced Kidney Function", points: 28, keywords: ["reduced kidney", "kidney function", "renal function", "decreased gfr", "renal impairment"] },
             { text: "Decreased Body Water", points: 15, keywords: ["water", "fluid", "dehydr"] },
             { text: "Decreased Body Water", points: 15, keywords: ["decreased body water", "reduced body water", "dehydration", "less body water"] },
             { text: "Increased Body Fat", points: 12, keywords: ["fat", "adipose"] },
             { text: "Increased Body Fat", points: 12, keywords: ["increased body fat", "increased fat", "more body fat", "adipose tissue"] },
             { text: "Slower GI Motility", points: 8, keywords: ["gi", "gastro", "digest"] },
             { text: "Slower GI Motility", points: 8, keywords: ["slower gi", "decreased motility", "slow digestion", "gi motility", "gastric motility"] },
             { text: "Reduced Albumin", points: 5, keywords: ["albumin", "protein"] }
             { text: "Reduced Albumin", points: 5, keywords: ["reduced albumin", "decreased albumin", "low albumin", "hypoalbuminemia"] }
         ]},
         ]},
         { category: "PATIENT TEACHING", question: "Name an essential part of discharge teaching.", answers: [
         { category: "PATIENT TEACHING", question: "Name an essential part of discharge teaching.", answers: [
             { text: "Medication Instructions", points: 28, keywords: ["med", "drug", "prescription", "pill"] },
             { text: "Medication Instructions", points: 28, keywords: ["medication instructions", "medication teaching", "drug instructions", "medicine instructions", "prescription instructions"] },
             { text: "Warning Signs", points: 24, keywords: ["warning", "return", "call", "er", "emergency"] },
             { text: "Warning Signs", points: 24, keywords: ["warning signs", "red flags", "when to call", "return precautions", "danger signs", "emergency signs"] },
             { text: "Follow-up Appointments", points: 18, keywords: ["follow", "appointment", "visit"] },
             { text: "Follow-up Appointments", points: 18, keywords: ["follow-up", "followup", "follow up appointment", "return visit", "next appointment"] },
             { text: "Written Instructions", points: 12, keywords: ["written", "paper", "handout"] },
             { text: "Written Instructions", points: 12, keywords: ["written instructions", "handout", "printed instructions", "discharge papers", "written materials"] },
             { text: "Teach-Back", points: 10, keywords: ["teach", "repeat", "understand"] },
             { text: "Teach-Back", points: 10, keywords: ["teach-back", "teach back", "return demonstration", "patient understanding", "verify understanding"] },
             { text: "Diet Instructions", points: 8, keywords: ["diet", "food", "eat", "nutrition"] }
             { text: "Diet Instructions", points: 8, keywords: ["diet instructions", "dietary", "nutrition", "food restrictions", "eating instructions"] }
         ]},
         ]},
         { category: "LEFT HEART FAILURE", question: "Name a sign of LEFT-sided heart failure.", answers: [
         { category: "LEFT HEART FAILURE", question: "Name a sign of LEFT-sided heart failure.", answers: [
             { text: "Shortness of Breath", points: 30, keywords: ["breath", "sob", "short", "dyspnea"] },
             { text: "Shortness of Breath", points: 30, keywords: ["shortness of breath", "dyspnea", "difficulty breathing", "breathlessness", "hard to breathe"] },
             { text: "Lung Crackles", points: 25, keywords: ["crackle", "rale", "lung"] },
             { text: "Lung Crackles", points: 25, keywords: ["crackles", "rales", "lung crackles", "pulmonary crackles", "lung sounds"] },
             { text: "Orthopnea", points: 18, keywords: ["orthopnea", "pillow", "sit", "flat"] },
             { text: "Orthopnea", points: 18, keywords: ["orthopnea", "cant lay flat", "needs pillows", "difficulty lying flat"] },
             { text: "Pink Frothy Sputum", points: 12, keywords: ["pink", "frothy", "sputum", "foam"] },
             { text: "Pink Frothy Sputum", points: 12, keywords: ["pink frothy", "frothy sputum", "pink sputum", "pulmonary edema"] },
             { text: "Fatigue", points: 10, keywords: ["fatigue", "tired", "weak"] },
             { text: "Fatigue", points: 10, keywords: ["fatigue", "tired", "exhaustion", "weakness", "lethargy"] },
             { text: "Tachycardia", points: 5, keywords: ["tachy", "fast", "rapid"] }
             { text: "Tachycardia", points: 5, keywords: ["tachycardia", "fast heart", "rapid pulse", "elevated heart rate", "racing heart"] }
         ]},
         ]},
         { category: "MEDICATION RIGHTS", question: "Name one of the 'Rights' of medication administration.", answers: [
         { category: "MEDICATION RIGHTS", question: "Name one of the 'Rights' of medication administration.", answers: [
             { text: "Right Patient", points: 20, keywords: ["patient", "person", "client"] },
             { text: "Right Patient", points: 20, keywords: ["right patient", "correct patient", "patient identification", "verify patient"] },
             { text: "Right Drug", points: 20, keywords: ["drug", "medication", "med"] },
             { text: "Right Drug", points: 20, keywords: ["right drug", "right medication", "correct drug", "correct medication", "right medicine"] },
             { text: "Right Dose", points: 18, keywords: ["dose", "amount"] },
             { text: "Right Dose", points: 18, keywords: ["right dose", "correct dose", "right amount", "correct amount", "proper dose"] },
             { text: "Right Route", points: 15, keywords: ["route", "oral", "iv"] },
             { text: "Right Route", points: 15, keywords: ["right route", "correct route", "administration route", "proper route"] },
             { text: "Right Time", points: 14, keywords: ["time", "when", "schedule"] },
             { text: "Right Time", points: 14, keywords: ["right time", "correct time", "proper time", "scheduled time", "timing"] },
             { text: "Right Documentation", points: 13, keywords: ["document", "chart", "record"] }
             { text: "Right Documentation", points: 13, keywords: ["right documentation", "documentation", "charting", "recording", "right record"] }
         ]},
         ]},
         { category: "ASTHMA DRUGS", question: "Name a medication class for asthma.", answers: [
         { category: "ASTHMA DRUGS", question: "Name a medication class for asthma.", answers: [
             { text: "Beta-2 Agonists", points: 30, keywords: ["beta", "albuterol", "agonist"] },
             { text: "Beta-2 Agonists", points: 30, keywords: ["beta-2 agonist", "beta agonist", "albuterol", "bronchodilator", "saba", "laba"] },
             { text: "Corticosteroids", points: 25, keywords: ["steroid", "cortico", "prednisone"] },
             { text: "Corticosteroids", points: 25, keywords: ["corticosteroid", "steroid", "prednisone", "inhaled steroid", "glucocorticoid"] },
             { text: "Anticholinergics", points: 18, keywords: ["cholinerg", "atrovent"] },
             { text: "Anticholinergics", points: 18, keywords: ["anticholinergic", "ipratropium", "atrovent", "tiotropium", "muscarinic antagonist"] },
             { text: "Leukotriene Inhibitors", points: 12, keywords: ["leuko", "singulair"] },
             { text: "Leukotriene Inhibitors", points: 12, keywords: ["leukotriene", "montelukast", "singulair", "leukotriene modifier"] },
             { text: "Mast Cell Stabilizers", points: 10, keywords: ["mast", "cromolyn"] },
             { text: "Mast Cell Stabilizers", points: 10, keywords: ["mast cell", "cromolyn", "nedocromil", "mast cell stabilizer"] },
             { text: "Theophylline", points: 5, keywords: ["theophylline", "xanthine"] }
             { text: "Theophylline", points: 5, keywords: ["theophylline", "aminophylline", "methylxanthine", "xanthine"] }
         ]},
         ]},
         { category: "LIVER FAILURE", question: "Name a sign of hepatic encephalopathy.", answers: [
         { category: "LIVER FAILURE", question: "Name a sign of hepatic encephalopathy.", answers: [
             { text: "Confusion", points: 30, keywords: ["confus", "mental", "altered", "orient"] },
             { text: "Confusion", points: 30, keywords: ["confusion", "altered mental status", "disorientation", "altered consciousness", "mental status changes"] },
             { text: "Asterixis", points: 25, keywords: ["asterix", "flap", "tremor"] },
             { text: "Asterixis", points: 25, keywords: ["asterixis", "liver flap", "flapping tremor", "hand flapping"] },
             { text: "Ammonia Breath", points: 18, keywords: ["ammonia", "breath", "fetor"] },
             { text: "Ammonia Breath", points: 18, keywords: ["ammonia breath", "fetor hepaticus", "musty breath", "sweet breath"] },
             { text: "Sleep Changes", points: 12, keywords: ["sleep", "insomnia", "awake"] },
             { text: "Sleep Changes", points: 12, keywords: ["sleep changes", "insomnia", "sleep reversal", "sleep disturbance", "day night reversal"] },
             { text: "Personality Changes", points: 10, keywords: ["personal", "behavior", "mood"] },
             { text: "Personality Changes", points: 10, keywords: ["personality changes", "behavior changes", "mood changes", "irritability"] },
             { text: "Slurred Speech", points: 5, keywords: ["slur", "speech"] }
             { text: "Slurred Speech", points: 5, keywords: ["slurred speech", "speech difficulty", "dysarthria", "difficulty speaking"] }
         ]},
         ]},
         { category: "HEARING LOSS CARE", question: "Name a nursing intervention for hearing-impaired patients.", answers: [
         { category: "HEARING LOSS CARE", question: "Name a nursing intervention for hearing-impaired patients.", answers: [
             { text: "Face the Patient", points: 28, keywords: ["face", "front", "look", "eye"] },
             { text: "Face the Patient", points: 28, keywords: ["face the patient", "face them", "eye contact", "look at patient", "face to face"] },
             { text: "Reduce Noise", points: 22, keywords: ["noise", "quiet", "background"] },
             { text: "Reduce Noise", points: 22, keywords: ["reduce noise", "quiet environment", "minimize noise", "background noise", "decrease noise"] },
             { text: "Speak Clearly", points: 18, keywords: ["clear", "slow", "loud"] },
             { text: "Speak Clearly", points: 18, keywords: ["speak clearly", "clear speech", "speak slowly", "enunciate", "articulate"] },
             { text: "Write Things Down", points: 14, keywords: ["writ", "paper", "note"] },
             { text: "Write Things Down", points: 14, keywords: ["write things down", "written communication", "write notes", "use paper", "writing"] },
             { text: "Check Hearing Aid", points: 10, keywords: ["hearing aid", "battery"] },
             { text: "Check Hearing Aid", points: 10, keywords: ["check hearing aid", "hearing aid", "hearing device", "assistive device"] },
             { text: "Use Gestures", points: 8, keywords: ["gesture", "point", "sign"] }
             { text: "Use Gestures", points: 8, keywords: ["use gestures", "gestures", "hand signals", "pointing", "nonverbal", "body language"] }
         ]},
         ]},
         { category: "INFECTION CONTROL", question: "Name a Standard Precaution.", answers: [
         { category: "INFECTION CONTROL", question: "Name a Standard Precaution.", answers: [
             { text: "Hand Hygiene", points: 30, keywords: ["hand", "wash", "hygiene", "sanitiz"] },
             { text: "Hand Hygiene", points: 30, keywords: ["hand hygiene", "hand washing", "wash hands", "hand sanitizer", "hand sanitizing"] },
             { text: "Gloves", points: 22, keywords: ["glove"] },
             { text: "Gloves", points: 22, keywords: ["gloves", "wear gloves", "gloving", "disposable gloves"] },
             { text: "Gown", points: 16, keywords: ["gown"] },
             { text: "Gown", points: 16, keywords: ["gown", "isolation gown", "protective gown", "wear gown"] },
             { text: "Mask", points: 14, keywords: ["mask", "n95", "face"] },
             { text: "Mask", points: 14, keywords: ["mask", "face mask", "n95", "surgical mask", "respirator"] },
             { text: "Sharps Disposal", points: 10, keywords: ["sharp", "needle"] },
             { text: "Sharps Disposal", points: 10, keywords: ["sharps disposal", "sharps container", "needle disposal", "sharp disposal", "needle safety"] },
             { text: "Cough Etiquette", points: 8, keywords: ["cough", "cover", "tissue"] }
             { text: "Cough Etiquette", points: 8, keywords: ["cough etiquette", "respiratory hygiene", "cover cough", "cover mouth", "respiratory etiquette"] }
         ]}
         ]}
     ];
     ];
Line 565: Line 565:
             var input = document.getElementById('ffInput');
             var input = document.getElementById('ffInput');
             var guess = input.value.trim().toLowerCase();
             var guess = input.value.trim().toLowerCase();
             if (!guess) return;
             if (!guess || guess.length < 3) return; // Minimum 3 characters
             var q = questions[currentQ];
             var q = questions[currentQ];
             var found = false;
             var found = false;
            var foundIndex = -1;
           
            // Find the best match (prioritize exact matches and longer keywords)
             q.answers.forEach(function(a, i) {
             q.answers.forEach(function(a, i) {
                 if (revealed.indexOf(i) === -1) {
                 if (revealed.indexOf(i) === -1 && !found) {
                     var match = a.keywords.some(function(k) { return guess.indexOf(k) !== -1 || k.indexOf(guess) !== -1; });
                     var match = a.keywords.some(function(k) {
                     if (match) { revealAnswer(i); found = true; }
                        // Require keyword to be at least 3 chars
                        if (k.length < 3) return false;
                       
                        // Check for word-based matching
                        var guessWords = guess.split(/\s+/);
                        var keyWords = k.split(/\s+/);
                       
                        // Exact match of full keyword
                        if (guess === k) return true;
                       
                        // Guess contains the full keyword (for multi-word keywords)
                        if (k.length >= 4 && guess.indexOf(k) !== -1) return true;
                       
                        // Keyword starts with guess (at least 4 chars)
                        if (guess.length >= 4 && k.indexOf(guess) === 0) return true;
                       
                        // Any word in guess matches start of keyword (at least 4 chars)
                        for (var w = 0; w < guessWords.length; w++) {
                            if (guessWords[w].length >= 4) {
                                if (k.indexOf(guessWords[w]) === 0) return true;
                                for (var kw = 0; kw < keyWords.length; kw++) {
                                    if (keyWords[kw].length >= 4 && keyWords[kw].indexOf(guessWords[w]) === 0) return true;
                                    if (guessWords[w].indexOf(keyWords[kw]) === 0 && keyWords[kw].length >= 4) return true;
                                }
                            }
                        }
                       
                        return false;
                    });
                     if (match) {  
                        found = true;
                        foundIndex = i;
                    }
                 }
                 }
             });
             });
             if (!found) addStrike();
           
             if (found && foundIndex >= 0) {
                revealAnswer(foundIndex);
            } else {
                addStrike();
            }
             input.value = '';
             input.value = '';
             input.focus();
             input.focus();

Latest revision as of 01:24, 11 January 2026

This widget displays the Family Feud Nursing Edition study game.

Usage

{{#widget:FamilyFeudNursing}}