package com.ywt.outpatient.domain.models.enums;

/**
 * 病人去向
 */
public enum DispositionEnum {
    Home("回家", 1),
    Observation("入院留观", 2),
    Admission("住院", 3),
    Died("死亡", 4),
    Other("其他", 0);

    private final String displayName;

    private final int value;

    DispositionEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static DispositionEnum valueOf(int value){
        switch (value){
            case 1:
                return Home;
            case 2:
                return Observation;
            case 3:
                return Admission;
            case 4:
                return Died;
            default:
                return Other;
        }
    }
}
