Skip to content

Commit

Permalink
Merge pull request #91 from onc-healthit/develop
Browse files Browse the repository at this point in the history
merge develop into master for April 26 release
  • Loading branch information
drbgfc authored Apr 27, 2021
2 parents b3124e2 + 668c558 commit 04c59aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
/.project
/target
/bin
/codevalidator-api/target
/codevalidator-api/target
/.apt_generated/
/.apt_generated_tests/
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.sitenv.vocabulary</groupId>
<artifactId>codevalidator-api</artifactId>
<version>1.0.27</version>
<version>1.0.28</version>
<name>Code Validator API</name>
<url>http://www.sitenv.org</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void load(List<File> filesToLoad, Connection connection) {
while ((line = br.readLine()) != null) {
if (!line.isEmpty()) {
String code = line.substring(0, 5);
String displayName = line.substring(line.indexOf(" "));
String displayName = isTabDelimitedFile(line) ? line.substring(line.indexOf('\t')) : line.substring(line.indexOf(" "));
buildCodeInsertQueryString(insertQueryBuilder, code, displayName, codeSystem, oid, CODES_IN_THIS_SYSTEM_ARE_ALWAYS_ACTIVE);

if ((++totalCount % BATCH_SIZE) == 0) {
Expand Down Expand Up @@ -74,4 +74,8 @@ public void load(List<File> filesToLoad, Connection connection) {
}
}
}

private boolean isTabDelimitedFile(String line) {
return line.indexOf('\t') != -1;
}
}
2 changes: 1 addition & 1 deletion src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CREATE TABLE VALUESETS (
CREATE TABLE CODES (
ID INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
CODE VARCHAR(50) NOT NULL,
DISPLAYNAME VARCHAR(5000) NOT NULL,
DISPLAYNAME VARCHAR(100000) NOT NULL,
CODESYSTEM VARCHAR(50) NOT NULL,
CODESYSTEMOID VARCHAR(50) NOT NULL,
ACTIVE BOOLEAN NOT NULL
Expand Down

0 comments on commit 04c59aa

Please sign in to comment.