@extends('layouts.app') @section('title', 'Gestion des Médicaments') @section('content')

Gestion des Médicaments

Nouveau Médicament
@php $lowStockCount = $medications->filter(function($med) { return $med->isLowStock(); })->count(); $expiredCount = $medications->filter(function($med) { return $med->isExpired(); })->count(); @endphp @if($lowStockCount > 0 || $expiredCount > 0)
@if($lowStockCount > 0)
{{ $lowStockCount }} médicament(s) en stock faible
@endif @if($expiredCount > 0)
{{ $expiredCount }} médicament(s) périmé(s)
@endif
@endif
@if($medications->count() > 0)
@foreach($medications as $medication) @endforeach
Nom Marque Dosage Catégorie Prix unitaire Stock Expiration Centre Actions
{{ $medication->name }} @if($medication->requires_prescription) @endif @if(!$medication->is_active) Inactif @endif
@if($medication->generic_name) {{ $medication->generic_name }} @endif
{{ $medication->brand ?? '-' }} {{ $medication->dosage }}
{{ $medication->form }}
{{ $medication->category }} {{ number_format($medication->unit_price, 0, ',', ' ') }} FCFA @if($medication->isLowStock()) {{ $medication->stock_quantity }} @else {{ $medication->stock_quantity }} @endif
Min: {{ $medication->minimum_stock_level }}
@if($medication->isExpired()) Périmé
{{ $medication->expiry_date->format('d/m/Y') }} @else {{ $medication->expiry_date->format('d/m/Y') }} @if($medication->expiry_date->diffInDays(now()) < 30)
{{ $medication->expiry_date->diffInDays(now()) }} jours @endif @endif
{{ $medication->healthCenter->name }}
{{ $medications->links() }}
@else
Aucun médicament en stock

Commencez par ajouter vos premiers médicaments au stock.

Ajouter un médicament
@endif
@endsection @push('scripts') @endpush