@extends('capture.layoutv6')






@section('content')
    <form action="{{ url('createmulticase') }}" method="POST">
        @csrf
        <input type="hidden" name="event" value="createmulticase">
        <input type="hidden" name="province_code" value="{{ @$tb_department['department_province_code'] }}">
        <input type="hidden" name="province_name" value="{{ @$tb_department['department_province_name'] }}">
        <input type="hidden" name="hospital_code" value="{{ @$tb_department['department_code'] }}">
        <div class="card p-3">
            <div class="row">
                <div class="col-9">
                    <h5 class="fs-15 ">
                        <h4><b>Create Muticase</b></h4>
                    </h5>
                </div>
                <div class="col-3">
                    <div class="row">

                        <div class="col-12 text-end">
                            <input type="date" class="form-control" name="appointment_date" value=""
                                data-provider="flatpickr" data-date-format="Y-m-d" required>
                        </div>

                    </div>
                </div>

            </div>
            <div class="row">
                <div class="col-12">
                    <h5 class="fs-15 " style="color: #9599AD;">
                        “Please fill in the required fields below to complete the registration process ..“
                    </h5>
                </div>
            </div>

            <div class="row mt-2">

                <div class="col-1"></div>
                <div class="col-4">
                    <div class="row">
                        <div class="col-4">

                        </div>
                        <div class="col-4">

                        </div>
                        <div class="col-4">

                        </div>
                    </div>
                </div>
                <div class="col-2">
                    <div class="row">
                        <div class="col-7 ">

                        </div>
                        <div class="col-5">

                        </div>
                    </div>
                </div>

            </div>

            <div class="col-12 p-0 mt-2 mb-2" style="border: 1px dashed #d9d9d985"></div>

            <div class="row mt-2">

                <div class="col-1"><b>HN</b></div>
                <div class="col-4">
                    <div class="row">
                        <div class="col-4"><b>Prefix</b></div>
                        <div class="col-4"><b>Firstname</b></div>
                        <div class="col-4"><b>Lastname</b></div>
                    </div>
                </div>
                <div class="col-2">
                    <div class="row">
                        <div class="col-7 "><b>Gender</b></div>
                        <div class="col-5"><b>Age</b></div>
                    </div>
                </div>
                <div class="col-5">
                    <div class="row">
                        <div class="col-6"><b>Procedure</b></div>
                        <div class="col-6"><b>Physician</b></div>

                    </div>
                </div>
            </div>


            @for ($i = 1; $i <= 10; $i++)
                <div class="row mt-2">
                    <div class="col-1">
                        <input type="text" placeholder="HN" class="form-control " name="hn[]" id="auto_hn"
                            value="" pattern="[A-Za-z0-9-]+"
                            oninput="this.value = this.value.replace(/[^A-Za-z0-9-]/g, '')">
                    </div>
                    <div class="col-4">
                        <div class="row">
                            <div class="col-4">
                                <input type="text" placeholder="Prefix" class="form-control " name="prefix[]"
                                    id="auto_pf" value="">

                            </div>
                            <div class="col-4">
                                <input type="text" placeholder="Firstname" class="form-control " name="firstname[]"
                                    id="auto_fn" value="">
                            </div>
                            <div class="col-4">
                                <input type="text" placeholder="Lastname" class="form-control " name="lastname[]"
                                    id="auto_ln" value="">
                            </div>
                        </div>
                    </div>
                    <div class="col-2">
                        <div class="row">
                            <div class="col-7 ">
                                <select class="form-select " name="gender[]" id="gender" style="">
                                    <option value="">Gender</option>
                                    <option value="1">Male</option>
                                    <option value="2">Female</option>
                                </select>
                            </div>
                            <div class="col-5">
                                <input type="text" placeholder="Age" class="form-control " name="age[]"
                                    id="auto_age" value="">

                            </div>
                        </div>

                    </div>
                    <div class="col-5">
                        <div class="row">
                            <div class="col-6">
                                <select class="form-select mb-3 auto_procedure" name="procedure[]" required>

                                    <option value="gi002"selected>Colonoscopy</option>
                                    {{-- @foreach ($procedure as $data)

                                    <option value="{{ $data['code'] }}">{{ $data['name'] }}</option>
                                @endforeach --}}

                                </select>

                            </div>
                            <div class="col-6">
                                <select name="physician[]" class="form-select auto_doctor" id="">
                                    <option value="">Physician</option>
                                    @foreach ($doctor as $d)
                                    <option value="{{ $d['_id'] }}">
                                        {{ $d['user_prefix'] }} {{ $d['user_firstname'] }}
                                        {{ $d['user_lastname'] }}
                                    </option>
                                @endforeach
                                </select>
                            </div>

                        </div>
                    </div>


                </div>
            @endfor

            <div class="modal-footer">
                <div class="row">
                    <div class="col-auto">
                        <button type="button" class="btn btn-soft-danger w-md" data-bs-dismiss="modal"><b>Close</b></button>
                    </div>
                    <div class="col-auto">
                        <button type="submit" class="btn btn-soft-success w-md "><b>Save Changes</b></button>
                    </div>
                </div>
            </div>
        </div>

    </form>
@endsection
