[关闭]
@chenwei123 2017-06-27T08:58:04.000000Z 字数 16659 阅读 611

问答订单

肺轻松


创建问答订单

Description

患者向医生下单

Method and URL Structure

Method Resource URL
POST /qaorder/order/create/

Request Parameters

Name Description Required Default
doctor 医生的用户名 Yes
order_type 订单类型 Yes

"order_type": 在线咨询(online),包月服务(monthly)

Request

  1. {
  2. "doctor":"doctor1",
  3. "order_type":"online"
  4. }

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X POST -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' -d 'order_type=online&doctor=doctor1' http://127.0.0.1:8000/qaorder/order/create/

JSON Response

  1. {
  2. "pk": 18,
  3. "patient": {
  4. "owner": "patient1",
  5. "invitation_code": "123",
  6. "name": "patient",
  7. "avatar": "http://123.jpg"
  8. },
  9. "doctor": {
  10. "owner": "doctor2",
  11. "invitation_code": "",
  12. "name": "doctor",
  13. "avatar": "http://123.jpg"
  14. },
  15. "question": null,
  16. "answer": null,
  17. "order_number": "12257268251845025696240003",
  18. "amount": "19.00",
  19. "status": 0,
  20. "status_display": "待支付",
  21. "channel": "alipay",
  22. "channel_display": "支付宝",
  23. "order_type": "online",
  24. "order_type_display": "在线咨询",
  25. "create_time": "2017-03-23T10:11:26.514808"
  26. }

查看订单详情

Description

用户查看订单信息

Method and URL Structure

Method Resource URL
GET /qaorder/order/detail/${order_number}/

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/detail/12257268228937975696240003/

JSON Response

  1. {
  2. "pk": 14,
  3. "patient": {
  4. "owner": "patient1",
  5. "invitation_code": "123",
  6. "name": "patient",
  7. "avatar": "http://123.jpg"
  8. },
  9. "doctor": {
  10. "owner": "doctor1",
  11. "invitation_code": "123456",
  12. "name": "doctor",
  13. "avatar": ""
  14. },
  15. "question": {
  16. "pk": 3,
  17. "owner": {
  18. "owner": "patient1",
  19. "invitation_code": "123",
  20. "name": "patient",
  21. "avatar": "http://123.jpg"
  22. },
  23. "order": "12257268228937975696240003",
  24. "allergy_history": "无过敏史",
  25. "smoke_history": "无吸烟史",
  26. "condition_description": "无病",
  27. "file_list": [
  28. "http://123.jpg",
  29. "http://123.jpg",
  30. "http://123.jpg"
  31. ],
  32. "desc_files": "http://123.jpg,http://123.jpg,http://123.jpg",
  33. "create_time": "2017-03-22T15:05:52.773782"
  34. },
  35. "answer": {
  36. "pk": 9,
  37. "owner": {
  38. "owner": "doctor1",
  39. "invitation_code": "123456",
  40. "name": "doctor",
  41. "avatar": ""
  42. },
  43. "question": 3,
  44. "diagnosis_tag": [
  45. {
  46. "pk": 3,
  47. "owner": "patient1",
  48. "name": "肺结核",
  49. "description": "这是一个肺结核"
  50. },
  51. {
  52. "pk": 2,
  53. "owner": "patient1",
  54. "name": "哮喘",
  55. "description": "这是一个挺严重的哮喘病"
  56. }
  57. ],
  58. "drug": [
  59. {
  60. "pk": 3,
  61. "owner": "doctor1",
  62. "name": "头孢",
  63. "standard": "0.25*20s",
  64. "total_dosage": "125mg*10盒(瓶)",
  65. "each_dosage": "0.5g",
  66. "day_times": "3次/天"
  67. },
  68. {
  69. "pk": 1,
  70. "owner": "patient1",
  71. "name": "头孢",
  72. "standard": "0.25*20s",
  73. "total_dosage": "125mg*10盒(瓶)",
  74. "each_dosage": "0.5g",
  75. "day_times": "3次/天"
  76. }
  77. ],
  78. "diagnosis_result": "吃点头孢,吃一个疗程,就好了",
  79. "extra_suggestion": "平时多出蔬菜",
  80. "create_time": "2017-03-22T16:41:09.317246"
  81. },
  82. "order_number": "12257268228937975696240003",
  83. "amount": "15.00",
  84. "status": 4,
  85. "status_display": "待评价",
  86. "channel": "alipay",
  87. "channel_display": "支付宝",
  88. "order_type": "online",
  89. "order_type_display": "在线咨询",
  90. "create_time": "2017-03-21T14:38:51.060124"
  91. }

