syntax = "proto3";

import "base.proto";

package com.ywt.gapi.system;

//option java_generic_services = true;
option java_multiple_files = true;
option java_package = "com.ywt.gapi.system";
option java_outer_classname = "SystemProto";

message Dept{
	int32 deptId = 1;
	string deptName = 2;
	string deptCode = 3;
	string yiDaCode = 4;	//医达科室code
	int32 parentId = 5;
	int32 subHospitalId = 6;
}

//获取科室Request
message GetDeptRequest{
	int32 deptId = 1;
}
//获取科室Response
message GetDeptResponse{
	int32 code = 1;
	string msg = 2;
	Dept dept = 3;
}


message HospitalDept{
	int32 deptId = 1;
	string deptName = 2;
	repeated Dept deptList = 3;
	string deptCode = 4;
}

message HospitalDeptListRequest{
	int32 hospitalId = 1;
	int32 subHospitalId = 2;
	string name = 3;
}

message HospitalDeptListResponse{
	Result result = 1;
	repeated HospitalDept hospitalDeptList = 2;
}


// 对应 rpc 项目的 SystemServiceImpl 类
service SystemService{

	//获取科室
	rpc getDept(GetDeptRequest) returns (GetDeptResponse);

	rpc getHospitalDeptList(HospitalDeptListRequest) returns (HospitalDeptListResponse);	//获取医院所有科室列表

}
