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 PatientInfo{
	string patientId = 1;
	string patientName = 2;
	int32 sex = 3;
	string birthday = 4;
	string phoneNumber = 5;
	string mobile = 6;
	string address = 7;
	string idNo = 8;
	string insureCardNo = 9;
	string cardNo = 10;
	string patientType = 11;
}

//获取患者基本信息请求
message GetPatientInfoRequest{
	string patientCard = 1;     //诊疗卡号
	string patientId = 2;       //患者Id
	string idNo = 3;            //身份证号
	string patientName = 4;     //患者姓名
	int32 hospitalId = 5;
	string cardType = 6;	// 卡类型，默认1, 1-居民身份证,2-居民户口簿,3-护照,4-军官证,5-驾驶证,6-老年证,7-优抚证,8-残疾证,9-港澳台身份证,10-其他
}

//获取患者基本信息响应
message GetPatientInfoResponse{
	int32 code = 1;
	string msg = 2;
	PatientInfo patientInfo = 3;
}

//科室
message Dept{
	string deptCode = 1;		//科室代码
	string deptName = 2;		//科室名称
	string deptIntro = 3;		//科室简介
	string deptAddr = 4;		//科室地理位置
	string parentCode = 5;		//上级科室代码(没有填-1)
	string ageLimited = 6;		//挂号年龄限制
}

//获取科室列表请求
message GetDeptListRequest{
	int32 hospitalId = 1;
}

//获取科室列表响应
message GetDeptListResponse{
	int32 code = 1;
	string msg = 2;
	int32 count = 3;			//科室数量
	repeated Dept depts = 4;	//科室列表
}

//医生
message Doctor{
	string doctorCode = 1;			//医生代码
	string doctorName = 2;			//医生名称
	string doctorTitle = 3;			//医生职称
	string doctorSpeciality = 4;	//医生擅长
	string doctorIntro = 5;			//医生简介
	string doctorDept = 6;			//医生科室
	string doctorDeptCode = 7;		//医生科室代码 
	string doctorJobNum = 8;		//医生工号
}

//获取医生列表请求
message GetDoctorListRequest{
	string deptCode = 1;		//科室代码
	string doctorName = 2;		//医生名称
	string doctorCode = 3;		//医生代码
	int32 hospitalId = 4;
}

//获取医生列表响应
message GetDoctorListResponse{
	int32 code = 1;
	string msg = 2;
	int32 count = 3;				//医生数量
	repeated Doctor doctors = 4;	//医生列表
}

//病历
message MedicalRecord{
	//患者信息
	message PatInfo{
		string patName = 1;		//患者姓名
		int32 age = 2;			//年龄
		int32 sex = 3;			//性别
		string nation = 4;		//民族
		string address = 5;		//住址
		string phoneNumber = 6;	//电话号码
	}

	PatInfo patInfo = 1;			//患者信息
	string doctorName = 2;			//医生姓名
	string registrationDate = 3;	//门诊时间
	string medicalCardNo = 4;		//诊疗卡号
	string doctorAdvice = 5;		//门/急诊医嘱
	string deptName = 6;			//科室名称
	string checkInTime = 7;			//患者入院日期
	string chiefComplaint = 8;		//主诉
	string physicalExam = 9;		//体格检查
	string diagnose = 10;			//门诊诊断
	string suggestion = 11;			//意见
}

//获取患者病历请求
message GetMedicalRecordRequest{
	int32 registrationId = 1;	//就诊流水号
	string patientId = 2;
	int32 hospitalId = 3;
}

//获取患者病历响应
message GetMedicalRecordResponse{
	int32 code = 1;
	string msg = 2;
	MedicalRecord medicalRecord = 3;	//病历
}

//化验报告
message LaboratoryReport {
	string reportId = 1;			//检验报告单id
	string reportTitle = 2;			//检验报告单标题名称
	string auditDate = 3;			//检验报告单审核日期（YYYY-MM-DD HH:MM:SS）
	int32 status = 4;				//报告状态 0 未审核 1已审核
	string patientName = 5;			//患者姓名
	int32 patientAge = 6;			//患者年龄
	int32 patientSex = 7;			//性别
	string deptName = 8;			//申请科室名称
	string diagnose = 9;			//临床诊断
	string reportDoctor = 10;		//报告医生姓名
	string registrationId = 11;		//门诊就诊流水号
	string auditor = 12;			//审核医生姓名
}

//化验报告详情
message LaboratoryDetail {
	string itemId = 1;			//检验指标代码
	string itemName = 2;		//检验指标中文名称
	int32 orderNo = 3;			//排序号，不需要排序的话可设成全部为0
	string testResult = 4;		//检测结果
	string unit = 5;			//检测结果单位
	string itemRef = 6;			//参考值范围
	string testDate = 7;		//检查日期（YYYY-MM-DD HH:MM:SS）
	string testEngName = 8;		//检验指标英文名称
	string specimType = 9;		//检验标本
	int32 resultFlag = 10;		//异常标识
}

//获取化验报告列表请求
message GetLaboratoryListRequest{
	string registrationId = 1;		//就诊流水号
	string patientId = 2;			//
	int32 hospitalId = 3;
}

//获取化验报告列表响应
message GetLaboratoryListResponse{
	int32 code = 1;
	string msg = 2;
	repeated LaboratoryReport report = 3;	//化验报告
}

//获取化验报告详情请求
message GetLaboratoryDetailRequest{
	string inspectionId = 1;	//检验报告单id
	int32 hospitalId = 2;
}

//获取化验报告详情响应
message GetLaboratoryDetailResponse{
	int32 code = 1;
	string msg = 2;
	repeated LaboratoryDetail detail = 3;	//化验报告详情
	string title = 4;
	string doctor = 5;
	string time = 6;
	string specimenNo = 7;
}

//检查结果
message InspectionReport{
	string reportId	= 1;			//检查报告单id
	string reportTitle = 2;			//检查报告单标题名称
	string auditDate = 3;			//检查报告单审核日期（YYYY-MM-DD HH:MM:SS）
	string patientName = 4;			//患者姓名
	int32 patientAge = 5;			//患者年龄
	int32 patientSex = 6;			//性别
	string diagnose = 7;			//临床诊断
	string reportNum = 8;			//检查单号
	string reportType = 9;			//检查类型，CT/MR 
}

