@extends('layouts.admin') @section('content') ← Records

Encounter — {{ $medicalRecord->encounter_type }} · {{ $medicalRecord->recorded_at->format('j M Y H:i') }}

{{ $medicalRecord->chief_complaint }}

{{ $medicalRecord->patient->user->first_name ?? '' }} {{ $medicalRecord->patient->user->last_name ?? '' }} · {{ $medicalRecord->patient->mrn ?? '' }} · Dr. {{ $medicalRecord->doctor->full_name ?? '—' }}

Tracking code

{{ $medicalRecord->tracking_code ?? '—' }}

Share with patient for tracker

Symptoms

{{ $medicalRecord->symptoms ?? '—' }}

Treatment plan

{{ $medicalRecord->treatment_plan ?? '—' }}

Edit record
@csrf @method('DELETE')

Treatments — history

{{ $medicalRecord->treatments->count() }} entries
This is where you add treatment history. Fill the form at the bottom and click Add treatment — generate code. The code (e.g. TR-A3F9K2) is what patients enter at /treatment-tracker.
@forelse($medicalRecord->treatments as $t)

{{ $t->name }}

{{ $t->tracking_code }}

{{ $t->description ?? '—' }}

{{ $t->started_on?->format('j M Y') ?? '' }} @if($t->ended_on) — {{ $t->ended_on->format('j M Y') }} @endif · {{ $t->outcome ?? 'ongoing' }}

Edit
@csrf @method('PUT')
@csrf @method('DELETE')
@empty

No treatments yet — add the first below. The first treatment’s code becomes the record’s tracker.

@endforelse

Add treatment

Tracking code auto-generates as TR-XXXXXX — editable if you need a vanity code. Patient uses it at /treatment-tracker.

@csrf

Prescriptions — adherence

@forelse($medicalRecord->prescriptions as $pres)

{{ $pres->reference }}

{{ $pres->status->value }}
    @foreach($pres->items as $it)
  • {{ $it->medication_name }}{{ $it->status }}
  • @endforeach
@empty

No prescriptions. Create lab or prescribe from pharmacy.

@endforelse Add prescription — coming soon

Prescriptions auto-appear in tracker with % adherence.

How the tracker works

  1. Clinician adds treatment above — code like TR-A3F9K2 is generated.
  2. Copy the record’s tracking code (top card) and give to patient on discharge.
  3. Patient opens /treatment-tracker, enters code, sees history + prescription adherence.
  4. Pharmacist dispenses → adherence % updates automatically.
@endsection