<?php

declare(strict_types=1);

namespace Kylin\Medical\Enums;

/**
 * 处方状态
 */
enum PrescriptionStatus: string
{
    case PENDING = 'pending';       // 待审核
    case APPROVED = 'approved';     // 已审核
    case REJECTED = 'rejected';     // 已退回
    case DISPENSED = 'dispensed';   // 已发药
    case EXPIRED = 'expired';       // 已过期

    public function label(): string
    {
        return match ($this) {
            self::PENDING => '待审核',
            self::APPROVED => '已审核',
            self::REJECTED => '已退回',
            self::DISPENSED => '已发药',
            self::EXPIRED => '已过期',
        };
    }
}