//检查结果详情
message InspectionDetail{
	string deptName = 1;			//申请科室名称
	string doctorName	= 2;		//报告医生姓名
	string inspectionPart = 3;		//检查部位
	string inspectionResult = 4;	//检查所见
	string diagnose = 5;			//诊断结果
	string inspectionDoctor = 6;	//检查医生（技师）姓名
	string inspectionDate = 7;		//检查日期（YYYY-MM-DD HH:MM:SS）
	string auditDate = 8;			//审核日期
	string auditor = 9;				//审核医生
	string submitDoctor = 10;		//开单医生
}

//获取检查报告列表请求
message GetInspectionListRequest{
	string registrationId = 1;		//门诊就诊流水号
	string patientId = 2;			//
	int32 hospitalId = 3;
}

//获取检查报告列表响应
message GetInspectionListResponse{
	int32 code = 1;
	string msg = 2;
	repeated InspectionReport inspectionReport = 3;
}

//获取检查报告请求
message GetInspectionDetailRequest{
	string reportId = 1;
	int32 hospitalId = 2;
}

//获取检查报告响应
message GetInspectionDetailResponse{
	int32 code = 1;
	string msg = 2;
 	InspectionDetail detail = 3;
}

//排班记录
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 GetScheduleListRequest{
	string serviceDate = 1;		//出诊日期，格式：yyyy-MM-dd
	string doctorCode = 2;		//医生代码
	string deptCode = 3;			//科室代码
	int32 hospitalId = 4;
	string serviceEndDate = 5;
	string serviceCode = 6;
}

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


//医生号源分时信息
message ScheduleTimeInfo{
	string scheduleItemCode = 1;		//门诊排班项记录标识
	string startTime = 2;				//班别开始时间，格式：HH:MI
	string endTime = 3;					//班别结束时间，格式：HH:MI
	int32 availableTotalNum = 4;		//该时段可预约的总号源数
	int32 availableLeftNum = 5;		//该时段剩余号源数
	string availableFlag = 6;			//可否预约标识（Y:可预约，N:不可预约）
	string availableNumStr = 7;			// 可预约号源序号列表
}

//获取医生号源分时信息请求
message GetScheduleTimeInfoRequest{
	string deptCode = 1;				//科室代码
	string doctorCode = 2;				//医生代码
	string serviceDate = 3;				//出诊日期
	int32 datePeriod = 4;				//出诊时段(2-上午 3-下午 4-晚上)
	int32 hospitalId = 5;
}

//获取医生号源分时信息响应
message GetScheduleTimeInfoResponse{
	int32 code = 1;
	string msg = 2;
	repeated ScheduleTimeInfo scheduleTimeInfos = 3;
}

//排队信息
message QueueInfo {
	string patientName = 1;		//病人姓名
	string deptName = 2;		//就诊科室
	string doctorName = 3;		//就诊医生
	int32 waitingNumber = 4;	//排队号
	string deptCode = 5;			//就诊科室代码
}

//获取排队信息请求
message GetQueueInfoRequest {
	string registrationId = 1;	//就诊流水号
	int32 hospitalId = 2;
}

//获取排队信息响应
message GetQueueInfoResponse {
	int32 code = 1;
	string msg = 2;
	QueueInfo queueInfo = 3;
}

//在线取号请求
message TakeRequest{
	string orderCode = 1;		//预约单号
	string patientId = 2;		//病人Id
	int32 hospitalId = 3;
}

//在线取号响应
message TakeResponse{
	int32 code = 1;
	string msg = 2;
	string registrationId = 3;	//就诊流水号
}

//取消预约请求
message CancelRequest{
	string orderCode = 1;	//预约单号
	string patId = 2;
	string cardNo = 3;
	string clinicCode = 4;
	int32 hospitalId = 5;
	string transactionId = 6;// HIS 交易流水号，供 HIS 对账用
	string payMode = 7;		// 支付方式："WECHATPAY","ALIPAY"
}

//取消预约响应
message CancelResponse{
	int32 code = 1;
	string msg = 2;
}

//预约记录
message Registration{
	string orderCode = 1;			//预约单号
	string transactionId = 2;		//交易流水号
	string registrationId = 3;		//就诊流水号
	string registrationDate = 4;	//挂号日期(yyyy-MM-dd)
	int32 status = 5;				//状态（1-正常，2-已退号，3-已过号）
	string patientName = 6;			//患者姓名
	string patientId = 7;			//患者Id
	string admitDate  = 8;			//就诊日期(yyyy-MM-dd)
	string deptCode = 9;			//科室代码
	string deptName = 10;			//科室名称
	string doctorCode = 11;			//医生代码
	string doctorName = 12;			//医生名称
	string doctorTitle = 13;		//医生职称
	int32 regFee = 14;				//总费用(单位:分)
	int32 seqCode = 15;				//就诊序号
	string admitAddress = 16;		//候诊地点
	string admitRange = 17;			//候诊时间
	string returnFlag = 18;			//可退号标志(Y/N)
	int32 datePeriod = 19;			//预约时段
	string startTime = 20;			//开始时间
	string endTime = 21;			//结束时间
}

//查询挂号记录列表请求
message GetRegistrationListRequest{
	string cardNo = 1;		//卡号
	string patientId = 2;	//病人Id
	string startDate = 3;	//开始日期（yyyy-MM-dd）
	string endDate = 4;		//结束日期（yyyy-MM-dd）
	int32 hospitalId = 5;
}

//查询挂号记录列表响应
message GetRegistrationListResponse{
	int32 code = 1;
	string msg = 2;
	repeated Registration registration = 3;
}

//查询挂号记录详情请求
message GetRegistrationDetailRequest{
	string orderCode = 1;		//预约单号
	int32 hospitalId = 2;
}

//查询挂号记录详情响应
message GetRegistrationDetailResponse{
	int32 code = 1;
	string msg = 2;
	Registration registration = 3;
}

//预约挂号请求
message RegisterRequest{
	string scheduleItemCode = 1;//门诊排班项代码
	string patientId = 2;		//病人ID(CardNo为空时必填)
	string cardNo = 3;			//卡号(PatientID为空时，必填）
	string startTime = 7;		//开始时间(09:00)
	string endTime = 8;			//结束时间(09:30)
	int32 hospitalId = 9;
}

//预约挂号响应
message RegisterResponse{
	int32 code = 1;
	string msg = 2;
	string seqCode = 3;			//挂号序号
	int32 regFee = 4;			//挂号费（单位：分）
	string admitRange = 5;		//就诊时间段
	string admitAddress = 6;	//就诊地点
	string orderContent = 7;	//预约单内容（内容说明：卡号^病人Rowid^病人姓名^性别^挂号序号(班别)^挂号序号^科室名称^医生姓名^预约日期^时间^候诊日期^^）
	// string transactionId = 8;	//交易流水号
	string orderCode = 8;		//预约单号
}

