Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
d3665bc
Remove owlexpression table with mysql syntax.
njmarques Dec 13, 2019
e41177b
Remove extra underscore in filename
njmarques Dec 13, 2019
73487d2
Fix SNOMED file name for import
njmarques Dec 13, 2019
70faddd
Fix SNOMED file name for import
njmarques Dec 13, 2019
634f8e5
Fix SNOMED file name and table columns to match MRCM Domain Snapshot
njmarques Dec 13, 2019
71ea8d0
Fix SNOMED file name and table columns to match MRCM Module Scope Sna…
njmarques Dec 13, 2019
d2511ab
Update INT to 20200131
Feb 17, 2020
4d65b7b
Update US to 20200301 and include instructions for postgres docker te…
Mar 3, 2020
d6a64fe
Minor changes to make it work with MySQL 8
Mar 4, 2020
2eec079
Add testing for MariaDB and add a file to make it easier to make anno…
Mar 4, 2020
18ae508
Update documentation
Mar 4, 2020
2c9cbce
Upgrade for 20200731
Aug 10, 2020
5666bc9
Some cleanup of postgres scripts
Aug 10, 2020
e8cb9e0
Support for docker testing of Oracle
Aug 11, 2020
c04cc82
Final changes for 20200731
Aug 11, 2020
fc99256
Announcements update
Aug 11, 2020
4825833
Update US to 20200901
Sep 1, 2020
83d0c98
Extend numerics to 20 digits to avoid UNSIGNED issues
Sep 2, 2020
fb1a1f4
Small fixes to oracle docker testin g
Sep 2, 2020
e81619f
Update to file paths to use the same structure as in HOWTO.txt. Add …
njmarques Feb 10, 2021
38398c7
Update INT to 20210131
njmarques Feb 10, 2021
f9bc33e
Update paths for wci-build server and file permissions for MacOS and …
njmarques Feb 17, 2021
4a1f00e
Update for 20210131
Feb 25, 2021
780ea3c
Merge branch 'master' of github.com:WestCoastInformatics/SNOMED-DB-Lo…
Feb 25, 2021
dcac64f
update SNOMED US 20210301
Mar 1, 2021
8991ad4
Add comment to use docker login to enable Oracle Docker image to down…
njmarques Mar 4, 2021
ae0ef8b
Merge branch 'master' of https://github.com/WestCoastInformatics/SNOM…
njmarques Mar 4, 2021
7492d42
Update for running load scripts with Oracle Docker on Linux
njmarques Mar 5, 2021
7b8ea88
Update copyright to 2021
njmarques Mar 5, 2021
aff4708
Update version release information in announcements
njmarques Mar 5, 2021
aef2a2d
Enhancements for the RelationshipConcreteValues file
Jul 29, 2021
a450f8a
More fixes for 20210731
Aug 2, 2021
4b57ddb
Merge branch 'master' of github.com:WestCoastInformatics/SNOMED-DB-Lo…
Aug 2, 2021
18da0cb
Merge branch 'bac/20210731'
Aug 2, 2021
45d4ea6
Fix oracle ctl file
Aug 3, 2021
1d5d19f
Some cleanup of mysql readme
Aug 3, 2021
8b8cea5
Add relationship concrete values
njmarques Aug 9, 2021
96fffa7
Use sudo for oracle db.
njmarques Aug 10, 2021
bb1900d
Add links to README.md
Aug 19, 2021
5356046
Update versions of dbs supported
Aug 19, 2021
e1e3b82
Remove completed TODO
Aug 19, 2021
3d8a3ae
Update US version to 20210901
Sep 8, 2021
5b02b24
Update announcement for Snomed US 20210901
Sep 8, 2021
ce7a1c9
Update Internation edition to 20220131
njmarques Feb 4, 2022
848bfda
Update Internation edition to 20220131
njmarques Feb 4, 2022
ad61922
Update anouncements
Feb 7, 2022
bc9cb1f
Merge branch 'master' of github.com:WestCoastInformatics/SNOMED-DB-Lo…
Feb 7, 2022
9e1a5aa
Update US release to 20220301
njmarques Mar 2, 2022
a9f4a3b
Update README-oracle-docker.txt
enjoylifejyl Mar 3, 2022
09ad1c8
Update README-oracle-docker.txt
enjoylifejyl Mar 4, 2022
6b462bc
Update announcement for US 3/1/2022 release
njmarques Mar 4, 2022
149bbb4
Update announcement
Mar 7, 2022
b134c34
Merge branch 'master' of github.com:WestCoastInformatics/SNOMED-DB-Lo…
Mar 7, 2022
aa39cb0
Update for July 2022 International Edition
njmarques Jul 30, 2022
b528c95
Update announcement for latest version
Aug 4, 2022
0cd8aa8
Merge branch 'master' of github.com:WestCoastInformatics/SNOMED-DB-Lo…
Aug 4, 2022
1965950
update to Snomed US edition 20220901
njmarques Sep 1, 2022
58d5b17
Update announcement
Sep 15, 2022
a28ec16
update for Snomed Int'l 20220131
njmarques Feb 1, 2023
edd4730
Update announcements
bcarlsenca Feb 9, 2023
54894d0
Merge branch 'master' of github.com:WestCoastInformatics/SNOMED-DB-Lo…
bcarlsenca Feb 9, 2023
0fe9698
Prepare US Edition 20230301
njmarques Mar 1, 2023
7dc5004
Update announcement
bcarlsenca Mar 27, 2023
434b5b0
Update link to website
bcarlsenca Jul 28, 2023
8521f97
Update link to website
bcarlsenca Jul 28, 2023
a1b5520
Update for 20230731 International release
njmarques Aug 1, 2023
f4b2290
update database versions
njmarques Aug 1, 2023
1bf5162
Update README-postgres-docker.txt
enjoylifejyl Aug 4, 2023
28b2849
Update README-postgres-docker.txt
enjoylifejyl Aug 5, 2023
6584aba
Update for SNOMEDCT US 20230901
njmarques Sep 2, 2023
5bb24ac
Remove postgres 11 testing, update announcement
bcarlsenca Sep 27, 2023
3d63262
January 1, 2024 Snomed International Release
njmarques Jan 4, 2024
e9f475f
January 1, 2024 Snomed International Release
njmarques Jan 4, 2024
9c5daea
fix mrcmdomain table load for mysql
njmarques Jan 9, 2024
6939f58
make mysql consistent
njmarques Jan 9, 2024
3df9d48
Update the Load Scripts (#1)
gaaliciA1990 Mar 6, 2024
e70c2ff
Update the Load Scripts (#1) (#2)
bcarlsenca Mar 6, 2024
9abdc80
Added check for python and perl to oracle and postgres
Mar 7, 2024
36ba02b
Merge branch 'master' into develop
gaaliciA1990 Mar 7, 2024
c27652c
Merge pull request #3 from WestCoastInformatics/develop
gaaliciA1990 Mar 7, 2024
a63a7c8
Update READMEs for announcement
bcarlsenca Mar 8, 2024
de18d8f
Update READMEs for announcement
bcarlsenca Mar 8, 2024
40b168e
Update announcement
bcarlsenca Mar 27, 2024
3f5b962
updating version for July INT download
Jul 16, 2024
e56f08a
OP-783 - fixing typos for log outputs
Jul 18, 2024
59110d7
fixing remaining to log typos
Jul 18, 2024
aaf5ef9
OP-721 Increased the max length for areas with 255 to 4096 (#4)
gaaliciA1990 Jul 22, 2024
74e2950
OP-839 Updated populate script to check for perl first
Sep 12, 2024
ca8f11b
Merge pull request #5 from WestCoastInformatics/alg/OP-839-SNOMEDCT-U…
gaaliciA1990 Sep 13, 2024
4e23887
Updates for announcement
bcarlsenca Oct 10, 2024
646ed8e
OP-854: update python script to calculate transitive closures
njmarques Jan 9, 2025
aa61525
OP-934: update files for Snomed Intl 01, 2025
njmarques Jan 9, 2025
0f2060c
OP-934: update files for Snomed Intl 01, 2025
njmarques Jan 9, 2025
9e03f06
OP-988: Update for SNOMEDCT US 20250301
njmarques Mar 3, 2025
45404e0
Update README-mysql-docker.md
njmarques Mar 4, 2025
a8c9640
OP-988: Update versions. Add script for MariaDb due to update in SQL…
njmarques Mar 5, 2025
725b0e6
OP-1079: Snomed CT INT July 1 2025 release
Jul 3, 2025
fe80a52
OP-1079: Update script to make it compatible with Python 2 and 3.
Jul 8, 2025
eaecaf4
OP-1079: Update field size to make load work with Oracle 19c.
Jul 8, 2025
3341405
OP-1079: Update for Oracle 19c.
Jul 8, 2025
ecdba2c
SNOMEDCT US 20250901 release
Aug 31, 2025
35d63a7
OP-1929: SNOMEDCT INTL 20260101
Jan 6, 2026
ea0fbeb
OP-1929: Remove populate mariadb script from oracle and postgres arti…
Jan 8, 2026
5ca456c
OP-2119: Update for SNOMEDCT US 20260301
Mar 5, 2026
7b1d84c
OP-2512: July 1, 2026 release of SNOMEDCT Int'l.
Jul 6, 2026
4622825
OP-2512: Update database versions
Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,8 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
/target

#################
## IntelliJ
#################
.idea
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
SNOMED CT DATABASE LOAD SCRIPTS
===============================
Scripts to create and populate a MySQL, Postgres, or Oracle database with a
SNOMED CT terminology release in RF2.
Scripts to build a transitive closure table from an RF2, snapshot,
inferred SNOMED CT relationships file, create and populate a MySQL,
Postgres, or Oracle database with a SNOMED CT terminology release in RF2.

To download a package built for the latest US or International edition, visit
http://www.westcoastinformatics.com/resources.html
https://www.westcoastinformatics.com/products/db-load-scripts

*New feature: a "depth" flag is now computed as well where 0 means "self",
1 means "child", and >1 means "non-child descendant". This enables asking
queries about "child of", "descendant of", and "descendant or self of".

Minimum Specification
---------------------
- MYSQL v5.6.+
- Oracle v11.+
- Postgres 9.+
- MySQL v8.4
- MySQL v8 requires the server to run with "--local_infile=ON"
- MariaDB v10.+, v11.+, v12.+
- Oracle v19.+, v21.+, v26.+
- Postgres v14.+, v15.+, v16.+, v17.+, v18.+

Installation
------------
* See HOWTO.txt file to understand how to load the rf2 files into the database

* See [HOWTO.md](src/main/resources/HOWTO.md) file to understand how to load the rf2 files into the database

See Also
--------
* src/main/resources/LICENSE.txt
* src/main/resources/README.txt
* src/main/resources/HOWTO.txt
* [src/main/resources/LICENSE.txt](src/main/resources/LICENSE.txt)
* [src/main/resources/README.md](src/main/resources/README.md)
* [src/main/resources/HOWTO.md](src/main/resources/HOWTO.md)

TODO
----
Next Steps:
* Better automated QA to validate file sizes against table sizes
* Better automated QA to validate views have same row count as driving tables
* Support additional SNOMED files

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<editionVersion>20190731</editionVersion>
<editionVersion>20260701</editionVersion>
<editionType>Core</editionType>
<editionLabel>INT</editionLabel>
</properties>
</profile>
<profile>
<id>US</id>
<properties>
<editionVersion>20190901</editionVersion>
<editionVersion>20260301</editionVersion>
<editionType>National</editionType>
<editionLabel>US1000124</editionLabel>
</properties>
Expand Down
1 change: 1 addition & 0 deletions src/main/assembly/oracle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<excludes>
<exclude>rf1/**</exclude>
<exclude>**/*mysql*</exclude>
<exclude>**/*maria*</exclude>
<exclude>**/*postgres*</exclude>
<exclude>**/*psql*</exclude>
</excludes>
Expand Down
1 change: 1 addition & 0 deletions src/main/assembly/postgres.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<excludes>
<exclude>rf1/**</exclude>
<exclude>**/*oracle*</exclude>
<exclude>**/*maria*</exclude>
<exclude>**/*.ctl</exclude>
<exclude>**/*mysql*</exclude>
</excludes>
Expand Down
39 changes: 39 additions & 0 deletions src/main/assembly/tc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<assembly>
<id>tc</id>
<baseDirectory>/</baseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>rf1/**</exclude>
<exclude>**/*mysql*</exclude>
<exclude>**/*oracle*</exclude>
<exclude>**/*.ctl</exclude>
</excludes>
<filtered>true</filtered>
<lineEnding>keep</lineEnding>
</fileSet>

<!-- Copy code to RF1 directory <fileSet> <directory>target/classes</directory>
<outputDirectory>/rf1</outputDirectory> <includes> <include>**/*class</include> <include>**/*class</include>
</includes> <filtered>false</filtered> </fileSet> <fileSet> <directory>src/main/java</directory>
<outputDirectory>/rf1</outputDirectory> </fileSet> -->
<!-- Copy code to RF2 directory -->
<fileSet>
<directory>target/classes</directory>
<outputDirectory>/rf2</outputDirectory>
<includes>
<include>**/*class</include>
</includes>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>src/main/java</directory>
<outputDirectory>/rf2</outputDirectory>
</fileSet>
</fileSets>
</assembly>
75 changes: 75 additions & 0 deletions src/main/resources/HOWTO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# How To Use the SNOMED CT Database Loader
This HOWTO describes how to use the installer scripts to load SNOMEDCT into a database.

## Watch the Demo Video

See [https://youtu.be/917T6D3b5ro](https://youtu.be/917T6D3b5ro)

## Installation
1. Download the database loader zip file from the https://www.westcoastinformatics.com/products/db-load-scripts website. Select the appropriate database-version pair (i.e. oracle-US Edition). Depending on your database and edition, identify the appropriate target's zip file.

2. Unzip the contents of the zip file into a 'data' folder

3. Download the SNOMED CT Release files in ZIP format. US Users can find the files here:
* [SNOMED CT® US Edition Release Files](https://www.nlm.nih.gov/healthit/snomedct/us_edition.html)
* [SNOMED CT® International Edition Release Files](https://www.nlm.nih.gov/healthit/snomedct/international.html)

4. Open the desired zip file and extract the 'Snapshot' folder into the 'data/rf2' folder. Once completed:
* The 'data' folder's content will include:
- 'rf2' folder
- HOWTO.md
- LICENSE.txt
- README.md
* The 'data/rf2' folder's contents will include:
- 'Snapshot' folder
- *.sql files
- *.ctl files (for oracle only)
- one *.sh file

5. In a text editor, open the temp-folder's appropriate "populate" script as defined by your database.
* For example:
- For MySQL (or MariaDB < 11), use the "populate_mysql_db.sh" script
- For MariaDB 11+, use the "populate_maria_db.sh" script
- For Postgres, use the "populate_postgres_db.sh" script
- For Oracle, use the "populate_oracle_db.sh" script
* Configure settings at the top of the "populate" script for your environment
- use your host's IP address or hostname
- user is your database's username
- password is your database's password
- tns_name or db_name is the database's schema which is to be populated

6. Create the database schema as defined in step #5

* NOTE: postgres supports only db-level character encoding, so make sure to create your database using: `WITH ENCODING 'UTF-8'`


7. Execute the "populate" script
* Note: a complete log file will appear as `mysql.log`, `mariadb.log`, `postgres.log`, or `oracle.log`

## Oracle: VARCHAR2 vs CLOB for description and text definition (4096 characters)

SNOMED CT allows description and text definition terms up to 4096 characters. Oracle's default `VARCHAR2` limit is 4000 characters, so this package uses **CLOB** for:

- `description.term`
- `textdefinition.term`

**Writing queries**

- **Simple SELECT:** Use the column as usual. Oracle converts CLOB to character data for display.
```sql
SELECT term FROM description WHERE id = 12345;
SELECT term FROM textdefinitionwithnames WHERE conceptId = 12345;
```

- **GROUP BY, ORDER BY, or DISTINCT** on these columns: Use `DBMS_LOB.SUBSTR` so Oracle can compare/sort. Use the same expression in both SELECT and GROUP BY when grouping by the term.
```sql
SELECT DBMS_LOB.SUBSTR(term, 4000, 1) AS term, COUNT(*)
FROM description
WHERE active = 1
GROUP BY DBMS_LOB.SUBSTR(term, 4000, 1);
```

- **Views:** Views that expose these columns (e.g. `descriptionwithnames`, `textdefinitionwithnames`, `conceptwithnames` / preferred name) return CLOB. Same rules: simple SELECT is fine; for GROUP BY/ORDER BY on the term column, wrap in `DBMS_LOB.SUBSTR(column, 4000, 1)`.

**Why CLOB and not VARCHAR2(4096)?**
`VARCHAR2(4096)` requires Oracle's `MAX_STRING_SIZE=EXTENDED`, which is not default and is not assumed for this package. Using CLOB works on all supported Oracle versions without that setting.
52 changes: 0 additions & 52 deletions src/main/resources/HOWTO.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2019 West Coast Informatics, LLC
Copyright 2026 West Coast Informatics, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
24 changes: 24 additions & 0 deletions src/main/resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Welcome to DB Load Scripts
Welcome to SNOMED CT MySQL, Postgres, and Oracle Database Load Scripts
https://www.westcoastinformatics.com/products/db-load-scripts

Go to the above link for documentation, and additional downloads.

## Important Notes
* These database load scripts are configured to work with the ${editionVersion}
SNOMEDCT ${editionLabel} Edition.

## Key Features

* Support for Oracle, Postgres, and MySQL (and MariaDB)
* Support for RF2 data format
* Denormalization of concept/description ids for contextualized lookup
* Builds transitive closure table from RF2 snapshot, inferred, SNOMEDCT file.
* Views with denormalized concept preferred names

## Watch the Demo Video

See [https://youtu.be/917T6D3b5ro](https://youtu.be/917T6D3b5ro)

### Developer Notes
https://github.com/WestCoastInformatics/SNOMED-DB-Load-Scripts
20 changes: 0 additions & 20 deletions src/main/resources/README.txt

This file was deleted.

Loading