syntax = "proto3";

import "base.proto";

package com.ywt.gapi.user;

option java_multiple_files = true;
option java_package = "com.ywt.gapi.doctor";
option java_outer_classname = "DoctorProto";



//医生详细信息
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;
    int32 identity = 30;
    bool negReception = 31;
    string negReceptionHint = 32;
    bool enableNextConsultChance = 33;// v3.2.0, 患者线下就诊后，是否3天内有1次免费咨询机会
    int32 offlineFee = 34;            // 线下就诊费用设置
    int32 prescriptionRightStatus = 35;
    string prescriptionRightPharmacyIds = 36;
    bool showMedEquipBtn = 37;// 是否显示开医疗设备检查按钮
    int32 hospitalId = 38;
    int32 consultFree =39;

}

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


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

//医生对于医院的code
message DoctorHisCode{
    int32 doctorId = 1;     //医生ID
    int32 hospitalId = 2;   //医院ID
    string deptCode = 3;     //his的部门编号
    string doctorCode = 4;   //his的医生编号
    string doctorName = 5;  //医生姓名
    string doctorJobNum = 6; // 用于处方回写插入医嘱 & 诊断的医生代码
}


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

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


//医生相关服务      // 对应 rpc 项目的 DoctorServiceImpl 类
// 对应 ywt-platform-internethospital-rpc 项目的 DoctorServiceProvider 类
service DoctorService {
    rpc getDoctorInfo(DoctorRequest) returns (DoctorInfoResponse); //根据手机号获取医生详细信息
    //获取医生对应的his部门、医生编号信息       create by daiyihua
    rpc getDoctorHisCode (GetDoctorHisCodeRequest) returns (GetDoctorHisCodeResponse);

}