//支付（挂号费大于0情况）请求
message PayRequest{
	string orderCode = 1;		//预约单号
	string transactionId = 2;	//交易流水号（微信支付）
	string patientId = 3;		//病人ID（CardNo为空时必填）
	string cardNo = 4;			//卡号（PatID为空时，必填）
	string payMode = 5;			//支付方式（wxPay：微信支付）
	int32 payAmount = 6;		//支付金额（单位：分，自费部分金额）
	string payTime = 7;			//支付时间（格式：yyyy-MM-dd HH:mm:ss）
	int32 hospitalId = 8;
}

//支付（挂号费大于0情况）响应
message PayResponse{
	int32 code = 1;
	string msg = 2;
	string seqCode = 3;
	int32 regFee = 4;
	string admitRange = 5;
	string admitAddress = 6;
	string transactionId = 7;
	string payOrderId = 8;
	string admNo = 9;
}

//挂号无须支付 请求
message PayFreeRequest{
	string orderCode = 1;	//预约单号
	string patientId = 2;	//病人Id
	int32 hospitalId = 3;
}

//挂号无须支付 响应
message PayFreeResponse{
	int32 code = 1;
	string msg = 2;
}

//缴费记录明细
message PaymentDetail{
	string itemName = 1;			//项目名称
	string itemType	= 2;			//项目类别/费别（ 如：药费、检查费、材料费）
	string itemUnit = 3;			//单位
	int32 itemPrice = 4;			//单价（单位：分）
	string itemSpec = 5;			//规格
	int32 itemNumber = 6;			//数量
	int32 itemTotalFee = 7;			//项目价格合计（单位：分， 单价*数量）
	string itemCode = 8;
}

//查询门诊缴费记录明细请求
message GetPaymentDetailRequest{
	string patCardNo = 1;		//诊疗卡号
	string hisOrdNum = 2;		//医院订单号
	string type = 3;			//类型：1-门诊待缴费记录明细 2-门诊已缴费记录明细 3-门诊已退费记录明细
	int32 hospitalId = 4;
	string clinicCode = 5;		//就诊号 可填基中一个 clinicCode invoiceNo
	string invoiceNo = 6;		//发票号
	string hisPatientId = 7;
}

//查询门诊缴费记录明细响应
message GetPaymentDetailResponse{
	int32 code = 1;
	string msg = 2;
	int32 count = 3;
	repeated PaymentDetail detail = 4;
}

// 缴费项目明细（东华）
message PayDetailItem {
	string itemCode = 1;
	string itemName = 2;
	string itemType = 3;
	int32 itemPrice = 4;
	string itemNumber = 5;
	int32 itemTotalFee = 6;
	string itemUnit = 7;
	string itemSpec = 8;
}

//缴费项目
message PaymentItem{
	string hisOrdNum = 1;	//医院订单号，可以是就诊登记号等，用来唯一标识一笔缴费
	string payName = 2;		//缴费项名称
	string deptName = 3;	//接诊科室名称
	string doctorName = 4;	//接诊医生姓名
	int32 totalFee = 5;		//缴费总额（单位：分）
	int32 medInsFee = 6;	//医保部分金额（单位：分）
	int32 selfFee = 7;		//自费部分金额（单位：分）
	string payMode = 8;		//支付方式
	string prescriptionDate = 9;	//处方日期，格式：yyyy-MM-dd HH:mm:ss
	string patientName = 10;
	int32 patientAge = 11;
	int32 patientSex = 12;
	string clinicCode = 13;
	string orderInsuFlag = 14;
	string orderInsType = 15;
	repeated PayDetailItem itemList = 16;
	string doctorCode = 17;
	string invDate = 18;
	string invTime = 19;
	string invoiceNo = 20;
	string invoiceType = 21; //发票类型
	string invoiceTypeName = 22; //发票类型名称
	int32 orderId = 23; 
}

//查询门诊缴费记录请求
message GetOutpatientListRequest{
	string patientId = 1;
	int32 type = 2;			//类型：1-门诊待缴费记录 2-门诊已缴费记录 3-门诊已退费记录
	int32 hospitalId = 3;
	string clinicCode = 4; //就诊号
	string startDate = 5;  //开始查询时间YYYY-MM-DD  如果查询范围用病人ID和时间范围
	string endDate = 6; //结束查询时间YYYY-MM-DD
}

//查询门诊缴费记录响应
message GetOutpatientListResponse{
	int32 code = 1;
	string msg = 2;
	repeated PaymentItem payment = 3;	//缴费项目列表
}

//医保试算请求
message CalInsuranceRequest{
	string patientId = 1;
	string prescriptionDate = 2;
	string hisOrdNum = 3;
	string insureKey = 4;
	string insureBizType = 5;
	string insureTreatmentType = 6;
	int32 hospitalId = 7;
}

//医保试算响应
message CalInsuranceResponse{
	int32 code = 1;
	string msg = 2;
	string hisOrdNum = 3;		//医院订单号
	int32 total = 4;			//总金额
	int32 reimbursement = 5;	//医保报销
	int32 individual = 6;		//自费金额
}

//门诊缴费订单支付（医保结算）请求
message PayOrderRequest{
	string patientId = 1;
	string hisOrdNum = 2;
	string psOrdNum = 3;
	string payMode = 4;
	int32 totalFee = 5;
	int32 medInsFee = 6;
	int32 payAmt = 7;
	string agtOrdNum = 8;
	string payTime = 9;
	int32 insurePay = 10;
	string insureKey = 11;
	string insureBizType = 12;
	string insureTreatmentType = 13;
	string insureFeeType = 14;
	string hisUserID = 15;
	int32 hospitalId = 16;
	string invoiceNoStr = 17;
}

//门诊缴费订单支付（医保结算）响应
message PayOrderResponse{
	int32 code = 1;
	string msg = 2;
}

//
message GetAddInfoRequest{
	string patientId = 1;
	string cardNo = 2;
	string patientName = 3;
	string idNo = 4;
	int32 hospitalId = 5;
}

//
message GetAddInfoResponse{
	int32 code = 1;
	string msg = 2;
	int32 allow = 3;
	string createTime = 4;
	int32 days = 5;
}

// 获取治疗指引请求（东华）
message GetTreatmentGuideV2Request {
	string invoiceNo = 1; //东华 HIS 使用发票 Id 查询指引
	int32 hospitalId = 2;
}

