[关闭]
@15311494814 2017-12-18T07:10:01.000000Z 字数 4502 阅读 497

亲健康追加接口

1,血压测量按年统计

  1. [get] rest/hBloodpressureController/countmonth/{userid}/{field}/{year}
  2. //{用户id,字段:(),年份(2017...)
  3. field:{bp_sys|bp_dia|bp_pulse}
  4. {
  5. "result": [
  6. {
  7. "month": 10,
  8. "field": "bp_sys",
  9. "max": "5",
  10. "min": "1",
  11. "avg": "1.67"
  12. },
  13. {
  14. "month": 11,
  15. "field": "bp_sys",
  16. "max": "1",
  17. "min": "1",
  18. "avg": "1.00"
  19. }
  20. ],
  21. "statusCode": "000000",
  22. "error": ""
  23. }

2, 血氧测量按年统计

  1. [get] rest/hBloodoxygenController/countmonth/{userid}/{field}/{year}
  2. //{用户id,字段:(),年份(2017...)
  3. field:{bo_xy , bo_mb}
  4. {
  5. "result": [
  6. {
  7. "month": 11,
  8. "field": "bo_xy",
  9. "max": "98",
  10. "min": "96",
  11. "avg": "96.46"
  12. }
  13. ],
  14. "error": "",
  15. "statusCode": "000000"
  16. }

3,耳温测量按年统计

  1. [get] rest/hEartemperatureController/countmonth/{userid}/{year}
  2. //{用户id,字段:(),年份(2017...)
  3. {
  4. "result": [
  5. {
  6. "month": 10,
  7. "field": "eartemp_temp",
  8. "max": "3",
  9. "min": "3",
  10. "avg": "3.00"
  11. },
  12. {
  13. "month": 11,
  14. "field": "eartemp_temp",
  15. "max": "1",
  16. "min": "1",
  17. "avg": "1.00"
  18. }
  19. ],
  20. "error": "",
  21. "statusCode": "000000"
  22. }

