Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
dehall committed Apr 21, 2022
1 parent 9ba9f93 commit f2229f8
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pcor-cdm
# CODI Schema
This project reads in the [PCORnet Common Data Model v4.1 Parseable Spreadsheet Format](https://github.com/CDMFORUM/CDM-GUIDANCE/raw/master/Files%20for%20CDM%20page/2018-12-05-PCORnet-Common-Data-Model-v4dot1-parseable.xlsx) and will create database tables to represent the CDM.

This project has been updated to support [PCORnet Common Data Model v6.0 Parseable Spreadsheet Format](https://pcornet.org/wp-content/uploads/2021/05/2021_04_12_PCORnet_Common_Data_Model_v6dot0_parseable.xlsx)
Expand All @@ -9,8 +9,6 @@ This script currently creates the tables, sets not null constraints and primary

**Note** The CSV files were created using Excel to open the parseable file and then perform an export to CSV. Excel will put a Byte Order Marker (BOM) in the file, which throws off the standard ruby CSV parsing library. The CSV files were re-encoded to UTF-8 using Visual Studio Code.

**Note** The CODI Ancillary Tables SQL was generated by an external tool. Original materials can be found on the [CODI SharePoint Site](https://communityshare.mitre.org/sites/CODI/SitePages/Home.aspx?RootFolder=%2Fsites%2FCODI%2FShared%20Documents%2FTasks%202-4-6%20Data%20Model%20Development%20and%20Implementation%2FData%20Model%20Recommendations&FolderCTID=0x012000FB06469179A8EA45AD22A72721DC2502&View=%7BA7E27498-CE3A-4A93-8D50-CD0BFADD9613%7D)

## Prerequisites

This was built using ruby 2.6.2. It used inline [Bundler](https://bundler.io/) to manage dependencies. Assuming you have ruby installed, you can:
Expand All @@ -19,8 +17,25 @@ This was built using ruby 2.6.2. It used inline [Bundler](https://bundler.io/) t

## Running

Just run the script:
The connection information exists in the ruby file: `build_db.rb`:
```
DB = Sequel.connect(adapter: 'postgres', :host => 'localhost',
:database => 'codi',
:user => 'codi',
:password => 'codi')
```
Change these values as appropriate to point to your database instance. The following adapters should be supported: `postgres`, `mysql`, `oracle`, `mssql`


To create the schema, just run the script:

ruby build_db.rb

The connection information exists in the ruby file. It assumes that the database has been created and is empty. It will create all of the columns after that.
It assumes that the database has been created and is empty. It will create all of the columns after that.


## Notice

Copyright 2022 The MITRE Corporation.

Approved for Public Release; Distribution Unlimited. Case Number 19-2008

0 comments on commit f2229f8

Please sign in to comment.