// 指引处方项
message TreamentGuidePreItem {
	string itemName = 1;
	string itemNumber = 2;
	string itemPrice = 3;
	string itemUnit = 4;
	string itemTotalFee = 5;
	string itemAddress = 6;
}

// 指引项
message TreamentGuideItem {
	string preName = 1;
	string deptName = 2;
	string address = 3;
	string windowName = 4;
	string remark = 5;
	repeated TreamentGuidePreItem preItem = 6;
}

// 获取治疗指引响应（东华）
message GetTreatmentGuideV2Response {
	int32 code = 1;
	string msg = 2;
	string patientId = 3;
	string patientName = 4;
	string sex = 5;
	string age = 6;
	string payTime = 7;
	string patType = 8;
	string payAmt = 9;
	string diagnosis = 10;
	string doctorName = 11;
	repeated TreamentGuideItem itemList = 12;
}

//获取治疗指引请求
message GetTreatmentGuideRequest{
	string hisOrderNo = 1;	//医院订单号（收费Id）
	int32 hospitalId = 2;
}

//获取治疗指引响应
message GetTreatmentGuideResponse{
	//药品项
	message DrugItem {
		string name = 1;	//药品名称，如：山芋肉(甲类)
		string desc = 2;	//药品说明，如：10g
	}

	//药品申请单
	message DrugApply {
		string doctorName = 1;
		string statusName = 2;
		string title = 3;
		string patientName = 4;
		int32 serialNo = 5;
		string applyDate = 6;
		string addr = 7;
		repeated DrugItem drugItem = 8;
	}

	//检验检查申请单
	message InspectionApply{
		string doctorName = 1;
		string statusName = 2;
		string itemName = 3;
		string title = 4;
		string patientName = 5;
		int32 serialNo = 6;
		string applyDate = 7;
		string desc = 8;
		string guide = 9;
	}

	int32 code = 1;
	string msg = 2;
	DrugApply drugApply = 3;						//药品申请单
	repeated InspectionApply inspectionApply = 4;	//检查申请单
	repeated InspectionApply laboratoryApply = 5;	//检验申请单
}

//药品信息
message Drug {
    // string drugCode = 1;                //药品编码
    // string drugCode3th = 2;             //第三方公司药品编码
    // double oneDosage = 3;                //单次服用剂量
    // string oneDosageUnit = 4;           //单次服用剂量单位
    // int32 amount = 5;                   //整包装数量
    // string units = 6;                   //整包装单位
    // string frequencyCode = 7;           //频次编码
    // string frequency = 8;               //频次说明
    // int32 frequencyQty = 9;             //频次数量
    // string usageCode = 10;              //用法编码
    // string usage = 11;                  //用法说明
	// string tip = 12;					//药品提示
    // int32 price = 13;                   //价格
    // string drugName = 14;               //药品名称
    // string drugSpec = 15;               //药品包装规格
    // string pinYinCode = 16;             //拼音编码
    // int32 drugId = 17;                  //唯一标识
    // string productName = 18;            //商品名
    // string producer = 19;               //厂家
    // int32 newDrug = 20;                 //是否是新药，0-不是，1-是
    // int32 pharmacy = 21;                //药品目录药房（1-广三生殖药房，2-太和医院药房）
	// int32 drugType = 22;				//药品类型（1-中草药 2-中成药 3-西药）
	// string smallestUnit = 23;			//最小单位（剂量单位）
	// int32 dosageForm = 24;				//剂型
	// int32 drugStatus = 25;				//药品状态(1-正常 2-停用)

	string drugCode3th = 1;             //第三方公司药品编码
    double oneDosage = 2;                //单次服用剂量
    string oneDosageUnit = 3;           //单次服用剂量单位
    int32 amount = 4;                   //整包装数量
	string units = 5;                   //整包装单位
	string tip = 6;					//药品提示
    int32 price = 7;                   //价格
    string drugName = 8;               //药品名称
    string drugSpec = 9;               //药品包装规格
	string pinYinCode = 10;             //拼音编码
    string productName = 11;            //商品名
	int32 drugStatus = 12;				//药品状态(1-正常 2-停用)
	int32 drugType = 13;				//药品类型（1-中草药 2-中成药 3-西药）
	string smallestUnit = 14;			//最小单位（剂量单位）	
}

//获取太和药品目录信息请求
message GetDrugListRequest{
	int32 hospitalId = 1;
}

//获取太和药品目录信息响应
message GetDrugListResponse{
	int32 code = 1;
	string msg = 2;
	repeated Drug drugs = 3;
}

//处方信息
message PrescriptionInfo {
    //处方药品信息
    message PrescriptionDrugInfo {
        string preBizNo = 1;
		int32 preId = 2;
		string drugCode = 3;
		string drugName = 4;
		string drugSpec = 5;
		double oneDosage = 6;
		string oneDosageUnit = 7;
		int32 amount = 8;
		string units = 9;
		string frequencyCode = 10;
		string frequency = 11;
		int32 frequencyQty = 12;
		string usageCode = 13;
		string usageDetail = 14;
		int32 price = 15;
		int32 total = 16;
		string remark = 17;
		int32 course = 18;
		int32 drugId = 19;
		int32 quantity = 20;
		int32 groups = 21;
		int32 orderIndex = 22;
		bool combination = 23;
		string producer = 24;
    }
	string preBizNo = 1;
	string doctorName = 2;
	string doctorCode = 3;
	string patientName = 4;
	string patientAge = 5;
	string patientSex = 6;
	string patientNo = 7;
	string diagnose = 8;
	string dept = 9;
	int64 createOn = 10;
	int32 status = 11;
	int32 totalPrice = 12;
	string patientMobile = 13;
	string allergicHistory = 14;
	string description = 15;
	int32 doctorId = 16;
	int32 hospitalId = 17;
	int32 deliveryMethod = 18;
	string address = 19;
	repeated PrescriptionDrugInfo drugs = 20;
	string createOnStr = 21;
}

message PushPresInfoRequest {
	PrescriptionInfo info = 1;
	int32 hospitalId = 2;
}

message BaseResult {
	int32 code = 1;
	string msg = 2;
}

message GetPresInfoRequest {
	string preBizNo = 1;
	int32 hospitalId = 2;
}

message GetPresInfoResponse {
	int32 code = 1;
	string msg = 2;
	PrescriptionInfo info = 3;
}

//根据就诊流水号获取患者基本信息请求
message GetPatInfoByHisClinicCodeRequest {
	int32 hisClinicCode = 1;    //就诊流水号
	int32 hospitalId = 2;
}