删除订单

Description

用户删除订单

Method and URL Structure

Method Resource URL
GET /qaorder/order/destroy/${order_number}/

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/destroy/12257268228937975696240003/

JSON Response

Name Description Default
detail 失败原因 Not found
status 成功 204

根据身份不同获取订单列表(或者过滤status)

Description

用户获取订单列表

Method and URL Structure

Method Resource URL Description
GET /qaorder/order/${position}/list/ 获取医生/患者下所有订单

Request Paramters

Name Description Required Default
status 订单状态 NO
  1. position 传值描述:
  2. 如果是患者端,则 position='patient';
  3. 如果是医生端,则 position='doctor'
  1. status 传值描述:
  2. 待支付,则 status=0;
  3. 已支付,则 status=1;
  4. 待回答,则 status=2;
  5. 已回答,则 status=3;
  6. 待评价,则 status=4;
  7. 已评价,则 status=5;
  8. 取消 ,则 status=6

Request Header

Name Description Required Default
Authorization Token 5fcfbbe09e2c7b18f4e5f2cca1f0511e9255ab49 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/doctor/list/?status=1

JSON Response

  1. {
  2. "count": 1,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 19,
  8. "patient": {
  9. "owner": "patient1",
  10. "invitation_code": "123",
  11. "name": "patient",
  12. "avatar": "http://123.jpg"
  13. },
  14. "doctor": {
  15. "owner": "doctor2",
  16. "invitation_code": "",
  17. "name": "doctor",
  18. "avatar": "http://123.jpg"
  19. },
  20. "question": null,
  21. "answer": null,
  22. "order_number": "12257268267676495696240003",
  23. "amount": "70.00",
  24. "status": 1,
  25. "status_display": "已支付",
  26. "channel": "alipay",
  27. "channel_display": "支付宝",
  28. "order_type": "online",
  29. "order_type_display": "在线咨询",
  30. "create_time": "2017-03-29T10:12:27.040199"
  31. }
  32. ]
  33. }

根据身份不同获取最新一条订单

Description

用户获取最新一条订单

Method and URL Structure

Method Resource URL Description
GET /qaorder/order/${position}/newone/ 获取医生/患者下最新一条订单

Request Paramters

Name Description Required Default
username 用户名 YES
  1. position 传值描述:
  2. 如果是患者端,则 position='patient';
  3. 如果是医生端,则 position='doctor'
  1. usernme 传值描述:
  2. 如果 position='patient', username:医生用户名
  3. 如果 position='doctor', username:患者用户名

Request Header

Name Description Required Default
Authorization Token 5fcfbbe09e2c7b18f4e5f2cca1f0511e9255ab49 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/patient/newone/?username=doctor2

JSON Response

  1. {
  2. "pk": 26,
  3. "patient": {
  4. "owner": "patient2",
  5. "invitation_code": "",
  6. "name": "",
  7. "avatar": ""
  8. },
  9. "doctor": {
  10. "owner": "doctor2",
  11. "invitation_code": "",
  12. "name": "doctor",
  13. "avatar": "http://123.jpg"
  14. },
  15. "question": null,
  16. "answer": null,
  17. "order_number": "12257268323647365696240006",
  18. "amount": "0.00",
  19. "status": 0,
  20. "status_display": "待支付",
  21. "channel": "alipay",
  22. "channel_display": "支付宝",
  23. "order_type": "online",
  24. "order_type_display": "在线咨询",
  25. "create_time": "2017-06-27T15:48:55.811295"
  26. }

获取用户所有的待回答&已回答的所有订单

Description

用户获取待回答&已回答订单列表

Method and URL Structure

Method Resource URL Description
GET /qaorder/order/${position}/list/qa/ 获取医生/患者下所有订单
  1. position 传值描述:
  2. 如果是患者端,则 position='patient';
  3. 如果是医生端,则 position='doctor'

