注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 阿里健康API

alibaba.alihealth.druguse.query (合理用药规则查询)

查询用户购买的药品命中的风险规则

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
command SafeMedicationReqCommand 可选 入参
  • └ order_id
  • String
  • 可选
  • 1838983105989823315
  • 关联订单
  • patient
  • Patient
  • 可选
  • 患者,启用特殊人群规则情况下必传
  • └ gender
  • Number
  • 可选
  • 1
  • 用药人性别(0未知1男2女)
  • └ weight
  • Number
  • 可选
  • 70
  • 用药人体重-单位kg
  • └ user_id
  • String
  • 可选
  • 22287869
  • 淘系用户id
  • └ age
  • Number
  • 可选
  • 55
  • 用药人年龄-单位:天
  • └ height
  • Number
  • 可选
  • 175
  • 用药人身高-单位cm
  • └ labels
  • String []
  • 可选
  • ["PREGNANCY","LACTATION","HYPOHEPATIA","SEVERE_HYPOHEPATIA","SEVERE_RENALINADEQUACY","RENALINADEQUACY"]
  • 人群标签
  • └ scene_name
  • String
  • 必须
  • prescription
  • 场景名
  • prescription_items
  • PrescriptionItem []
  • 必须
  • 处方项,包括药品、用法用量以及购买量
  • dosage
  • Dosage
  • 可选
  • 用法用量,启用用法用量规则的条件下必传
  • items
  • DosageItem []
  • 可选
  • 用法用量
  • └ unit
  • String
  • 可选
  • mg
  • 使用量单位
  • └ type
  • String
  • 可选
  • SINGLEDAILYDOSE
  • 用量类型(SINGLEDAILYDOSE("单日剂量"), SINGLEDOSE("单次剂量"), DRUGCOURSE("药品疗程"), FREQUENCYADMINISTRATION("给药频次"))
  • └ value
  • BigDecimal
  • 可选
  • 10.0
  • 使用量
  • └ way
  • String
  • 可选
  • 口服
  • 用法
  • buy_amount
  • BuyAmount
  • 可选
  • 购买数量,启用限购的规则条件下必传
  • └ buy_amount
  • Number
  • 可选
  • 5
  • 本次购买量
  • └ history_days
  • Number
  • 可选
  • 10
  • 统计周期,不传的话则不做周期限购
  • └ history_total_amount
  • Number
  • 可选
  • 20
  • 历史购买量。历史购买量需要包含本次购买量,不传的话则不做周期限购
  • drug
  • Drug
  • 必须
  • 购买的药品
  • └ common_name
  • String
  • 必须
  • 茶碱缓释片
  • 通用名
  • └ quantity_per_pack
  • Number
  • 可选
  • 24
  • 装量值(例:24粒)
  • └ tenant_spu_id
  • String
  • 可选
  • 22244
  • 租户的药品唯一标识别
  • └ producer
  • String
  • 可选
  • 锦州本天药业有限公司
  • 生产厂家
  • ingredients
  • Ingredients []
  • 可选
  • 成分
  • └ unit
  • String
  • 可选
  • mg
  • 成分单位
  • └ quantity
  • Number
  • 可选
  • 10
  • 成分数值
  • └ name
  • String
  • 可选
  • 青霉素类广谱β-内酰胺类抗生素
  • 成分名
  • └ spu_id
  • String
  • 可选
  • 511281473
  • 健康标品库的SpuId
  • └ unit_of_per_unit
  • String
  • 可选
  • mg
  • 最小使用单位数值剂量单位(mg)
  • └ quantity_per_unit
  • Number
  • 可选
  • 10
  • 最小使用单位数值(例:10)
  • └ approval_number
  • String
  • 可选
  • 国药准字H21020004
  • 国药准字号
  • └ type
  • String
  • 可选
  • WESTERN_PRESCRIPTION_MEDICINE
  • 药品类型(WESTERN_PRESCRIPTION_MEDICINE(1,"处方药-西药"), CHINESE_PRESCRIPTION_MEDICINE(2, "处方药-中成药"), WESTERN_OTC(3, "OTC-西药"), CHINESE_OTC(4, "OTC-中成药"), PIECES(5, "饮片"))
  • └ norm
  • String
  • 可选
  • 0.1g*24片/盒
  • 规格详情
  • diags
  • Diag []
  • 可选
  • 诊断信息,启用适应症和禁忌症规则下必传
  • └ code
  • String
  • 可选
  • F42.900
  • 诊断码
  • └ name
  • String
  • 可选
  • 强迫性障碍
  • 诊断名
  • └ tenant_code
  • String
  • 必须
  • ele
  • 租户名

