package thyyxxk.webserver.entity.inpatient.chargelist;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class PatOverview {
    private String patNo;
    private Integer times;
    private Integer ledgerSn;
    private Boolean needChargeDate;
    // 0-全部，1-大人，2-小孩
    private Integer feeBelong;
    private BigDecimal totalCharge;
    private String name;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date admdate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date disdate;
    private String begndate;
    private String enddate;

    private String statement;

    public Integer getFeeBelong() {
        return null == feeBelong ? 0 : feeBelong;
    }

    public Boolean needChargeDate() {
        return null != needChargeDate && needChargeDate;
    }
}
