syntax = "proto3";

import "base.proto";
import "system.proto";

package com.ywt.gapi.user;

option java_generic_services = true;
option java_multiple_files = true;
option java_package = "com.ywt.gapi.user";
option go_package = "/gapi";

//医生信息
message Doctor {
    int32 userid = 1;
    string title = 2;
    string specialty = 3;
    string briefintro = 4;
    int64 createtime = 5;
    int64 updatetime = 6;
}


//医生详细信息
message DoctorInfo{
    int32 doctorid = 1;
    string name = 2;
    string avatar = 3;
    string city = 4;
    string hospital = 5;
    string specialty = 6;
    int32 status = 7;
    string title = 8;
    string dept = 9;
    string hospitalIds = 10;
    string deptIds = 11;
    int32 scheduleStatus = 12;      //医生出诊状态
    int32 consultFee = 13;          //医生咨询费用（单位：分）
    string qrCodeUrl = 14;          //二维码链接
    string briefIntro = 15;         //简介
    int32 signId = 16;              //医生签名ID
    string signUrl = 17;            //医生签名地址
    int32 baseInfoStatus = 18;      //基本信息是否填写（0-未填写，1-已填写）
    int32 licenseStatus = 19;       //认证状态（0-未通过，1-已通过）
    string mobile = 20;             //手机号
    int32 authType = 21;            //认证方式, 0-后台导入；1-医生认证
    int32 userType = 22;            //用户类型
    string rpContent = 23;          //处方二维码内容
    string rpUrl = 24;              //处方二维码链接
    string avatar2 = 25;
    string rpContentPc = 26;          //处方二维码内容PC端
    string rpUrlPc = 27;              //处方二维码链接PC端
    int32 pharmacyId = 28;
    string pharmacyName = 29;
}

//患者信息
message Patient{
    int32 patientid = 1;            //患者Id
    string realname = 2;            //真实姓名
    int32 age = 3;                  //年龄
    int32 sex = 4;                  //性别（数字）
    string mobile = 5;              //手机号码
    int32 doctorId = 6;             //医生Id
    int32 userId = 7;               //用户Id
    int64 createtime = 8;           //创建时间
    string chiefComplaint = 9;      //主诉
    string diagnosis = 10;          //诊断结果
    string remark = 11;             //备注
    string sexStr = 12;             //性别（中文）
    string allergicHistory = 13;    //过敏史
    string description = 14;        //病情描述
    string idCardNo = 15;           //身份证号
    string hisPatientId = 16;       //太和门诊ID

}

message DoctorRequest {
    int32 userid = 1;
    string phone = 2;
}

message DoctorResponse {
    Result result = 1;
    Doctor doctor = 2;
}

message DoctorInfoResponse{
    Result result = 1;
    DoctorInfo info = 2;
}

message UnionDoctorListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    int32 hospitalId = 4;
    int32 deptId = 5;
    string name = 6;
    string areaIds = 7;         //地区Id，e.g. 100000,110000,110001
}

message UnionDoctorListResponse{
    Result result = 1;
    repeated DoctorInfo doctorList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

//获取我的关联医生列表请求
message GetFriendListRequest{
    int32 doctorId = 1;         //医生Id
    int32 hospitalId = 2;       //医院Id
    int32 deptId = 3;           //科室Id
    string name = 4;            //医生姓名
    string areaIds = 5;         //地区Id，e.g. 100000,110000,110001
}

//获取我的关联医生列表响应
message GetFriendListResponse{
    Result result = 1;                      //结果
    repeated DoctorInfo doctorList = 2;     //医生列表
}

message PatientListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    string name = 4;
}


message PatientListResponse {
    Result result = 1;
    repeated Patient patientlist = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

message CreatePatientRequest{
    string name = 1;
    int32 sex = 2;
    int32 age = 3;
    string mobile = 4;
    int32 doctorId = 5;
    string chiefComplaint = 6;
    string diagnosis = 7;
    string remark = 8;
    string images = 9;
    string allergicHistory = 10;    //过敏史
    string description = 11;        //病情描述
    string idCardNo = 12;           //身份证号
}

message CreatePatientResponse{
    Result result = 1;
}

message WithdrawRequest{
    int32 doctorId = 1;
    double amount = 2;
    int32 cardId = 3;
}

message UnionDoctorRequest{
    int32 doctorId = 1;
    int32 userId = 2;
    int32 type = 3;
}


message PlatformDoctorListRequest{
    int32 pageIndex = 1;
    int32 pageSize = 2;
    int32 doctorId = 3;
    string name = 4;
    int32 hospitalId = 5;
    int32 deptId = 6;
    string areaIds = 7;         //地区Id，e.g. 100000,110000,110001
}

message PlatformDoctorListResponse{
    Result result = 1;
    repeated DoctorInfo doctorList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}


message PatientOrderInfoListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    string name = 4;
    int32 type = 5;
}

message PatientOrderInfoListResponse{
    Result result = 1;
    repeated PatientOrderInfo patientOrderInfoList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

message WithdrawRecord{
    int32 recordId = 1;
    double amount = 2;
    int64 createTime = 3;
    int32 cardId = 4;
    string cardNo = 5;
    int32 status = 6;
    int64 updateTime = 7;
    int32 auditStatus = 8;   //状态（1-待审核，2-审核通过，3-审核不通过）
    int32 userId = 9;
    string remark = 10;
}

message WithdrawRecordListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    int32 status = 4;
}