Request Header

Name Description Required Default
Authorization Token 5fcfbbe09e2c7b18f4e5f2cca1f0511e9255ab49 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/doctor/list/qa/

JSON Response

  1. {
  2. "count": 2,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 19,
  8. "patient": {
  9. "owner": "patient1",
  10. "invitation_code": "123",
  11. "name": "patient",
  12. "avatar": "http://123.jpg"
  13. },
  14. "doctor": {
  15. "owner": "doctor2",
  16. "invitation_code": "",
  17. "name": "doctor",
  18. "avatar": "http://123.jpg"
  19. },
  20. "question": null,
  21. "answer": null,
  22. "order_number": "12257268267676495696240003",
  23. "amount": "70.00",
  24. "status": 2,
  25. "status_display": "待回答",
  26. "channel": "alipay",
  27. "channel_display": "支付宝",
  28. "order_type": "online",
  29. "order_type_display": "在线咨询",
  30. "create_time": "2017-03-29T10:12:27.040199"
  31. },
  32. {
  33. "pk": 18,
  34. "patient": {
  35. "owner": "patient1",
  36. "invitation_code": "123",
  37. "name": "patient",
  38. "avatar": "http://123.jpg"
  39. },
  40. "doctor": {
  41. "owner": "doctor2",
  42. "invitation_code": "",
  43. "name": "doctor",
  44. "avatar": "http://123.jpg"
  45. },
  46. "question": null,
  47. "answer": null,
  48. "order_number": "12257268251845025696240003",
  49. "amount": "19.00",
  50. "status": 3,
  51. "status_display": "已回答",
  52. "channel": "alipay",
  53. "channel_display": "支付宝",
  54. "order_type": "online",
  55. "order_type_display": "在线咨询",
  56. "create_time": "2017-03-23T10:11:26.514808"
  57. }
  58. ]
  59. }

取消订单

Description

用户可以对未付款的订单取消掉

Method and URL Structure

Method Resource URL
PUT /qaorder/order/cancel/${order_number}/

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/cancel/12257268246663755696240003/

JSON Response

  1. {
  2. "pk": 16,
  3. "patient": {
  4. "owner": "patient1",
  5. "invitation_code": "123",
  6. "name": "patient",
  7. "avatar": "http://123.jpg"
  8. },
  9. "doctor": {
  10. "owner": "doctor2",
  11. "invitation_code": "",
  12. "name": "doctor",
  13. "avatar": "http://123.jpg"
  14. },
  15. "question": null,
  16. "answer": null,
  17. "order_number": "12257268246663755696240003",
  18. "amount": "15.00",
  19. "status": 6,
  20. "status_display": "取消",
  21. "channel": "alipay",
  22. "channel_display": "支付宝",
  23. "order_type": "online",
  24. "order_type_display": "在线咨询",
  25. "create_time": "2017-03-22T17:51:24.190047"
  26. }

结束订单

Description

用户可以对已回答的订单结束咨询

Method and URL Structure

Method Resource URL
PUT /qaorder/order/finish/${order_number}/

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/finish/12257268228937975696240003/

