#nullable enable
namespace Baya.Application.Models.Patients;

/// <summary>The family-owned care plan for a patient — the customer's editable medications / routine / tasks.</summary>
public record CarePlanDto(
    long PatientId,
    IReadOnlyList<MedicationDto> Medications,
    IReadOnlyList<RoutineItemDto> Routine,
    IReadOnlyList<CareTaskDto> Tasks);

public record MedicationDto(long Id, string Name, string? Dosage, string Frequency, string? TimingNote);

public record RoutineItemDto(long Id, string Label, string? TimeOfDay, string? Note);

public record CareTaskDto(long Id, string Label, bool Done);

/// <summary>Whether the caller may view/edit the plan or append a clinical note — so the UI renders the right
/// affordances (and a non-leaking access-denied state) without probing the 403.</summary>
public record RecordAccessDto(bool CanView, bool CanEdit, bool CanAppendNote, string? DeniedReason);

/// <summary>One ticked item from the nurse's visit checklist, preserved structurally on the visit note.</summary>
public record TaskResultDto(string Label, bool Done);