message WithdrawRecordListResponse{
    Result result = 1;
    repeated WithdrawRecord recordList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

//删除银行卡请求
message DelBankCardRequest{
    int32 doctorId = 1;
    int32 cardId = 2;
}


//查看患者信息请求
message GetPatientRequest{
    int32 patientId = 1;
    int32 doctorId = 2;
}

//查看患者信息响应
message GetPatientResponse{
    Result result = 1;
    Patient patient = 2;
    repeated MedicalRecordsImage images = 3;
}

//医生签名
message DoctorSign{
    int32 id  = 1;
    int32 doctorId = 2;
    string signUrl = 3;
    int64 createTime = 4;
}

//保存医生签名请求
message SaveSignRequest{
    string signUrl = 1;
    int32 doctorId = 2;
}

//获取医生签名请求
message GetDoctorSignListRequest{
    int32 doctorId = 1;
}

//获取医生签名响应
message GetDoctorSignListResponse{
    Result result = 1;
    repeated DoctorSign signs = 2;
}

//根据Id获取医生签名请求
message GetDoctorSignRequest{
    int32 id = 1;
}

//根据Id获取医生签名响应
message GetDoctorSignResponse{
    Result result = 1;
    DoctorSign sign = 2;
}

//删除银行卡请求
message DelPatientRequest{
    int32 doctorId = 1;
    int32 patientId = 2;
}


//医生出诊状态开关
message UpdateScheduleStatusRequest{
    int32 type = 1;     //业务类型：1-会诊，2-转诊，3-主诊，4-咨询
    int32 status = 2;   //业务状态：0-关闭 1-开启
    int32 userId = 3;   //用户Id
}

//修改咨询费用
message UpdateConsultFeeRequest{
    int32 userId = 1;   //用户Id
    int32 amount = 2;   //咨询费用，单位：分
}

//获取咨询功能设置请求
message GetConsultSettingsRequest{
    int32 userId = 1;   //用户Id
}

//获取咨询功能设置响应
message GetConsultSettingsResponse{
    Result result = 1;
    int32 consultFee = 2;   //咨询费
    int32 status = 3;       //状态：0-关闭 1-开启
}

//获取咨询医生列表请求
message GetConsultDoctorListRequest{
    int32 pageIndex = 1;
    int32 pageSize = 2;
    string name = 3;
    int32 hospitalId = 4;
    int32 deptId = 5;
    string areaIds = 6;     //地区Id
}

//获取咨询医生列表响应
message GetConsultDoctorListResponse{
    Result result = 1;
    repeated DoctorInfo doctorList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}


//创建病历请求
message CreateMedicalRecordsRequest{
    string typeName = 1;
    string desc = 2;
    string images = 3;
    int32 doctorId = 4;
    int32 patientId = 5;
    string diagnose = 6;
}

//修改病历请求
message UpdateMedicalRecordsRequest{
    int32 recordId = 1;
    string typeName = 2;
    string desc = 3;
    string images = 4;
    int32 doctorId = 5;
    string diagnose = 6;
}


//病历详情
message MedicalRecordsDetail{
    int32 recordId = 1;
    string typeName = 2;
    string desc = 3;
    repeated string imageUrl = 4;                           //图片
    int32 doctorId = 5;
    int32 patientId = 6;
    int64 createTime = 7;
    string mobile = 8;
    int32 age = 9;
    int32 sex = 10;
    string patientName = 11;                                //患者姓名
    int32 userId = 12;
    string admTime = 13;                                    //患者入院日期
    string hospitalName = 14;                               //医院名称
    string doctorName = 15;                                 //医生名字
    string selfReport = 16;                                 //主诉
    string phyExam = 17;                                    //体格检查
    string diagnose = 18;                                   //诊断结果
    string suggestion = 19;                                 //意见
    string advice = 20;                                     //门急诊医嘱
    repeated LaboratoryReport laboratoryReport = 21;        //化验报告
    repeated InspectionReport inspectionReport = 22;        //检查报告
    string idNo = 23;                                       //身份证号
}

//获取病历详情请求
message GetMedicalRecordsDetailRequest{
    int32 recordId = 1;
}

//获取病历详情响应
message GetMedicalRecordsDetailResponse{
    Result result = 1;
    MedicalRecordsDetail detail = 2;
}

//获取病历列表请求
message GetMedicalRecordsDetailListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    int32 patientId = 4;
}

