MeiZhongYiHeService.proto
4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.infoloop.rpc.meizhongyiheservice";
option java_outer_classname = "MeiZhongYiHeServiceProto";
option objc_class_prefix = "OP";
package com.infoloop.rpc.meizhongyiheservice;
service MeiZhongYiHeServiceRpc {
rpc GetAllHospitals (GetAllHospitalsRpcRequest) returns (GetAllHospitalsRpcResponse) {}
rpc GetHospitalDepartmentsByHospitalCode (GetHospitalDepartmentsByHospitalCodeRpcRequest) returns (GetHospitalDepartmentsByHospitalCodeRpcResponse) {}
rpc GetCustomersByCondition (GetCustomersByConditionRpcRequest) returns (GetCustomersByConditionRpcResponse) {}
rpc GetCustomerDetailById (GetCustomerDetailByIdRpcRequest) returns (GetCustomerDetailByIdRpcResponse) {}
rpc GetCustomerAllergiesByCustomerIds (GetCustomerAllergiesByCustomerIdsRpcRequest) returns (GetCustomerAllergiesByCustomerIdsRpcResponse) {}
rpc GetCustomerMedicalAdvicesByHospitalRecordIds (GetCustomerMedicalAdvicesByHospitalRecordIdsRpcRequest) returns (GetCustomerMedicalAdvicesByHospitalRecordIdsRpcResponse) {}
rpc GetAllHospitalAllergies (GetAllHospitalAllergiesRpcRequest) returns (GetAllHospitalAllergiesRpcResponse) {}
rpc GetHospitalMedicalAdvicesByType (GetHospitalMedicalAdvicesByTypeRpcRequest) returns (GetHospitalMedicalAdvicesByTypeRpcResponse) {}
}
message GetAllHospitalsRpcRequest {
}
message GetAllHospitalsRpcResponse {
repeated Hospital hospitals = 1;
}
message Hospital {
string hospitalId = 1;
string hospitalCode = 2;
string hospitalName = 3;
string hospitalAddress = 4;
}
message GetHospitalDepartmentsByHospitalCodeRpcRequest {
string hospitalCode = 1;
}
message GetHospitalDepartmentsByHospitalCodeRpcResponse {
repeated HospitalDepartment departments = 1;
}
message HospitalDepartment {
string departmentId = 1;
string departmentCode = 2;
string departmentName = 3;
string departmentContent = 4;
string departmentAddress = 5;
string hospitalId = 6;
string hospitalCode = 7;
}
message GetCustomersByConditionRpcRequest {
repeated string deptCode = 1;
}
enum HospitalStatus {
PRE_ADMISSION = 0;
CURRENT = 1;
CANCEL = 2;
DISCHARGED = 3;
}
enum CustomerSex {
UNKNOWN_SEX = 0;
MALE = 1;
FEMALE = 2;
}
message Customer {
string customerId = 1;
string customerName = 2;
CustomerSex customerSex = 3;
string identityCardNo = 4;
int32 age = 5;
string height = 6;
string weight = 7;
string mobile = 8;
int64 birthday = 9;
CustomerHospitalRecord customerHospitalRecord = 10;
}
message GetCustomersByConditionRpcResponse {
repeated Customer customers = 1;
}
message CustomerHospitalRecord {
string hospitalRecordId = 1;
string departmentCode = 2;
string departmentName = 3;
string roomNo = 4;
int64 hospitalTime = 5;
int64 expectDischargeTime = 6;
int64 actualDischargeTime = 7;
int64 dueDate = 8;
int64 birthDate = 9;
string hospitalCode = 10;
HospitalStatus hospitalStatus = 11;
}
message GetCustomerDetailByIdRpcRequest {
string customerId = 1;
string hospitalRecordId = 2;
}
message GetCustomerDetailByIdRpcResponse {
Customer customer = 1;
}
message GetCustomerAllergiesByCustomerIdsRpcRequest {
repeated string customerIds = 1;
}
message CustomerAllergy {
string customerId = 1;
repeated Allergy allergies = 2;
}
message Allergy {
string allergyId = 1;
string allergyCode = 2;
string allergyDescription = 3;
int64 createdAt = 4;
}
message GetCustomerAllergiesByCustomerIdsRpcResponse {
repeated CustomerAllergy customerAllergies = 1;
}
message GetCustomerMedicalAdvicesByHospitalRecordIdsRpcRequest {
repeated string hospitalRecordIds = 1;
}
message CustomerMedicalAdvice {
string customerId = 1;
string hospitalRecordId = 2;
repeated MedicalAdvice medicalAdvices = 3;
}
message MedicalAdvice {
string medicalAdviceId = 1;
string medicalAdviceCode = 2;
string medicalAdvice = 3;
string connotation = 4;
int64 medicalTime = 5;
int64 effectDate = 6;
MedicalAdviceTypeEnum medicalAdviceType = 7;
}
message GetCustomerMedicalAdvicesByHospitalRecordIdsRpcResponse {
repeated CustomerMedicalAdvice customerMedicalAdvices = 1;
}
message GetAllHospitalAllergiesRpcRequest {
}
message GetAllHospitalAllergiesRpcResponse {
repeated HospitalAllergy hospitalAllergies = 1;
}
message HospitalAllergy {
string allergyId = 1;
string allergyCode = 2;
string allergyDescription = 3;
}
enum MedicalAdviceTypeEnum {
UNKNOWN_MEDICAL_ADVICE_TYPE = 0;
DIET = 1; //饮食医嘱
CLINICAL = 2; //临床文字医嘱
}
message GetHospitalMedicalAdvicesByTypeRpcRequest {
MedicalAdviceTypeEnum type = 1;
}
message GetHospitalMedicalAdvicesByTypeRpcResponse {
repeated HospitalMedicalAdvice hospitalMedicalAdvices = 1;
}
message HospitalMedicalAdvice {
string medicalAdviceId = 1;
string medicalAdviceCode = 2;
string medicalAdvice = 3;
string connotation = 4;
string unit = 5;
}