# term-query

> Small tool to query rxnorm and snomed REST API's

Latest version **1.2.0** (published 2016-05-04) · Apache License Version 2.0, January 2004 license · 0 weekly downloads

## Install

```sh
npm install term-query
pnpm add term-query
yarn add term-query
bun add term-query
```

Provides the command `term-query`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2016-05-04 |
| First published | 2016-05-02 |
| Weekly downloads | 0 |
| License | Apache License Version 2.0, January 2004 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Author | Sean McIlvenna |
| Maintainers | seanmcilvenna |

## Links

- npm: https://www.npmjs.com/package/term-query
- npm.io page: https://npm.io/package/term-query

## Dependencies (7)

- [q](https://npm.io/package/q.md) ^1.4.1
- [xlsx](https://npm.io/package/xlsx.md) ^0.8.0
- [yargs](https://npm.io/package/yargs.md) ^4.6.0
- [request](https://npm.io/package/request.md) ^2.72.0
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [request-promise](https://npm.io/package/request-promise.md) ^3.0.0
- [simple-rate-limiter](https://npm.io/package/simple-rate-limiter.md) ^0.2.3

## Recent versions

- 1.2.0 (latest) — 2016-05-04
- 1.1.0 — 2016-05-04
- 1.0.0 — 2016-05-02

## README

# term-query

![npm](https://img.shields.io/npm/v/term-query.svg) ![license](https://img.shields.io/npm/l/term-query.svg)

Small tool to query rxnorm and snomed REST API's

![nodei.co](https://nodei.co/npm/term-query.png?downloads=true&downloadRank=true&stars=true)


## Features
- Run queries against SNOMED-CT and RXNORM REST APIs
- Customized RXNORM queries to include brands and classes for each code/concept
- Commands pre-populated with queries for allergies, medications and body sites

## Install

Ensure that Node.JS is installed: https://www.nodejs.org

`npm install term-query -g`

## Usage

Runs the default query for medications against snomed and produces a "medications.xlsx" file:

```
term-query medications
```

Runs a query for all "IN+PIN" tty's and outputs them to "allergies.xlsx" file:

```
term-query rxnorm --tty "IN+PIN" --output "allergies.xlsx"
```

| Command | Description |
| ------- | ----------- |
| rxnorm | Queries RXNorm using custom options |
| snomed | Queries Snomed-CT using custom options |
| medications | Creates a medications list using default options for rxnorm command |
| problems | Creates a problems list using default options for snomed command |
| allergies | Creates an allergies list using default options for rxnorm command |
| bodySite | Creates a bodySite list using default options for snomed command |
| dirServiceEventCodes | Creates a list of diagnostic imaging service event codes |

Options:

| Option | Required | Description | Type | Default |
| ------ | -------- | ----------- | ---- | ------- |
| --help | No | Show help | boolean | |
  
### RxNorm Command Options

| Option | Required | Description | Type | Default |
| ------ | -------- | ----------- | ---- | ------- |
| --help | No | Show help | boolean | |
| --brands, -b | No | Include brand information for each concept | boolean | false |
| --classes, -c | No | Include class information for each concept | boolean | false |
| --output, -o | No | The name of the file to output the XLSX to | string | "output.xlsx" |
| --tty, -t | Yes | | | |

### SNOMED Command Options

| Option | Required | Description | Type | Default |
| ------ | -------- | ----------- | ---- | ------- |
| --help | No | Show help | boolean | |
| --limit, -l | No | Limits the results returned from the query | number | 10000 |
| --expression, -x | Yes | The expression (can be repeated) to run against the SNOMED-CT API | string | < 91723000 \| Anatomical structure (body structure) \| |
| --version, -v | No | The version of SNOMED-CT to execute | string | v20160131 |
| --edition, -e | No | The edition of SNOMED-CT to execute | string | en-edition |
  
## Dependencies
Package | Version | Dev
--- |:---:|:---:
[q](https://www.npmjs.com/package/q) | ^1.4.1 | ✖
[request](https://www.npmjs.com/package/request) | ^2.72.0 | ✖
[request-promise](https://www.npmjs.com/package/request-promise) | ^3.0.0 | ✖
[simple-rate-limiter](https://www.npmjs.com/package/simple-rate-limiter) | ^0.2.3 | ✖
[underscore](https://www.npmjs.com/package/underscore) | ^1.8.3 | ✖
[xlsx](https://www.npmjs.com/package/xlsx) | ^0.8.0 | ✖
[yargs](https://www.npmjs.com/package/yargs) | ^4.6.0 | ✖
[node-readme](https://www.npmjs.com/package/node-readme) | ^0.1.9 | ✔


## References
- [SNOMED CT Expression Constraint Language Specification and Guide](http://ihtsdo.org/fileadmin/user_upload/doc/download/doc_ExpressionConstraintLanguageSpecificationAndGuide_Current-en-US_INT_20150820.pdf?ok)
- [SNOMED CT Snapshot Browser REST API](http://docs.snomedctsnapshotapi.apiary.io)
- [RxNorm API](https://rxnav.nlm.nih.gov/RxNormAPIs.html)

---
_Source: https://npm.io/package/term-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
