More badges
About these extra badges:
- Both badges: Defunct as of 2024/12, as from that time we are only using a single deployment.
Test, Frontend Dev (local changes), Playwright E2E
only: Failure on this doesn't necessarily indicate an issue. It could just mean that the deployed instance has an older UI that is not compatible with new tests:
TermHub is a user interface and collection of analytic tools for working with concept sets. Its goal is to ease the process of concept set authoring and to facilitate the creation of higher-quality concept sets by providing users with immediate information and viasualization capabilities to understand their concept set and take advantage of existing concept sets that can aid their use case.
Allows comparison of overlapping concept sets, display of cset metadata, display of concept hierarchy, term usage and concept set patient counts, and modification and upload of concept sets to the N3C Enclave. Will interface with other code set repositories over time.
More info: Requirements
TermHub can take a CSV and create/edit concepts and concept sets. Read more
Includes links to the API docs. Read more
The simple concept vocabulary mapping, SNOMED, etc.
A grouping of vocabularies (single concepts) that make up a particular value set. This entails user-based tagging.
(Siggie?) The vocabulary that deals with just concept IDs and terminologies but also there is a part that deals with presence of these terminologies within your data source.
Description of API needed outside enclave in order to do cset analysis: (see Siggie's spreadsheet: https://roamresearch.com/#/app/jhu-bids/page/RsLm1drBI)
--includes single cset to a revised single cset (version compare) --similar/related csets --combination of csets
managing multiple csets may include single cset comparisons, either one cset compared to another, or a single cset version comparison. It can include neighborhods or similar, related csets. Or, it can be a combination of csets for a broader category.
Source, Limitations, Intention
Identifying/labeling sets of csets: --bundles, --approved --reviewed --published --externally curated, etc.
Documentation and visualization; reviewing, understanding, what is in the sets
Identifying neighborhoods --what is similar/different -- properties (articulating why they are different) User Interactions --select, relabel, groupings,
(is this the same as Review? maybe not)
Some of the important parts of developer documentation are below, but for more thorough information on development for frontend/backend, follow these 2 links.
$ git clone git@github.com:jhu-bids/TermHub.git
$ cd TermHub
If git lfs hasn't been installed yet on your system, first run: git lfs install
Then, update get the submodules:
$ git submodule init
$ git submodule update
At this point, check and see if files are there and have been pulled properly. For example, you can do
less termhub-csets/datasets/prepped_files/concept_relationship.csv
. If all you see there are a few lines lines which
include text like oid sha256:LONG_HASH
and size SOME_NUMBER
, this means that git submodule update
was unable to
fetch the files, and you should run the git LFS commands below and check again.
$ git lfs pull
$ git submodule foreach git lfs pull
3. Create virtual environment and activate it
$ venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ cd frontend
$ npm install
$ cd ..
$ mkdir env
$ cp .env.example env/.env
Then, edit .env
and set any variables that haven't been filled out. You'll likely need to reach out to @joeflack4 or
@Sigfried. In terms of Postgres variables: PGHOST
, PGUSER
, PGPASSWORD
, PGPORT
, and PGDATABASE
, and despite
using shell syntax for those variables, the values have to be constants, not shell variables
TERMHUB_DB_SERVER=postgresql
TERMHUB_DB_DRIVER=psycopg2
TERMHUB_DB_HOST=$PGHOST
TERMHUB_DB_USER=$PGUSER
TERMHUB_DB_DB=$PGDATABASE
TERMHUB_DB_SCHEMA=n3c
TERMHUB_DB_PASS=$PGPASSWORD
TERMHUB_DB_PORT=$PGPORT
You should have everything you need at this point to use TermHub. At this point, it will be connected to the same PostgreSQL database that is used in production. If you want to use a local database, follow the steps below.
Postgres.app makes this a breeze on macos: https://postgresapp.com/
Variables are initially set to the values below. Note that PGDATABASE
and TERMHUB_DB_DB
will need to change to termhub in the steps below.
PGHOST=localhost
PGUSER=postgres
PGPASSWORD=
PGPORT=5432
PGDATABASE=postgres
# create new db:
$ createdb termhub
# connect to new db:
$ psql termhub
# connected to postgres. run:
CREATE SCHEMA n3c;
SET search_path TO n3c;
$ python backend/db/initialize.py
Refer to the developer docs for more information.
- Go to the "Cset Search" page.
- Search for the codeset.
- Select the codeset from the dropdown menu.
- Optional: Select any additional codesets that might also be helpful in the process, e.g. to compare to the one we are editing.
- Go to the "Cset Comparison" page.
- Click on the column header for codeset you want to change.
- Click + to add a concept
- Click the cancel sign to remove a concept
- Click D to toggle
inludeDescendants
- Click M to toggle
includeMapped
- Click X to toggle
isExcluded
- You will see two boxes at the top. The left box has some metadata about the codeset. The right box shows your staged changes. Click the Export JSON link in that staged changes box.
- A new browser tab will up with just the JSON. Copy or save it.
- Go back to the "Cset Comparison" page, and click the "Open in Enclave" link.
- A new tab for the N3C data enclave will open. Log in if needed.
- Click the "Versions" tab at the top left.
- Click the blue "Create new version" button at the bottom left.
- Fill out the information in the "Create New Draft OMOP Concept Set Version" popup, and click "Submit".
- Your new draft version should appear on the left (may require a page refresh). Click it.
- On the right hand side, there is a blue button called "Add Concepts". Click the down arrow, then select "Import ATLAS Concept Set Expression JSON" from the menu.
- Copy/paste the JSON obtained from TermHub earlier into the box, and click "Import Atlas JSON".
- Click the version on the left again.
- On the right, click the green "Done" button.
Refer to the developer docs for more information.