//根据就诊流水号获取患者基本信息请求
message GetPatInfoByHisClinicCodeResponse{
    int32 code = 1;
    string msg = 2;
    string name = 3;
	string idNo = 4;
	string mobile = 6;              //手机号
}

// 锁号请求
message LockOrderRequest {
	string scheduleItemCode = 1;
	string cardNo = 2;
	string patID = 3;
	string startTime = 4;
	string endTime = 5;
	string lockQueueNo = 6;
	string availableNumStr = 7;
	int32 hospitalId = 8;
}

// 锁号响应
message LockOrderResponse {
	int32 code = 1;
	string msg = 2;
	string seqCode = 3; 
	string regFee = 4; 
	string admitRange = 5; 
	string admitAddress = 6; 
	string orderContent = 7; 
	string orderCode = 8; 
}

// 获取就诊记录列表请求
message GetClinicListRequest {
	string cardNo = 1;
	string patID = 2;
	string startDate = 3;
	string endDate = 4;
	int32 hospitalId = 5;
}

message ClinicItem {
	string registrationID = 1;
	string admitDate = 2;
	string admTime = 3;
	string registrationDate = 4;
	string admDept = 5;
	string admDoctor = 6;
	string admAmt = 7;
	string billFlag = 8;
}

// 获取就诊记录列表响应
message GetClinicListResponse {
	int32 code = 1;
	string msg = 2;
	repeated ClinicItem clinicList = 3;
}

// 获取医生当前排班信息请求
message GetDoctorCurrentScheduleRequest {
	string serviceDate = 1;
	string doctorCode = 2;
	string deptCode = 3;
	int32 period = 4;// 排班时段：2-上午，3-下午，4-晚上
	int32 hospitalId = 5;
}

// 获取医生当前排班信息响应
message GetDoctorCurrentScheduleResponse {
	int32 code = 1;
	string msg = 2;
	string scheduleItemCode = 3;
	string startTime = 4;
	string endTime = 5;
	string availableNumStr = 6;
}

message PrePayConfirmRequest {
	string cardNo = 1;// 卡号
	string patientId = 2;// HIS 患者 ID
	string startDate = 3;//
	string endDate = 4;
	string clinicCode = 5;// 就诊流水号
	string hisOrdNum = 6;// HIS 订单号
	int32 orderSum = 7;// 订单金额，单位分
	string hisUserID = 8;
	int32 hospitalId = 9;
	string payMode = 10;
}

message PrePayConfirm {
	string invoiceNo = 1;// 票据唯一流水号
	int32 invoiceAmt = 2;// 票据金额，单位分
	string insuFlag = 3;// 调用医保标志（Y调用,N不调用）
	string outInsuInfo = 4;// 第三方医保分解上传明细
	string hisInsuInfo = 5;// HIS动态库医保分解参数(& strInvprtDr & UserId & ExpStr)
	int32 invoiceInsuAmt = 6;// 票据金额，单位分
	int32 invoiceSelfAmt = 7;// 票据金额，单位分
	string insuOutTradeNo = 8;// 第三方医保分解上传明细
}

message PrePayConfirmResponse {
	int32 code = 1;
	string msg = 2;
	repeated PrePayConfirm list = 3;
}

message GetDrugInventoryRequest {
	string drugCode = 1;
	int32 hospitalId = 2;
}

message GetDrugInventoryResponse {
	int32 code = 1;
	string msg = 2;
	int32 inventoryNum = 3;
}

// 诊断
message Diagnose {
	string id = 1;
	string code = 2;
	string desc = 3;
	string type = 4;
	string status = 5;
	string docotrCode = 6;
	string category = 7;
	string date = 8;
	string time = 9;
	string remark = 10;
}

message AddDiagnosisRequest {
	string patientId = 1;
	string clinicCode = 2;
	string deptCode = 3;
	string doctorCode = 4;
	repeated Diagnose diagnoseList = 5;
	int32 hospitalId = 6;
}

message AddDiagnosisResponse {
	int32 code = 1;
	string msg = 2;
}

// 医嘱
message HisOEORI {
	string orderId = 1;
	string orderNo = 2;
	string mastCode = 3;
	string priorityCode = 4;
	string froms = 5;
	string qty = 6;
	string unitCode = 7;
	string freqCode = 8;
	string instrCode = 9;
	string durationCode = 10;
	string orderQty = 11;
	string remark = 12;
	string enterDoctorCode = 13;
	string enterDate = 14;
	string enterTime = 15;
	string enterDeptCode = 16;
	string execDeptCode = 17;
	string execDate = 18;
	string execTime = 19;
	string stopDate = 20;
	string stopTime = 21;
	string stopDoctorCode = 22;
	string qtyPackUOM = 23;
	string drugName = 24;
}

message AddOEORIInfoRequest {
	string patientId = 1;
	string clinicCode = 2;
	string doctorCode = 3;
	repeated HisOEORI hisOEORIList = 4;
	int32 hospitalId = 5;
}

// 插入医嘱返回项
message OEORIRespItem {
	string hisOrderId = 1;
	string orderId = 2;
	string prescNo = 3;
}

message AddOEORIInfoResponse {
	int32 code = 1;
	string msg = 2;
	repeated OEORIRespItem list = 3;
}

message HisOEORIListItem {
	string hisOrderId = 1;
}

message CancelOEORIInfoRequest {
	string patientId = 1;
	string orderId = 2;
	string doctorCode = 3;
	repeated HisOEORIListItem hisOEORIList = 4;
	int32 hospitalId = 5;
}

message CancelOEORIInfoResponse {
	int32 code = 1;
	string msg = 2;
}

message GetInPatInfoRequest {
	string patientCard = 1;
	string cardType = 2;
	string patientId = 3;
	int32 hospitalId = 4;
}

message GetInPatInfoResponse {
	int32 code = 1;
	string msg = 2;
	string patientId = 3;
	string patientName = 4;
	string sex = 5;
	string dOB = 6;
	string medical = 7;
	string credType = 8;
	string credNo = 9;
	string admNo = 10;
	string admDate = 11;
	string admDept = 12;
	string billNo = 13;
	string admReason = 14;
	string nationalCode = 15;
	int32 totalAmount = 16;
	int32 depositAmount = 17;
	int32 depositBalance = 18;
}

message GetDayFeeListRequest {
	string patientCard = 1;
	string cardType = 2;
	string patientId = 3;
	string admNo = 4;
	string billDate = 5;
	int32 hospitalId = 6;
}

