├── .devcontainer └── devcontainer.json ├── .env.example ├── .github ├── config.yml ├── dependabot.yml └── workflows │ ├── bump.yml │ ├── docs.yml │ ├── integration.yml │ ├── publish.yml │ └── pullrequest.yml ├── .gitignore ├── .npmignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── mocktest ├── fake-cui-response.ts ├── fake-key-response.ts ├── fake-search-response.ts ├── mock.cuiSearch.spec.ts ├── mock.generalService.spec.ts └── mock.umlsSearch.spec.ts ├── notes ├── jsdoc.md ├── placeholder.md └── updates.md ├── package-lock.json ├── package.json ├── scripts └── gpr.js ├── src ├── function │ ├── auiSearch.ts │ ├── cuiSearch.ts │ └── umlsSearch.ts ├── index.ts ├── model │ ├── atom.ts │ ├── concept.ts │ ├── conceptrelation.ts │ ├── definition.ts │ ├── queryTemplate.ts │ ├── search.ts │ └── umlsToken.ts └── service │ ├── authService.ts │ └── generalService.ts ├── test ├── auiSearch.test.ts ├── authService.test.ts ├── cuiSearch.test.ts ├── generalService.test.ts ├── index.test.ts └── umlsSearch.test.ts └── tsconfig.json /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12", 3 | "extensions": [ 4 | "dbaeumer.vscode-eslint" 5 | ], 6 | "forwardPorts": [ 7 | 3000 8 | ] 9 | } -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | UMLS_API_KEY= -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configurations for todo: https://probot.github.io/apps/todo/ 2 | # Automatically add issues from @todo with @body 3 | # /** 4 | # * @todo What needs to be done 5 | # * @body How to do it. 6 | # */ 7 | 8 | # https://github.com/behaviorbot/welcome 9 | newIssueWelcomeComment: > 10 | Thank you for raising this issue. We will try and get back to you as soon as possible. 11 | 12 | Be sure to star ✨ the repository for a priority response! 13 | 14 | Please make sure you have given us as much context as possible. 15 | 16 | 17 | newPRWelcomeComment: > 18 | Thank you for submitting a pull request. 19 | 20 | Please make sure you have followed our contributing guidelines in CONTRIBUTING.md. We will review it as soon as possible. 21 | 22 | firstPRMergeComment: > 23 | Congrats on merging your first pull request! 🎉🎉🎉 -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | # open-pull-requests-limit: 10 8 | 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: "weekly" -------------------------------------------------------------------------------- /.github/workflows/bump.yml: -------------------------------------------------------------------------------- 1 | name: "Bump Version" 2 | # include major/minor/patch in commit message 3 | # Pull after pushing to develop 4 | on: 5 | push: 6 | branches: 7 | - develop 8 | 9 | jobs: 10 | bump-version: 11 | name: "Bump Version on release branch" 12 | runs-on: ubuntu-latest 13 | timeout-minutes: 15 14 | steps: 15 | - name: "Checkout source code" 16 | uses: "actions/checkout@v3" 17 | with: 18 | ref: ${{ github.ref }} 19 | - name: Generate changelog 20 | uses: charmixer/auto-changelog-action@v1 21 | with: 22 | token: ${{ secrets.GITHUB_TOKEN }} 23 | - name: "cat package.json" 24 | run: cat ./package.json 25 | - name: "Setup Node.js" 26 | uses: "actions/setup-node@v3.1.0" 27 | with: 28 | node-version: 12 29 | - name: "Automated Version Bump" 30 | uses: "dermatologist/gh-action-bump-version@beapen-1" 31 | with: 32 | tag-prefix: '' 33 | env: 34 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 35 | UMLS_API_KEY: ${{secrets.umls_api_key}} 36 | - name: "cat package.json" 37 | run: cat ./package.json 38 | 39 | # - name: Commit changes 40 | # uses: EndBug/add-and-commit@v7 41 | # with: 42 | # default_author: github_actions 43 | # add: '*.md' 44 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Generate and puplish gh-pages 2 | # https://docs.github.com/en/actions/guides/building-and-testing-python 3 | # https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ 4 | on: 5 | release: 6 | types: [published] 7 | 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 15 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: actions/setup-node@v3.1.0 16 | with: 17 | node-version: 12 18 | - run: npm ci 19 | - run: npm run docs 20 | env: 21 | UMLS_API_KEY: ${{secrets.umls_api_key}} 22 | - name: Deploy Docs 🚀 23 | uses: JamesIves/github-pages-deploy-action@v4.3.0 24 | with: 25 | branch: gh-pages # The branch the action should deploy to. 26 | folder: docs # The folder the action should deploy. -------------------------------------------------------------------------------- /.github/workflows/integration.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop 7 | 8 | release: 9 | types: [created] 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | - uses: actions/setup-node@v3.1.0 17 | with: 18 | node-version: 12 19 | - run: npm ci 20 | - run: npm test 21 | env: 22 | UMLS_API_KEY: ${{secrets.umls_api_key}} 23 | # publish-npm: 24 | # needs: build 25 | # runs-on: ubuntu-latest 26 | # steps: 27 | # - uses: actions/checkout@v3 28 | # - uses: actions/setup-node@v3.1.0 29 | # with: 30 | # node-version: 12 31 | # registry-url: https://registry.npmjs.org/ 32 | # - run: npm ci 33 | # - run: npm publish 34 | # env: 35 | # NODE_AUTH_TOKEN: ${{secrets.npm_token}} 36 | 37 | # publish-gpr: 38 | # needs: build 39 | # runs-on: ubuntu-latest 40 | # steps: 41 | # - uses: actions/checkout@v3 42 | # - uses: actions/setup-node@v3.1.0 43 | # with: 44 | # node-version: 12 45 | # registry-url: https://npm.pkg.github.com/ 46 | # scope: '@dermatologist' 47 | # - run: npm ci 48 | # - run: npm build 49 | # - run: npm run gpr-setup 50 | # - run: npm publish 51 | # env: 52 | # NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 53 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | - uses: actions/setup-node@v3.1.0 13 | with: 14 | node-version: 12 15 | registry-url: https://registry.npmjs.org/ 16 | - run: npm install 17 | - run: npm publish 18 | env: 19 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 20 | 21 | # name: Publish 22 | 23 | # on: 24 | # push: 25 | # branches: 26 | # - master 27 | 28 | 29 | # jobs: 30 | # publish-gpr: 31 | # runs-on: ubuntu-latest 32 | # steps: 33 | # - uses: actions/checkout@v2.3.4 34 | # - uses: actions/setup-node@v3.1.0 35 | # with: 36 | # node-version: 12 37 | # registry-url: https://npm.pkg.github.com/ 38 | # scope: '@dermatologist' 39 | # - run: npm ci 40 | # - run: npm build 41 | # - run: npm run gpr-setup 42 | # - run: npm publish 43 | # env: 44 | # NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 45 | 46 | # pull_request: 47 | # branches: 48 | # - master 49 | # - develop 50 | # on: 51 | # release: 52 | # types: [created] 53 | 54 | # jobs: 55 | # build: 56 | # runs-on: ubuntu-latest 57 | # steps: 58 | # - uses: actions/checkout@v2.3.4 59 | # - uses: actions/setup-node@v3.1.0 60 | # with: 61 | # node-version: 12 62 | # - run: npm ci 63 | # - run: npm test 64 | # env: 65 | # UMLS_API_KEY: ${{secrets.umls_api_key}} 66 | # publish-npm: 67 | # needs: build 68 | # runs-on: ubuntu-latest 69 | # steps: 70 | # - uses: actions/checkout@v2.3.4 71 | # - uses: actions/setup-node@v3.1.0 72 | # with: 73 | # node-version: 12 74 | # registry-url: https://registry.npmjs.org/ 75 | # - run: npm ci 76 | # - run: npm publish 77 | # env: 78 | # NODE_AUTH_TOKEN: ${{secrets.npm_token}} 79 | 80 | 81 | -------------------------------------------------------------------------------- /.github/workflows/pullrequest.yml: -------------------------------------------------------------------------------- 1 | name: Node.js Package Pull Request 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | - develop 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - uses: actions/setup-node@v3.1.0 15 | with: 16 | node-version: 12 17 | - run: npm ci 18 | - run: npm test mocktest 19 | - run: npm run build 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | dist 4 | test/api.js 5 | .idea 6 | .env 7 | scratch 8 | docs -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | src 4 | test/api.js 5 | .vscode 6 | .idea 7 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | // https://github.com/formium/tsdx/issues/577 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "TSDX Jest Tests", 10 | "type": "node", 11 | "request": "launch", 12 | "runtimeArgs": [ 13 | "--inspect-brk", 14 | "${workspaceRoot}/node_modules/tsdx/dist/index.js", 15 | "test", 16 | "--detectOpenHandles", 17 | "/mocktest", 18 | "--runInBand" 19 | ], 20 | "console": "integratedTerminal", 21 | "internalConsoleOptions": "neverOpen", 22 | "port": 9229 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "licenser.license": "MIT", 3 | "licenser.author": "Bell Eapen", 4 | "licenser.projectName": "umlsjs", 5 | "licenser.useSingleLineStyle": false, 6 | "cSpell.words": [ 7 | "apikey", 8 | "esnext", 9 | "mocktest", 10 | "postversion", 11 | "preversion", 12 | "tsdx", 13 | "tslib", 14 | "umls", 15 | "umlsjs" 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "npm", 6 | "script": "start", 7 | "problemMatcher": [], 8 | "label": "npm: start", 9 | "detail": "tsdx watch", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [v1.2.0](https://github.com/dermatologist/umlsjs/tree/v1.2.0) (2022-04-13) 4 | 5 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.17.3...v1.2.0) 6 | 7 | **Merged pull requests:** 8 | 9 | - Update bump.yml [\#116](https://github.com/dermatologist/umlsjs/pull/116) ([dermatologist](https://github.com/dermatologist)) 10 | - build\(deps-dev\): bump typescript from 4.5.5 to 4.6.3 [\#112](https://github.com/dermatologist/umlsjs/pull/112) ([dependabot[bot]](https://github.com/apps/dependabot)) 11 | - Update package.json [\#111](https://github.com/dermatologist/umlsjs/pull/111) ([dermatologist](https://github.com/dermatologist)) 12 | - build\(deps\): bump JamesIves/github-pages-deploy-action from 4.1.5 to 4.3.0 [\#109](https://github.com/dermatologist/umlsjs/pull/109) ([dependabot[bot]](https://github.com/apps/dependabot)) 13 | - build\(deps\): bump actions/setup-node from 2.5.1 to 3.1.0 [\#108](https://github.com/dermatologist/umlsjs/pull/108) ([dependabot[bot]](https://github.com/apps/dependabot)) 14 | - build\(deps\): bump ansi-regex from 3.0.0 to 3.0.1 [\#107](https://github.com/dermatologist/umlsjs/pull/107) ([dependabot[bot]](https://github.com/apps/dependabot)) 15 | - build\(deps\): bump minimist from 1.2.5 to 1.2.6 [\#106](https://github.com/dermatologist/umlsjs/pull/106) ([dependabot[bot]](https://github.com/apps/dependabot)) 16 | - build\(deps-dev\): bump typedoc from 0.22.10 to 0.22.13 [\#105](https://github.com/dermatologist/umlsjs/pull/105) ([dependabot[bot]](https://github.com/apps/dependabot)) 17 | - build\(deps\): bump axios from 0.24.0 to 0.26.1 [\#103](https://github.com/dermatologist/umlsjs/pull/103) ([dependabot[bot]](https://github.com/apps/dependabot)) 18 | - build\(deps\): bump actions/checkout from 2 to 3 [\#101](https://github.com/dermatologist/umlsjs/pull/101) ([dependabot[bot]](https://github.com/apps/dependabot)) 19 | - build\(deps-dev\): bump typescript from 4.5.4 to 4.5.5 [\#98](https://github.com/dermatologist/umlsjs/pull/98) ([dependabot[bot]](https://github.com/apps/dependabot)) 20 | - build\(deps\): bump follow-redirects from 1.14.5 to 1.14.8 [\#95](https://github.com/dermatologist/umlsjs/pull/95) ([dependabot[bot]](https://github.com/apps/dependabot)) 21 | - build\(deps\): bump phips28/gh-action-bump-version from 8.0.18 to 9.0.16 [\#92](https://github.com/dermatologist/umlsjs/pull/92) ([dependabot[bot]](https://github.com/apps/dependabot)) 22 | 23 | ## [v0.17.3](https://github.com/dermatologist/umlsjs/tree/v0.17.3) (2022-03-20) 24 | 25 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.17.2...v0.17.3) 26 | 27 | **Merged pull requests:** 28 | 29 | - build\(deps-dev\): bump dotenv from 10.0.0 to 16.0.0 [\#93](https://github.com/dermatologist/umlsjs/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot)) 30 | - build\(deps\): bump nanoid from 3.1.23 to 3.2.0 [\#88](https://github.com/dermatologist/umlsjs/pull/88) ([dependabot[bot]](https://github.com/apps/dependabot)) 31 | 32 | ## [v0.17.2](https://github.com/dermatologist/umlsjs/tree/v0.17.2) (2022-02-27) 33 | 34 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.17.1...v0.17.2) 35 | 36 | **Merged pull requests:** 37 | 38 | - build\(deps\): bump shelljs from 0.8.4 to 0.8.5 [\#85](https://github.com/dermatologist/umlsjs/pull/85) ([dependabot[bot]](https://github.com/apps/dependabot)) 39 | 40 | ## [v0.17.1](https://github.com/dermatologist/umlsjs/tree/v0.17.1) (2022-01-14) 41 | 42 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.17.0...v0.17.1) 43 | 44 | **Merged pull requests:** 45 | 46 | - build\(deps\): bump actions/setup-node from 2.5.0 to 2.5.1 [\#81](https://github.com/dermatologist/umlsjs/pull/81) ([dependabot[bot]](https://github.com/apps/dependabot)) 47 | 48 | ## [v0.17.0](https://github.com/dermatologist/umlsjs/tree/v0.17.0) (2022-01-03) 49 | 50 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.16.0...v0.17.0) 51 | 52 | **Merged pull requests:** 53 | 54 | - build\(deps-dev\): bump typescript from 4.4.4 to 4.5.4 [\#79](https://github.com/dermatologist/umlsjs/pull/79) ([dependabot[bot]](https://github.com/apps/dependabot)) 55 | 56 | ## [v0.16.0](https://github.com/dermatologist/umlsjs/tree/v0.16.0) (2021-12-22) 57 | 58 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.15.2...v0.16.0) 59 | 60 | **Merged pull requests:** 61 | 62 | - build\(deps\): bump actions/setup-node from 2.4.1 to 2.5.0 [\#74](https://github.com/dermatologist/umlsjs/pull/74) ([dependabot[bot]](https://github.com/apps/dependabot)) 63 | 64 | ## [v0.15.2](https://github.com/dermatologist/umlsjs/tree/v0.15.2) (2021-12-08) 65 | 66 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.15.1...v0.15.2) 67 | 68 | **Merged pull requests:** 69 | 70 | - build\(deps-dev\): bump typedoc from 0.22.9 to 0.22.10 [\#73](https://github.com/dermatologist/umlsjs/pull/73) ([dependabot[bot]](https://github.com/apps/dependabot)) 71 | 72 | ## [v0.15.1](https://github.com/dermatologist/umlsjs/tree/v0.15.1) (2021-11-19) 73 | 74 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.15.0...v0.15.1) 75 | 76 | **Merged pull requests:** 77 | 78 | - build\(deps-dev\): bump typedoc from 0.22.6 to 0.22.9 [\#70](https://github.com/dermatologist/umlsjs/pull/70) ([dependabot[bot]](https://github.com/apps/dependabot)) 79 | 80 | ## [v0.15.0](https://github.com/dermatologist/umlsjs/tree/v0.15.0) (2021-11-17) 81 | 82 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.14.0...v0.15.0) 83 | 84 | **Merged pull requests:** 85 | 86 | - build\(deps\): bump axios from 0.21.4 to 0.24.0 [\#68](https://github.com/dermatologist/umlsjs/pull/68) ([dependabot[bot]](https://github.com/apps/dependabot)) 87 | 88 | ## [v0.14.0](https://github.com/dermatologist/umlsjs/tree/v0.14.0) (2021-11-15) 89 | 90 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.13.1...v0.14.0) 91 | 92 | **Merged pull requests:** 93 | 94 | - build\(deps\): bump fast-xml-parser from 3.20.3 to 3.21.1 [\#67](https://github.com/dermatologist/umlsjs/pull/67) ([dependabot[bot]](https://github.com/apps/dependabot)) 95 | 96 | ## [v0.13.1](https://github.com/dermatologist/umlsjs/tree/v0.13.1) (2021-11-06) 97 | 98 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.13.0...v0.13.1) 99 | 100 | **Merged pull requests:** 101 | 102 | - build\(deps-dev\): bump husky from 7.0.2 to 7.0.4 [\#65](https://github.com/dermatologist/umlsjs/pull/65) ([dependabot[bot]](https://github.com/apps/dependabot)) 103 | 104 | ## [v0.13.0](https://github.com/dermatologist/umlsjs/tree/v0.13.0) (2021-11-05) 105 | 106 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.12.0...v0.13.0) 107 | 108 | ## [v0.12.0](https://github.com/dermatologist/umlsjs/tree/v0.12.0) (2021-11-05) 109 | 110 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.11.0...v0.12.0) 111 | 112 | **Merged pull requests:** 113 | 114 | - build\(deps-dev\): bump typescript from 4.3.5 to 4.4.4 [\#63](https://github.com/dermatologist/umlsjs/pull/63) ([dependabot[bot]](https://github.com/apps/dependabot)) 115 | - build\(deps\): bump actions/setup-node from 2.3.0 to 2.4.1 [\#56](https://github.com/dermatologist/umlsjs/pull/56) ([dependabot[bot]](https://github.com/apps/dependabot)) 116 | 117 | ## [v0.11.0](https://github.com/dermatologist/umlsjs/tree/v0.11.0) (2021-10-25) 118 | 119 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.10.0...v0.11.0) 120 | 121 | **Merged pull requests:** 122 | 123 | - build\(deps-dev\): bump typedoc from 0.21.6 to 0.22.6 [\#62](https://github.com/dermatologist/umlsjs/pull/62) ([dependabot[bot]](https://github.com/apps/dependabot)) 124 | 125 | ## [v0.10.0](https://github.com/dermatologist/umlsjs/tree/v0.10.0) (2021-10-15) 126 | 127 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.9...v0.10.0) 128 | 129 | **Merged pull requests:** 130 | 131 | - build\(deps\): bump fast-xml-parser from 3.19.0 to 3.20.3 [\#55](https://github.com/dermatologist/umlsjs/pull/55) ([dependabot[bot]](https://github.com/apps/dependabot)) 132 | 133 | ## [v0.9.9](https://github.com/dermatologist/umlsjs/tree/v0.9.9) (2021-10-12) 134 | 135 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.8...v0.9.9) 136 | 137 | ## [v0.9.8](https://github.com/dermatologist/umlsjs/tree/v0.9.8) (2021-10-12) 138 | 139 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.7...v0.9.8) 140 | 141 | **Merged pull requests:** 142 | 143 | - build\(deps\): bump nth-check from 2.0.0 to 2.0.1 [\#54](https://github.com/dermatologist/umlsjs/pull/54) ([dependabot[bot]](https://github.com/apps/dependabot)) 144 | - build\(deps\): bump tmpl from 1.0.4 to 1.0.5 [\#53](https://github.com/dermatologist/umlsjs/pull/53) ([dependabot[bot]](https://github.com/apps/dependabot)) 145 | 146 | ## [v0.9.7](https://github.com/dermatologist/umlsjs/tree/v0.9.7) (2021-09-25) 147 | 148 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.6...v0.9.7) 149 | 150 | **Merged pull requests:** 151 | 152 | - build\(deps\): bump axios from 0.21.1 to 0.21.4 [\#49](https://github.com/dermatologist/umlsjs/pull/49) ([dependabot[bot]](https://github.com/apps/dependabot)) 153 | 154 | ## [v0.9.6](https://github.com/dermatologist/umlsjs/tree/v0.9.6) (2021-09-22) 155 | 156 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.5...v0.9.6) 157 | 158 | **Merged pull requests:** 159 | 160 | - build\(deps\): bump JamesIves/github-pages-deploy-action from 4.1.4 to 4.1.5 [\#48](https://github.com/dermatologist/umlsjs/pull/48) ([dependabot[bot]](https://github.com/apps/dependabot)) 161 | 162 | ## [v0.9.5](https://github.com/dermatologist/umlsjs/tree/v0.9.5) (2021-09-21) 163 | 164 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.4...v0.9.5) 165 | 166 | **Merged pull requests:** 167 | 168 | - build\(deps-dev\): bump husky from 7.0.1 to 7.0.2 [\#47](https://github.com/dermatologist/umlsjs/pull/47) ([dependabot[bot]](https://github.com/apps/dependabot)) 169 | 170 | ## [v0.9.4](https://github.com/dermatologist/umlsjs/tree/v0.9.4) (2021-08-28) 171 | 172 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.3...v0.9.4) 173 | 174 | **Merged pull requests:** 175 | 176 | - build\(deps-dev\): bump typedoc from 0.21.5 to 0.21.6 [\#45](https://github.com/dermatologist/umlsjs/pull/45) ([dependabot[bot]](https://github.com/apps/dependabot)) 177 | 178 | ## [v0.9.3](https://github.com/dermatologist/umlsjs/tree/v0.9.3) (2021-08-19) 179 | 180 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.2...v0.9.3) 181 | 182 | **Merged pull requests:** 183 | 184 | - build\(deps-dev\): bump tslib from 2.3.0 to 2.3.1 [\#44](https://github.com/dermatologist/umlsjs/pull/44) ([dependabot[bot]](https://github.com/apps/dependabot)) 185 | 186 | ## [v0.9.2](https://github.com/dermatologist/umlsjs/tree/v0.9.2) (2021-08-15) 187 | 188 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.1...v0.9.2) 189 | 190 | **Merged pull requests:** 191 | 192 | - build\(deps\): bump path-parse from 1.0.6 to 1.0.7 [\#43](https://github.com/dermatologist/umlsjs/pull/43) ([dependabot[bot]](https://github.com/apps/dependabot)) 193 | 194 | ## [v0.9.1](https://github.com/dermatologist/umlsjs/tree/v0.9.1) (2021-08-03) 195 | 196 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.9.0...v0.9.1) 197 | 198 | **Merged pull requests:** 199 | 200 | - build\(deps-dev\): bump typedoc from 0.21.4 to 0.21.5 [\#40](https://github.com/dermatologist/umlsjs/pull/40) ([dependabot[bot]](https://github.com/apps/dependabot)) 201 | 202 | ## [v0.9.0](https://github.com/dermatologist/umlsjs/tree/v0.9.0) (2021-07-29) 203 | 204 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.8.0...v0.9.0) 205 | 206 | ## [0.8.0](https://github.com/dermatologist/umlsjs/tree/0.8.0) (2021-07-29) 207 | 208 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.8.0...0.8.0) 209 | 210 | ## [v0.8.0](https://github.com/dermatologist/umlsjs/tree/v0.8.0) (2021-07-29) 211 | 212 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.7.0...v0.8.0) 213 | 214 | **Merged pull requests:** 215 | 216 | - Added author tag [\#39](https://github.com/dermatologist/umlsjs/pull/39) ([apar-mistry](https://github.com/apar-mistry)) 217 | - Added name to contributors [\#38](https://github.com/dermatologist/umlsjs/pull/38) ([apar-mistry](https://github.com/apar-mistry)) 218 | 219 | ## [v0.7.0](https://github.com/dermatologist/umlsjs/tree/v0.7.0) (2021-07-28) 220 | 221 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.6.1...v0.7.0) 222 | 223 | ## [v0.6.1](https://github.com/dermatologist/umlsjs/tree/v0.6.1) (2021-07-28) 224 | 225 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.6.0...v0.6.1) 226 | 227 | **Merged pull requests:** 228 | 229 | - Added AUI function [\#37](https://github.com/dermatologist/umlsjs/pull/37) ([apar-mistry](https://github.com/apar-mistry)) 230 | 231 | ## [v0.6.0](https://github.com/dermatologist/umlsjs/tree/v0.6.0) (2021-07-27) 232 | 233 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/v0.5.1...v0.6.0) 234 | 235 | **Merged pull requests:** 236 | 237 | - build\(deps\): bump actions/setup-node from 2.2.0 to 2.3.0 [\#36](https://github.com/dermatologist/umlsjs/pull/36) ([dependabot[bot]](https://github.com/apps/dependabot)) 238 | 239 | ## [v0.5.1](https://github.com/dermatologist/umlsjs/tree/v0.5.1) (2021-07-19) 240 | 241 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.5.0...v0.5.1) 242 | 243 | **Closed issues:** 244 | 245 | - localStorage is available only in a browser context. [\#32](https://github.com/dermatologist/umlsjs/issues/32) 246 | - Getting up and running [\#31](https://github.com/dermatologist/umlsjs/issues/31) 247 | 248 | **Merged pull requests:** 249 | 250 | - Patch 1 [\#34](https://github.com/dermatologist/umlsjs/pull/34) ([apar-mistry](https://github.com/apar-mistry)) 251 | 252 | ## [0.5.0](https://github.com/dermatologist/umlsjs/tree/0.5.0) (2021-07-18) 253 | 254 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/pre-v0.4.1...0.5.0) 255 | 256 | ## [pre-v0.4.1](https://github.com/dermatologist/umlsjs/tree/pre-v0.4.1) (2021-07-18) 257 | 258 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.4.0...pre-v0.4.1) 259 | 260 | ## [0.4.0](https://github.com/dermatologist/umlsjs/tree/0.4.0) (2021-07-18) 261 | 262 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.3.2...0.4.0) 263 | 264 | **Closed issues:** 265 | 266 | - UMLS REST API wrapper [\#8](https://github.com/dermatologist/umlsjs/issues/8) 267 | 268 | **Merged pull requests:** 269 | 270 | - build\(deps\): bump actions/setup-node from 1 to 2.2.0 [\#28](https://github.com/dermatologist/umlsjs/pull/28) ([dependabot[bot]](https://github.com/apps/dependabot)) 271 | - build\(deps-dev\): bump husky from 4.3.0 to 7.0.0 [\#27](https://github.com/dermatologist/umlsjs/pull/27) ([dependabot[bot]](https://github.com/apps/dependabot)) 272 | - build\(deps-dev\): bump typescript from 4.0.3 to 4.3.5 [\#26](https://github.com/dermatologist/umlsjs/pull/26) ([dependabot[bot]](https://github.com/apps/dependabot)) 273 | - build\(deps-dev\): bump dotenv from 8.2.0 to 10.0.0 [\#24](https://github.com/dermatologist/umlsjs/pull/24) ([dependabot[bot]](https://github.com/apps/dependabot)) 274 | - build\(deps-dev\): bump tslib from 2.0.3 to 2.3.0 [\#22](https://github.com/dermatologist/umlsjs/pull/22) ([dependabot[bot]](https://github.com/apps/dependabot)) 275 | - build\(deps\): bump actions/checkout from 1 to 2.3.4 [\#20](https://github.com/dermatologist/umlsjs/pull/20) ([dependabot[bot]](https://github.com/apps/dependabot)) 276 | - update deps [\#19](https://github.com/dermatologist/umlsjs/pull/19) ([dermatologist](https://github.com/dermatologist)) 277 | - build\(deps\): bump ws from 6.2.1 to 6.2.2 [\#18](https://github.com/dermatologist/umlsjs/pull/18) ([dependabot[bot]](https://github.com/apps/dependabot)) 278 | - build\(deps\): bump browserslist from 4.14.5 to 4.16.6 [\#17](https://github.com/dermatologist/umlsjs/pull/17) ([dependabot[bot]](https://github.com/apps/dependabot)) 279 | - build\(deps\): bump hosted-git-info from 2.8.8 to 2.8.9 [\#16](https://github.com/dermatologist/umlsjs/pull/16) ([dependabot[bot]](https://github.com/apps/dependabot)) 280 | - build\(deps\): bump lodash from 4.17.20 to 4.17.21 [\#15](https://github.com/dermatologist/umlsjs/pull/15) ([dependabot[bot]](https://github.com/apps/dependabot)) 281 | - build\(deps\): bump y18n from 4.0.0 to 4.0.1 [\#14](https://github.com/dermatologist/umlsjs/pull/14) ([dependabot[bot]](https://github.com/apps/dependabot)) 282 | - build\(deps\): bump axios from 0.19.2 to 0.21.1 [\#13](https://github.com/dermatologist/umlsjs/pull/13) ([dependabot[bot]](https://github.com/apps/dependabot)) 283 | 284 | ## [0.3.2](https://github.com/dermatologist/umlsjs/tree/0.3.2) (2020-10-21) 285 | 286 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.3.1...0.3.2) 287 | 288 | ## [0.3.1](https://github.com/dermatologist/umlsjs/tree/0.3.1) (2020-10-21) 289 | 290 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.3.0...0.3.1) 291 | 292 | ## [0.3.0](https://github.com/dermatologist/umlsjs/tree/0.3.0) (2020-10-21) 293 | 294 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.2.2...0.3.0) 295 | 296 | **Merged pull requests:** 297 | 298 | - Feature/v2 tsdx 1 [\#11](https://github.com/dermatologist/umlsjs/pull/11) ([dermatologist](https://github.com/dermatologist)) 299 | - Add more mock tests [\#10](https://github.com/dermatologist/umlsjs/pull/10) ([sinujackson](https://github.com/sinujackson)) 300 | - build\(deps\): bump yargs-parser from 13.1.1 to 13.1.2 [\#7](https://github.com/dermatologist/umlsjs/pull/7) ([dependabot[bot]](https://github.com/apps/dependabot)) 301 | - build\(deps\): bump lodash from 4.17.15 to 4.17.19 [\#6](https://github.com/dermatologist/umlsjs/pull/6) ([dependabot[bot]](https://github.com/apps/dependabot)) 302 | - Create LICENSE [\#5](https://github.com/dermatologist/umlsjs/pull/5) ([dermatologist](https://github.com/dermatologist)) 303 | - build\(deps\): bump acorn from 5.7.3 to 5.7.4 [\#4](https://github.com/dermatologist/umlsjs/pull/4) ([dependabot[bot]](https://github.com/apps/dependabot)) 304 | 305 | ## [0.2.2](https://github.com/dermatologist/umlsjs/tree/0.2.2) (2020-01-12) 306 | 307 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.2.1...0.2.2) 308 | 309 | **Merged pull requests:** 310 | 311 | - Create updates.md [\#3](https://github.com/dermatologist/umlsjs/pull/3) ([dermatologist](https://github.com/dermatologist)) 312 | - fix: 124 [\#2](https://github.com/dermatologist/umlsjs/pull/2) ([sinujackson](https://github.com/sinujackson)) 313 | - fix: 123 [\#1](https://github.com/dermatologist/umlsjs/pull/1) ([sinujackson](https://github.com/sinujackson)) 314 | 315 | ## [0.2.1](https://github.com/dermatologist/umlsjs/tree/0.2.1) (2020-01-04) 316 | 317 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.1.2...0.2.1) 318 | 319 | ## [0.1.2](https://github.com/dermatologist/umlsjs/tree/0.1.2) (2020-01-02) 320 | 321 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/0.1.0...0.1.2) 322 | 323 | ## [0.1.0](https://github.com/dermatologist/umlsjs/tree/0.1.0) (2020-01-01) 324 | 325 | [Full Changelog](https://github.com/dermatologist/umlsjs/compare/777241c262ef4816855becb8e1b8ff95b8852cc5...0.1.0) 326 | 327 | 328 | 329 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* 330 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | ## Please note: 4 | 5 | * (Optional) We adopt [Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow). Most feature branches are pushed to the repository and deleted when merged to *develop* branch. 6 | * (**Important**): Submit pull requests to the *develop* branch or *feature/* branches 7 | * Use *GitHub Issues* for feature requests and bug reports. Include as much information as possible while reporting bugs. 8 | 9 | 10 | ## Contributing (Step-by-step) 11 | 12 | 1. [Fork the repo](http://help.github.com/fork-a-repo) and clone it to your local computer, and set up the upstream remote: 13 | 14 | git clone https://github.com/YourGithubUsername/umlsjs.git 15 | cd umlsjs 16 | git remote add upstream https://github.com/dermatologist/umlsjs.git 17 | 18 | 2. Checkout out a new local branch based on your master and update it to the latest (BRANCH-123 is the branch name, You can name it whatever you want. Try to give it a meaningful name. If you are fixing an issue, please include the issue #). 19 | 20 | git checkout -b BRANCH-123 develop 21 | git clean -df 22 | git pull --rebase upstream develop 23 | 24 | > Please keep your code clean. If you find another bug, you want to fix while being in a new branch, please fix it in a separated branch instead. 25 | 26 | 3. Push the branch to your fork. Treat it as a backup. 27 | 28 | git push origin BRANCH-123 29 | 30 | 4. Code 31 | 32 | * Adhere to common conventions you see in the existing code. 33 | * Include tests as much as possible, and ensure they pass. 34 | 35 | 5. Commit to your branch 36 | 37 | git commit -m "BRANCH-123: Put change summary here (can be a ticket title)" 38 | 39 | **NEVER leave the commit message blank!** Provide a detailed, clear, and complete description of your commit! 40 | 41 | 6. Update your branch to the latest code. 42 | 43 | git pull --rebase upstream develop 44 | 45 | 7. **Important** If you have made many commits, please squash them into atomic units of work. (Most Git GUIs such as sourcetree and smartgit offer a squash option) 46 | 47 | 48 | git checkout develop 49 | git pull --rebase upstream develop 50 | git merge --squash BRANCH-123 51 | git commit -m "fix: 123" 52 | 53 | Push changes to your fork: 54 | 55 | git push 56 | 57 | 8. Issue a Pull Request 58 | 59 | In order to make a pull request: 60 | * Click "Pull Request". 61 | * Choose the develop branch 62 | * Click 'Create pull request' 63 | * Fill in some details about your potential patch including a meaningful title. 64 | * Click "Create pull request". 65 | 66 | Thanks for that -- we'll get to your pull request ASAP. We love pull requests! 67 | 68 | ## Feedback 69 | 70 | If you need to contact me, see my contact details on my profile page. 71 | 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Bell Raj Eapen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # umlsjs (For UMLS REST APIs) 2 | 3 | [](https://github.com/dermatologist/fhir-questionnaire-render-react) 4 | [](https://www.npmjs.com/package/umlsjs) 5 | [](https://nuchange.ca) 6 | 7 | ## About 8 | This is an unofficial package for accessing [UMLS REST APIs](https://documentation.uts.nlm.nih.gov/rest/home.html). The technical documentation for the APIs is available [here.](https://documentation.uts.nlm.nih.gov/) You need an API-KEY to access UMLS services. You can apply for the license [here.](https://uts.nlm.nih.gov/license.html) 9 | 10 | ## Install 11 | ``` 12 | npm install umlsjs --save 13 | 14 | ``` 15 | 16 | ## Usage 17 | 18 | ``` 19 | import {UMLSJS} from 'umlsjs' 20 | // Create Once 21 | const umls_key = "YOUR_KEY_HERE" ; 22 | const token = new UMLSJS.UMLSToken(umls_key) 23 | 24 | // Generate with each request 25 | let st = await token.getSt() 26 | const search1 = new UMLSJS.UMLSSearch(st) 27 | search1.init('Erythema Multiforme') 28 | await search1.query() 29 | const results = search1.getResults() 30 | 31 | // Generate with each request 32 | st = await token.getSt() 33 | const search2 = new UMLSJS.CUISearch(st) 34 | search2.init('C0009044') 35 | await search2.query() 36 | const result = search2.getResult() 37 | 38 | st = await token.getSt() 39 | const search2 = new UMLSJS.CUISearch(st) 40 | search2.init('C0009044') 41 | await search2.getAtoms() 42 | const result = search2.atoms 43 | 44 | st = await token.getSt() 45 | const search2 = new UMLSJS.CUISearch(st) 46 | search2.init('C0009044') 47 | await search2.getDefinitions() 48 | const result = search2.definitions 49 | 50 | st = await token.getSt() 51 | const search2 = new UMLSJS.CUISearch(st) 52 | search2.init('C0009044') 53 | await search2.getRelations() 54 | const result = search2.relations 55 | 56 | st = await token.getSt(); 57 | const search2 = new UMLSJS.AUISearch(st); 58 | search2.init("A10134087"); 59 | await search2.getChildren(); 60 | const result = search2.children; 61 | 62 | st = await token.getSt(); 63 | const search2 = new UMLSJS.AUISearch(st); 64 | search2.init("A10134087"); 65 | await search2.getDescendents(); 66 | const result = search2.descendants; 67 | 68 | st = await token.getSt(); 69 | const search2 = new UMLSJS.AUISearch(st); 70 | search2.init("A10134087"); 71 | await search2.getParents(); 72 | const result = search2.parents; 73 | 74 | 75 | st = await token.getSt(); 76 | const search2 = new UMLSJS.AUISearch(st); 77 | search2.init("A10134087"); 78 | await search2.getAncestors(); 79 | const result = search2.ancestors; 80 | 81 | ``` 82 | 83 | 84 | ``` 85 | const umlsjs = require('umlsjs) 86 | 87 | // Create Once 88 | const umls_key = "YOUR_KEY_HERE" ; 89 | const token = new umlsjs.UMLSJS.UMLSToken(umls_key) 90 | 91 | // Generate with each request 92 | let st = await token.getSt() 93 | const search1 = new umlsjs.UMLSJS.UMLSSearch(st) 94 | ``` 95 | 96 | ### pagination 97 | 98 | ``` 99 | nextPage() 100 | nextPage(2) 101 | ``` 102 | 103 | ## More to come 104 | 105 | * UMLSContent 106 | * UMLSSubsets 107 | * UMLSSemanticNetwork 108 | * UMLSContentView 109 | * UMLSCrosswalk 110 | 111 | ## Want to join development? 112 | 113 | * Rename .env.example to .env and add your API key. 114 | * Submit PR to the develop branch. 115 | 116 | ## Contributor(s) 117 | 118 | * [Bell Eapen](https://nuchange.ca) | [](https://twitter.com/beapen) 119 | * [Apar Mistry](https://github.com/apar-mistry) 120 | -------------------------------------------------------------------------------- /mocktest/fake-cui-response.ts: -------------------------------------------------------------------------------- 1 | export const fakeCUIRelations = { 2 | "pageSize": 25, 3 | "pageNumber": 1, 4 | "pageCount": 1, 5 | "result": [ 6 | { 7 | "classType": "ConceptRelation", 8 | "ui": "R02986047", 9 | "suppressible": false, 10 | "sourceUi": "NONE", 11 | "obsolete": false, 12 | "sourceOriginated": false, 13 | "rootSource": "MTH", 14 | "relationLabel": "RN", 15 | "additionalRelationLabel": "", 16 | "groupId": "NONE", 17 | "attributeCount": 0, 18 | "relatedId": "https://uts-ws.nlm.nih.gov/rest/content/2016AA/CUI/C0029509", 19 | "relatedIdName": "Unspecified site injury" 20 | } 21 | ] 22 | } 23 | export const fakeCUIDefinitions = { 24 | "pageSize": 25, 25 | "pageNumber": 1, 26 | "pageCount": 1, 27 | "result": [ 28 | { 29 | "classType": "Definition", 30 | "sourceOriginated": true, 31 | "rootSource": "MSH", 32 | "value": "Idiopathic recurrent VERTIGO associated with POSITIONAL NYSTAGMUS. It is associated with a vestibular loss without other neurological or auditory signs. Unlike in LABYRINTHITIS and VESTIBULAR NEURONITIS inflammation in the ear is not observed." 33 | } 34 | ] 35 | } 36 | export const fakeCUIAtoms = { 37 | "pageSize": 25, 38 | "pageNumber": 1, 39 | "pageCount": 1, 40 | "result": [{ 41 | "classType": "Atom", 42 | "ui": "A8345234", 43 | "suppressible": "false", 44 | "obsolete": "false", 45 | "rootSource": "ICD9CM", 46 | "termType": "PT", 47 | "code": "https://uts-ws.nlm.nih.gov/rest/content/2016AA/source/ICD9CM/386.11", 48 | "concept": "https://uts-ws.nlm.nih.gov/rest/content/2016AA/CUI/C0155502", 49 | "sourceConcept": "NONE", 50 | "sourceDescriptor": "NONE", 51 | "attributes": "NONE", 52 | "parents": "NONE", 53 | "ancestors": null, 54 | "children": "NONE", 55 | "descendants": null, 56 | "relations": "https://uts-ws.nlm.nih.gov/rest/content/2016AA/AUI/A8345234/relations", 57 | "name": "Benign paroxysmal positional vertigo", 58 | "language": "ENG", 59 | "contentViewMemberships": [{ 60 | "memberUri": "https://uts-ws.nlm.nih.gov/rest/content-views/2016AA/CUI/C1700357/member/A8345234", 61 | "uri": "https://uts-ws.nlm.nih.gov/rest/content-views/2016AA/CUI/C1700357", 62 | "name": "MetaMap NLP View" 63 | } 64 | ] 65 | }] 66 | } 67 | 68 | export const fakeCUIResponse = { 69 | 70 | "pageSize": 25, 71 | "pageNumber": 1, 72 | "result": 73 | 74 | { 75 | 76 | "classType": "searchResults", 77 | "results": 78 | 79 | [ 80 | 81 | { 82 | 83 | "ui": "C0009044", 84 | "rootSource": "SNOMEDCT_US", 85 | "uri": "https://uts-ws.nlm.nih.gov/rest/content/2015AA/CUI/C0009044", 86 | "name": "Closed fracture carpal bone" 87 | 88 | }] 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /mocktest/fake-key-response.ts: -------------------------------------------------------------------------------- 1 | export const fakeTgt = ` 2 | 3 | 4 |
5 |