接口描述
本接口用于获取知识库中的方剂数据。
- 请求地址:
https://openapi.macrocura.com/knowledge/prescriptions/
- 请求方法:
GET
API
版本要求
- 详见版本发布
请求示例
GET https://openapi.macrocura.com/knowledge/prescriptions/
请求参数
无
响应示例
{
"code": 2000,
"description": "success",
"results": [
{
"uuid": "830c8231-baa9-43ce-804d-8bfaa72155a3",
"name": "半夏厚朴汤",
"alias_list": ["半夏厚朴汤"],
"pinyin": "bxhpt",
"prescription_items": [
{
"uuid": "f97d8374-4e65-49a9-9bcb-e893e1de6cee",
"name": "姜半夏",
"weight": 15
},
{
"uuid": "8f31a50b-0736-4c33-9100-9d2bcc1fe560",
"name": "茯苓",
"weight": 12
},
{
"uuid": "5a698156-1d88-4bf0-b4ac-7c1633118471",
"name": "厚朴",
"weight": 9
},
{
"uuid": "1f93b6d6-2ee1-4272-bbc0-0291a36c29a3",
"name": "生姜",
"weight": 15
},
{
"uuid": "10be155c-7b34-494d-b8a2-0e74b7d95462",
"name": "紫苏叶",
"weight": 6
}
]
},
...
]
}
公共响应参数
名称 | 类型 | 描述 | 示例 |
---|---|---|---|
code | Number | 请求处理的状态码 | 2000 |
description | String | 请求处理的状态描述 | "success" |
results | Object | 请求处理的返回值,具体内容参照各章节"返回数据说明" | {} 或 [] |
返回数据说明
results
字段为本接口返回的方剂数据,它的构成如下:
名称 | 类型 | 描述 |
---|---|---|
uuid | String | 方剂的uuid |
name | String | 方剂的名称 |
alias_list | Array | 方剂别名列表 |
pinyin | String | 方剂的中文拼音 |
prescription_items | Array | 组成方剂的中药列表 |
prescription_items
中存放的是组成某一方剂的中药列表,它的构成如下:
名称 | 类型 | 描述 |
---|---|---|
uuid | String | 中药的uuid |
name | String | 中药的名称 |
weight | Number | 中药的剂量 (注意:此剂量为草药类型的剂量) |