user.proto 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. syntax = "proto3";
  2. import "base.proto";
  3. package com.ywt.gapi.user;
  4. option java_generic_services = true;
  5. option java_multiple_files = true;
  6. option java_package = "com.ywt.gapi.user";
  7. option go_package = "/gapi";
  8. //用户信息
  9. message User {
  10. int32 userid = 1;
  11. string username = 2;
  12. string realname = 3;
  13. string mobile = 4;
  14. int32 idtype = 5;
  15. string idno = 6;
  16. int32 sex = 7;
  17. int32 age = 8;
  18. string avatar = 9;
  19. string birthday = 10;
  20. int64 createtime = 11;
  21. string registerip = 12;
  22. int32 usertype = 13;
  23. }
  24. //银行卡信息
  25. message BankCard{
  26. int32 bankCardId = 1;
  27. string bankName = 2;
  28. string logo = 3;
  29. string cardNo = 4;
  30. int32 type = 5;
  31. }
  32. //明细信息
  33. message AccountDetail{
  34. int32 detailId = 1;
  35. double balance = 2;
  36. double amount = 3;
  37. string title = 4;
  38. int64 createTime = 5;
  39. }
  40. //获取微信小程序登录 token
  41. message GetWxAppTokenRequest{
  42. string nickName = 1;
  43. int32 gender = 2;
  44. string language = 3;
  45. string city = 4;
  46. string province = 5;
  47. string country = 6;
  48. string avatarUrl = 7;
  49. string openid = 8;
  50. string sessionKey = 9;
  51. string unionid = 10;
  52. int32 expiresIn = 11;
  53. }
  54. //获取微信小程序登录 token
  55. message GetWxAppTokenResponse{
  56. Result result = 1;
  57. int32 isUnion = 2;
  58. int32 userId = 3;
  59. string sessionId = 4;
  60. }
  61. //微信号关联手机号码
  62. message BindWxAppMobileRequest{
  63. string mobile = 1;
  64. string openId = 2;
  65. string ip = 3;
  66. }
  67. message UserRequest {
  68. int32 userid = 1;
  69. string phone = 2;
  70. }
  71. message UserResponse {
  72. Result result = 1;
  73. User user = 2;
  74. }
  75. message AddBankCardRequest{
  76. int32 userId = 1;
  77. string name = 2;
  78. string cardNo = 3;
  79. string bankName = 4;
  80. int32 cardType = 5;
  81. string mobile = 6;
  82. }
  83. message AddBankCardResponse{
  84. Result result = 1;
  85. int32 cardId = 2;
  86. string cardNo = 3;
  87. }
  88. message BankCardListRequest{
  89. int32 doctorId = 1;
  90. int32 pageIndex = 2;
  91. int32 pageSize = 3;
  92. }
  93. message BankCardListResponse{
  94. Result result = 1;
  95. repeated BankCard bankCardList = 2;
  96. int32 count = 3;
  97. int32 totalPages = 4;
  98. }
  99. message AccountBalanceRequest{
  100. int32 userId = 1;
  101. }
  102. message AccountBalanceResponse {
  103. Result result = 1;
  104. double totalBalance = 2;// 账户总余额
  105. double withdrawableBalance = 3;// 可提现余额
  106. }
  107. message AccountDetailListRequest{
  108. int32 doctorId = 1;
  109. int32 pageIndex = 2;
  110. int32 pageSize = 3;
  111. }
  112. //账户明细列表
  113. message AccountDetailListResponse{
  114. Result result = 1;
  115. repeated AccountDetail detailList = 2;
  116. int32 count = 3;
  117. int32 totalPages = 4;
  118. }
  119. message WithdrawRequest{
  120. int32 doctorId = 1;
  121. double amount = 2;
  122. int32 cardId = 3;
  123. }
  124. message FeedbackRequest{
  125. string content = 1;
  126. int32 origin = 2;
  127. int32 userId = 3;
  128. }
  129. message WithdrawRecord{
  130. int32 recordId = 1;
  131. double amount = 2;
  132. int64 createTime = 3;
  133. int32 cardId = 4;
  134. string cardNo = 5;
  135. int32 status = 6;
  136. int64 updateTime = 7;
  137. int32 auditStatus = 8; //状态(1-待审核,2-审核通过,3-审核不通过)
  138. int32 userId = 9;
  139. string remark = 10;
  140. }
  141. message WithdrawRecordListRequest{
  142. int32 doctorId = 1;
  143. int32 pageIndex = 2;
  144. int32 pageSize = 3;
  145. int32 status = 4;
  146. }
  147. message WithdrawRecordListResponse{
  148. Result result = 1;
  149. repeated WithdrawRecord recordList = 2;
  150. int32 count = 3;
  151. int32 totalPages = 4;
  152. }
  153. //删除银行卡请求
  154. message DelBankCardRequest{
  155. int32 doctorId = 1;
  156. int32 cardId = 2;
  157. }
  158. // 第三方账户信息
  159. message SnsUser{
  160. int32 id = 1;
  161. string openId = 2;
  162. string unionId = 3;
  163. int32 userId = 4;
  164. string nickname = 5;
  165. int32 sex = 6;
  166. string province = 7;
  167. string city = 8;
  168. string country = 9;
  169. string avatar = 10;
  170. string language = 11;
  171. int32 snsType = 12;
  172. int32 status = 13;
  173. int64 createTime = 14;
  174. }
  175. message GetSnsUserRequest{
  176. string openId = 1;
  177. string unionId = 2;
  178. int32 userId = 3;
  179. }
  180. message GetSnsUserByOpenIdRequest{
  181. string openId = 1;
  182. }
  183. message GetSnsUserByUserIdRequest{
  184. int32 userId = 1;
  185. }
  186. message GetSnsUserResponse{
  187. Result result = 1;
  188. SnsUser snsUser = 2;
  189. }
  190. //诊疗卡
  191. message MedicalCard{
  192. string patientId = 1;
  193. string patientName = 2;
  194. int32 sex = 3;
  195. string birthday = 4;
  196. string telephoneNo = 5;
  197. string mobile = 6;
  198. string documentId = 7;
  199. string address = 8;
  200. string idTypeCode = 9;
  201. string idTypeDesc = 10;
  202. string idNo = 11;
  203. string insureCardNo = 12;
  204. string accInfo = 13;
  205. string cardNo = 14;
  206. string cardType = 15;
  207. string patientType = 16;
  208. int32 balance = 17;
  209. int32 userId = 18; //用户Id
  210. int32 hospitalId = 19; //医院Id
  211. int32 cardId = 20; //卡Id
  212. string hospitalName = 21; //医院名称
  213. string hisPatientId = 22; //his的病人ID
  214. string guardian = 23; //监护人(家长姓名)
  215. int32 flag = 24; //加号标识 1-是 0-否
  216. }
  217. //绑定诊疗卡请求
  218. message AddMedicalCardRequest{
  219. int32 userId = 1; //用户Id
  220. int32 hospitalId = 2; //医院Id
  221. string cardNo = 3; //卡号
  222. string realName = 4; //姓名
  223. string mobile = 5; //手机号
  224. }
  225. //获取诊疗卡列表请求
  226. message GetMedicalCardListRequest{
  227. int32 userId = 1; //用户Id
  228. int32 hospitalId = 2; //医院Id
  229. int32 flag = 3; //加号标识,1-是,0-否
  230. }
  231. //获取诊疗卡列表响应
  232. message GetMedicalCardListResponse{
  233. Result result = 1;
  234. repeated MedicalCard medicalCards = 2;
  235. }
  236. //用户登录信息
  237. message UserLoginInfo{
  238. int32 userId = 1;
  239. string userName = 2;
  240. string realName = 3;
  241. string mobile = 4;
  242. int32 idType = 5;
  243. string idNo = 6;
  244. int32 sex = 7;
  245. int32 age = 8;
  246. string avatar = 9;
  247. string birthday = 10;
  248. int64 createTime = 11;
  249. string registerIp = 12;
  250. int32 userType = 13;
  251. string title = 14;
  252. string specialty = 15;
  253. string briefIntro = 16;
  254. string hospitalName = 17;
  255. string deptName = 18;
  256. string city = 19;
  257. int32 status = 20;
  258. string province = 21;
  259. string area = 22;
  260. string hospitalIds = 23;
  261. string deptIds = 24;
  262. string qrCodeUrl = 25;
  263. }
  264. //通过手机号码登录请求
  265. message LoginByMobileRequest{
  266. string mobile = 1; //手机号
  267. int32 userType = 2; //登录用户类型
  268. string ip = 3; //IP地址
  269. }
  270. //通过用户名+密码登录请求
  271. message LoginByUserNameRequest{
  272. string username = 1; //用户名
  273. string pwd = 2; //用户密码
  274. }
  275. //登录响应
  276. message LoginResponse{
  277. Result result = 1;
  278. UserLoginInfo userLoginInfo = 2;
  279. }
  280. message MedicalRecordsImage{
  281. int32 id = 1;
  282. int32 doctorId = 2;
  283. int32 patientId = 3;
  284. string imageUrl = 4;
  285. int64 createTime = 5;
  286. int32 orderId = 6;
  287. }
  288. //删除诊疗卡请求
  289. message DeleteMedicalCardRequest{
  290. int32 userId = 1; //用户Id
  291. int32 cardId = 2; //诊疗卡Id
  292. }
  293. message AddSnsUserRequest{
  294. string nickName = 1;
  295. int32 gender = 2;
  296. string language = 3;
  297. string city = 4;
  298. string province = 5;
  299. string country = 6;
  300. string avatarUrl = 7;
  301. string openid = 8;
  302. string sessionKey = 9;
  303. string unionid = 10;
  304. int32 expiresIn = 11;
  305. int32 snsType = 12;
  306. string privilege = 13;
  307. string accessToken = 14;
  308. string refreshToken = 15;
  309. }
  310. message BindWxRequest {
  311. string mobile = 1;
  312. string unionId = 2;
  313. string ip = 3;
  314. int32 terminal = 4; //终端类型
  315. string openId = 5;
  316. string name = 6; // 姓名
  317. string idNo = 7; // 身份证号
  318. }
  319. //获取公众号用户信息请求
  320. message GetOffcialUserInfoRequest{
  321. int32 hospitalId = 1;
  322. string unionId = 2;
  323. }
  324. //获取公众号用户信息响应
  325. message GetOffcialUserInfoResponse{
  326. Result result = 1;
  327. int32 userId = 2;
  328. int32 hasMedicalCard = 3;
  329. }
  330. message MedicalRecords{
  331. int32 id = 1;
  332. int32 userId = 2;
  333. string clinicCode = 3;
  334. string admTime = 4;
  335. string hospitalName = 5;
  336. string doctorName = 6;
  337. string doctorTitle = 7;
  338. }
  339. message GetMedicalRecordsListRequest{
  340. int32 medicalCardId = 1;
  341. int32 pageIndex = 2;
  342. int32 pageSize = 3;
  343. int32 userId = 4;
  344. }
  345. message GetMedicalRecordsListResponse{
  346. Result result = 1;
  347. repeated MedicalRecords records = 2;
  348. int32 count = 3;
  349. int32 totalPages = 4;
  350. }
  351. //更换手机号码请求
  352. message ChangeMobileRequest{
  353. int32 userId = 1;
  354. string mobile = 2;
  355. }
  356. //病历详情
  357. message MedicalRecordsDetail{
  358. int32 recordId = 1;
  359. string typeName = 2;
  360. string desc = 3;
  361. repeated string imageUrl = 4; //图片
  362. int32 doctorId = 5;
  363. int32 patientId = 6;
  364. int64 createTime = 7;
  365. string mobile = 8;
  366. int32 age = 9;
  367. int32 sex = 10;
  368. string patientName = 11; //患者姓名
  369. int32 userId = 12;
  370. string admTime = 13; //患者入院日期
  371. string hospitalName = 14; //医院名称
  372. string doctorName = 15; //医生名字
  373. string selfReport = 16; //主诉
  374. string phyExam = 17; //体格检查
  375. string diagnose = 18; //诊断结果
  376. string suggestion = 19; //意见
  377. string advice = 20; //门急诊医嘱
  378. repeated LaboratoryReport laboratoryReport = 21; //化验报告
  379. repeated InspectionReport inspectionReport = 22; //检查报告
  380. string idNo = 23; //身份证号
  381. }
  382. //获取病历详情请求
  383. message GetMedicalRecordsDetailRequest{
  384. int32 recordId = 1;
  385. }
  386. //获取病历详情响应
  387. message GetMedicalRecordsDetailResponse{
  388. Result result = 1;
  389. MedicalRecordsDetail detail = 2;
  390. }
  391. //获取病历列表请求
  392. message GetMedicalRecordListByUserIdRequest{
  393. int32 userId = 1;
  394. int32 pageIndex = 2;
  395. int32 pageSize = 3;
  396. }
  397. //获取病历列表响应
  398. message GetMedicalRecordListByUserIdResponse{
  399. Result result = 1;
  400. repeated MedicalRecordsDetail detail = 2;
  401. int32 count = 3;
  402. int32 totalPages = 4;
  403. }
  404. //获取公众号用户信息请求
  405. message GetOfficialUserInfoRequest{
  406. int32 hospitalId = 1;
  407. string unionId = 2;
  408. int32 terminal = 3; //终端
  409. string openId = 4;
  410. }
  411. //获取公众号用户信息响应
  412. message GetOfficialUserInfoResponse{
  413. Result result = 1;
  414. int32 userId = 2;
  415. int32 hasMedicalCard = 3;
  416. string avatar = 4;
  417. string nickname = 5;
  418. string openId = 6;
  419. string mobile = 7;
  420. string unionId = 8;
  421. int32 sex = 9;
  422. }
  423. //检查结果
  424. message InspectionReport{
  425. string reportId = 1; //检查报告单id
  426. string reportTitle = 2; //检查报告单标题名称
  427. int64 reportDate = 3; //检查报告单审核日期(YYYY-MM-DD HH:MM:SS)
  428. int32 status = 4; //报告状态 0 未审核 1已审核
  429. string patientName = 5; //患者姓名
  430. string patientAge = 6; //患者年龄
  431. int32 sex = 7; //性别
  432. string clinicalDiagnosis = 8; //临床诊断
  433. string clinicSeq = 9; //门诊就诊流水号
  434. string inpatientId = 10; //住院流水号
  435. int32 id = 11; //主键Id
  436. }
  437. //检查结果详情
  438. message InspectionReportDetail{
  439. string deptName = 1; //申请科室名称
  440. string reportDoctorName = 2; //报告医生姓名
  441. string checkParts = 3; //检查部位
  442. string examination = 4; //检查所见
  443. string diagnosis = 5; //诊断结果
  444. string checkDoctorName = 6; //检查医生(技师)姓名
  445. int64 examinationDate = 7; //检查日期(YYYY-MM-DD HH:MM:SS)
  446. int64 verifyDate = 8; //审核日期
  447. string verifyDocName = 9; //审核医生
  448. string appDocName = 10; //开单医生
  449. int32 id = 11; //主键Id
  450. string reportId = 12; //检查报告单id
  451. }
  452. //获取检查结果列表请求
  453. message GetInspectionReportListRequest{
  454. int32 medicalCardId = 1; //诊疗卡Id
  455. int32 userId = 2; //用户Id
  456. }
  457. //获取检查结果列表响应
  458. message GetInspectionReportListResponse{
  459. Result result = 1;
  460. repeated InspectionReport report = 2;
  461. }
  462. //获取检查结果详情请求
  463. message GetInspectionReportDetailRequest{
  464. string reportId = 1; //检查报告单id
  465. }
  466. //获取检查结果详情响应
  467. message GetInspectionReportDetailResponse{
  468. Result result = 1;
  469. InspectionReportDetail report = 2;
  470. }
  471. //化验报告
  472. message LaboratoryReport {
  473. string inspectionId = 1; //检验报告单id
  474. string inspectionName = 2; //检验报告单标题名称
  475. int64 inspectionDate = 3; //检验报告单审核日期(YYYY-MM-DD HH:MM:SS)
  476. int32 status = 4; //报告状态 0 未审核 1已审核
  477. string patientName = 5; //患者姓名
  478. string patientAge = 6; //患者年龄
  479. int32 sex = 7; //性别
  480. string deptName = 8; //申请科室名称
  481. string clinicalDiagnosis = 9; //临床诊断
  482. string reportDoctorName = 10; //报告医生姓名
  483. string clinicSeq = 11; //门诊就诊流水号
  484. string inpatientId = 12; //住院号
  485. string checkDoctorName = 13; //审核医生姓名
  486. int32 id = 14; //主键
  487. }
  488. //化验报告详情
  489. message LaboratoryReportDetail {
  490. string itemId = 1; //检验指标代码
  491. string itemName = 2; //检验指标中文名称
  492. string orderNo = 3; //排序号,不需要排序的话可设成全部为0
  493. string testResult = 4; //检测结果
  494. string unit = 5; //剂量单位
  495. string itemRef = 6; //参考值范围
  496. int64 testDate = 7; //检查日期(YYYY-MM-DD HH:MM:SS)
  497. string testEngName = 8; //检验指标英文名称
  498. string specimType = 9; //检验标本
  499. string resultFlag = 10; //异常标识
  500. int32 id = 11; //主键
  501. }
  502. //获取化验报告列表请求
  503. message GetLaboratoryReportListRequest{
  504. int32 medicalCardId = 1; //诊疗卡Id
  505. int32 userId = 2; //用户Id
  506. }
  507. //获取化验报告列表响应
  508. message GetLaboratoryReportListResponse{
  509. Result result = 1;
  510. repeated LaboratoryReport report = 2; //化验报告
  511. }
  512. //获取化验报告详情请求
  513. message GetLaboratoryReportDetailRequest{
  514. string inspectionId = 1; //检验报告单id
  515. }
  516. //获取化验报告详情响应
  517. message GetLaboratoryReportDetailResponse{
  518. Result result = 1;
  519. repeated LaboratoryReportDetail detail = 2; //化验报告详情
  520. string inspectionName = 3; //检验报告单标题名称
  521. int64 inspectionDate = 4; //检验报告单审核日期(YYYY-MM-DD HH:MM:SS)
  522. string clinicalDiagnosis = 5; //临床诊断
  523. string reportDoctorName = 6; //报告医生姓名
  524. string checkDoctorName = 7; //审核医生姓名
  525. int32 status = 8; //报告状态 0 未审核 1已审核
  526. }
  527. //根据门诊ID获取检查结果列表请求
  528. message GetInspectionReportListByHisPatientIdRequest{
  529. string hisPatientId = 1; //hisPatientId
  530. }
  531. //根据门诊ID获取检查结果列表响应
  532. message GetInspectionReportListByHisPatientIdResponse{
  533. int32 code = 1;
  534. string msg = 2;
  535. repeated InspectionReport report = 3;
  536. }
  537. //根据门诊ID获取化验报告列表请求
  538. message GetLaboratoryReportListByHisPatientIdRequest{
  539. string hisPatientId = 1; //hisPatientId
  540. }
  541. //根据门诊ID获取化验报告列表响应
  542. message GetLaboratoryReportListByHisPatientIdResponse{
  543. int32 code = 1;
  544. string msg = 2;
  545. repeated LaboratoryReport report = 3; //化验报告
  546. }
  547. //根据就诊流水号获取门诊病历
  548. message GetMedicalRecordByClinicCodeRequest{
  549. string clinicCode = 1;
  550. }
  551. //根据就诊流水号获取门诊病历
  552. message GetMedicalRecordByClinicCodeResponse{
  553. Result result = 1;
  554. MedicalRecordsDetail detail = 2; //病历详情
  555. }
  556. //根据用户名和密码登录Request
  557. message LoginWithUserAndPsdRequest{
  558. string username = 1;
  559. string password = 2;
  560. string ip = 3;
  561. int32 type = 4;
  562. }
  563. //根据用户名和密码登录Response
  564. message LoginWithUserAndPsdResponse{
  565. Result result = 1;
  566. int32 doctorId = 2;
  567. string doctorName = 3;
  568. string deptIds = 4;
  569. string deptName = 5;
  570. int32 checkSign = 6;
  571. string signUrl = 7;
  572. int32 doctorSignId = 8;
  573. string doctorAvatar = 9;
  574. int32 isFirstLogin = 10; //判断在这个平台是否是首次登录
  575. }
  576. //跟新密码Request
  577. message UpdatePasswordRequest{
  578. string mobile = 1;
  579. string password = 2;
  580. }
  581. //修改密码Request
  582. message ChangePasswordRequest{
  583. int32 userId = 1;
  584. string oldPassword = 2;
  585. string newPassword = 3;
  586. string verifyPassword = 4;
  587. }
  588. //根据code拉取用户信息请求
  589. message GetUserInfoByCodeRequest{
  590. string code = 1; //换取access_token的票据
  591. int32 type = 2; //终端类型
  592. }
  593. //根据code拉取用户信息响应
  594. message GetUserInfoByCodeResponse{
  595. Result result = 1;
  596. int32 userId = 2;
  597. string openId = 3;
  598. string unionId = 4;
  599. string nickname = 5;
  600. string realName = 6;
  601. string avatar = 7;
  602. }
  603. //根据openid拉取用户信息请求
  604. message GetUserInfoByOpenIdRequest{
  605. string openId = 1; //openid
  606. int32 terminal = 2; //终端类型
  607. }
  608. //根据openid拉取用户信息响应
  609. message GetUserInfoByOpenIdResponse{
  610. Result result = 1;
  611. int32 userId = 2;
  612. string openId = 3;
  613. string unionId = 4;
  614. string nickname = 5;
  615. string realName = 6;
  616. }
  617. //根据用户ID和Terminal获取用户基本信息请求
  618. message GetUserInfoByUserIdAndTerminalRequest{
  619. int32 userId = 1; //userId
  620. int32 terminal = 2; //终端类型
  621. }
  622. //根据用户ID和Terminal获取用户基本信息响应
  623. message GetUserInfoByUserIdAndTerminalResponse{
  624. Result result = 1;
  625. int32 userId = 2;
  626. string openId = 3;
  627. string unionId = 4;
  628. string nickname = 5;
  629. string realName = 6;
  630. }
  631. // 有加诊排班的医生
  632. message ScheduleDoctorInfo{
  633. int32 doctorId = 1; //医生ID
  634. string name = 2; //医生姓名
  635. string hospital = 3; //医院
  636. string specialty = 4; //擅长
  637. string title = 5; //职称
  638. string dept = 6; //部门
  639. string hospitalIds = 7; //医院ID
  640. string deptIds = 8; //部门ID
  641. string briefIntro = 9; //简介
  642. string avatar = 10; //医生头像
  643. }
  644. //获取加诊医生列表请求
  645. message GetScheduleDoctorListRequest{
  646. int32 hospitalId = 1; //医院Id
  647. int32 deptId = 2; //科室Id
  648. string name = 3; //医生姓名
  649. string areaIds = 4; //地区Id,e.g. 100000,110000,110001
  650. int32 pageIndex = 5; //当前页数
  651. int32 pageSize = 6; //每页大小
  652. }
  653. //获取加诊医生列表响应
  654. message GetScheduleDoctorListResponse{
  655. Result result = 1; //结果
  656. repeated ScheduleDoctorInfo scheduleDoctorInfo = 2; //有加诊排班的医生列表
  657. int32 totalPages = 3; //总页数
  658. int32 count = 4; //总条数
  659. }
  660. //用户新建就诊人
  661. message UserCreateMedicalRecordRequest{
  662. int32 userId = 1; //用户ID
  663. int32 age = 2; //年龄
  664. int32 sex = 3; //性别
  665. string name = 4; //姓名
  666. string mobile = 5; //手机号
  667. int32 recordId = 6; //病历ID
  668. string idNo = 7; //身份证号
  669. }
  670. //团队成员 create by daiyihua
  671. message TeamDoctor{
  672. int32 doctorId = 1; //医生ID
  673. string name = 2; //医生姓名
  674. string avatar = 3; //医生头像
  675. string title = 4; //医生职称
  676. string hospital = 5; //医生所在医院(名称)
  677. string dept = 6; //医生所在科室(名称)
  678. string specialty = 7; //医生擅长
  679. }
  680. //搜索的医生信息 create by daiyihua
  681. message SearchDoctorInfo{
  682. int32 doctorId = 1; //医生ID
  683. string doctorName = 2; //医生姓名
  684. string title = 3; //医生职称
  685. string hospitalName = 4; //医院名称
  686. string deptName = 5; //科室名称
  687. string avatar = 6; //医生头像
  688. string specialty = 7; //医生擅长
  689. }
  690. //根据科室搜索医生信息Request create by daiyihua
  691. message GetDoctorListByDeptIdRequest{
  692. int32 deptId = 1;
  693. int32 pageIndex = 2; //当前页
  694. int32 pageSize = 3; //每页大小
  695. }
  696. //根据科室搜索医生信息Response create by daiyihua
  697. message GetDoctorListByDeptIdResponse{
  698. Result result = 1;
  699. repeated SearchDoctorInfo searchDoctorInfo = 2; //医生信息
  700. int32 count = 3; //总条数
  701. int32 totalPages = 4; //总页数
  702. }
  703. //根据医生ID得到医生团队数量Request create by daiyihua
  704. message GetDoctorTeamCountRequest{
  705. int32 doctorId = 1; //医生ID
  706. }
  707. //根据医生ID得到医生加号数量Request create by daiyihua
  708. message GetDoctorAdditionalCountRequest{
  709. int32 doctorId = 1; //医生ID
  710. }
  711. //根据医院ID得到医院对象Reqeust create by daiyihua
  712. message GetHospitalByIdRequest{
  713. int32 hospitalId = 1;
  714. }
  715. //根据医院ID得到医院对象Response create by daiyihua
  716. message GetHospitalByIdResponse{
  717. Result result = 1;
  718. int32 hospitalId = 2; //医院ID
  719. string hospitalName = 3; //医院名称
  720. }
  721. //太和医院绑定诊疗卡Reqeust create by daiyihua
  722. message AddTaiheMedicalCardRequest{
  723. int32 userId = 1; //用户Id
  724. int32 hospitalId = 2; //医院Id
  725. string cardNo = 3; //卡号
  726. string realName = 4; //姓名
  727. string mobile = 5; //手机号
  728. // string hisPatientId = 6; //his的病人ID
  729. string guardian = 7; //监护人(家长姓名)
  730. string address = 8 ; //家庭住址
  731. string idNo = 9;
  732. int32 idType = 10;
  733. int32 sex = 11;
  734. string birthday = 12;
  735. // string insureCardNo = 13;
  736. }
  737. // 提现到微信请求
  738. message WithdrawToWeChatRequest {
  739. int32 userId = 1;// 用户id
  740. double amount = 2;// 金额
  741. string openid = 3; //用户openid
  742. string spbillCreateIp = 4; //Ip地址
  743. }
  744. // 提现到微信响应
  745. message WithdrawToWeChatResponse {
  746. Result result = 1;
  747. string orderNo = 2;
  748. }
  749. message WithdrawOrderPayRequest {
  750. string orderNo = 1;
  751. string openid = 2;// openid
  752. }
  753. message WithdrawOrderPayResponse {
  754. Result result = 1;
  755. }
  756. //用户扫描关注医生Request
  757. message UserAttentionDoctorRequest{
  758. int32 userId = 1; //用户ID
  759. int32 doctorId = 2; //医生ID
  760. }
  761. //用户点击关注、取消医生Request
  762. message GeneralAttentionDoctorRequest{
  763. int32 userId = 1; //用户ID
  764. int32 doctorId = 2; //医生ID
  765. }
  766. //用户点击关注、取消医生Request
  767. message GeneralAttentionHospitalRequest{
  768. int32 userId = 1; //用户ID
  769. int32 hospitalId = 2; //医院ID
  770. }
  771. // 用户个人资料
  772. message UserPatient{
  773. int32 user_patient_id = 1; // 添加或修改的个人资料ID
  774. int32 user_id = 2; // 用户ID
  775. string mobile = 3; // 手机号码
  776. string idNo = 4; // 身份证号
  777. string parent_name = 5; // 家长姓名
  778. string name = 6; // 姓名
  779. int32 sex = 7; // 性别,1-男,2-女,0-未知
  780. int32 relationship = 8; //与本人关系
  781. }
  782. // 得到用户个人资料列表Request
  783. message GetUserPatientListRequest{
  784. int32 user_id = 1; // 用户ID
  785. int32 pageSize = 2;
  786. int32 pageIndex = 3;
  787. }
  788. // 得到用户个人资料列表Response
  789. message GetUserPatientListResponse{
  790. Result result = 1; // 用户ID
  791. repeated UserPatient userPatient = 2;
  792. int32 count = 3; //总条数
  793. int32 totalPages = 4; //总页数
  794. }
  795. // 编辑用户个人资料Request
  796. message UpdateUserPatientInfo{
  797. UserPatient userPatient = 1;
  798. }
  799. // 得到单个用户个人资料Request
  800. message GetUserPatientByIdRequest{
  801. int32 user_patient_id = 1; // 用户ID
  802. }
  803. // 得到单个用户个人资料Response
  804. message GetUserPatientByIdResponse{
  805. Result result = 1; // 用户ID
  806. UserPatient userPatient = 2;
  807. }
  808. //保存社交账号信息请求消息
  809. message SaveSnsUserInfoRequest {
  810. string openId = 1;
  811. string unionId = 2;
  812. int32 userId = 3;
  813. string nickname = 4;
  814. int32 sex = 5;
  815. string province = 6;
  816. string city = 7;
  817. string country = 8;
  818. string avatar = 9;
  819. string language = 10;
  820. int32 snsType = 11; //1: 微信小程序;2: 微信公众号
  821. int32 terminal = 12;
  822. }
  823. //保存社交账号信息响应消息
  824. message SaveSnsUserInfoRespose {
  825. int32 code = 1;
  826. string info = 2;
  827. int32 userId = 3;
  828. }
  829. // 删除个人资料
  830. message DelUserPatientRequest{
  831. int32 userPatientId = 1;
  832. int32 userId = 2;
  833. }
  834. //根据unionId和terminal判断是否需要更新sns_user_info表的userId request
  835. message CheckAndUpdateSnsUserIdRequest {
  836. int32 terminal = 1;//关联的其他终端
  837. string unionId = 2;
  838. int32 userId = 3;//当前终端的userId
  839. }
  840. //更新关注医生状态(关注/取消关注)Request
  841. message UpdateFollowedStatusRequest{
  842. int32 userId = 1; //用户ID
  843. int32 doctorId = 2; //医生ID
  844. int32 status = 3; //1-关注 2-取关
  845. }
  846. //保存小程序用户信息
  847. message SaveMinAppUserRequest{
  848. string openId = 1;
  849. string unionId = 2;
  850. int32 userId = 3;
  851. string nickname = 4;
  852. int32 sex = 5;
  853. string province = 6;
  854. string city = 7;
  855. string country = 8;
  856. string avatar = 9;
  857. string language = 10;
  858. int32 snsType = 11; //1: 微信小程序;2: 微信公众号
  859. int32 terminal = 12;
  860. }
  861. //保存小程序用户信息
  862. message SaveMinAppUserResponse{
  863. int32 code = 1;
  864. string msg = 2;
  865. int32 userId = 3;
  866. string mobile = 4;
  867. }
  868. // 第三方账户信息
  869. message SnsUserInfo{
  870. int32 id = 1;
  871. string openId = 2;
  872. string unionId = 3;
  873. int32 userId = 4;
  874. string nickname = 5;
  875. int32 sex = 6;
  876. string province = 7;
  877. string city = 8;
  878. string country = 9;
  879. string avatar = 10;
  880. string language = 11;
  881. int32 snsType = 12;
  882. int32 status = 13;
  883. int64 createTime = 14;
  884. int32 terminal = 15;
  885. }
  886. message GetSnsUserInfoRequest{
  887. string openId = 1;
  888. string unionId = 2;
  889. int32 userId = 3;
  890. int32 terminal = 4;
  891. }
  892. message GetSnsUserInfoResponse{
  893. int32 code = 1;
  894. string msg = 2;
  895. SnsUserInfo snsUserInfo = 3;
  896. }
  897. message UpdateSnsUserInfoByUserIdRequest{
  898. int32 userId = 1;
  899. string nickname = 2;
  900. int32 sex = 3;
  901. string province = 4;
  902. string city = 5;
  903. string country = 6;
  904. string avatar = 7;
  905. string language = 8;
  906. int32 terminal = 9;
  907. }
  908. message UpdateSnsUserInfoByUserIdResponse{
  909. int32 code = 1;
  910. string msg = 2;
  911. }
  912. //实名认证
  913. message AuthenticateRequest{
  914. string idCardNo = 1;
  915. string realName = 2;
  916. int32 userId = 3;
  917. }
  918. //实名认证
  919. message AuthenticateResponse{
  920. int32 code = 1;
  921. string msg = 2;
  922. }
  923. // 根据 userId 和 terminal 获取 snsUserInfo
  924. message GetSnsUserInfoByUserIdAndTerminalRequest{
  925. int32 userId = 1;
  926. int32 terminal = 2;
  927. }
  928. message GetSnsUserInfoByUserIdAndTerminalResponse {
  929. int32 code = 1;
  930. string msg = 2;
  931. SnsUserInfo snsUserInfo = 3;
  932. }
  933. message GetUserListRequest {
  934. int32 userId = 1;
  935. string userName = 2;
  936. string mobile = 3;
  937. int32 pageIndex = 4;
  938. int32 pageSize = 5;
  939. }
  940. message GetUserListResponse {
  941. Result result = 1;
  942. repeated User user = 2;
  943. int32 count = 3;
  944. int32 totalPages = 4;
  945. }
  946. //用户相关服务 // 对应 rpc 项目的 UserServiceImpl 类
  947. service UserService {
  948. rpc findByPhone(UserRequest) returns (UserResponse); //根据手机号获取用户信息
  949. rpc findByUserId(UserRequest) returns (UserResponse); //根据用户ID获取用户信息
  950. rpc addUser(User) returns (Result); //添加用户
  951. rpc addBankCard(AddBankCardRequest) returns (AddBankCardResponse); //添加银行卡
  952. rpc getBankCardList(BankCardListRequest) returns (BankCardListResponse); //获取我的银行卡列表
  953. rpc getAccountBalance(AccountBalanceRequest) returns (ResultDouble); //获取我的账户余额
  954. // 获取我的账户余额,返回总余额以及可提现余额
  955. rpc getAccountBalanceNew(AccountBalanceRequest) returns (AccountBalanceResponse);
  956. rpc getAccountDetailList(AccountDetailListRequest) returns (AccountDetailListResponse); //获取账户明细列表
  957. rpc withdraw(WithdrawRequest) returns (Result); //申请提现
  958. rpc feedback(FeedbackRequest) returns (Result); //用户留言反馈
  959. rpc getWithdrawRecordList(WithdrawRecordListRequest) returns (WithdrawRecordListResponse); //获取我的提现记录列表
  960. rpc delBankCard(DelBankCardRequest) returns (Result); //删除银行卡
  961. rpc getWxAppToken(GetWxAppTokenRequest) returns (GetWxAppTokenResponse); //获取微信小程序登录 token
  962. rpc bindWxAppMobile(BindWxAppMobileRequest) returns (Result); //微信号关联手机号码
  963. rpc getSnsUser(GetSnsUserRequest) returns (GetSnsUserResponse); //获取第三方账户信息
  964. rpc getSnsUserByOpenId(GetSnsUserByOpenIdRequest) returns (GetSnsUserResponse);//获取第三方账户信息
  965. rpc getSnsUserByUserId(GetSnsUserByUserIdRequest) returns (GetSnsUserResponse);//获取第三方账户信息
  966. rpc addMedicalCard(AddMedicalCardRequest) returns (ResultInt); //绑定诊疗卡
  967. rpc getMedicalCardList(GetMedicalCardListRequest) returns (GetMedicalCardListResponse); //获取诊疗卡列表数据
  968. rpc loginByMobile(LoginByMobileRequest) returns (LoginResponse); //手机号码登录系统
  969. rpc loginByUserName(LoginByUserNameRequest) returns (LoginResponse); //通过用户名+密码登录系统
  970. rpc deleteMedicalCard(DeleteMedicalCardRequest) returns (Result); //删除诊疗卡请求
  971. rpc addSnsUser(AddSnsUserRequest) returns (Result); //
  972. rpc bindWx(BindWxRequest) returns (Result);
  973. rpc getOffcialUserInfo(GetOffcialUserInfoRequest) returns (GetOffcialUserInfoResponse);//获取公众号用户信息
  974. rpc getMedicalRecordsList(GetMedicalRecordsListRequest) returns (GetMedicalRecordsListResponse);//获取咨询医生列表
  975. rpc changeMobile(ChangeMobileRequest) returns (Result);//更换手机号码
  976. rpc getOfficialUserInfo(GetOfficialUserInfoRequest) returns (GetOfficialUserInfoResponse);//获取公众号用户信息
  977. //获取用户病历列表
  978. rpc getMedicalRecordListByUserId(GetMedicalRecordListByUserIdRequest) returns (GetMedicalRecordListByUserIdResponse);
  979. //获取病历详情
  980. rpc getMedicalRecordsDetail(GetMedicalRecordsDetailRequest) returns (GetMedicalRecordsDetailResponse);
  981. //获取检查结果列表
  982. rpc getInspectionReportList(GetInspectionReportListRequest) returns (GetInspectionReportListResponse);
  983. //根据门诊ID获取检查结果列表
  984. rpc getInspectionReportListByHisPatientId(GetInspectionReportListByHisPatientIdRequest) returns (GetInspectionReportListByHisPatientIdResponse);
  985. //获取检查结果详情
  986. rpc getInspectionReportDetail(GetInspectionReportDetailRequest) returns (GetInspectionReportDetailResponse);
  987. //获取化验结果列表
  988. rpc getLaboratoryReportList(GetLaboratoryReportListRequest) returns (GetLaboratoryReportListResponse);
  989. //根据门诊ID获取化验结果列表
  990. rpc getLaboratoryReportByListByHisPatientId(GetLaboratoryReportListByHisPatientIdRequest) returns (GetLaboratoryReportListByHisPatientIdResponse);
  991. //获取化验结果详情
  992. rpc getLaboratoryReportDetail(GetLaboratoryReportDetailRequest) returns (GetLaboratoryReportDetailResponse);
  993. //根据就诊流水号获取门诊病历
  994. rpc getMedicalRecordByClinicCode(GetMedicalRecordByClinicCodeRequest) returns (GetMedicalRecordByClinicCodeResponse);
  995. //根据用户名和密码登录
  996. rpc loginWithUserAndPsd(LoginWithUserAndPsdRequest) returns (LoginWithUserAndPsdResponse);
  997. //忘记密码
  998. rpc updatePassword(UpdatePasswordRequest) returns (Result);
  999. //修改密码
  1000. rpc changePassword(ChangePasswordRequest) returns (Result);
  1001. //根据code拉取用户信息
  1002. rpc getUserInfoByCode(GetUserInfoByCodeRequest) returns (GetUserInfoByCodeResponse);
  1003. //得到加诊排班医生列表 create by daiyihua
  1004. rpc getScheduleDoctorList(GetScheduleDoctorListRequest) returns (GetScheduleDoctorListResponse);
  1005. //用户创建就诊人 create by daiyihua
  1006. rpc userCreateMedicalRecord(UserCreateMedicalRecordRequest) returns (Result);
  1007. //根据科室ID搜索医生 create by daiyihua
  1008. rpc getDoctorListByDeptId(GetDoctorListByDeptIdRequest) returns (GetDoctorListByDeptIdResponse);
  1009. //根据医生ID得到医生团队数量 create by daiyihua
  1010. rpc getDoctorTeamCount(GetDoctorTeamCountRequest) returns (Result);
  1011. //根据医生ID得到医生加诊记录数量 create by daiyihua
  1012. rpc getDoctorAdditionalCount(GetDoctorAdditionalCountRequest) returns (Result);
  1013. //根据医院ID得到医院对象 create by daiyihua
  1014. rpc getHospitalById(GetHospitalByIdRequest) returns (GetHospitalByIdResponse);
  1015. //绑定太和的诊疗卡 create by daiyihua
  1016. rpc addTaiheMedicalCard(AddTaiheMedicalCardRequest) returns (ResultInt);
  1017. // 微信提现
  1018. rpc withdrawToWeChat(WithdrawToWeChatRequest) returns (WithdrawToWeChatResponse);
  1019. // 微信提现订单支付
  1020. rpc withdrawOrderPay(WithdrawOrderPayRequest) returns (WithdrawOrderPayResponse);
  1021. //添加关注(用户扫描关注医生) created by daiyihua
  1022. rpc userAttentionDoctor(UserAttentionDoctorRequest) returns (Result);
  1023. //用户点击添加、取消关注医生
  1024. rpc saveAttentionDoctorStatus(GeneralAttentionDoctorRequest) returns (Result);
  1025. //用户点击添加、取消关注医院
  1026. rpc saveAttentionHospitalStatus(GeneralAttentionHospitalRequest) returns (Result);
  1027. // 得到单个用户个人资料
  1028. rpc getUserPatientById(GetUserPatientByIdRequest) returns (GetUserPatientByIdResponse);
  1029. // 修改单个用户个人资料
  1030. rpc updateUserPatientInfo(UpdateUserPatientInfo) returns (Result);
  1031. // 得到用户的个人资料列表
  1032. rpc getUserPatientList(GetUserPatientListRequest) returns (GetUserPatientListResponse);
  1033. //保存社交账号信息
  1034. rpc saveSnsUserInfo(SaveSnsUserInfoRequest) returns (SaveSnsUserInfoRespose);
  1035. // 判断添加个人资料
  1036. rpc checkAndAddUserPatientInfo(UpdateUserPatientInfo) returns (Result);
  1037. // 绑定微信体系账号
  1038. rpc bindWxNew(BindWxRequest) returns (Result);
  1039. // 删除个人资料
  1040. rpc delUserPatient(DelUserPatientRequest) returns (Result);
  1041. //根据unionId和terminal判断是否需要更新sns_user_info表的userId
  1042. rpc checkAndUpdateSnsUserId (CheckAndUpdateSnsUserIdRequest) returns (Result);
  1043. //根据openid拉取用户信息
  1044. rpc getUserInfoByOpenId(GetUserInfoByOpenIdRequest) returns (GetUserInfoByOpenIdResponse);
  1045. //根据用户ID和Terminal获取用户基本信息
  1046. rpc getUserInfoByUserIdAndTerminal(GetUserInfoByUserIdAndTerminalRequest) returns (GetUserInfoByUserIdAndTerminalResponse);
  1047. //更新关注医生状态(关注/取消关注)
  1048. rpc updateFollowedStatus(UpdateFollowedStatusRequest) returns (Result);
  1049. //保存小程序用户信息
  1050. rpc saveMinAppUser(SaveMinAppUserRequest) returns (SaveMinAppUserResponse);
  1051. //
  1052. rpc getSnsUserInfo(GetSnsUserInfoRequest) returns (GetSnsUserInfoResponse);
  1053. //根据用户ID更新用户小程序信息
  1054. rpc updateSnsUserInfoByUserId(UpdateSnsUserInfoByUserIdRequest) returns (UpdateSnsUserInfoByUserIdResponse);
  1055. //实名认证
  1056. rpc authenticate(AuthenticateRequest) returns (AuthenticateResponse);
  1057. // 根据 userId 和 terminal 获取 snsUserInfo
  1058. rpc getSnsUserInfoByUserIdAndTerminal(GetSnsUserInfoByUserIdAndTerminalRequest) returns (GetSnsUserInfoByUserIdAndTerminalResponse);
  1059. //获取用户列表
  1060. rpc getUserList (GetUserListRequest) returns (GetUserListResponse);
  1061. }