Medical Questionnaire

Please answer the following questions to help our doctors provide the best care

Progress: {{ $progress }}%
@csrf

Current Medications

Please list ALL medications you are currently taking (for any condition)

@if(isset($medicalQuestions['medications']) && count($medicalQuestions['medications']) > 0) @foreach($medicalQuestions['medications'] as $index => $medication)
@endforeach @else
@endif

Allergies

Please list any allergies you have

@if(isset($medicalQuestions['allergies']) && count($medicalQuestions['allergies']) > 0) @foreach($medicalQuestions['allergies'] as $index => $allergy)
@endforeach @else
@endif

Medical Questionnaire

Please answer these questions to help our doctors provide the best care

@php $testOptions = ['None', 'Blood tests', 'Urinalysis', 'X-rays', 'CT scan', 'MRI', 'Ultrasound', 'Skin test / Patch test', 'ECG / EKG', 'Other']; $selectedTests = isset($medicalQuestions['tests_imaging']) && is_array($medicalQuestions['tests_imaging']) ? $medicalQuestions['tests_imaging'] : []; @endphp @foreach($testOptions as $option) @endforeach

Treatment-Specific Questions

Please answer the following questions about your treatment

@if($treatment->questions && $treatment->questions->count() > 0) @foreach($treatment->questions as $question) @if(in_array($question->section, $relevantSections) && $question->section !== 'general')
@if($question->question_type === 'text') is_required ? 'required' : '' }}> @elseif($question->question_type === 'select') @elseif($question->question_type === 'radio')
@foreach($question->options as $option) @endforeach
@elseif($question->question_type === 'checkbox')
@foreach($question->options as $option) @endforeach
@endif
@endif @endforeach @else

No specific questions for this treatment. Please provide any additional information in the notes section below.

@endif @if(isset($conditionQuestions) && $conditionQuestions->count() > 0)

Condition-Specific Questions

Please answer these additional questions about your specific condition

@foreach($conditionQuestions as $question)
@if($question->question_type === 'text') is_required ? 'required' : '' }}> @elseif($question->question_type === 'select') @elseif($question->question_type === 'radio')
@foreach($question->options as $option) @endforeach
@elseif($question->question_type === 'checkbox')
@foreach($question->options as $option) @endforeach
@endif
@endforeach @endif
document.addEventListener('DOMContentLoaded', function() { // Add medication functionality const medicationsContainer = document.getElementById('medications-container'); const addMedicationButton = document.getElementById('add-medication'); let medicationCount = medicationsContainer.querySelectorAll('.medication-item').length; addMedicationButton.addEventListener('click', function() { const newMedication = document.createElement('div'); newMedication.className = 'medication-item grid grid-cols-1 md:grid-cols-3 gap-4 mb-4 p-4 bg-gray-50 rounded-lg'; newMedication.innerHTML = `
`; medicationsContainer.appendChild(newMedication); medicationCount++; }); // Add allergy functionality const allergiesContainer = document.getElementById('allergies-container'); const addAllergyButton = document.getElementById('add-allergy'); let allergyCount = allergiesContainer.querySelectorAll('.allergy-item').length; addAllergyButton.addEventListener('click', function() { const newAllergy = document.createElement('div'); newAllergy.className = 'allergy-item grid grid-cols-1 md:grid-cols-2 gap-4 mb-4 p-4 bg-gray-50 rounded-lg'; newAllergy.innerHTML = `
`; allergiesContainer.appendChild(newAllergy); allergyCount++; }); });