message DayFeeListItem {
	string serialNo = 1;
	string category = 2;
	string itemName = 3;
	string quantity = 4;
	string unit = 5;
	int32 price = 6;
	int32 totalAmt = 7;
	string billDate = 8;
	string billTime = 9;
	string insuClass = 10;
	string itemChargeBasis = 11;
}

message GetDayFeeListResponse {
	int32 code = 1;
	string msg = 2;
	string patientId = 3;
	string patientName = 4;
	string sex = 5;
	string age = 6;
	string admReason = 7;
	string deptName = 8;
	string ward = 9;
	string bedNo = 10;
	string patFee = 11;
	string deposit = 12;
	string visitStatus = 13;
	string printFlag = 14;
	string printTimes = 15;
	repeated DayFeeListItem list = 16;
}

message PayCashRequest {
	string patientCard = 1;
	string cardType = 2;
	string patientId = 3;
	string admNo = 4;
	string payAmt = 5;
	string payTime = 6;
	string agtOrdNum = 7;
	string psOrdNum = 8;
	int32 hospitalId = 9;
	string payMode = 10; // 支付方式，微信-WECHATPAY;支付宝-ALIPAY。不传默认 WECHATPAY
}

message PayCashResponse {
	int32 code = 1;
	string msg = 2;
	string serialNo = 3;
	int32 depositAmount = 4;
	int32 depositBalance = 5;
}

message GetCashListRequest {
	string patientCard = 1;
	string cardType = 2;
	string patientId = 3;
	string admNo = 4;
	string secrityNo = 5;
	int32 hospitalId = 6;
}

message CashListItem {
	string payDate = 1;
	string payTime = 2;
	int32 payAmout = 3;
	string payMode = 4;
	string payFlag = 5;
	string receiptNo = 6;
	string payUserCode = 7;
	string payUserName = 8;
	string payDept = 9;
	string payWard = 10;
	string remark = 11;
}

message GetCashListResponse {
	int32 code = 1;
	string msg = 2;
	repeated CashListItem list = 3;
}


//在线自助报到请求
message GetCheckInRequest{ 
	string cardType = 1;//卡类型 1：条形码 2：卡号
	string cardNo = 2;//卡号
	string areaCode = 3; //报到区域代码，由东华URL里获取
	int32 hospitalId = 4;
}



message CheckInItem {
	string patName = 1;//患者姓名
	string admLoc = 2;//就诊科室
	string resultText = 3; //报到信息
	string queueNo = 4;//排队号
	string admStatus = 5;//报道状态
	string rangTime = 6;//就诊时段
	string admArriveDate = 7;//报道时间
	string admWaitNumber = 8;//等候当前未就诊人数
	string admBoroughDesc = 9;//就诊区
	string admWaitTrueNumber = 10;  //当前等候人数
	string admDoc = 11; // 医生姓名
} 

//在线自助报到响应
message GetCheckInResponse{
	int32 code = 1;
	string info = 2; 
	repeated CheckInItem list = 3;
}

message CreatePatInfoRequest {
	string phoneNo = 1;//手机号
	string idNo = 2;//身份证号
	string patientName = 3;//患者姓名
	string city = 4;//在线建卡市区
	string address = 5;//详细地址
	string isInsu = 6;//建卡患者是否是医保  1 ：广州医保 空值：非医保
	int32 hospitalId = 7;
}

message CreatePatInfoResponse {
	int32 code = 1;
	string info = 2;
	string patientId = 3;// 病人ID
	string regNo = 4;// 病人登记号
	string patientCard = 5;// 卡号
	string cardType = 6;// 卡类型
}

message OneKeyRegisterRequest {
	string doctorCode = 1;
	string deptCode = 2;
	string patientId = 3;
	int32 hospitalId = 4;
}

message OneKeyRegisterResponse {
	int32 code = 1;
	string info = 2;
	string clinicCode = 3;
}

message GetDiagnoseRecordRequest {
	string clinicCode = 1;
	int32 hospitalId = 2;
}

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


message PhyPayListRequest {
	string regNo = 1;//登记号
	int32 hospitalId = 2;
}

message PhyPayListItem {
	string admId = 1;//就诊ID||预约类型 
	int32 amt = 2;//单金额 单位分
	int32 totalFee = 3;//总金额 单位分
	string checkDate = 4;//体检日期
	string setsDesc = 5;//套餐描述
}

message PhyPayListResponse {
	int32 code = 1;
	string info = 2;
	string patientName = 3;//姓名
	string sex = 4; //性别
	repeated PhyPayListItem list = 5;
}


message PhyPayDetailRequest {
	string admId = 1;//就诊ID||预约类型
	int32 hospitalId = 2;
}

message PhyPayDetailItem {
	string arcmiDesc = 1;//项目或套餐描述
	int32 amt = 2;//单金额  单位分
}

message PhyPayDetailResponse {
	int32 code = 1;
	string info = 2; 
	repeated PhyPayDetailItem list = 3;
}

 
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 GetEInvoiceRequest {
	string invoiceNo = 1;//发票号	
	int32 hospitalId = 2;
	string invoiceType = 3;//发票类型
}

message GetEInvoiceResponse {
	int32 code = 1;
	string info = 2;  
	string invoiceInfo =3; //发票内容，URL或BASE64
}

message GetInPayListRequest {
	string hisPatientId = 1;
	string startDate = 2; // 开始日期，格式 yyyy-MM-dd
	string endDate = 3; // 结束日期，格式 yyyy-MM-dd
	int32 hospitalId = 4;
}

message GetInPayListResponse {
	int32 code = 1;
	string info = 2;
	repeated InPayInfo inPayInfos = 3;
}

message InPayInfo {
	string startDate = 1;
	string endDate = 2;
	string deptName = 3;
	int32 totalFee = 4; // 金额，单位：分
	string chargeFlag = 5;
	string invoiceNo = 6; // 发票号
	string invoiceType = 7; // 发票类型代号
	string invoiceTypeName = 8; // 发票类型名称
}

message GetInsuOPDividePreRequest {
	string invoiceNo = 1;//发票号	
	int32 hospitalId = 2;
	string curIns = 3;//费别
	string idNo = 4;//身份证号
	string medType = 5;//病种类型：普通门诊传11，门诊慢特病传14
	string psnMedType = 6;//医疗待遇类别,先固定传110
	string medTypeName = 7;//医疗待遇类别名称，先固定传普通门诊
	string mdtrtCertType = 8;//病种类型 默认01
	string psnCertType = 9;//医疗待遇类别 默认02
	string clinicCode = 10;//就诊号
	string orderInsType = 11; // 订单医保类型，由 HIS 从待缴费列表返回
}