JSON Response

  1. {
  2. "pk": 14,
  3. "patient": {
  4. "owner": "patient1",
  5. "invitation_code": "123",
  6. "name": "patient",
  7. "avatar": "http://123.jpg"
  8. },
  9. "doctor": {
  10. "owner": "doctor1",
  11. "invitation_code": "123456",
  12. "name": "doctor",
  13. "avatar": ""
  14. },
  15. "question": {
  16. "pk": 3,
  17. "owner": {
  18. "owner": "patient1",
  19. "invitation_code": "123",
  20. "name": "patient",
  21. "avatar": "http://123.jpg"
  22. },
  23. "order": "12257268228937975696240003",
  24. "allergy_history": "无过敏史",
  25. "smoke_history": "无吸烟史",
  26. "condition_description": "无病",
  27. "file_list": [
  28. "http://123.jpg",
  29. "http://123.jpg",
  30. "http://123.jpg"
  31. ],
  32. "desc_files": "http://123.jpg,http://123.jpg,http://123.jpg",
  33. "create_time": "2017-03-22T15:05:52.773782"
  34. },
  35. "answer": {
  36. "pk": 9,
  37. "owner": {
  38. "owner": "doctor1",
  39. "invitation_code": "123456",
  40. "name": "doctor",
  41. "avatar": ""
  42. },
  43. "question": 3,
  44. "diagnosis_tag": [
  45. {
  46. "pk": 3,
  47. "owner": "patient1",
  48. "name": "肺结核",
  49. "description": "这是一个肺结核"
  50. },
  51. {
  52. "pk": 2,
  53. "owner": "patient1",
  54. "name": "哮喘",
  55. "description": "这是一个挺严重的哮喘病"
  56. }
  57. ],
  58. "drug": [
  59. {
  60. "pk": 3,
  61. "owner": "doctor1",
  62. "name": "头孢",
  63. "standard": "0.25*20s",
  64. "total_dosage": "125mg*10盒(瓶)",
  65. "each_dosage": "0.5g",
  66. "day_times": "3次/天"
  67. },
  68. {
  69. "pk": 1,
  70. "owner": "patient1",
  71. "name": "头孢",
  72. "standard": "0.25*20s",
  73. "total_dosage": "125mg*10盒(瓶)",
  74. "each_dosage": "0.5g",
  75. "day_times": "3次/天"
  76. }
  77. ],
  78. "diagnosis_result": "吃点头孢,吃一个疗程,就好了",
  79. "extra_suggestion": "平时多出蔬菜",
  80. "create_time": "2017-03-22T16:41:09.317246"
  81. },
  82. "order_number": "12257268228937975696240003",
  83. "amount": "15.00",
  84. "status": 4,
  85. "status_display": "待评价",
  86. "channel": "alipay",
  87. "channel_display": "支付宝",
  88. "order_type": "online",
  89. "order_type_display": "在线咨询",
  90. "create_time": "2017-03-21T14:38:51.060124"
  91. }

Error Response

  1. {
  2. "status": -4,
  3. "message": "不能结束订单"
  4. }

过滤订单列表(暂时废弃)

Description

用户过滤订单(根据订单的状态)

Method and URL Structure

Method Resource URL
GET /qaorder/order/filter/

Request Paramters

Name Description Required Default
status 订单状态 YES
  1. status 传值描述:
  2. 待支付,则 status=0;
  3. 已支付,则 status=1;
  4. 待回答,则 status=2;
  5. 已回答,则 status=3;
  6. 待评价,则 status=4;
  7. 已评价,则 status=5;
  8. 取消 ,则 status=6

Request Header

Name Description Required Default
Authorization Token 5fcfbbe09e2c7b18f4e5f2cca1f0511e9255ab49 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/filter/?status=0

JSON Response

  1. {
  2. "count": 2,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 18,
  8. "patient": {
  9. "owner": "patient1",
  10. "invitation_code": "123",
  11. "name": "patient",
  12. "avatar": "http://123.jpg"
  13. },
  14. "doctor": {
  15. "owner": "doctor2",
  16. "invitation_code": "",
  17. "name": "doctor",
  18. "avatar": "http://123.jpg"
  19. },
  20. "question": null,
  21. "answer": null,
  22. "order_number": "12257268251845025696240003",
  23. "amount": "19.00",
  24. "status": 0,
  25. "status_display": "待支付",
  26. "channel": "alipay",
  27. "channel_display": "支付宝",
  28. "order_type": "online",
  29. "order_type_display": "在线咨询",
  30. "create_time": "2017-03-23T10:11:26.514808"
  31. },
  32. {
  33. "pk": 15,
  34. "patient": {
  35. "owner": "patient1",
  36. "invitation_code": "123",
  37. "name": "patient",
  38. "avatar": "http://123.jpg"
  39. },
  40. "doctor": {
  41. "owner": "doctor1",
  42. "invitation_code": "123456",
  43. "name": "doctor",
  44. "avatar": ""
  45. },
  46. "question": null,
  47. "answer": null,
  48. "order_number": "12257268238541425696240003",
  49. "amount": "15.00",
  50. "status": 0,
  51. "status_display": "待支付",
  52. "channel": "alipay",
  53. "channel_display": "支付宝",
  54. "order_type": "online",
  55. "order_type_display": "在线咨询",
  56. "create_time": "2017-03-21T15:00:09.963589"
  57. }
  58. ]
  59. }