//获取病历列表响应
message GetMedicalRecordsDetailListResponse{
    Result result = 1;
    repeated MedicalRecordsDetail detail = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

//获取病历列表请求
message GetMedicalRecordListByUserIdRequest{
    int32 userId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
}


//获取订单图片列表请求
message GetOrderImageListRequest{
    int32 doctorId = 1;
    int32 userId = 2;
    int32 pageIndex = 3;
    int32 pageSize = 4;
}

//获取订单图片列表响应
message GetOrderImageListResponse{
    Result result = 1;
    repeated MedicalRecordsImage images = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

message MedicalRecordsImage{
    int32 id = 1;
    int32 doctorId = 2;
    int32 patientId = 3;
    string imageUrl = 4;
    int64 createTime = 5;
    int32 orderId = 6;
}


//患者能否发起业务（远程会诊、名医主诊、双向转诊、咨询）请求
message CanInitiateRequest{
    int32 doctorId = 1;
    int32 patientId = 2;
    int32 type = 3;
}

//获取医生信息请求
message GetDoctorRequest{
    int32 doctorId = 1;
}

//获取医生信息响应
message GetDoctorResponse{
    Result result = 1;
    DoctorInfo doctorInfo = 2;  //医生信息
}

//获取所有医生信息请求
message GetDoctorAllRequest {
    int32 doctorId = 1;
}

//获取所有医生信息响应
message GetDoctorAllResponse{
    int32 code = 1;
    repeated DoctorInfo doctorInfos = 2;  //医生信息集合
}

//获取远程会诊功能设置请求
message GetTreatmentSettingsRequest{
    int32 userId = 1;   //用户Id
}

//获取远程会诊功能设置响应
message GetTreatmentSettingsResponse{
    Result result = 1;
    int32 treatmentFee = 2;   //会诊费
}


//医生远程会诊功能设置
message UpdateTreatmentFeeRequest{
    int32 userId = 1;   //用户Id
    int32 amount = 2;   //咨询费用，单位：分
}

//医生审核资料
message DoctorInfoAudit{
    int32 doctorId = 1;
    string avatar = 2;
    string doctorName = 3;
    int32 sex = 4;
    int32 hospitalId = 5;
    int32 deptId = 6;
    string title = 7;
    string briefIntro = 8;
    string specialty = 9;
    repeated string certificateUrl = 10;    //执业证书
    int32 auditStatus = 11;
    int64 auditTime = 12;
    string auditRemark = 13;
    int32 infoId = 14;
    string hospital = 15;
    string dept = 16;
    repeated string doctorIdNoImg = 17;     //医生身份证照片
    repeated string doctorQualificationImg = 18;        //医师资格证
    repeated string doctorProfessionalSkillImg = 19;    //医师专业技术资格证
    string idNo = 20;                       //身份证号码
    int32 authType = 21;                                //认证方式, 0-后台导入；1-医生认证
    string avatar2 = 22;

}

//更新医生资料请求
message UpdateDoctorInfoRequest{
    int32 doctorId = 1;
    string avatar = 2;
    string doctorName = 3;
    int32 sex = 4;
    int32 hospitalId = 5;
    int32 deptId = 6;
    string title = 7;
    string briefIntro = 8;
    string specialty = 9;
    string idNo = 10;                        //身份证号
    string hospitalName = 11;                //医院名称（自填）
    repeated string certificateUrl = 12;                //执业证书
    repeated string doctorIdNoImg = 17;                 //医生身份证照片
    repeated string doctorQualificationImg = 18;        //医师资格证
    repeated string doctorProfessionalSkillImg = 19;    //医师专业技术资格证
}

//获取医生信息请求
message GetDoctorInfoAuditRequest{
    int32 doctorId = 1;
}

//获取医生信息响应
message GetDoctorInfoAuditResponse{
    Result result = 1;
    DoctorInfoAudit doctorInfo = 2;
}


//搜索患者Request
message SearchPatientRequest{
    string patientName = 1;
    int32 doctorId = 2;
    int32 pageIndex = 3;    //当前页
    int32 pageSize = 4;     //每页大小
}

//搜索患者Response
message SearchPatientResponse{
    Result result = 1;
    repeated Patient patient = 2;
    int32  count = 3;          //总条数
    int32 totalPages = 4;       //总页数

}


//查询患者病历数量request
message GetPatientMedicalRecordCountRequest{
    int32 patientId = 1; //患者ID
    int32 doctorId = 2;  //医生ID
}

//查询患者病历数量response
message GetPatientMedicalRecordCountResponse{
    int32 code = 1;
    string info = 2;
    int32 medicalRecordCount = 3; //病历数量
}


//添加或修改病历模版Request
message AddOrUpdateMedicalModuleRequest{
    int32 doctorId = 1;
    int32 moduleId = 2;
    string moduleName = 3;
    string context = 4;
    int32 type = 5;
}

//得到模版详情Request
message GetMedicalModuleDetailRequest{
    int32 moduleId = 1;
}

//得到模版详情Response
message GetMedicalModuleDetailResponse{
    Result result = 1;
    int32 moduleId = 2;
    string moduleName = 3;
    string context = 4;
    int32 type = 5;
    string typeStr = 6;
}

//根据模版类型type和医生ID得到所有模版Request
message GetAllMedicalModuleRequest{
    int32 doctorId = 1;
    int32 type = 2;
}

message MedicalModule{
    int32 moduleId = 1;
    string moduleName = 2;
}

//根据模版类型type和医生ID得到所有模版Response
message GetAllMedicalModuleResponse{
    Result result = 1;
    repeated MedicalModule medicalModule =2;
    string context = 3; //表示最近的一个模版内容
    int32 type = 4;
    string typeStr = 5;
}

//得到患者信息Response
message GetPatientByIdResponse{
    Result result = 1;
    Patient patient = 2;
}


//获取病历详情Request
message GetMedicalRecordsDetailByIdRequest{
    int32 recordId = 1;
}

//获取病历详情Response
message GetMedicalRecordsDetailByIdResponse{
    Result result = 1;
    string patientName = 2;
    int32 patientSex = 3;
    int32 patientAge = 4;
    string patientMobile = 5;
    string chiefComplaint = 6;                           //主诉
    string presentHistory = 7;                          //现病史
    string pastHistory = 8;                             //既往史
    string allergicHistory = 9;                             //过敏史
    string personalHistory = 10;                             //个人史
    string phyExam = 11;                                        //体格检查
    double bodyTemperature = 12;                             //病人体温
    string specialCondition = 13;                             //专科情况
    string accessoryExamination = 14;                             //辅助检查
    string diagnosis = 15;                              //诊断
    int32 single = 16;                             //单病种，1-是，0-否
    int64 diseaseTime = 17;                             //发病时间
    int32 disposition = 18;                             //病人去向
    int32 treatmentCase = 19;                             //抢救病人
    int32 treatmentStatus = 20;                             //是否抢救成功
    string diseaseEvaluation = 21;                             //病情评估
    string icdCode = 22;                             //ICD编码
    string management = 23;                             //处置
    string doctorName = 24;
    string deptName = 25;
    string remark = 26;
    int64 createTime = 27;         //病历创建时间，就诊日期
}

//获取病历列表Request
message GetMedicalRecordsDetailListByPatientIdRequest{
    int32 doctorId = 1;
    int32 patientId = 2;
}


//添加患者病历Request
message AddMedicalRecordRequest{
    int32 patientId = 1;
    string patientName = 2;
    int32 patientSex = 3;
    int32 patientAge = 4;
    string patientMobile = 5;
    string chiefComplaint = 6;                           //主诉
    string presentHistory = 7;                          //现病史
    string pastHistory = 8;                             //既往史
    string allergicHistory = 9;                             //过敏史
    string personalHistory = 10;                             //个人史
    string phyExam = 11;                                        //体格检查
    double bodyTemperature = 12;                             //病人体温
    string specialCondition = 13;                             //专科情况
    string accessoryExamination = 14;                             //辅助检查
    string diagnosis = 15;                              //诊断
    int32 single = 16;                             //单病种，1-是，0-否
    int64 diseaseTime = 17;                             //发病时间
    int32 disposition = 18;                             //病人去向
    int32 treatmentCase = 19;                             //抢救病人
    int32 treatmentStatus = 20;                             //是否抢救成功
    string diseaseEvaluation = 21;                             //病情评估
    string icdCode = 22;                             //ICD编码
    string management = 23;                             //处置
    int32 doctorId = 24;
    string remark = 25;
    string idCardNo = 26;               //身份证号
    int32 userId = 27;
}

//获取关联医生所在医院列表请求
message GetFriendHospitalListRequest{
    int32 doctorId = 1;         //医生Id
}

//获取关联医生所在医院列表响应
message GetFriendHospitalListResponse{
    Result result = 1;                      //结果
    repeated com.ywt.gapi.system.Hospital hospitalList = 2;     //医生列表
}

//得到医生最近一个月的交易记录Request   create by daiyihua
message GetLastMonthTransactionRecordRequest{
    int32 doctorId = 1;
}

//得到医生最近一个月的交易记录Response    create by daiyihua
message GetLastMonthTransactionRecordResponse{
    Result result = 1;
    repeated AccountDetail detailList = 2;
        int32 payCount = 3; //支出金额
    int32 incomeCount = 4;  //收入金额
}

// 按时间段获取医生交易记录request
message GetTransactionRecordRequest {
    int32 doctorId = 1;
    string startTime = 2; // 起始时间
    string endTime = 3; // 结束时间
    int32 pageIndex = 4; // 页码
    int32 pageSize = 5; // 页大小
}

// 按时间段获取医生交易记录response
message GetTransactionRecordResponse {
    Result result = 1;
    repeated AccountDetail detailList = 2;
    int32 payCount = 3; //支出金额统计
    int32 incomeCount = 4; //收入金额统计
    int32 count = 5; //总条数
    int32 totalPages = 6; //总页数
}

// 快捷语   create by daiyihua
message QuickLanguage{
    int32 id=1;			//快捷语ID
    string content = 2; //快捷语内容
    int32 count = 3;
    int32 totalPages = 4;
}

//得到快捷语Request create by daiyihua
message GetQuickLanguageListRequest{

}

//得到快捷语Response create by daiyihua
message GetQuickLanguageListResponse{
    Result resutl = 1;
    repeated QuickLanguage quickLanguage = 2;
}


//出诊排班 create by daiyihua
message DoctorSchedule {
    int64 clinicTime = 1 ;  //出诊日期
    int32 morning = 2;      //是否上午出诊（0-不出诊；1-出诊）
    int32 afternoon = 3;    //是否上午出诊（0-不出诊；1-出诊）
    int32 night = 4;        //是否上午出诊（0-不出诊；1-出诊）
    int32 configId = 5;     //schedule配置ID，没有则用0表示
    int32 amount = 6;       //预约金额
    int32 provinceId = 7;   //省ID
    int32 cityId = 8;       //市ID
    int32 areaId = 9;       //区ID
    string province = 10;   //省
    string city = 11;       //市
    string area = 12;       //区
    string address = 13;    //地址
    string remark = 14;     //备注
    int32 type = 15;        //类型：1-按月 2-按周
    int32 scheduleId = 16;  //医生排班ID，新增的时候，默认为0
}

//保存出诊排班Request create by daiyihua
message SaveDoctorScheduleRequest {
    int32 doctorId = 1;                             //医生ID
    repeated DoctorSchedule doctorSchedule = 2;     //出诊排班
}

//得到医生问诊排班信息Request  create by daiyihua
message GetDoctorScheduleRequest{
    int32 doctorId = 1;
}

//得到医生问诊排班信息Response    create by daiyihua
message GetDoctorScheduleResponse{
    Result result = 1;
    repeated DoctorSchedule doctorSchedule = 2;     //出诊排班
}

//根据医生问诊排班ID得到排班信息Request
message GetScheduleConfigByScheduleIdRequest{
    int32 docotorId = 1;
    int32 scheduleId = 2;
}

//根据医生问诊排班ID得到排班信息Response
message GetScheduleConfigByScheduleIdResponse{
    Result result = 1;
    DoctorSchedule doctorSchedule = 2;     //出诊排班配置
}

//出诊排班 create by daiyihua
message DoctorScheduleTime {
    int64 clinicTime = 1 ;  //出诊日期
    int32 morning = 2;      //是否上午出诊（0-不出诊；1-出诊）
    int32 afternoon = 3;    //是否上午出诊（0-不出诊；1-出诊）
    int32 night = 4;        //是否上午出诊（0-不出诊；1-出诊）
    int32 scheduleId = 5;   //预约ID
}

//得到最近的排班信息Request   create by daiyihua
message GetLatestScheduleRequest{
    int32 doctorId = 1;
    string date = 2;
}

//得到最近的排班信息Response create by daiyihua
message GetLatestScheduleResponse{
    Result result = 1;
    repeated DoctorScheduleTime doctorScheduleTime = 2;
}

//设置停诊排班Response create by daiyihua
message SetCancelScheduleRequest{
    int32 doctorId = 1;
    string scheduleIds = 2;     //停诊排班
}

//判断排班预约状况Request create by daiyihua
message CheckScheduleStatusRequest{
    int32 doctorId = 1;
}

//判断排班预约状况Respnose create by daiyihua
message CheckScheduleStatusResponse{
    Result result = 1;
    int32 count = 2;     //0：没有预约，1-有预约
}

// 有加诊排班的医生
message ScheduleDoctorInfo{
    int32 doctorId = 1;             //医生ID
    string name = 2;                //医生姓名
    string hospital = 3;            //医院
    string specialty = 4;           //擅长
    string title = 5;               //职称
    string dept = 6;                //部门
    string hospitalIds = 7;        //医院ID
    string deptIds = 8;            //部门ID
    string briefIntro = 9;         //简介
    string avatar = 10;              //医生头像
}

//获取加诊医生列表请求
message GetScheduleDoctorListRequest{
    int32 hospitalId = 1;       //医院Id
    int32 deptId = 2;           //科室Id
    string name = 3;            //医生姓名
    string areaIds = 4;         //地区Id，e.g. 100000,110000,110001
    int32 pageIndex = 5;        //当前页数
    int32 pageSize = 6;         //每页大小
}

//获取加诊医生列表响应
message GetScheduleDoctorListResponse{
    Result result = 1;                      //结果
    repeated ScheduleDoctorInfo scheduleDoctorInfo = 2;     //有加诊排班的医生列表
    int32 totalPages = 3;   //总页数
    int32 count = 4;        //总条数
}


//根据状态查询咨询订单Request   create by daiyihua
message GetConsultOrderListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    int32 status = 4;
}

//咨询订单详情  create by daiyihua
message ConsultOrderDetail{
    string patientName = 1;     //患者姓名
    int32 patientSex = 2;       //患者性别
    int32 patientAge = 3;       //患者年龄
    string patientMobile = 4;   //患者手机号
    int32 amount = 5;           //咨询费用
    int32 status = 6;           //预约状态
    string statusStr = 7;        //预约状态
    int32 consultId = 8;         // 问诊订单ID
    int64 createTime = 9;        //下单时间
    int32 orderId = 10;          //订单ID
}

//根据状态查询咨询订单Response   create by daiyihua
message GetConsultOrderListResponse{
    Result result = 1;          //返回状态
    repeated ConsultOrderDetail detail = 2;
    int32  count = 3;          //总条数
    int32 totalPages = 4;       //总页数
}


//根据状态查询加号订单Request   create by daiyihua
message GetAdditionalRegistrationListRequest{
    int32 doctorId = 1;
    int32 pageIndex = 2;
    int32 pageSize = 3;
    int32 status = 4;
}

//加诊订单详情  create by daiyihua
message AdditionalRegistration{
    string patientName = 1;     //患者姓名
    int32 patientSex = 2;       //患者性别
    int32 patientAge = 3;       //患者年龄
    string patientMobile = 4;   //患者手机号
    int32 amount = 5;           //加诊费用
    string address = 6;         //加诊地址
    int32 status = 7;           //加诊状态
    string statusStr = 8;       //加诊状态
    int32 additionalRegistrationId = 9;       //加诊订单ID
    int64 addDate = 10;         //预约时间
    int32 addTime = 11;         //上午、下午、晚上
}


//根据状态查询加号订单Response   create by daiyihua
message GetAdditionalRegistrationListResponse{
    Result result = 1;          //返回状态
    repeated AdditionalRegistration additionalRegistration = 2;
    int32  count = 3;          //总条数
    int32 totalPages = 4;       //总页数
}

//得到医生订单统计Response    create by daiyihua
message GetDoctorStatisticsResponse{
    Result result = 1;
    int32 bookedCount = 2;//已预约数
    int32 diagnosisCount = 3;//待诊数
    int32 followUpCount = 4; //随访数
    int32 consultCount = 5;  //咨询数
    int32 myTeamCount = 6;   //我的团队数量（我加入的和我创建的）
    int32 patientCount = 7;  //邀请的患者数量
    int32 articleCount = 8;     //未读资讯数量
}


//医生绑定信息
message DoctorBindWxRequest{
    string mobile = 1;
    string unionId = 2;
    string openId = 3;
    int32 terminal = 4;
    string ip = 5;
}

//团队中的医生信息    create by daiyihua
message TeamDoctorInfo{
    int32 doctorId = 1;         //医生ID
    string doctorName = 2;      //医生姓名
    string title = 3;           //医生职称
    string hospitalName = 4;    //医院名称
    string deptName = 5;        //科室名称
    int32 status = 6;           //加入状态
    string avatar = 7;          //医生头像
    string specialty = 8;       //医生擅长
    string avatar2 = 9;          //医生头像

}

//保存团队信息Request        create by daiyihua
message SaveTeamRequest{
    int32 teamId = 1;                               //团队ID，新增时传0
    string teamName = 2;                            //团队名称
    string teamIntro = 3;                           //团队介绍
    repeated TeamDoctorInfo teamDoctorInfo = 4;     //团队成员
    int32 doctorId = 5;                             //创建医生ID
}

//得到团队信息Request        create by daihua
message GetTeamInfoRequest{
    int32 teamId = 1;   //团队ID
}

//得到团队信息Response       create by daiyihua
message GetTeamInfoResponse{
    Result result = 1;
    int32 teamId = 2;                               //团队ID
    int32 doctorId = 3;                             //创建团队的医生ID
    string teamName = 4;                            //团队名称
    string teamIntro = 5;                           //团队介绍
    repeated TeamDoctorInfo teamDoctorInfo = 6;     //团队成员
}

//搜索医生Request           create by daiyihua
message SearchDoctorRequest{
    string name = 1;            //搜索的关键字
    string areaIds = 2;         //地区ID
    int32 hospitalId = 3;       //医院ID
    int32 deptId = 4;           //科室ID
    int32 teamId = 5;           //团队ID（新增时传0）
    int32 pageIndex = 6;        //当前页
    int32 pageSize = 7;         //每页大小
}

//搜索医生Response          create by daiyihua
message SearchDoctorResponse{
    Result result = 1;
    repeated TeamDoctorInfo teamDoctorInfo = 2;     //医生信息
    int32 count =  3;                               //总条数
    int32 totalPages = 4;                            //总页数
}


//删除团队成员Request        create by daiyihua
message DelTeamDoctorRequest{
    int32 doctorId = 1;     //医生ID
    int32 teamId = 2;       //团队ID
}

//删除团队Request        create by daiyihua
message DelTeamRequest{
    int32 doctorId = 1;     //医生ID
    int32 teamId = 2;       //团队ID
}

//团队成员    create by daiyihua
message TeamDoctor{
    int32 doctorId = 1;         //医生ID
    string name = 2;            //医生姓名
    string avatar = 3;          //医生头像
    string title = 4;           //医生职称
    string hospital = 5;        //医生所在医院（名称）
    string dept = 6;            //医生所在科室（名称）
    string specialty = 7;       //医生擅长
}

//团队信息    create by daiyihua
message TeamInfo{
    int32 teamId = 1;           //团队ID
    int32 doctorId = 2;         //创建人ID
    string teamName = 3;        //团队名称
    string avatar = 4;          //团队头像（创建人头像）
    string teamIntro = 5;       //团队介绍
    repeated TeamDoctor teamDoctor = 6;
    string avatar2 = 7;          //团队头像（创建人头像）
}

//得到团队信息Request create by daiyihua
message GetMyTeamRequest{
    int32 doctorId = 1;
}

//得到团队信息Response    create by daiyihua
message GetMyTeamResponse{
    Result result = 1;
    repeated TeamInfo teamInfo = 2;     //团队信息
}

//申请加入团队Request  create by daiyihua
message ApplyToJoinRequest{
    int32 teamId = 1;           //团队ID
    int32 doctorId = 2;         //医生（申请人）ID
}

//搜索团队Reqeust       create by daiyihua
message SearchTeamRequest{
    string name = 1;            //关键字搜索
    int32 doctorId = 2;         //医生ID
    int32 pageIndex = 3;        //当前页
    int32 pageSize = 4;         //每页大小
}

//搜索团队Response       create by daiyihua
message SearchTeamResponse{
    Result result = 1;
    repeated TeamInfo teamInfo = 2;                 //团队信息
    int32 count =  3;                               //总条数
    int32 totalPages = 4;                            //总页数
}

//处理邀请Request       create by daiyihua
message DealWithInvitationRequest{
    int32 doctorId = 1;         //医生ID
    int32 teamId = 2;           //团队ID
    int32 status = 3;           //状态（1-同意加入，2-拒绝加入）
}

//搜索的医生信息    create by daiyihua
message SearchDoctorInfo{
    int32 doctorId = 1;         //医生ID
    string doctorName = 2;      //医生姓名
    string title = 3;           //医生职称
    string hospitalName = 4;    //医院名称
    string deptName = 5;        //科室名称
    string avatar = 6;          //医生头像
    string specialty = 7;       //医生擅长
}

//根据科室搜索医生信息Request    create by daiyihua
message GetDoctorListByDeptIdRequest{
    int32 deptId = 1;
    int32 pageIndex = 2;        //当前页
    int32 pageSize = 3;         //每页大小
}

//根据科室搜索医生信息Response    create by daiyihua
message GetDoctorListByDeptIdResponse{
    Result result = 1;
    repeated SearchDoctorInfo searchDoctorInfo = 2;     //医生信息
    int32 count =  3;                                   //总条数
    int32 totalPages = 4;                               //总页数
}

//根据医生ID得到医生团队数量Request  create by daiyihua
message GetDoctorTeamCountRequest{
    int32 doctorId = 1;     //医生ID
}

//根据医生ID得到医生加号数量Request     create by daiyihua
message GetDoctorAdditionalCountRequest{
    int32 doctorId = 1;     //医生ID
}


//根据医院ID得到医院对象Reqeust   create by daiyihua
message GetHospitalByIdRequest{
    int32 hospitalId = 1;
}

//根据医院ID得到医院对象Response   create by daiyihua
message GetHospitalByIdResponse{
    Result result = 1;
    int32 hospitalId = 2;       //医院ID
    string hospitalName = 3;    //医院名称
}


//根据用户ID判断医院的状态Request	create by daiyihua
message CheckHospitalStatusByDoctorIdRequest{
    int32 doctorId = 1;	//医生ID
}

//返回医院的状态Request	create by daiyihua
message CheckHospitalStatusResponse{
    Result result = 1;
    int32 status = 2;	//医院状态（0-正常 1-禁用）
}

//修改患者信息Reqeust    create by daiyihua
message UpdatePatientRequest{
    string name = 1;
    int32 sex = 2;
    int32 age = 3;
    string mobile = 4;
    int32 doctorId = 5;
    string chiefComplaint = 6;
    string diagnosis = 7;
    string remark = 8;
    string images = 9;
    string allergicHistory = 10;    //过敏史
    string description = 11;        //病情描述
    int32 patientId = 12;
}


//得到医生团队信息Request create by daiyihua
message GetDoctorTeamsRequest{
    int32 doctorId = 1;
}

//得到医生团队信息Response    create by daiyihua
message GetDoctorTeamsResponse{
    Result result = 1;
    repeated TeamInfo teamInfo = 2;     //团队信息
}

//医生对于医院的code
message DoctorHisCode{
    int32 doctorId = 1;     //医生ID
    int32 hospitalId = 2;   //医院ID
    string deptCode = 3;     //his的部门编号
    string doctorCode = 4;   //his的医生编号
    string doctorName = 5;  //医生姓名
}


//获取医生信息请求          create by daiyihua
message GetDoctorHisCodeRequest{
    int32 doctorId = 1;
    int32 hospitalId = 2;
}

//获取医生信息响应          create by daiyihua
message GetDoctorHisCodeResponse{
    Result result = 1;
    DoctorHisCode doctorHisCode = 2;  //医生信息
}

//保存基本信息Request      create by daiyihua
message SaveBaseInfoRequest{
    int32 doctorId = 1;
    string name = 2;        //医生姓名
    int32 hospitalId = 3;   //医院id
    string hospitalName = 4;//医院名称
    int32 deptId = 5;       //科室ID
    string title = 6;       //职称
}

//根据医院ID和hiscode得到医生信息Request   create by daiyihua
message GetDoctorByHisCodeRequest{
    int32 hospitalId = 1;
    string hisCode = 2;
}

//根据医院ID和hiscode得到医生信息Response    create by daiyihua
message GetDoctorByHisCodeResponse{
    Result result = 1;
    int32 doctorId = 2;	    //医生ID
    string doctorName = 3;        //医生姓名
    string avatar = 4;       //医生头像
}

//患者订单信息
message PatientOrderInfo{
    int32 patientid = 1;
    string realname = 2;
    int32 age = 3;
    int32 sex = 4;
    string mobile = 5;
    int32 doctorId = 6;
    int32 userId = 7;
    int64 createtime = 8;
    int32 status = 9;   //0未预约，1已预约
    int32 type = 10;    //订单类型
    string diagnosis = 11;  //诊断
    string idCardNo = 15;           //身份证号
}


//化验报告
message LaboratoryReport {
    string inspectionId = 1;        //检验报告单id
    string inspectionName = 2;      //检验报告单标题名称
    int64 inspectionDate = 3;       //检验报告单审核日期（YYYY-MM-DD HH:MM:SS）
    int32 status = 4;               //报告状态 0 未审核 1已审核
    string patientName = 5;         //患者姓名
    string patientAge = 6;          //患者年龄
    int32 sex = 7;                  //性别
    string deptName = 8;            //申请科室名称
    string clinicalDiagnosis = 9;   //临床诊断
    string reportDoctorName = 10;   //报告医生姓名
    string clinicSeq = 11;          //门诊就诊流水号
    string inpatientId = 12;        //住院号
    string checkDoctorName = 13;    //审核医生姓名
    int32 id = 14;                  //主键
}

//检查结果
message InspectionReport{
    string reportId = 1;            //检查报告单id
    string reportTitle = 2;         //检查报告单标题名称
    int64 reportDate = 3;           //检查报告单审核日期（YYYY-MM-DD HH:MM:SS）
    int32 status = 4;               //报告状态 0 未审核 1已审核
    string patientName = 5;         //患者姓名
    string patientAge = 6;          //患者年龄
    int32 sex = 7;                  //性别
    string clinicalDiagnosis = 8;   //临床诊断
    string clinicSeq = 9;           //门诊就诊流水号
    string inpatientId = 10;        //住院流水号
    int32 id = 11;                  //主键Id
}

//明细信息
message AccountDetail{
    int32 detailId = 1;
    double balance = 2;
    double amount = 3;
    string title = 4;
    int64 createTime = 5;
}

//病历时间列表
message MedicalRecordsTime{
    string recordsTime = 1;
    int32 recordsId = 2;
}

//病历日期列表
message MedicalRecordsDate{
    string recordsDate = 1;
    repeated MedicalRecordsTime recordsTime = 2;
}

//获取病历列表Response
message GetMedicalRecordsDetailListByPatientIdResponse{
    Result result = 1;
    repeated MedicalRecordsDate recordsDate = 2;
}

//根据科室Id获取医生团队请求
message GetTeamListByDeptIdRequest{
    int32 deptId = 1;
}

//根据科室Id获取医生团队响应
message GetTeamListByDeptIdResponse{
    int32 code = 1;
    string msg = 2;
    repeated TeamInfo team = 3;
}

//科室排班医生
message DeptScheduleDoctor{
    int32 id = 1;
    int32 hospitalId = 2;
    int32 doctorId = 3;
    string doctorCode = 4;
    string doctorName = 5;
    int32 deptId = 6;
    string deptCode = 7;
    string scheduleCode = 8;
}

//获取科室排班医生请求
message GetDeptScheduleDoctorListRequest{

}

//获取科室排班医生响应
message GetDeptScheduleDoctorListResponse{
    int32 code = 1;
    string msg = 2;
    repeated DeptScheduleDoctor deptDoctor = 3;
}

//用户得到平台医生request   creawte by daiyihua
message GeneralGetPlatformDoctorListRequest{
    int32 pageIndex = 1;
    int32 pageSize = 2;
    int32 userId = 3;
    string name = 4;
    int32 hospitalId = 5;
    int32 deptId = 6;
    string areaIds = 7;         //地区Id，e.g. 100000,110000,110001
}

//用户得到平台医生response  creawte by daiyihua
message GeneralGetPlatformDoctorListResponse{
    Result result = 1;
    repeated DoctorInfo doctorList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}


//用户得到关注的平台医生request   creawte by daiyihua
message GeneralGetAttentionDoctorListRequest{
    int32 pageIndex = 1;
    int32 pageSize = 2;
    int32 userId = 3;
    string name = 4;
    int32 hospitalId = 5;
    int32 deptId = 6;
    string areaIds = 7;         //地区Id，e.g. 100000,110000,110001
}

//用户得到关注的平台医生response  creawte by daiyihua
message GeneralGetAttentionDoctorListResponse{
    Result result = 1;
    repeated DoctorInfo doctorList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

//展示的医生团队数据
message DisplayTeam{
    message TeamInfo{
        int32 teamId = 1;
        string teamName = 2;
        string teamIntro = 3;
        repeated DoctorInfo doctor = 4;
    }

    message DoctorInfo{
        int32 doctorId = 1;
        string doctorName = 2;
        string title = 3;
        string avatar = 4;
        string hospitalName = 5;
        string deptName = 6;
        string specialty = 7;
        string intro = 8;
        repeated ScheduleInfo schedule = 9;
    }

    message ScheduleInfo{
        string week = 1;
        string date = 2;
        string afternoon = 3;
        string forenoon = 4;
    }

    int32 deptId = 1;
    string deptName = 2;
    repeated TeamInfo team = 3;
}

message GetDisplayTeamListRequest{

}

message GetDisplayTeamListResponse{
    int32 code = 1;
    string msg = 2;
    repeated DisplayTeam displayTeam = 3;
}

message CheckUserUnionDoctorRequest{
    int32 userId = 1;
    int32 doctorId = 2;
}

// 通知医生审核通过request
message NotifyDoctorVerificationPassRequest {
    int32 userId = 1;       // user id
    string mobile = 2;      
    string password = 3;    
}

// 通知医生审核不通过request
message NotifyDoctorVerificationNotPassRequest {
    int32 userId = 1;// user id
    string auditRemark = 2;// 审核备注
}

//获取问诊医生列表请求
message GetConsultDoctorPageListRequest {
    int32 pageIndex = 1; // page index
    int32 pageSize = 2; // page size
    int32 userId = 3; // patient id
    string name = 4; // doctor name, optional
    int32 hospitalId = 5; // hospital id, optional
    int32 deptId = 6; // department id, optional
    string areaIds = 7; // area id, optional
    int32 filterType = 8;// Filter type, 0:no filter, 1:filter out non-consulting doctors.Default is 0.
}

//获取问诊医生列表响应
message GetConsultDoctorPageListResponse {
    Result result = 1;
    repeated ConsultDoctorInfo doctorList = 2;
    int32 count = 3;
    int32 totalPages = 4;
}

//问诊医生信息
message ConsultDoctorInfo {
    int32 doctorId = 1;
    string title = 2;
    string specialty = 3;
    string briefintro = 4;
    int64 createtime = 5;
    int64 updatetime = 6;
    string hospitals = 7;
    string depts = 8;
    string realName = 9;
    string avatar = 10;
    int32 followed = 11; //是否已关注：0-未关注；1-已关注
    string avatar2 = 12;
}

//推荐医生
message RecommendDoctor{
    int32 doctorId = 1;
    string title = 2;
    string specialty = 3;
    string briefintro = 4;
    int64 createtime = 5;
    int64 updatetime = 6;
    string hospitals = 7;
    string depts = 8;
    string realName = 9;
    string avatar = 10;
    int32 lineNumber = 11;//行数
    string avatar2 = 12;

}
//推荐医生请求
message GetRecommendDoctorListRequest{

}
//推荐医生响应
message GetRecommendDoctorListResponse{
    int32 code = 1;
    string msg = 2;
    repeated RecommendDoctor doctor = 3;
}

// 扫码加入医生团队
message ScanQrCodeJoinTeamDoctorRequest{
    int32 teamId = 1;           //团队ID
    int32 doctorId = 2;         //医生ID
}

//医生端公众号功能栏目显示/隐藏设置
message DoctorMpMenu{
    int32 id = 1;
    int32 doctorId = 2;
    int32 status = 3;
    int64 createTime = 4;
    int64 updateTime = 5;
    string menuCode = 6;
}
//获取医生端公众号功能栏目显示/隐藏
message GetDoctorMpMenuListReqeust{
    int32 doctorId = 1;
}
//获取医生端公众号功能栏目显示/隐藏
message GetDoctorMpMenuListResponse{
    int32 code = 1;
    string msg = 2;
    repeated DoctorMpMenu menu = 3;
}
//设置医生端公众号功能栏目显示/隐藏
message UpdateDoctorMpMenuReqeust{
    int32 doctorId = 1;
    string menuCode = 2;
    int32 status = 3;
}

//设置医生端公众号功能栏目显示/隐藏
message UpdateDoctorMpMenuResponse{
    int32 code = 1;
    string msg = 2;
}

message GetIsUserAnAuditDoctorRequest {
    int32 doctorId = 1;
}

message GetIsUserAnAuditDoctorResponse {
    int32 code = 1;
    string info = 2;
    int32 status = 3;//审核状态 0-未审核通过；1-审核通过
}

//设置医生默认处方药房请求
message SetDefaultPharmacyRequest{
    int32 doctorId = 1;
    int32 pharmacyId = 2;
}

//
message SetDefaultPharmacyResponse{
    int32 code = 1;
    string msg = 2;
}

message DoctorTitle{
    int32 id = 1;       // 医生职称表ID
    string name = 2;    // 医生职称
}
message GetDoctorTitleListRequest{
}
message GetDoctorTitleListResponse{
    int32 code = 1;
    string msg = 2;
    repeated DoctorTitle DoctorTitle = 4;
}


//医生相关服务      // 对应 rpc 项目的 DoctorServiceImpl 类
service DoctorService {
    rpc findByUserId(DoctorRequest) returns (DoctorResponse); //根据用户ID获取医生
    rpc getDoctorInfo(DoctorRequest) returns (DoctorInfoResponse); //根据手机号获取医生详细信息
    rpc getPatientList(PatientListRequest) returns (PatientListResponse);    //获取"我的患者"列表
    rpc createPatient(CreatePatientRequest) returns (CreatePatientResponse); //添加患者
    rpc getUnionDoctorList(UnionDoctorListRequest) returns (UnionDoctorListResponse);   //获取关联医生信息
    rpc unionDoctor(UnionDoctorRequest) returns (Result);   //添加或取消医生关联
    rpc getPlatformDoctorList(PlatformDoctorListRequest) returns (PlatformDoctorListResponse);  //获取平台所有医生
    rpc getPatientOrderInfoList(PatientOrderInfoListRequest) returns (PatientOrderInfoListResponse);    //获取患者订单信息
    rpc DelPatientRequent(DelPatientRequest) returns (Result);    //删除我的患者
    rpc getPatient(GetPatientRequest) returns (GetPatientResponse); //获取患者信息
    rpc saveSign(SaveSignRequest) returns (ResultInt);   //保存医生签名
    rpc getDoctorSignList(GetDoctorSignListRequest) returns (GetDoctorSignListResponse);  //获取医生签名
    rpc updateScheduleStatus(UpdateScheduleStatusRequest) returns (Result);  //医生出诊状态开关
    rpc updateConsultFee(UpdateConsultFeeRequest) returns (Result);  //修改咨询费用
    rpc getConsultSettings(GetConsultSettingsRequest) returns (GetConsultSettingsResponse);//获取咨询功能设置
    rpc getConsultDoctorList(GetConsultDoctorListRequest) returns (GetConsultDoctorListResponse);//获取咨询医生列表
    rpc createMedicalRecords(CreateMedicalRecordsRequest) returns (Result);//创建病历
    rpc updateMedicalRecords(UpdateMedicalRecordsRequest) returns (Result);//修改病历
    rpc getMedicalRecordsDetail(GetMedicalRecordsDetailRequest) returns (GetMedicalRecordsDetailResponse);//获取病历详情

    //获取病历列表
    rpc getMedicalRecordsDetailList(GetMedicalRecordsDetailListRequest) returns (GetMedicalRecordsDetailListResponse);

    //获取订单图片列表
    rpc getOrderImageList(GetOrderImageListRequest) returns (GetOrderImageListResponse);

    //患者能否发起业务（远程会诊、名医主诊、双向转诊、咨询）
    rpc canInitiate(CanInitiateRequest) returns (Result);

    //获取医生信息
    rpc getDoctor(GetDoctorRequest) returns (GetDoctorResponse);

    //获取所有医生信息
    rpc getDoctorAll(GetDoctorAllRequest) returns (GetDoctorAllResponse);

    //获取远程会诊功能设置
    rpc getTreatmentSettings(GetTreatmentSettingsRequest) returns (GetTreatmentSettingsResponse);

    //修改远程会诊费用
    rpc updateTreatmentFee(UpdateTreatmentFeeRequest) returns (Result);

    //更新医生资料
    rpc updateDoctorInfo(UpdateDoctorInfoRequest) returns (Result);

    //获取医生资料
    rpc getDoctorInfoAudit(GetDoctorInfoAuditRequest) returns (GetDoctorInfoAuditResponse);

    //根据Id获取医生签名
    rpc getDoctorSign(GetDoctorSignRequest) returns (GetDoctorSignResponse);

    //获取我的关联医生列表
    rpc getFriendList(GetFriendListRequest) returns (GetFriendListResponse);

    //根据患者名字搜索患者   create bt daiyihua
    rpc searchPatient(SearchPatientRequest) returns (SearchPatientResponse);

    //根据患者ID得到患者信息   create bt daiyihua
    rpc getPatientById(GetPatientRequest) returns (GetPatientByIdResponse);

    //查询患者病历数量   create bt daiyihua
    rpc getPatientMedicalRecordCount(GetPatientMedicalRecordCountRequest) returns (GetPatientMedicalRecordCountResponse);

    //添加或修改病历模版   create bt daiyihua
    rpc addOrUpdateMedicalModule(AddOrUpdateMedicalModuleRequest) returns (Result);

    //得到病历模版详情   create bt daiyihua
    rpc getMedicalModuleDetail(GetMedicalModuleDetailRequest) returns (GetMedicalModuleDetailResponse);

    //医生得到某一类的所有模版   create bt daiyihua
    rpc getAllMedicalModule(GetAllMedicalModuleRequest) returns (GetAllMedicalModuleResponse);

    //获取病历详情   create bt daiyihua
    rpc getMedicalRecordsDetailById(GetMedicalRecordsDetailByIdRequest) returns (GetMedicalRecordsDetailByIdResponse);

    //获取患者病历列表   create bt daiyihua
    rpc getMedicalRecordsDetailListByPatientId(GetMedicalRecordsDetailListByPatientIdRequest) returns (GetMedicalRecordsDetailListByPatientIdResponse);

    //添加患者病历   create bt daiyihua
    rpc addMedicalRecord(AddMedicalRecordRequest) returns (Result);

    //获取关联医生所在医院列表
    rpc getFriendHospitalList(GetFriendHospitalListRequest) returns (GetFriendHospitalListResponse);

    //医生微信公众号统计信息   create by daiyihua
    rpc getDoctorStatistics(GetDoctorInfoAuditRequest) returns (GetDoctorStatisticsResponse);

    //得到最近一个月的交易记录  create by daiyihua
    rpc getLastMonthTransactionRecord(GetLastMonthTransactionRecordRequest) returns (GetLastMonthTransactionRecordResponse);

    // 按时间段获取交易记录
    rpc getTransactionRecord(GetTransactionRecordRequest) returns (GetTransactionRecordResponse);

    //得到快捷语list  create by daiyihua
    rpc getQuickLanguageList(GetQuickLanguageListRequest) returns (GetQuickLanguageListResponse);

    //待诊--（待诊、待诊中） 待诊--问诊记录（结束、退诊、取消） create by daiyihua
    rpc getConsultOrderListWithStatus(GetConsultOrderListRequest) returns (GetConsultOrderListResponse);

    //已预约--（待诊中）,已预约--预约加号订单记录（患者取消、就诊结束、医生取消） create by daiyihua
    rpc getAdditionalRegistrationListWithStatus(GetAdditionalRegistrationListRequest) returns (GetAdditionalRegistrationListResponse);

    //保存出诊排班    create by daiyihua
    rpc saveDoctorSchedule(SaveDoctorScheduleRequest) returns (Result);

    //得到出诊排班信息  create by daiyihua
    rpc getDoctorSchedule(GetDoctorScheduleRequest) returns (GetDoctorScheduleResponse);

    //得到最近一周的排班信息   create by daiyihua
    rpc getLatestWeekSchedule(GetDoctorScheduleRequest) returns (GetDoctorScheduleResponse);

    //得到最近三个月的排班信息(排班时间)  create by daiyihua
    rpc getLatestSchedule(GetLatestScheduleRequest) returns (GetLatestScheduleResponse);

    //设置停诊    create by daiyihua
    rpc setCancelSchedule(SetCancelScheduleRequest) returns (Result);

    //根据排班ID得到排班配置信息  create by daiyihua
    rpc getScheduleConfigByScheduleId(GetScheduleConfigByScheduleIdRequest) returns (GetScheduleConfigByScheduleIdResponse);

    //判断排班预约情况  create by daiyihua
    rpc checkScheduleStatus(CheckScheduleStatusRequest) returns (CheckScheduleStatusResponse);

    //医生绑定信息    create by daiyihua
    rpc doctorBindWx(DoctorBindWxRequest) returns (Result);

    //保存团队信息    create by daiyihua
    rpc saveTeam(SaveTeamRequest) returns (Result);

    //得到团队信息    create by daiyihua
    rpc getTeamInfo(GetTeamInfoRequest) returns (GetTeamInfoResponse);

    //搜索医生        create by daiyihua
    rpc searchDoctor(SearchDoctorRequest) returns (SearchDoctorResponse);

    //删除团队成员     create by daiyihua
    rpc delTeamDoctor(DelTeamDoctorRequest) returns (Result);

    //得到我的团队     create by daiyihua
    rpc getMyTeam(GetMyTeamRequest) returns (GetMyTeamResponse);

    //删除团队      create by daiyihua
    rpc delTeam(DelTeamRequest) returns (Result);

    //申请加入团队   create by daiyihua
    rpc applyToJoin(ApplyToJoinRequest)  returns (Result);

    //搜索团队      create by daiyihua
    rpc searchTeam(SearchTeamRequest) returns (SearchTeamResponse);

    //处理团队邀请
    rpc dealWithInvitation(DealWithInvitationRequest) returns (Result);

    //根据用户ID判断医院的状态		create by daiyihua
    rpc checkHospitalStatusByDoctorId(CheckHospitalStatusByDoctorIdRequest) returns (CheckHospitalStatusResponse);

    //修改患者，病历
    rpc updatePatient(UpdatePatientRequest) returns (Result);

    //得到医生的团队（自己创建的和已加入的）     create by daiyihua
    rpc getDoctorTeams(GetDoctorTeamsRequest) returns (GetDoctorTeamsResponse);

    //获取医生对应的his部门、医生编号信息       create by daiyihua
    rpc getDoctorHisCode(GetDoctorHisCodeRequest) returns (GetDoctorHisCodeResponse);

    //保存基本信息    create by daiyihua
    rpc saveBaseInfo(SaveBaseInfoRequest) returns (Result);

    //获取医生认证资料（新增的认证）    create by daiyihua
    rpc getDoctorInfoVerify(GetDoctorInfoAuditRequest) returns (GetDoctorInfoAuditResponse);

    //更新医生资料（新增的认证）    create by daiyihua
    rpc updateDoctorInfoVerify(UpdateDoctorInfoRequest) returns (Result);

    //根据hisCode得到对应的医生信息    create by daiyihua
    rpc getDoctorByHisCode(GetDoctorByHisCodeRequest) returns (GetDoctorByHisCodeResponse);

    //根据科室Id获取医生团队
    rpc getTeamListByDeptId(GetTeamListByDeptIdRequest) returns (GetTeamListByDeptIdResponse);

    //获取科室排班医生
    rpc getDeptScheduleDoctorList(GetDeptScheduleDoctorListRequest)returns (GetDeptScheduleDoctorListResponse);

    //获取平台所有医生(返回普通用户是否关注该医生)
    rpc generalGetPlatformDoctorList(GeneralGetPlatformDoctorListRequest) returns (GeneralGetPlatformDoctorListResponse);

    //获取关注的平台医生
    rpc generalGetAttentionDoctorList(GeneralGetAttentionDoctorListRequest) returns (GeneralGetAttentionDoctorListResponse);

    //获取展示的医生团队
    rpc getDisplayTeamList(GetDisplayTeamListRequest) returns (GetDisplayTeamListResponse);

    //判断患者是否关注医生
    rpc checkUserUnionDoctor(CheckUserUnionDoctorRequest) returns (ResultInt);

    // 通知医生信息审核通过
    rpc notifyDoctorVerificationPass (NotifyDoctorVerificationPassRequest) returns (Result);

    // 通知医生信息审核不通过
    rpc notifyDoctorVerificationNotPass (NotifyDoctorVerificationNotPassRequest) returns (Result);

    // 获取问诊医生列表
    rpc getConsultDoctorPagedList (GetConsultDoctorPageListRequest) returns (GetConsultDoctorPageListResponse);

    // 加入医生团队
    rpc scanQrCodeJoinTeamDoctor(ScanQrCodeJoinTeamDoctorRequest) returns (Result);

    // 获取推荐医生
    rpc getRecommendDoctorList(GetRecommendDoctorListRequest) returns(GetRecommendDoctorListResponse);

    //
    rpc getDoctorMpMenuList(GetDoctorMpMenuListReqeust) returns (GetDoctorMpMenuListResponse);

    //
    rpc updateDoctorMpMenu(UpdateDoctorMpMenuReqeust) returns (UpdateDoctorMpMenuResponse);

    //获取用户是否是审核通过的医生
    rpc getIsUserAnAuditDoctor(GetIsUserAnAuditDoctorRequest) returns (GetIsUserAnAuditDoctorResponse);
    //设置医生默认处方药房
    rpc setDefaultPharmacy(SetDefaultPharmacyRequest) returns (SetDefaultPharmacyResponse);

    // 得到医生职称列表
    rpc getDoctorTitleList(GetDoctorTitleListRequest) returns (GetDoctorTitleListResponse);
}
