Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Oct 26, 2015
1 parent 2649b86 commit 1cba2db
Show file tree
Hide file tree
Showing 10 changed files with 21,942 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
classes/
78 changes: 78 additions & 0 deletions ReadMe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
CDISC Changes Report Generator
==============================

This program will generate a changes report between two CDISC releases.
The releases may span any amount of time.

Requirements
------------
Git
Apache Ant
Java Developers Kit

Building the program
--------------------

Clone the DiffCDISC repository onto your local filesystem using Git.

C:\> git clone https://github.com/NCIEVS/diff-cdisc.git

Open a Command Prompt and navigate to the repository directory.

Run an ant build

C:\DiffCDISC> ant build

This will create a 'classes' and add a jar file to the 'dist' directory
where program dependancies are stored. The program is now ready to run.

NOTE: If the build fails, you may need to inspect your ant configurations.
See: https://ant.apache.org/manual/

Preparing data for the program
------------------------------

Users should pull two reports in .txt format from the same EVS CDISC
Archive directory (e.g., ADaM, SDTM, SEND).

Included in this repository are two example reports from the SDTM Archive
directory. The example below will demonstrate how to run the program
using these two files.

Running the program
-------------------

Each report is input into the program (newest followed by oldest),
followed by a "release date" and then the filename of the output.

C:\DiffCDISC\dist>RunChanges "..\docs\SDTM Terminology 2015-09-25.txt" "..\docs\SDTM Terminology 2015-06-26.txt" "9/25/2015" Changes.txt
Initializing diff report...
Getting changes...
Printing changes report...

About the program
-----------------

The following changes between CDISC releases are detected. In the event
of an Update, original and new values are reported.

- Add new CDISC Synonym
- Add new term to existing codelist
- Add new term to new codelist
- Addition of new codelist
- Remove CDISC Synonym
- Remove term entirely from codelist
- Remove term from retired codelist
- Retire codelist
- Update CDISC Codelist Name
- Update CDISC Definition
- Update CDISC Extensible List
- Update CDISC Submission Value
- Update NCI Preferred Term

Known issues
------------

The 'Request Code' column will always be empty as they are stored in the
JIRA tracking system. This column is manually populated by EVS before
each quarterly release.
35 changes: 35 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<project name="DiffCDISC" basedir=".">
<!-- *************************** -->
<!-- Properties -->
<!-- *************************** -->

<property name="dist.dir" value="./dist"/>
<property name="classes.dir" value="./classes"/>
<property name="src.dir" value="./src"/>

<!-- *************************** -->
<!-- Targets for building -->
<!-- *************************** -->

<target name="clean" description="Removes generated artifacts">
<delete dir="${classes.dir}" quiet="true"/>
<delete file="${dist.dir}/DiffCDISC.jar" quiet="true"/>
</target>

<target name="init" depends="clean" description="Creates necessary directories">
<mkdir dir="${classes.dir}"/>
</target>

<target name="compile" depends="init" description="Compiles">
<javac srcdir="${src.dir}" destdir="${classes.dir}" encoding="cp1252" debug="true" debuglevel="lines,source"/>
</target>

<!-- *******************************-->
<!-- Targets for packaging -->
<!-- *******************************-->

<target name="build" depends="compile" description="Package code into a jar file">
<jar destfile= "${dist.dir}/DiffCDISC.jar" basedir="${classes.dir}"/>
</target>
</project>

10,545 changes: 10,545 additions & 0 deletions docs/SDTM Terminology 2015-06-26.txt

Large diffs are not rendered by default.

10,732 changes: 10,732 additions & 0 deletions docs/SDTM Terminology 2015-09-25.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions scripts/RunChanges.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
java -cp "DiffCDISC.jar" gov.nih.nci.evs.cdisc.Diff %*
80 changes: 80 additions & 0 deletions src/gov/nih/nci/evs/cdisc/Change.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package gov.nih.nci.evs.cdisc;

public class Change {
private String releaseDate;
private String requestCode;
private String changeType;
private String code;
private String termType;
private String codelistShortName;
private String codelistLongName;
private String changeSummary;
private String originalValue;
private String newValue;
private int noCCode;

public Change(String relDate, String reqCode, String chType, String c, String tType, String clsn, String clln, String cs, String ov, String nv) {
this.releaseDate = relDate;
this.requestCode = reqCode;
this.changeType = chType;
this.code = c;
this.noCCode = Integer.parseInt(code.replace("C", ""));
this.termType = tType;
this.codelistShortName = clsn;
this.codelistLongName = clln;
this.changeSummary = cs;
this.originalValue = ov;
this.newValue = nv;
}

public String getReleaseDate() {
return this.releaseDate;
}

public String getRequestCode() {
return this.requestCode;
}

public String getChangeType() {
return this.changeType;
}

public String getCode() {
return this.code;
}

public String getTermType() {
return this.termType;
}

public String getShortName() {
return this.codelistShortName;
}

public String getLongName() {
return this.codelistLongName;
}

public String getChangeSummary() {
return this.changeSummary;
}

public String getOriginalValue() {
return this.originalValue;
}

public String getNewValue() {
return this.newValue;
}

public int getNoCCode() {
return this.noCCode;
}

public String toString() {
return this.releaseDate + "\t" + this.requestCode + "\t" + this.changeType + "\t" +
this.code + "\t" + this.termType + "\t" + this.codelistShortName + "\t" + this.codelistLongName + "\t" +
this.changeSummary + "\t" + this.originalValue + "\t" + this.newValue + "\n";
}

}
53 changes: 53 additions & 0 deletions src/gov/nih/nci/evs/cdisc/Codelist.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package gov.nih.nci.evs.cdisc;

public class Codelist {
private String code;
private String extensible;
private String name;
private String subValue;
private String[] synonyms;
private String definition;
private String pt;

public Codelist (String c, String ext, String n, String sub, String syns, String def, String ncipt) {
this.code = c;
this.extensible = ext;
this.name = n;
this.subValue = sub;
this.synonyms = syns.split(";");
for(int i=0; i < synonyms.length; i++) {
synonyms[i] = synonyms[i].trim();
}
this.definition = def;
this.pt = ncipt;
}

public String getCode() {
return code;
}

public String getExtensible() {
return extensible;
}

public String getName() {
return name;
}

public String getSubValue() {
return subValue;
}

public String[] getSynonyms() {
return synonyms;
}

public String getDefinition() {
return definition;
}

public String getPT() {
return pt;
}

}
Loading

0 comments on commit 1cba2db

Please sign in to comment.