订单评价

Description

患者进行对医生评价

Method and URL Structure

Method Resource URL
PUT /qaorder/order/evaluate/${order_number}/

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

Request Paramters

Name Description Required Default
scores 评分 YES
content 评价内容 YES

cURL Example

  1. curl -X PUT -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/evaluate/12257268228937975696240003/

JSON Response

  1. {
  2. "pk": 12,
  3. "patient": {
  4. "owner": "patient1",
  5. "invitation_code": "123",
  6. "name": "patient",
  7. "avatar": "http://123.jpg"
  8. },
  9. "doctor": {
  10. "owner": "doctor1",
  11. "invitation_code": "123456",
  12. "name": "doctor",
  13. "avatar": ""
  14. },
  15. "scores": 5,
  16. "scores_display": "五星",
  17. "content": "好评",
  18. "create_time": "2017-03-23T15:23:38.084583",
  19. "evaluate_type": "online",
  20. "evaluate_type_display": "在线咨询"
  21. }

获取某一医生的所有评价

Description

查看医生的评价

Method and URL Structure

Method Resource URL
GET /qaorder/user/${username}/

Request Header

Name Description Required Default
Authorization Token 5fcfbbe09e2c7b18f4e5f2cca1f0511e9255ab49 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/user/doctor1/

JSON Response

  1. {
  2. "count": 12,
  3. "next": "http://127.0.0.1:8000/qaorder/user/doctor1/?page=2&page_size=4",
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 1,
  8. "patient": {
  9. "owner": "patient1",
  10. "invitation_code": "123",
  11. "name": "patient",
  12. "avatar": "http://123.jpg"
  13. },
  14. "doctor": {
  15. "owner": "doctor1",
  16. "invitation_code": "123456",
  17. "name": "doctor",
  18. "avatar": ""
  19. },
  20. "scores": 5,
  21. "scores_display": "五星",
  22. "content": "好评",
  23. "create_time": "2017-03-23T14:51:21.302837",
  24. "evaluate_type": "online",
  25. "evaluate_type_display": "在线咨询"
  26. },
  27. {
  28. "pk": 2,
  29. "patient": {
  30. "owner": "patient1",
  31. "invitation_code": "123",
  32. "name": "patient",
  33. "avatar": "http://123.jpg"
  34. },
  35. "doctor": {
  36. "owner": "doctor1",
  37. "invitation_code": "123456",
  38. "name": "doctor",
  39. "avatar": ""
  40. },
  41. "scores": 5,
  42. "scores_display": "五星",
  43. "content": "好评",
  44. "create_time": "2017-03-23T14:51:43.167329",
  45. "evaluate_type": "online",
  46. "evaluate_type_display": "在线咨询"
  47. },
  48. {
  49. "pk": 3,
  50. "patient": {
  51. "owner": "patient1",
  52. "invitation_code": "123",
  53. "name": "patient",
  54. "avatar": "http://123.jpg"
  55. },
  56. "doctor": {
  57. "owner": "doctor1",
  58. "invitation_code": "123456",
  59. "name": "doctor",
  60. "avatar": ""
  61. },
  62. "scores": 5,
  63. "scores_display": "五星",
  64. "content": "好评",
  65. "create_time": "2017-03-23T14:52:10.106598",
  66. "evaluate_type": "online",
  67. "evaluate_type_display": "在线咨询"
  68. },
  69. {
  70. "pk": 4,
  71. "patient": {
  72. "owner": "patient1",
  73. "invitation_code": "123",
  74. "name": "patient",
  75. "avatar": "http://123.jpg"
  76. },
  77. "doctor": {
  78. "owner": "doctor1",
  79. "invitation_code": "123456",
  80. "name": "doctor",
  81. "avatar": ""
  82. },
  83. "scores": 5,
  84. "scores_display": "五星",
  85. "content": "好评",
  86. "create_time": "2017-03-23T14:53:50.544454",
  87. "evaluate_type": "online",
  88. "evaluate_type_display": "在线咨询"
  89. }
  90. ]
  91. }

订单支付

Description

支付问答订单

Method and URL Structure

Method Resource URL
PATCH /qaorder/order/pay/${order_number}/

Request Parameter