message GetInsuOPDividePreResponse {
	int32 code = 1;
	string info = 2;  
	string psnNo =3; //个人编号
	string medType =4; //医疗类别代码，普通门诊11，门慢门特是14
	string mdtrtId =5; //医保登记流水号
	string insuType =6; //险种类别代码
	string insuAdmDr =7; //医保登记RowiD 
	string recerSysCode =8;//接收方系统代码
	string fixmedinsCode =9;//定点医药机构编号
	string fixmedinsName =10;//定点医药机构名称
	string infver=11;//接口版本号
	string mdtrtareaAdmvs=12;//就医地医保区划
	string insuplcAdmdvs=13;//参保地医保区划
	string psnSetlway=14;//个人结算方式
	string acctUsedFlag=15;//个人账户使用标志
	string chrgBchNo=16;//收费批次号
	int32 medfeeSumamt=17;//医疗费总额,单位为分
	string opterType=18;//经办人类别1-经办人；2-自助终端；3-移动终端
	string opter=19; //经办人
	string opterName=20;//经办人姓名
	string insuAdmInfoDr = 21; // 医保登记 RowId，市直医保添加
	string insuTypeCode = 22; // 市直医保添加
	string sessionId = 23; // 会话 id，市直医保添加
	string currentSessionId = 24; // 市值医保添加
	string insuDividePreDr = 25; // 省直医保
	string insuAdmInfoJson = 26; // HIS GetInsuAdmInfoXS 方法返回响应
}

message GetInsuAdmInfoRequest {
	string clinicCode = 1;//就诊号
	int32 hospitalId = 2;
	string invoiceNo = 3;//发票号  
}

message GetInsuAdmInfoResponse {
	int32 code = 1;
	string info = 2;  
	string psnNo =3; //个人编号
	string medType =4; //医疗类别代码，普通门诊11，门慢门特是14
	string mdtrtId =5; //医保登记流水号
	string insuType =6; //险种类别代码
	string insuAdmDr =7; //医保登记RowiD 
	string recerSysCode =8;//接收方系统代码
	string fixmedinsCode =9;//定点医药机构编号
	string fixmedinsName =10;//定点医药机构名称
	string infver=11;//接口版本号
	string mdtrtareaAdmvs=12;//就医地医保区划
	string insuplcAdmdvs=13;//参保地医保区划
	string psnSetlway=14;//个人结算方式
	string acctUsedFlag=15;//个人账户使用标志
	string chrgBchNo=16;//收费批次号
	int32 medfeeSumamt=17;//医疗费总额,单位为分
	string opterType=18;//经办人类别1-经办人；2-自助终端；3-移动终端
	string opter=19; //经办人
	string opterName=20;//经办人姓名 
}

message SaveInsuResultRequest {
	string admInfoDr = 1;//医保登记Rowid	
	int32 hospitalId = 2;
	string jsonStrInsuRtn = 3;//医保结算成功返回串	
	string jsonStrTencentRtn = 4;//结算成功腾讯返回串
	string invRowidStr = 5;// 发票 rowId
	string insuAdmInfoDr = 6; // 医保登记 id，市直医保新增
	int32 medInsType = 7; // 医保类型标识，1-广州医保，2-市直医保
	string insuDividePreDr = 8; // 省直医保
}

message SaveInsuResultResponse {
	int32 code = 1;
	string info = 2;  
	string insuDivDr =3; //医保结算表Rowid
}


message PhyReportListRequest {
	string idNo = 1;		// 身份证号
	int32 hospitalId = 2;	
}

message PhyReportListItem {
	string patientName = 1;		//姓名
    string sex = 2;				//性别
    string age = 3;				//年龄
    string examDate = 4;		//体检日期
	string company = 5;			//单位
	string admId = 6;			//就诊ID
	string reportStatus = 7;	//报告状态
	string peStatus = 8;		//体检状态
	string preDate = 9;			//预约日期
	string orderName = 10;		//套餐名称
	string hPNo = 11;			//FIXME
}

message PhyReportListResponse {
	int32 code = 1;
	string info = 2; 
	repeated PhyReportListItem list = 3;
}


message PhyReportDetailRequest {
	string admId = 1;	//登记号
	int32 hospitalId = 2;
}

message PhyReportDetailResponse {
	int32 code = 1;
	string info = 2;  
	string reportPdf =3; 	// PDF报告地址
}


message PreSettleRequest {
	string invPrtDr = 1;
	string cardNo = 2;
	string psnName = 3;
	string authCode = 4;
	string openId = 5;
	int32 hospitalId = 6;
	int32 mpType = 7;
	string aliPayAuthNo = 8;
}

message PreSettleResponse {
	int32 code = 1;
	string info = 2;
	string output = 3;
	string hiOutput = 4;
	string payAuthNo = 5;
	string setlLatlnt = 6;
}

message GetMedInsTypeByOrderInsTypeRequest {
	string orderInsTypeStr = 1;
	int32 hospitalId = 2;
}

message GetMedInsTypeByOrderInsTypeResponse {
	int32 code = 1;
	string info = 2;
	int32 orderInsType = 3;
}

message PayConfirmRequest {
	int32 hospitalId = 1;
	string insuDivId = 2; // 医保结算表id，HI6202接口返回中的insuDivId字段
	string ownPayPMDr = 3; // 自付部分支付，第三方，见各项目维护的自付部分支付方式id
	string ownPayAmt = 4; // 自付部分金额，医保返回的需第三方扣除的患者自付部分金额。单位：元
	string payAuthNo = 5; // 支付授权码，His医保确认失败时，使用此字段撤销医保结算使用
}

message PayConfirmResponse {
	int32 code = 1;
	string info = 2;
	string data = 3;
}

