امتحان تجريبي مجاني

أسئلة طبية متنوعة

سؤال 1 من 5
1

مريض يعاني من نوبة ربو حادة مع صعوبة شديدة في التنفس. ما هو العلاج الطارئ؟

// Translation System class TranslationManager { constructor() { this.translations = { ar: { platform_name: "منصة البورد الفلسطيني", platform_subtitle: "Specialized Educational Platform with Thousands of Medical Questions", dashboard: "لوحة التحكم", try_exam: "جرب الامتحان", login: "دخول", register: "تسجيل", home: "الرئيسية", guest_exam_title: "امتحان تجريبي مجاني", diverse_medical_questions: "أسئلة طبية متنوعة", question_of: "سؤال", from: "من", previous: "السابق", next: "التالي", finish_exam: "إنهاء الامتحان", lang_arabic: "عربي", lang_english: "English" }, en: { platform_name: "Palestinian Board Platform", platform_subtitle: "منصة تعليمية متخصصة توفر آلاف الأسئلة الطبية", dashboard: "Dashboard", try_exam: "Try Exam", login: "Login", register: "Register", home: "Home", guest_exam_title: "Free Trial Exam", diverse_medical_questions: "Diverse Medical Questions", question_of: "Question", from: "of", previous: "Previous", next: "Next", finish_exam: "Finish Exam", lang_arabic: "عربي", lang_english: "English" } }; this.currentLang = 'ar'; } t(key) { return this.translations[this.currentLang]?.[key] || key; } switchLanguage(lang) { this.currentLang = lang; const html = document.documentElement; if (lang === 'en') { html.setAttribute('lang', 'en'); html.setAttribute('dir', 'ltr'); document.body.style.fontFamily = "'Inter', sans-serif"; } else { html.setAttribute('lang', 'ar'); html.setAttribute('dir', 'rtl'); document.body.style.fontFamily = "'Cairo', sans-serif"; } this.updatePageContent(); localStorage.setItem('language', lang); } updatePageContent() { document.querySelectorAll('[data-translate]').forEach(element => { const key = element.getAttribute('data-translate'); element.textContent = this.t(key); }); const currentLangEl = document.getElementById('currentLang'); if (currentLangEl) { currentLangEl.textContent = this.t(this.currentLang === 'en' ? 'lang_english' : 'lang_arabic'); } } init() { const savedLang = localStorage.getItem('language') || 'ar'; this.switchLanguage(savedLang); } } const translator = new TranslationManager(); function switchLanguage(lang) { translator.switchLanguage(lang); const langMenu = document.getElementById('langMenu'); if (langMenu) { langMenu.classList.add('hidden'); } } let currentQuestion = 1; const totalQuestions = 5; // Navigation functions function nextQuestion() { if (currentQuestion < totalQuestions) { document.querySelector(`[data-question="${currentQuestion}"]`).classList.add('hidden'); currentQuestion++; document.querySelector(`[data-question="${currentQuestion}"]`).classList.remove('hidden'); document.getElementById('currentQ').textContent = currentQuestion; document.getElementById('progressBar').style.width = `${(currentQuestion / totalQuestions) * 100}%`; } } function previousQuestion() { if (currentQuestion > 1) { document.querySelector(`[data-question="${currentQuestion}"]`).classList.add('hidden'); currentQuestion--; document.querySelector(`[data-question="${currentQuestion}"]`).classList.remove('hidden'); document.getElementById('currentQ').textContent = currentQuestion; document.getElementById('progressBar').style.width = `${(currentQuestion / totalQuestions) * 100}%`; } } // Auto-advance on answer selection document.querySelectorAll('input[type="radio"]').forEach(radio => { radio.addEventListener('change', function() { setTimeout(() => { if (currentQuestion < totalQuestions) { nextQuestion(); } }, 500); }); }); // Initialize document.addEventListener('DOMContentLoaded', function() { translator.init(); }); // Submit exam function function submitExam() { // Check if all questions are answered const totalQuestions = 5; const form = document.getElementById('examForm'); const formData = new FormData(form); let answeredQuestions = 0; for (let i = 1; i <= totalQuestions; i++) { const questionId = document.querySelector(`input[name^="answers["][name$="]"]`)?.name.match(/\[(\d+)\]/)?.[1]; if (questionId && formData.get(`answers[${questionId}]`)) { answeredQuestions++; } } if (answeredQuestions < totalQuestions) { if (confirm('لم تجب على جميع الأسئلة. هل تريد إرسال الامتحان بالإجابات الحالية؟')) { form.submit(); } } else { form.submit(); } }