Name Description Required Default
channel 支付方式 YES
  1. 支付方式分三种:wx(微信),alipay(支付宝),balance(余额)

Request Header

Name Description Required Default
Authorization Token 48cebaf1955b6f45ee76515dbed221a1f229dd69 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X PATCH -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/order/pay/12257268238541425696240003/

JSON Response

  1. {
  2. "status": 0,
  3. "message": "",
  4. "charge": {
  5. "order_no": "12257268238541425696240003",
  6. "extra": {},
  7. "app": "app_HOafLKjbnLm1jXrP",
  8. "livemode": true,
  9. "currency": "cny",
  10. "time_settle": null,
  11. "time_expire": 1490340878,
  12. "id": "ch_TabDi9v1u9G0fjnLiPq5OmDS",
  13. "subject": "肺轻松#1225726823854142569624",
  14. "failure_msg": null,
  15. "channel": "alipay",
  16. "metadata": {
  17. "owner": "patient1",
  18. "order_number": "12257268238541425696240003"
  19. },
  20. "body": "肺轻松#12257268238541425696240003",
  21. "credential": {
  22. "alipay": {
  23. "orderInfo": "service=\"mobile.securitypay.pay\"&_input_charset=\"utf-8\"&notify_url=\"https%3A%2F%2Fnotify.pingxx.com%2Fnotify%2Fcharges%2Fch_TabDi9v1u9G0fjnLiPq5OmDS\"&partner=\"2088601268521360\"&out_trade_no=\"12257268238541425696240003\"&subject=\"肺轻松#1225726823854142569624\"&body=\"肺轻松#12257268238541425696240003 ch_TabDi9v1u9G0fjnLiPq5OmDS\"&total_fee=\"15.00\"&payment_type=\"1\"&seller_id=\"2088601268521360\"&it_b_pay=\"2017-03-24 15:34:38\"&sign=\"Skm9ejPMkUIYTc%2F%2FDAF8lWnzSEx9LJyoAHYEL7GRAkPC317Pe%2BxYn9TqdRrpRs6AErregTec6eLFiCdpgaVob0yDAhML49yP%2BrdRhHqMpLzhdyr4293I5JmSZ1%2B7HKHWVpLG6r%2B2o80C1lLao7mSW2jgI9bheWTaTNQrfw5YK1Y%3D\"&sign_type=\"RSA\""
  24. },
  25. "object": "credential"
  26. },
  27. "client_ip": "127.0.0.1",
  28. "description": null,
  29. "amount_refunded": 0,
  30. "refunded": false,
  31. "object": "charge",
  32. "paid": false,
  33. "amount_settle": 1500,
  34. "time_paid": null,
  35. "failure_code": null,
  36. "refunds": {
  37. "url": "/v1/charges/ch_TabDi9v1u9G0fjnLiPq5OmDS/refunds",
  38. "has_more": false,
  39. "object": "list",
  40. "data": []
  41. },
  42. "created": 1490254478,
  43. "transaction_no": null,
  44. "amount": 1500
  45. }
  46. }

获取某一患者的所有记录(医生端)

Description

医生查看患者的问诊记录

Method and URL Structure

Method Resource URL
GET /qaorder/patient/inquiry/record/${pk}/

url 中的 pk 为患者patient 的 pk

Request Header

Name Description Required Default
Authorization Token 5fcfbbe09e2c7b18f4e5f2cca1f0511e9255ab49 Yes

* Authorization的值为登录成功后返回值

cURL Example

  1. curl -X GET -H 'Authorization: Token 48cebaf1955b6f45ee76515dbed221a1f229dd69' http://127.0.0.1:8000/qaorder/patient/inquiry/record/3/

JSON Response

  1. {
  2. "count": 3,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 15,
  8. "order_number": "12257268238541425696240003",
  9. "create_time": "2017-03-21T15:00:09.963589"
  10. },
  11. {
  12. "pk": 14,
  13. "order_number": "12257268228937975696240003",
  14. "create_time": "2017-03-21T14:38:51.060124"
  15. },
  16. {
  17. "pk": 13,
  18. "order_number": "12257268217187655696240003",
  19. "create_time": "2017-03-21T14:38:50.594895"
  20. }
  21. ]
  22. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注