// 对应 central-control-service 项目的 provider/taihe.js 文件
service TaiheService{
    //获取患者基本信息
    rpc getPatientInfo(GetPatientInfoRequest) returns (GetPatientInfoResponse);	    
	
	//获取科室列表
	rpc getDeptList(GetDeptListRequest) returns (GetDeptListResponse);

	//获取医生列表
	rpc getDoctorList(GetDoctorListRequest) returns (GetDoctorListResponse);

	//获取患者病历
	rpc getMedicalRecord(GetMedicalRecordRequest) returns (GetMedicalRecordResponse);

	//获取检验报告列表
	rpc getLaboratoryList(GetLaboratoryListRequest) returns (GetLaboratoryListResponse);

	//获取报告详情
	rpc getLaboratoryDetail(GetLaboratoryDetailRequest) returns (GetLaboratoryDetailResponse);

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

	//获取医生号源分时信息
	rpc getScheduleTimeInfo(GetScheduleTimeInfoRequest) returns (GetScheduleTimeInfoResponse);	

	//获取检查报告列表
	rpc getInspectionList(GetInspectionListRequest) returns (GetInspectionListResponse);

	//获取检查报告详情
	rpc getInspectionDetail(GetInspectionDetailRequest) returns (GetInspectionDetailResponse);

	//获取排队信息
	rpc getQueueInfo(GetQueueInfoRequest) returns (GetQueueInfoResponse);

	//在线取号
	rpc take(TakeRequest) returns (TakeResponse);

	//取消预约
	rpc cancel(CancelRequest) returns (CancelResponse);

	//查询挂号记录列表
	rpc getRegistrationList(GetRegistrationListRequest) returns (GetRegistrationListResponse);

	//查询挂号记录详情
	rpc getRegistrationDetail(GetRegistrationDetailRequest) returns (GetRegistrationDetailResponse);

	//挂号
	rpc register(RegisterRequest) returns (RegisterResponse);

	//挂号支付
	rpc pay(PayRequest) returns (PayResponse);

	//挂号无须支付
	rpc payFree(PayFreeRequest) returns (PayFreeResponse);

	//查询门诊缴费记录
	rpc getOutpatientList(GetOutpatientListRequest) returns (GetOutpatientListResponse);

	//查询门诊缴费记录明细
	rpc getPaymentDetail(GetPaymentDetailRequest) returns (GetPaymentDetailResponse);

	//医保试算
	rpc calInsurance(CalInsuranceRequest) returns (CalInsuranceResponse);

	//门诊缴费订单支付（医保结算）
	rpc payOrder(PayOrderRequest) returns (PayOrderResponse);

	//查询加号信息
	rpc getAddInfo(GetAddInfoRequest) returns (GetAddInfoResponse);

	//获取治疗指引
	rpc getTreatmentGuide(GetTreatmentGuideRequest) returns (GetTreatmentGuideResponse);

	//获取治疗指引（东华）
	rpc getTreatmentGuideV2(GetTreatmentGuideV2Request) returns (GetTreatmentGuideV2Response);

	//获取太和药品目录信息
	rpc getDrugList(GetDrugListRequest) returns (GetDrugListResponse);

	//推送处方信息
	rpc pushPresInfo(PushPresInfoRequest) returns (BaseResult);

	//获取处方信息
	rpc getPresInfo(GetPresInfoRequest) returns (GetPresInfoResponse);

	//根据就诊流水号获取患者基本信息
	rpc getPatInfoByHisClinicCode(GetPatInfoByHisClinicCodeRequest) returns (GetPatInfoByHisClinicCodeResponse);
	// 东华 HIS 挂号锁号
	rpc lockOrder(LockOrderRequest) returns (LockOrderResponse);
	// 获取就诊记录列表
	rpc getClinicList(GetClinicListRequest) returns (GetClinicListResponse);
	// 获取医生当前排班信息
	rpc getDoctorCurrentSchedule(GetDoctorCurrentScheduleRequest) returns (GetDoctorCurrentScheduleResponse);
	// 预结算
	rpc prePayConfirm(PrePayConfirmRequest) returns (PrePayConfirmResponse);
	// 查询药品库存
	rpc getDrugInventory(GetDrugInventoryRequest) returns (GetDrugInventoryResponse);
	// 插入诊断
	rpc addDiagnosis(AddDiagnosisRequest) returns (AddDiagnosisResponse);
	// 插入医嘱
	rpc addOEORIInfo(AddOEORIInfoRequest) returns (AddOEORIInfoResponse);
	// 作废医嘱
	rpc cancelOEORIInfo(CancelOEORIInfoRequest) returns (CancelOEORIInfoResponse);
	// 获取住院患者信息
	rpc getInPatInfo(GetInPatInfoRequest) returns (GetInPatInfoResponse);
	// 日清单列表
	rpc getDayFeeList(GetDayFeeListRequest) returns (GetDayFeeListResponse);
	// 住院充值押金
	rpc payCash(PayCashRequest) returns (PayCashResponse);
	// 查询住院押金
	rpc getCashList(GetCashListRequest) returns (GetCashListResponse); 
	
	//在线自助报到
	rpc getCheckIn(GetCheckInRequest) returns (GetCheckInResponse);

	// 创建病人主索引
	rpc createPatInfo(CreatePatInfoRequest) returns (CreatePatInfoResponse);
	// 一键挂号
	rpc oneKeyRegister(OneKeyRegisterRequest) returns (OneKeyRegisterResponse);
	// 获取患者诊断详情 
	rpc getDiagnoseRecord (GetDiagnoseRecordRequest) returns (GetDiagnoseRecordResponse);


	// 体检缴费 查找待缴费记录  
	rpc phyPayList (PhyPayListRequest) returns (PhyPayListResponse);
	// 体检缴费 查找待缴费项目 
	rpc phyPayDetail (PhyPayDetailRequest) returns (PhyPayDetailResponse);
	// 体检缴费 支付接口 
	rpc phyPayOrder (PhyPayOrderRequest) returns (PhyPayOrderResponse);
 
	// 电子票据接口 
	rpc getEInvoice (GetEInvoiceRequest) returns (GetEInvoiceResponse);
	// 获取住院发票列表
	rpc getInPayList (GetInPayListRequest) returns (GetInPayListResponse);

	// 调用医保线上接口 
	rpc getInsuOPDividePre (GetInsuOPDividePreRequest) returns (GetInsuOPDividePreResponse); 
	// 获取医保登记信息 
	rpc getInsuAdmInfo (GetInsuAdmInfoRequest) returns (GetInsuAdmInfoResponse);
	// 保存医保结算结果 
	rpc saveInsuResult (SaveInsuResultRequest) returns (SaveInsuResultResponse);
	// 体检报告列表
	rpc phyReportList (PhyReportListRequest) returns (PhyReportListResponse);
	// 体检报告详情
	rpc phyReportDetail (PhyReportDetailRequest) returns (PhyReportDetailResponse);
	// 省中台医保预结算
	rpc preSettle (PreSettleRequest) returns (PreSettleResponse);
	// 根据 HIS 返回的订单类型字符串，判断医保类型
	rpc getMedInsTypeByOrderInsType (GetMedInsTypeByOrderInsTypeRequest) returns (GetMedInsTypeByOrderInsTypeResponse);
	// 医保费用确认
	rpc payConfirm (PayConfirmRequest) returns (PayConfirmResponse);
}