跳转到主要内容

简化连接到UMLS rest API的过程

项目描述

超轻量级的UMLS连接。目标是感觉类似于UMLS浏览器。无需下载,但UMLS rest连接速度较慢,用户请注意。您需要在UMLS中创建一个账户。

import connect_umls as um
umls = um.UMLS(apikey)

您的API密钥可以在以下位置找到: https://documentation.uts.nlm.nih.gov/rest/authentication.html 您只需要在第一步中提供API密钥。我们负责处理所有票务事宜。

示例

#get top 10 search results
results = umls.search("joint pain hip", k=10)

#"CUI"|"Term"|"Code" default Term. CUI - the cui. Term - the text words. Code - the code.

for result in results:
    code = result.cui() # the CUI
    name = result.name() # the main name
    synonyms = result.synonyms() # all the different names of the atoms
    if result.hasMapping("LNC"):
        # check if this result maps to a certain codeset, eg. SNOMED-CT.
        ## Note: you will need to give the UMLS short hand version of the codeset name.
        ## e.g. "LNC" not "LOINC"
        print("There is a map to LOIN-C!")

项目详情


下载文件

下载适用于您的平台文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分布

connect_umls-0.0.2.tar.gz (3.5 kB 查看哈希值)

上传时间:

构建分布

connect_umls-0.0.2-py3-none-any.whl (6.8 kB 查看哈希值)

上传时间: Python 3

支持