响应参数

名称 类型 示例值 描述
result ServiceResult result alinkappserver系统返回的通用结果类
  • datas
  • BaseRule []
  • data
  • 结果集
  • └ level
  • Number
  • 1
  • 级别规则
  • └ detail
  • String
  • 详细数据
  • 规则的详细数据
  • └ desc
  • String
  • 2岁以下谨慎使用他克莫司软膏
  • 提示文案
  • └ type
  • String
  • CycleLimitRule
  • 周期限购:CycleLimitRule,单次限购规则:SingleLimitRule,频次规则:FreqDosageRule, 每日剂量规则:DailyDosageRule,单次剂量规则:SingleDosageRule ,用法规则:WayDosageRule ,重复用药规则:RepetitionRule ,特殊年龄规则:AgeSpecialCrowdRule ,人群标签规则:UserLabelSpecialCrowdRule ,性别诊断冲突规则则:GenderSpecialCrowdRule ,适应症规则:IndicationRule ,相互作用规则:InteractionRule ,禁忌症规则:ContraIndicationRule
  • └ spu_id
  • String
  • 511281473
  • spuid
  • └ threshold
  • String
  • 50.0mg(0.0片)
  • 每次剂量上线(命中每日剂量规则+单次剂量规则)
  • └ suggested_freq
  • String
  • 3
  • 建议的每日使用频次,如2-3(命中频次规则)
  • └ suggested_way
  • String
  • 口服
  • 建议的用法, 如:口服(命中用法规则)
  • └ common_name
  • String
  • 茶碱缓释片
  • 药品通用名
  • └ other_common_name
  • String
  • 阿莫西林
  • 药品通用名(重复用药+相互作用规则)
  • └ forbidden_age
  • String
  • 1000
  • 禁用的年龄区间,单位是天,比如0-1000(命中特殊年龄规则)
  • └ forbidden_user
  • String
  • 妊娠
  • 禁用的人群(命中特殊人群规则)
  • └ gender
  • String
  • 性别(命中性别诊断冲突规则)
  • └ diag_code
  • String
  • F42.900
  • 诊断码(命中性别诊断冲突规则)
  • └ diags
  • String
  • A46.x00:1:丹毒;R12:1:胃灼热
  • 诊断(命中适应症规则)
  • └ forbidden_diags
  • String
  • N19.x00
  • 跟该药冲突的诊断码, 如N19.x00((命中禁忌症规则))
  • └ limit_threshold
  • Number
  • 10
  • 限购上限制(命中周期限购+单次限购规则)
  • └ success
  • Boolean
  • true
  • 成功与否
  • └ error_code
  • String
  • SYSTEM_ERROR
  • 错误码
  • └ error_msg
  • String
  • 系统错误
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthDruguseQueryRequest req = new AlibabaAlihealthDruguseQueryRequest();
AlibabaAlihealthDruguseQueryRequest.SafeMedicationReqCommand obj1 = new AlibabaAlihealthDruguseQueryRequest.SafeMedicationReqCommand();
obj1.setOrderId("1838983105989823315");
AlibabaAlihealthDruguseQueryRequest.Patient obj2 = new AlibabaAlihealthDruguseQueryRequest.Patient();
obj2.setGender(1L);
obj2.setWeight(70L);
obj2.setUserId("22287869");
obj2.setAge(55L);
obj2.setHeight(175L);
obj2.setLabels(""PREGNANCY","LACTATION","HYPOHEPATIA","SEVERE_HYPOHEPATIA","SEVERE_RENALINADEQUACY","RENALINADEQUACY"");
obj1.setPatient(obj2);
obj1.setSceneName("prescription");
List<AlibabaAlihealthDruguseQueryRequest.PrescriptionItem> list4 = new ArrayList<AlibabaAlihealthDruguseQueryRequest.PrescriptionItem>();
AlibabaAlihealthDruguseQueryRequest.PrescriptionItem obj5 = new AlibabaAlihealthDruguseQueryRequest.PrescriptionItem();
list4.add(obj5);
AlibabaAlihealthDruguseQueryRequest.Dosage obj7 = new AlibabaAlihealthDruguseQueryRequest.Dosage();
List<AlibabaAlihealthDruguseQueryRequest.DosageItem> list9 = new ArrayList<AlibabaAlihealthDruguseQueryRequest.DosageItem>();
AlibabaAlihealthDruguseQueryRequest.DosageItem obj10 = new AlibabaAlihealthDruguseQueryRequest.DosageItem();
list9.add(obj10);
obj10.setUnit("mg");
obj10.setType("SINGLEDAILYDOSE");
obj10.setValue("10.0");
obj7.setItems(list9);
obj7.setWay("口服");
list6.setDosage(obj7);
AlibabaAlihealthDruguseQueryRequest.BuyAmount obj12 = new AlibabaAlihealthDruguseQueryRequest.BuyAmount();
obj12.setBuyAmount(5L);
obj12.setHistoryDays(10L);
obj12.setHistoryTotalAmount(20L);
list11.setBuyAmount(obj12);
AlibabaAlihealthDruguseQueryRequest.Drug obj14 = new AlibabaAlihealthDruguseQueryRequest.Drug();
obj14.setCommonName("茶碱缓释片");
obj14.setQuantityPerPack(24L);
obj14.setTenantSpuId("22244");
obj14.setProducer("锦州本天药业有限公司");
List<AlibabaAlihealthDruguseQueryRequest.Ingredients> list16 = new ArrayList<AlibabaAlihealthDruguseQueryRequest.Ingredients>();
AlibabaAlihealthDruguseQueryRequest.Ingredients obj17 = new AlibabaAlihealthDruguseQueryRequest.Ingredients();
list16.add(obj17);
obj17.setUnit("mg");
obj17.setQuantity(10L);
obj17.setName("青霉素类广谱β-内酰胺类抗生素");
obj14.setIngredients(list16);
obj14.setSpuId("511281473");
obj14.setUnitOfPerUnit("mg");
obj14.setQuantityPerUnit(10L);
obj14.setApprovalNumber("国药准字H21020004");
obj14.setType("WESTERN_PRESCRIPTION_MEDICINE");
obj14.setNorm("0.1g*24片/盒");
list13.setDrug(obj14);
obj1.setPrescriptionItems(list4);
List<AlibabaAlihealthDruguseQueryRequest.Diag> list19 = new ArrayList<AlibabaAlihealthDruguseQueryRequest.Diag>();
AlibabaAlihealthDruguseQueryRequest.Diag obj20 = new AlibabaAlihealthDruguseQueryRequest.Diag();
list19.add(obj20);
obj20.setCode("F42.900");
obj20.setName("强迫性障碍");
obj1.setDiags(list19);
obj1.setTenantCode("ele");
req.setCommand(obj1);
AlibabaAlihealthDruguseQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_druguse_query_response>
    <result>
        <datas>
            <base_rule>
                <level>1</level>
                <detail>详细数据</detail>
                <desc>2岁以下谨慎使用他克莫司软膏</desc>
                <type>CycleLimitRule</type>
                <spu_id>511281473</spu_id>
                <threshold>50.0mg(0.0片)</threshold>
                <suggested_freq>3</suggested_freq>
                <suggested_way>口服</suggested_way>
                <common_name>茶碱缓释片</common_name>
                <other_common_name>阿莫西林</other_common_name>
                <forbidden_age>1000</forbidden_age>
                <forbidden_user>妊娠</forbidden_user>
                <gender>男</gender>
                <diag_code>F42.900</diag_code>
                <diags>A46.x00:1:丹毒;R12:1:胃灼热</diags>
                <forbidden_diags>N19.x00</forbidden_diags>
                <limit_threshold>10</limit_threshold>
            </base_rule>
        </datas>
        <success>true</success>
        <error_code>SYSTEM_ERROR</error_code>
        <error_msg>系统错误</error_msg>
    </result>
</alibaba_alihealth_druguse_query_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部