@extends('layouts.main') @section('title', 'Preencher Anamnese - Clinix AI') @section('page-title', 'Preencher Anamnese') @section('page-subtitle', 'Paciente: {{ $anamnesis->patient->name }} | Template: {{ $anamnesis->template->name }}') @section('content')

Paciente: {{ $anamnesis->patient->name }}

Template: {{ $anamnesis->template->name }}

{{ $anamnesis->is_completed ? 'Completa' : 'Em Andamento' }}
{{ $anamnesis->completion_percentage }}% concluída
@if(session('success'))
{{ session('success') }}
@endif
@csrf @method('PUT')
@foreach($questions as $question)
@if($question->help_text)

{{ $question->help_text }}

@endif
@php $answerValue = $answers[$question->id] ?? ''; @endphp @switch($question->question_type) @case('short_text') is_required ? 'required' : '' }} class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent" placeholder="Digite sua resposta..."> @break @case('long_text') @break @case('yes_no')
@break @case('multiple_choice') @php $options = json_decode($question->options_json, true) ?? []; @endphp
@foreach($options as $option) @endforeach
@break @case('checkbox') @php $options = json_decode($question->options_json, true) ?? []; $selectedOptions = is_array($answerValue) ? $answerValue : []; @endphp
@foreach($options as $option) @endforeach
@break @case('number') is_required ? 'required' : '' }} class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"> @break @case('date') is_required ? 'required' : '' }} class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent"> @break @endswitch
@endforeach
Voltar
@endsection