Module: 中药配方模板新增^2021/11/6

  1. 中药配方模版流程
Since:
  • 2021/11/6
Author:
  • zz

Methods

(inner) post /treatmentplan_template_add(timestamp, sign, JSON)

Parameters:
Name Type Description
timestamp String(10) 时间戳,值为秒值,长度10位,时间戳有效期:±10分钟
sign String(64) 签名
JSON Object body参数
Properties
Name Type Attributes Default Description
doctorId String(24) 医生ID
diseaseId String(24) 病症ID
title String(50) 证型名称
prescriptionName String(50) 中药配方名称
isPublic Boolean <optional>
false 是否公开发布,true为公开发布,默认false 2021/11/3
isDefault Boolean <optional>
false 是否为默认使用的模板,trur为默认使用,默认false 2021/11/3
useAmount Number <optional>
0 使用费,一般由模板医生设置,其他医生需要付费使用
acupointMothod String(100) <optional>
针灸手法 2021/11/20
insideOrOutside Boolean 内外服法,true:内服,false:外用 2021/11/6
other String(5000) <optional>
其他疗法
takemethod String(100) <optional>
服用方法
prescription Array.<Object> 处方
Properties
Name Type Attributes Description
decoctionpieces String(50) 饮片名称
dose Number 饮片计量,单位克
method String(50) 炮制方法
knowledgebaseid String(24) <optional>
知识库饮片ID,如果比提供,接口会根据名称自动匹配知识库 2021/10/27
patentmedicines Array.<Object> <optional>
中成药列表 2021/11/2
Properties
Name Type Attributes Default Description
pirce Number <optional>
0 单价 2021/11/2
patentmedicine Object | String 中成药信息,文本类型时为知识库ID 2021/11/20
Properties
Name Type Description
_id String(24) 中成药ID,可用于调用 获取知识库 的参数 2021/11/2
title String(50) 中成药名称 2021/11/2
group String(5) <optional>
中成药联合用药标记,相同的group为联合用药的中成药 2021/11/2
acupoints Array.<Object> <optional>
针灸指压列表
Properties
Name Type Description
acupoint Object | String 针灸指压,文本类型时为知识库ID 2021/11/20
Properties
Name Type Description
_id String(24) 穴位ID,可用于调用 获取知识库 的参数
title String(50) 穴位名称
diettyerapy Array.<(Object|String)> <optional>
食疗列表,文本类型时为知识库ID 2021/11/20
Properties
Name Type Description
_id String(24) 食疗ID,可用于调用 获取知识库 的参数
title String(50) 食疗名称
reference Array.<(Object|String)> <optional>
临证参考列表,文本类型时为知识库ID 2021/11/20
Properties
Name Type Description
_id String(24) 临证参考ID,可用于调用 获取知识库 的参数
title String(50) 临证参考名称
Properties:
Name Type Description
templateId String(24) 中药配方模板ID
Throws:
400 缺少diseaseId
400 缺少doctorId
400 缺少title
Examples
请求示例:/treatmentplan_template_add?sign=29B95FBA8B10FEDFDCD4C9BC172F31AFA687DFA6B9241E69F3E59E873B6CF924&timestamp=1570428513
第一种请求JSON参数(推荐)
{
  "insideOrOutside": true,
  "acupointMothod": "针用泻法",
  "other": "<p>偏方:</p><p>①薏苡仁、白扁豆各30克,粳米1000克,共煮成...",
  "prescriptionName": "新加香薷饮",
  "title": "暑湿",
  "diseaseId": "5e3815da27ddaa24a8b0c74b"
  "takemethod": "每日一副,分两次服用。",
  "diettyerapy": ["5e32726e20a8e7777c66fda5", "5e32726e20a8e7777c66feba"],
  "reference": ["5f04863395883a2a915841ad"],
  "acupoints": [{
    "acupoint": "5e31908df90d9a74e4678b42"
  }, {
    "acupoint": "5e31908ef90d9a74e4678c8a"
  }, {
    "acupoint": "5e31908ef90d9a74e4678bd7"
  }, {
    "acupoint": "5e31908ef90d9a74e4678bf5"
  }, {
    "acupoint": "5e31908ef90d9a74e4678b75"
  }, {
    "acupoint": "5e31908ef90d9a74e4678ba2"
  }],
  "prescription": [{
    "price": 0.054,
    "decoctionpieces": "香薷",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b03137"
  }, {
    "price": 0,
    "decoctionpieces": "鲜扁豆花",
    "dose": 15
  }, {
    "price": 0.054,
    "decoctionpieces": "厚朴",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b03255"
  }, {
    "price": 0.8,
    "decoctionpieces": "金银花",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b03200"
  }, {
    "price": 0.165,
    "decoctionpieces": "连翘",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b031c1"
  }, {
    "price": 0.099,
    "decoctionpieces": "藿香",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b0314c"
  }, {
    "price": 0.054,
    "decoctionpieces": "佩兰",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b0320d"
  }],
  "patentmedicines": [{
    "price": 0,
    "patentmedicine": "5e37726a246ef76200b3cd36"
  }, {
    "price": 0,
    "patentmedicine": "5e377266246ef76200b3c235"
  }, {
    "price": 0,
    "patentmedicine": "5e37726e246ef76200b3d84b"
  }, {
    "price": 0,
    "patentmedicine": "5e377267246ef76200b3c274"
  }],
}
第二种请求JSON参数
{
  "insideOrOutside": true,
  "acupointMothod": "针用泻法",
  "other": "<p>偏方:</p><p>①薏苡仁、白扁豆各30克,粳米1000克,共煮成...",
  "prescriptionName": "新加香薷饮",
  "title": "暑湿",
  "diseaseId": "5e3815da27ddaa24a8b0c74b"
  "takemethod": "每日一副,分两次服用。",
  "diettyerapy": [{
    "_id": "5e32726e20a8e7777c66fda5",
    "title": "香薷饮【感冒】"
  }, {
    "_id": "5e32726e20a8e7777c66feba",
    "title": "藿香饮【感冒】"
  }],
  "reference": [{
      "_id": "5f04863395883a2a915841ad",
      "title": "支气管炎【专科】"
    }],
  "acupoints": [{
    "acupoint": {
      "_id": "5e31908df90d9a74e4678b42",
      "title": "孔最"
    }
  }, {
    "acupoint": {
      "_id": "5e31908ef90d9a74e4678c8a",
      "title": "合谷"
    }
  }, {
    "acupoint": {
      "_id": "5e31908ef90d9a74e4678bd7",
      "title": "中脘"
    }
  }, {
    "acupoint": {
      "_id": "5e31908ef90d9a74e4678bf5",
      "title": "足三里"
    }
  }, {
    "acupoint": {
      "_id": "5e31908ef90d9a74e4678b75",
      "title": "支沟"
    }
  }, {
    "acupoint": {
      "_id": "5e31908ef90d9a74e4678ba2",
      "title": "天枢"
    }
  }],
  "prescription": [{
    "price": 0,
    "decoctionpieces": "鲜扁豆花",
    "dose": 15
  }, {
    "price": 0.054,
    "decoctionpieces": "香薷",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b03137"
  }, {
    "price": 0.054,
    "decoctionpieces": "厚朴",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b03255"
  }, {
    "price": 0.8,
    "decoctionpieces": "金银花",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b03200"
  }, {
    "price": 0.165,
    "decoctionpieces": "连翘",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b031c1"
  }, {
    "price": 0.099,
    "decoctionpieces": "藿香",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b0314c"
  }, {
    "price": 0.054,
    "decoctionpieces": "佩兰",
    "dose": 9,
    "knowledgebaseid": "5e31a2b6e645d57634b0320d"
  }],
  "patentmedicines": [{
    "price": 0,
    "patentmedicine": {
      "_id": "5e37726a246ef76200b3cd36",
      "title": "藿香正气软胶囊"
    }
  }, {
    "price": 0,
    "patentmedicine": {
      "_id": "5e377266246ef76200b3c235",
      "title": "保济丸"
    }
  }, {
    "price": 0,
    "patentmedicine": {
      "_id": "5e37726e246ef76200b3d84b",
      "title": "十滴水"
    }
  }, {
    "price": 0,
    "patentmedicine": {
      "_id": "5e377267246ef76200b3c274",
      "title": "柴连口服液"
    }
  }],
}
返回示例:
{
  "templateId": "617f939587cc726f80d59af6"
}