// 开医疗设备检查的功能
syntax = "proto3";


package com.ywt.gapi.third.taihe;

option java_multiple_files = true;
option java_package = "com.ywt.gapi.third.taihe";
option java_outer_classname = "TaiheProto";



message PhyPayOrderRequest {
    string admId = 1;//就诊ID||预约类型
    string regNo = 2;//登记号 非必须
    int32 payAmount = 3;//金额 单位分
    string orderNo = 4;//订单号
    string extOrderNo =5;//腾讯交易流水号
    int32 hospitalId = 6;
}

message PhyPayOrderResponse {
    int32 code = 1;
    string info = 2;
}


//获取医生排班记录请求
message GetScheduleListRequest{
    string serviceDate = 1;		//出诊日期，格式：yyyy-MM-dd
    string doctorCode = 2;		//医生代码
    string deptCode = 3;			//科室代码
    int32 hospitalId = 4;
    string serviceEndDate = 5;
    string serviceCode = 6;
}

//排班记录
message Schedule{
    string scheduleItemCode	= 1; 		//门诊排班项记录标识
    string serviceDate = 2;				//门诊排班日期(YYYY-MM-DD)
    int32 datePeriod = 3;				//排班时段代码
    string datePeriodName = 4;			//排班时段名称
    string deptCode = 5;				//科室代码
    string deptName = 6;				//科室名称
    string doctorCode = 7;				//医生代码
    string doctorName = 8;				//医生名称
    string avatar = 9;					//医生图片链接
    string doctorTitle = 10; 			//医生职称
    string doctorSpec = 11; 			//医生专长
    int32 fee = 12;						//预约挂号总费用
    int32 regFee = 13;					//挂号费
    int32 checkupFee = 14;				//诊查费
    int32 serviceFee = 15;				//服务费
    int32 otherFee = 16;				//其它费
    string admitAddress = 17;			//就诊地址
    int32 scheduleStatus = 18;			//出诊状态（1-可预约 0-已满 2-停诊 3-其它(不可预约)）
    int32 availableTotalNum = 19;		//该时段可预约的总号源数
    int32 availableLeftNum = 20;		//该时段剩余号源数
    string serviceCode = 21;
    string serviceName = 22;
    string startTime = 23;
    string endTime = 24;
    string availableNumStr = 25;
    string doctorSessTypeCode = 26;		// 出诊级别code
    string doctorSessTypeName = 27;		// 出诊级别name
}

//获取医生排班记录响应
message GetScheduleListResponse{
    int32 code = 1;
    string msg = 2;
    int32 total = 3;
    repeated Schedule schedules = 4;
}


// 对应 central-control-service 项目的 provider/taihe.js 文件
service TaiheService{
    // 体检缴费 支付接口
    rpc phyPayOrder (PhyPayOrderRequest) returns (PhyPayOrderResponse);

    //获取排班记录
    rpc getScheduleList(GetScheduleListRequest) returns (GetScheduleListResponse);

}