package com.yihu.jw.entity.care.assistance;

import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.care.securitymonitoring.EmergencyWarnConclusionDO;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * Created by Bing on 2021/4/12.
 */
@Entity
@Table(name="base_emergency_assistance_order")
public class EmergencyAssistanceDO extends UuidIdentityEntityWithOperator {

    /**
     * 工单状态：
     */
    public enum Status {

        ErrorWarning(-2, "误报警"),
        cancel(-1, "已取消"),
        complete(0, "已完成"),
        apply(1, "申请中");

        private Integer type;
        private String desc;

        Status(Integer type, String desc) {
            this.type = type;
            this.desc = desc;
        }

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }
    }

    private String patient; //发起救助的居民id
    private String patientName; //发起救助的居民姓名
    private String patientPhone; //救助居民电话
    private String patientIdcard; //救助居民身份证
    private String proxyPatient; //代理发起工单的居民code，替父母，孩子等发起工单
    private String proxyPatientName; //代理发起工单的居民code，替父母，孩子等发起工单
    private String proxyPatientPhone; //代理发起工单的居民联系电话
    private String orgCode; //救助居民所在机构code
    private String orgName; //救助居民所在机构名称
    private String serveAddress;
    private String serveLat; //居民当前定位地址纬度
    private String serveLon; //居民当前定位地址经度
    private String sessionId; //会话id
    private String doctor; //医生code
    private String doctorName; //医生name
    private String doctorAddress;
    private String doctorLat; //医生当定位地址纬度
    private String doctorLon; //医生当前定位地址经度
    private String conclusion; //服务完成笔记
    private String conclusionImg; //服务相关附件
    private Integer status;
    private Date completeTime;//完成时间
    private String teamCode;
    private Integer type; //发起类型（1本人发起 2家人待预约 3医生代预约 4家属代预约）
    private Integer orderSource;//工单发起来源状态 1APP 2手环 3居家报警,4拐杖发起
    private Integer emergencyCancel;// 紧急预警工单误报警原因 字典emergency_cancel
    private String deviceSn;//设备sn  设备触发是才有该字段值


    private String sendMessage;//
    private Integer patientAge;
    private String patientPhoto;
    private Integer patientSex;
    private double distance;//医生与患者距离 单位km
    private String otherDoctorDistance;

    /**
     * 服务小结
     */
    private EmergencyWarnConclusionDO emergencyWarnConclusionDO;

    public String getPatient() {
        return patient;
    }

    public void setPatient(String patient) {
        this.patient = patient;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getPatientPhone() {
        return patientPhone;
    }

    public void setPatientPhone(String patientPhone) {
        this.patientPhone = patientPhone;
    }

    public String getPatientIdcard() {
        return patientIdcard;
    }

    public void setPatientIdcard(String patientIdcard) {
        this.patientIdcard = patientIdcard;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getServeLat() {
        return serveLat;
    }

    public void setServeLat(String serveLat) {
        this.serveLat = serveLat;
    }

    public String getServeLon() {
        return serveLon;
    }

    public void setServeLon(String serveLon) {
        this.serveLon = serveLon;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getDoctor() {
        return doctor;
    }

    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }

    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public String getDoctorLat() {
        return doctorLat;
    }

    public void setDoctorLat(String doctorLat) {
        this.doctorLat = doctorLat;
    }

    public String getDoctorLon() {
        return doctorLon;
    }

    public void setDoctorLon(String doctorLon) {
        this.doctorLon = doctorLon;
    }

    public String getConclusion() {
        return conclusion;
    }

    public void setConclusion(String conclusion) {
        this.conclusion = conclusion;
    }

    public String getConclusionImg() {
        return conclusionImg;
    }

    public void setConclusionImg(String conclusionImg) {
        this.conclusionImg = conclusionImg;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getServeAddress() {
        return serveAddress;
    }

    public void setServeAddress(String serveAddress) {
        this.serveAddress = serveAddress;
    }
    public String getDoctorAddress() {
        return doctorAddress;
    }

    public void setDoctorAddress(String doctorAddress) {
        this.doctorAddress = doctorAddress;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public String getTeamCode() {
        return teamCode;
    }

    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }

    public String getProxyPatient() {
        return proxyPatient;
    }

    public void setProxyPatient(String proxyPatient) {
        this.proxyPatient = proxyPatient;
    }

    public String getProxyPatientName() {
        return proxyPatientName;
    }

    public void setProxyPatientName(String proxyPatientName) {
        this.proxyPatientName = proxyPatientName;
    }

    public String getProxyPatientPhone() {
        return proxyPatientPhone;
    }

    public void setProxyPatientPhone(String proxyPatientPhone) {
        this.proxyPatientPhone = proxyPatientPhone;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Transient
    public String getSendMessage() {
        return sendMessage;
    }

    public void setSendMessage(String sendMessage) {
        this.sendMessage = sendMessage;
    }

    @Transient
    public Integer getPatientAge() {
        return patientAge;
    }

    public void setPatientAge(Integer patientAge) {
        this.patientAge = patientAge;
    }

    @Transient
    public String getPatientPhoto() {
        return patientPhoto;
    }

    public void setPatientPhoto(String patientPhoto) {
        this.patientPhoto = patientPhoto;
    }

    @Transient
    public Integer getPatientSex() {
        return patientSex;
    }

    public void setPatientSex(Integer patientSex) {
        this.patientSex = patientSex;
    }

    @Transient
    public double getDistance() {
        return distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    @Transient
    public String getOtherDoctorDistance() {
        return otherDoctorDistance;
    }

    public void setOtherDoctorDistance(String otherDoctorDistance) {
        this.otherDoctorDistance = otherDoctorDistance;
    }

    public Integer getOrderSource() {
        return orderSource;
    }

    public void setOrderSource(Integer orderSource) {
        this.orderSource = orderSource;
    }

    @Transient
    public EmergencyWarnConclusionDO getEmergencyWarnConclusionDO() {
        return emergencyWarnConclusionDO;
    }

    public void setEmergencyWarnConclusionDO(EmergencyWarnConclusionDO emergencyWarnConclusionDO) {
        this.emergencyWarnConclusionDO = emergencyWarnConclusionDO;
    }

    public Integer getEmergencyCancel() {
        return emergencyCancel;
    }

    public void setEmergencyCancel(Integer emergencyCancel) {
        this.emergencyCancel = emergencyCancel;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }
}