package thyyxxk.webserver.entity.view.patient360;

import lombok.Data;
import thyyxxk.webserver.utils.DateUtil;

import java.util.ArrayList;
import java.util.List;

@Data
public class PatientInfo360 {
    private String inpatientNo;
    private String mzNo;
    private String name;
    private String sex;
    private String socialNo;
    private String birthDate;
    private List<MedicalTrack> medicalTrackList = new ArrayList<>();

    public String getAge() {
        return DateUtil.calculateAgeWithUnit(birthDate);
    }

    public String getSexName() {
        if ("1".equals(sex)) {
            return "男";
        }
        if ("2".equals(sex)) {
            return "女";
        }
        return "";
    }

}