4,体重体脂按年测量数据

  1. [get] rest/hWeightBodyfatController/countmonth/{userid}/{field}/{year}
  2. //{用户id,字段:(),年份(2017...)
  3. *field:{"body_weight|body_fat_ratio|body_muscle_mass|body_moisture|body_bmi|
  4. body_bmr|body_bone_mass|body_visceral_fat"};
  5. {
  6. "result": [
  7. {
  8. "month": 11,
  9. "field": "body_weight",
  10. "max": "79.6",
  11. "min": "44.1",
  12. "avg": "67.89"
  13. }
  14. ],
  15. "error": "",
  16. "statusCode": "000000"
  17. }

5,尿检按年测量数据

  1. [get] rest/hUrineTestController/countmonth/{userid}/{field}/{year}
  2. //{用户id,字段:(),年份(yyyy)
  3. field:{leu|nit|ubg|pro|ph|bld|sg|ket|bil|glu|vc}
  4. {
  5. "result": [
  6. {
  7. "month": 11,
  8. "field": "leu",
  9. "max": "2",
  10. "min": "2",
  11. "avg": "2.00"
  12. }
  13. ],
  14. "error": "",
  15. "statusCode": "000000"
  16. }

6,心电按年检测数据

  1. [get] rest/hElectrocardingraphyController/countmonth/{userid}/{year}
  2. //{用户id,字段:(),年份(yyyy)
  3. {"result":[{"month":11,"field":"hr","max":"88","min":"3","avg":"64.12"}],"error":"","statusCode":"000000"}

7-1,血糖按年统计

  1. [get] rest/hBloodSugarController/countmonth/{userid}/{foodstatus}/{year}
  2. //{用户id,字段:(),年份(yyyy)
  3. {"result":[{"month":10,"field":"foodstatus","max":"7","min":"5.29","avg":"6.81"}],"error":"","statusCode":"000000"}

7-2,血糖统计检测

  1. [get] rest/hBloodSugarController/count/{userid}/{year}
  2. //{用户id,字段:(),年份(yyyy)
  3. {
  4. "result": [
  5. {
  6. "date": "2017-10-23",
  7. "field": "foodstatus",
  8. "max": "5.29",
  9. "min": "5.29",
  10. "avg": "5.29"
  11. }
  12. ],
  13. "error": "",
  14. "statusCode": "000000"
  15. }

7-3 通过userid查询血糖数据

  1. [post] rest/hBloodSugarController/get
  2. body:{
  3. "userid":"" ,
  4. "startindex":"10",
  5. "pagesize":"3",
  6. "begincreatetime":"2016-12-12 00:00:00",
  7. "endcreatetime":"2018-12-13 00:00:00"
  8. }
  9. result:
  10. {
  11. "result": [
  12. {
  13. "id": "402881475f47fe24015f47fed75a0000",
  14. "result": "7",
  15. "createName": null,
  16. "createBy": null,
  17. "status": "100",
  18. "devicesn": "2AH4MHR0886",
  19. "createdateBegin": null,
  20. "createdateEnd": null,
  21. "foodstatus": "8",
  22. "sysOrgCode": null,
  23. "sysCompanyCode": null,
  24. "updateName": null,
  25. "updateBy": null,
  26. "page": 1,
  27. "updateDate": null,
  28. "rows": 10,
  29. "realname": null,
  30. "code": "31215087291631",
  31. "userId": "402881035ebd51e0015ebd5353590001",
  32. "unit": "0",
  33. "aimstatus": "5",
  34. "openid": "",
  35. "testtime": "2017-10-25 11:25:25",
  36. "usercode": "100114",
  37. "createtime": "2017-10-25 11:26:03",
  38. "time": null,
  39. "token": null
  40. }
  41. ],
  42. "error": "",
  43. "statusCode": "000000"
  44. }

血脂

1,录入数据

  1. [post] rest/hBloodFatController
  2. body:{
  3. "userid":"",//用户id
  4. "token":"",
  5. "chol":"",//胆固醇
  6. "trig":"",//甘油三脂
  7. "hdl_chol":"",//高密度蛋白质
  8. "calc_ldl":"",//低密度蛋白质
  9. "tc_hdl":"",//
  10. "source":"",//数据来源(ios,android,wx)
  11. "boundtype":"",//绑定类型,暂时只有bluetooth
  12. "name":"",//设备名称
  13. }
  14. result:{
  15. "result": {
  16. "name": "apple watch 38mm",
  17. "id": "ff8080816063cfce016063d2a2130000",
  18. "chol": "10",
  19. "trig": "2",
  20. "hdlChol": "3",
  21. "calcLdl": "2",
  22. "tcHdl": "1",
  23. "source": "ios",
  24. "userid": "8af4dd1c5f46eeb3015f471d693c0024",
  25. "createDate": 1513503236619,
  26. "boundtype": "bluetooth"
  27. },
  28. "error": "",
  29. "statusCode": "000000"
  30. }
  31. error:{"result":"","error":"result丢失","statusCode":"666666"}

2,查看一条数据

  1. [get] rest/hBloodFatController/{id}
  2. result:{"result":{},"error":"","statusCode":"000000"}

3,通过用户ID查看测量数据

  1. [post] rest/hBloodFatController/get
  2. body:{
  3. "userid":"",//用户id
  4. "startindex":"",//起始下标,分页用
  5. "pagesize":"",//每页条数
  6. "begincreatetime":"2017-01-01 12:01:21" ,
  7. "endcreatetime":"2017-01-01 12:01:21"
  8. }
  9. result:{"result":[{}],"statusCode":"000000","error":""}

4,通过数据ID删除数据

  1. delete] rest/hBloodFatController/{id}
  2. result:{"result":"ok","error":"","statusCode":"000000"}

5,统计信息

  1. [get] rest/hBloodFatController/count/{userid}/{field}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. field:{chol | trig | hdl_chol| calc_ldl | tc_hdl}
  4. result:{
  5. "result": [
  6. {
  7. "date": "2017-10-20",
  8. "field": "chol",
  9. "max": "5",
  10. "min": "1",
  11. "avg": 3
  12. },
  13. {
  14. "date": "2017-10-31",
  15. "field": "chol",
  16. "max": "1",
  17. "min": "1",
  18. "avg": 1
  19. }
  20. ],
  21. "error": "",
  22. "statusCode": "000000"
  23. }

6,按年统计信息

  1. [get] rest/hBloodFatController/countmonth/{userid}/{field}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. field:{chol | trig | hdl_chol| calc_ldl | tc_hdl}
  4. result:{
  5. "result": [
  6. {
  7. "month": "12",
  8. "field": "chol",
  9. "max": "5",
  10. "min": "1",
  11. "avg": 3
  12. }
  13. ],
  14. "error": "",
  15. "statusCode": "000000"
  16. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注