# NICTA t3as SNOMED CT Coder Web Service
This web service takes some free text and tries to determine what SNOMED CT codes can be extracted from it.
## License
Copyright (c) 2014, National ICT Australia
All rights reserved.
This software is under the GPL version 3.
Please see the license file LICENSE.txt
Alternative licensing can be arranged, please contact us.
## Installation
The web service requires that the [MetaMap Tagger](metamap-tagger) and [SNOMED CT Lookup](snomedct-lookup) installation instructions has been followed. Other than that it simply just needs the WAR file to be deployed on a Java Servlet compatible app server.
## Building
You can build the SNOMED CT Coder Web Service project only by entering the `snomed-coder-web` directory and running Maven with no arguments:
mvn
To make a t3as .tar.gz assembly run:
mvn assembly:single
This requires that the [MetaMap Tagger](metamap-tagger) and [SNOMED CT Lookup](snomedct-lookup) installation instructions has been followed - i.e. that MetaMap has been installed at `/opt/metamap/` and the SNOMED CT lookup db file exists at `/opt/snomed-coder-web/data/snomedct.h2.db`.
## Running
This project can be run as a Maven development service or using the WAR file in an app server.
There are a number of system properties available to set:
1. **publicMmDir** (default: /opt/metamap/public_mm), path to the MetaMap installation *public_mm* directory.
2. **snomedDbPath** (default: /opt/snomed-coder-web/data/snomedct), path/base name of the SNOMED CT lookup database.
### Using Maven
This project can be run as a Maven development service by entering the `snomed-coder-web` directory and running:
mvn tomcat7:run
### Using an App Server
To run using an app server, simply copy the WAR file from the `snomed-coder-web/target` directory into the webapp directory of any Java Servlet compatible app server.
## Web service end points
### /snomed-coder-web/rest/v1.0/snomedctCodes
This is a web service to analyse English clinical text and return all the SNOMED CT concepts that could be found. The service can return JSON or XML. By default JSON is returned, but by passing the HTTP `Accept` header you can determine what you want to have returned:
Accept: application/json
Accept: text/xml
#### The simple case
To use the web service simply POST some URL encoded text (with the content type `application/x-www-form-urlencoded`)
to this URL, which will return a JSON response. If you are on Linux or OSX a simple test might look like this (note the `python` line is optional and only used to make it more human readable):
curl -s --request POST \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "The patient had a stroke." \
http://snomedct.t3as.org/snomed-coder-web/rest/v1.0/snomedctCodes \
| python -mjson.tool
To get the answer as XML, pass a suitable `Accept` header (note the `xmllint` line is optional and only used to make it more human readable):
curl -s --request POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: text/xml" \
--data-urlencode "The patient had a stroke." \
http://snomedct.t3as.org/snomed-coder-web/rest/v1.0/snomedctCodes \
| xmllint --format -
#### Specifying custom MetaMap Semantic Types
It is also possible to specify custom Semantic Types for MetaMap, which can be used to filter the categories of concepts that are searched for. To do this you can use the `semanticType` web service documented in the section below, alternatively see this web page which has the current available semantic types:
<http://metamap.nlm.nih.gov/Docs/SemanticTypes_2013AA.txt>
Once you have determined which semantic types to use you can then pass a JSON request containing the text to analyse and the types:
{
"options": [
"restrict_to_sts fndg,dsyn,ftcn"
],
"text": "The patient had a stroke."
}
When using the web service in this way you must set the `Content-Type` header to JSON:
curl -s --request POST \
-H "Content-Type: application/json" \
--data '{"text": "The patient had a stroke.", "options": ["restrict_to_sts fndg,dsyn,ftcn"]}' \
http://snomedct.t3as.org/snomed-coder-web/rest/v1.0/snomedctCodes \
| python -mjson.tool
Note that if you do not pass any semantic types the analysis will be done with all types.
#### Specifying MetaMap sources
It is now possible to specify which sources that you want MetaMap to search for concepts in - meaning that the service is no longer restricted to SNOMED CT only. To specify which sources you are interested in use the `restrict_to_sources` option (see more on how to set options in a section below):
"restrict_to_sources SNOMEDCT_US,RXNORM"
If you do not set the `restrict_to_sources` option then the web service will automatically set it to `SNOMEDCT_US`. If all sources should be used then pass the value '[all]'.
#### Specifying MetaMap options
It is possible to pass specific runtime options for MetaMap. To do this include `options` in a JSON request:
{
"options": [
"ignore_word_order",
"composite_phrases 8"
],
"text": "The patient had a stroke.",
}
Use something like the following for a command line test:
curl -s --request POST \
-H "Content-Type: application/json" \
--data '{"text": "The patient had a stroke.", "options": ["ignore_word_order","composite_phrases 8"]}' \
http://snomedct.t3as.org/snomed-coder-web/rest/v1.0/snomedctCodes \
| python -mjson.tool
MetaMap is always run with these minimum options:
composite_phrases=4
lexicon=db
lexicon_year=2013
mm_data_year=2013AB
XMLf1
The following additional MetaMap options are supported:
all_acros_abbrs
allow_large_n
composite_phrases 8
ignore_stop_phrases
ignore_word_order
no_derivational_variants
restrict_to_sources SNOMEDCT_US
strict_model
word_sense_disambiguation
Adding more options is relatively trivial (and can be done on request), but does require code changes.
### /snomed-coder-web/rest/v1.0/semanticTypes
Behind the scenes NLM MetaMap is used, and it is possible to specify which MetaMap Semantic Types (STs) that we are
interested in. In order to do so it can be handy to first get a list of the STs that are available, which will also
indicate if it is a type that is enabled by default by the web service if no STs are specifically passed:
curl -s http://snomedct.t3as.org/snomed-coder-web/rest/v1.0/semanticTypes | python -mjson.tool
没有合适的资源?快使用搜索试试~ 我知道了~
hazelcast-cloud-3.3-RC3.zip
共157个文件
java:97个
txt:15个
xml:15个
需积分: 9 0 下载量 23 浏览量
2019-09-26
07:14:29
上传
评论
收藏 432KB ZIP 举报
温馨提示
t3as-snomedct-service.zip,包含不同模块之间通用功能的类。
资源推荐
资源详情
资源评论
收起资源包目录
hazelcast-cloud-3.3-RC3.zip (157个子文件)
create-snomed-db 104B
MMOtoXML_v5.dtd 6KB
ajax_loader_blue_512.gif 47KB
.gitignore 19B
ConfigureHandler.java 13KB
Candidate.java 10KB
ObjectFactory.java 8KB
SnomedCoderUi.java 8KB
Main.java 7KB
SnomedLookup.java 7KB
SnomedCoderService.java 7KB
SnomedRequestCallback.java 6KB
AnalyseHandler.java 6KB
Utterance.java 6KB
AA.java 6KB
Main.java 6KB
Phrase.java 5KB
Candidates.java 5KB
LookupAndCreateTest.java 5KB
MatchMap.java 5KB
Negation.java 5KB
SyntaxUnit.java 5KB
MetaMapOptions.java 4KB
CreateLookupDb.java 4KB
MetaMap.java 4KB
MMO.java 4KB
SemanticTypes.java 4KB
SnomedClient.java 4KB
NegTriggerPIs.java 4KB
MatchedWords.java 4KB
NegConcepts.java 4KB
SyntaxUnits.java 4KB
NegConcPIs.java 4KB
Utterances.java 4KB
ConceptPIs.java 4KB
MappingCandidates.java 4KB
SemTypes.java 4KB
Negations.java 4KB
MatchMaps.java 4KB
Phrases.java 4KB
Sources.java 4KB
Mappings.java 4KB
Options.java 4KB
AACUIs.java 4KB
Tokens.java 4KB
AAs.java 4KB
Main.java 3KB
JaxbLoaderTest.java 3KB
Mapping.java 3KB
NegConcept.java 3KB
CmdLine.java 3KB
NegTriggerPI.java 3KB
ConceptPI.java 3KB
NegConcPI.java 3KB
Option.java 3KB
SemanticTypesService.java 3KB
CreateDb.java 3KB
MMOs.java 3KB
JaxbLoader.java 3KB
SnomedConcept.java 3KB
SnomedRequestCallbackTest.java 3KB
Source.java 3KB
MatchedWord.java 2KB
SemType.java 2KB
AACUI.java 2KB
Token.java 2KB
MetaMapOptionsTest.java 2KB
RestrictToSources.java 2KB
SnomedDescriptionComparatorTest.java 2KB
GlassLoadingPanel.java 2KB
RestrictToSts.java 2KB
TestData.java 2KB
CompositePhrases.java 2KB
ObjectMapperProvider.java 2KB
Candidate.java 2KB
SemanticTypesTest.java 2KB
AnalysisRequest.java 2KB
Option.java 2KB
MetaMapTest.java 2KB
SnomedTerm.java 2KB
MappingGroupComparator.java 2KB
SemanticType.java 2KB
SnomedCodeComparator.java 2KB
MappingGroupComparatorTest.java 2KB
SnomedCodeComparatorTest.java 2KB
SnomedDescriptionComparator.java 2KB
PhraseComparator.java 2KB
Phrase.java 2KB
Utterance.java 2KB
Mapping.java 2KB
Resources.java 2KB
Mappings.java 2KB
Phrases.java 2KB
SemType.java 1KB
WordSenseDisambiguation.java 1KB
NoDerivationalVariants.java 1KB
IgnoreStopPhrases.java 1KB
IgnoreWordOrder.java 1KB
AllAcrosAbbrs.java 1KB
AllowLargeN.java 1KB
共 157 条
- 1
- 2
资源评论
weixin_38743968
- 粉丝: 404
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 中大功率电源电路设计、PCB布局设计规范
- 创新实践CNN车牌识别项目
- 小程序版图像分类算法对中文数字识别-不含数据集图片-含逐行注释和说明文档.zip
- 公交卡管理系统一个实验
- C语言学生成绩管理系统(信息可保存读取txt文件)
- 网上零食销售系统论文.docx
- 小程序版图像分类算法对电脑配件分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版深度学习CNN训练识别8种水果-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版基于深度学习对手势动作分类识别-不含数据集图片-含逐行注释和说明文档.zip
- 小程序版深度学习CNN训练识别手写数字图像中的数字分类-不含数据集图片-含逐行注释和说明文档.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功