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

Commit 1cba2db

Browse files
unknownunknown
authored andcommitted
initial commit
1 parent 2649b86 commit 1cba2db

File tree

10 files changed

+21942
-0
lines changed

10 files changed

+21942
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/
2+
classes/

ReadMe.txt

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
CDISC Changes Report Generator
2+
==============================
3+
4+
This program will generate a changes report between two CDISC releases.
5+
The releases may span any amount of time.
6+
7+
Requirements
8+
------------
9+
Git
10+
Apache Ant
11+
Java Developers Kit
12+
13+
Building the program
14+
--------------------
15+
16+
Clone the DiffCDISC repository onto your local filesystem using Git.
17+
18+
C:\> git clone https://github.com/NCIEVS/diff-cdisc.git
19+
20+
Open a Command Prompt and navigate to the repository directory.
21+
22+
Run an ant build
23+
24+
C:\DiffCDISC> ant build
25+
26+
This will create a 'classes' and add a jar file to the 'dist' directory
27+
where program dependancies are stored. The program is now ready to run.
28+
29+
NOTE: If the build fails, you may need to inspect your ant configurations.
30+
See: https://ant.apache.org/manual/
31+
32+
Preparing data for the program
33+
------------------------------
34+
35+
Users should pull two reports in .txt format from the same EVS CDISC
36+
Archive directory (e.g., ADaM, SDTM, SEND).
37+
38+
Included in this repository are two example reports from the SDTM Archive
39+
directory. The example below will demonstrate how to run the program
40+
using these two files.
41+
42+
Running the program
43+
-------------------
44+
45+
Each report is input into the program (newest followed by oldest),
46+
followed by a "release date" and then the filename of the output.
47+
48+
C:\DiffCDISC\dist>RunChanges "..\docs\SDTM Terminology 2015-09-25.txt" "..\docs\SDTM Terminology 2015-06-26.txt" "9/25/2015" Changes.txt
49+
Initializing diff report...
50+
Getting changes...
51+
Printing changes report...
52+
53+
About the program
54+
-----------------
55+
56+
The following changes between CDISC releases are detected. In the event
57+
of an Update, original and new values are reported.
58+
59+
- Add new CDISC Synonym
60+
- Add new term to existing codelist
61+
- Add new term to new codelist
62+
- Addition of new codelist
63+
- Remove CDISC Synonym
64+
- Remove term entirely from codelist
65+
- Remove term from retired codelist
66+
- Retire codelist
67+
- Update CDISC Codelist Name
68+
- Update CDISC Definition
69+
- Update CDISC Extensible List
70+
- Update CDISC Submission Value
71+
- Update NCI Preferred Term
72+
73+
Known issues
74+
------------
75+
76+
The 'Request Code' column will always be empty as they are stored in the
77+
JIRA tracking system. This column is manually populated by EVS before
78+
each quarterly release.

build.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<project name="DiffCDISC" basedir=".">
2+
<!-- *************************** -->
3+
<!-- Properties -->
4+
<!-- *************************** -->
5+
6+
<property name="dist.dir" value="./dist"/>
7+
<property name="classes.dir" value="./classes"/>
8+
<property name="src.dir" value="./src"/>
9+
10+
<!-- *************************** -->
11+
<!-- Targets for building -->
12+
<!-- *************************** -->
13+
14+
<target name="clean" description="Removes generated artifacts">
15+
<delete dir="${classes.dir}" quiet="true"/>
16+
<delete file="${dist.dir}/DiffCDISC.jar" quiet="true"/>
17+
</target>
18+
19+
<target name="init" depends="clean" description="Creates necessary directories">
20+
<mkdir dir="${classes.dir}"/>
21+
</target>
22+
23+
<target name="compile" depends="init" description="Compiles">
24+
<javac srcdir="${src.dir}" destdir="${classes.dir}" encoding="cp1252" debug="true" debuglevel="lines,source"/>
25+
</target>
26+
27+
<!-- *******************************-->
28+
<!-- Targets for packaging -->
29+
<!-- *******************************-->
30+
31+
<target name="build" depends="compile" description="Package code into a jar file">
32+
<jar destfile= "${dist.dir}/DiffCDISC.jar" basedir="${classes.dir}"/>
33+
</target>
34+
</project>
35+

docs/SDTM Terminology 2015-06-26.txt

Lines changed: 10545 additions & 0 deletions
Large diffs are not rendered by default.

docs/SDTM Terminology 2015-09-25.txt

Lines changed: 10732 additions & 0 deletions
Large diffs are not rendered by default.

scripts/RunChanges.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
java -cp "DiffCDISC.jar" gov.nih.nci.evs.cdisc.Diff %*

src/gov/nih/nci/evs/cdisc/Change.java

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
package gov.nih.nci.evs.cdisc;
2+
3+
public class Change {
4+
private String releaseDate;
5+
private String requestCode;
6+
private String changeType;
7+
private String code;
8+
private String termType;
9+
private String codelistShortName;
10+
private String codelistLongName;
11+
private String changeSummary;
12+
private String originalValue;
13+
private String newValue;
14+
private int noCCode;
15+
16+
public Change(String relDate, String reqCode, String chType, String c, String tType, String clsn, String clln, String cs, String ov, String nv) {
17+
this.releaseDate = relDate;
18+
this.requestCode = reqCode;
19+
this.changeType = chType;
20+
this.code = c;
21+
this.noCCode = Integer.parseInt(code.replace("C", ""));
22+
this.termType = tType;
23+
this.codelistShortName = clsn;
24+
this.codelistLongName = clln;
25+
this.changeSummary = cs;
26+
this.originalValue = ov;
27+
this.newValue = nv;
28+
}
29+
30+
public String getReleaseDate() {
31+
return this.releaseDate;
32+
}
33+
34+
public String getRequestCode() {
35+
return this.requestCode;
36+
}
37+
38+
public String getChangeType() {
39+
return this.changeType;
40+
}
41+
42+
public String getCode() {
43+
return this.code;
44+
}
45+
46+
public String getTermType() {
47+
return this.termType;
48+
}
49+
50+
public String getShortName() {
51+
return this.codelistShortName;
52+
}
53+
54+
public String getLongName() {
55+
return this.codelistLongName;
56+
}
57+
58+
public String getChangeSummary() {
59+
return this.changeSummary;
60+
}
61+
62+
public String getOriginalValue() {
63+
return this.originalValue;
64+
}
65+
66+
public String getNewValue() {
67+
return this.newValue;
68+
}
69+
70+
public int getNoCCode() {
71+
return this.noCCode;
72+
}
73+
74+
public String toString() {
75+
return this.releaseDate + "\t" + this.requestCode + "\t" + this.changeType + "\t" +
76+
this.code + "\t" + this.termType + "\t" + this.codelistShortName + "\t" + this.codelistLongName + "\t" +
77+
this.changeSummary + "\t" + this.originalValue + "\t" + this.newValue + "\n";
78+
}
79+
80+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package gov.nih.nci.evs.cdisc;
2+
3+
public class Codelist {
4+
private String code;
5+
private String extensible;
6+
private String name;
7+
private String subValue;
8+
private String[] synonyms;
9+
private String definition;
10+
private String pt;
11+
12+
public Codelist (String c, String ext, String n, String sub, String syns, String def, String ncipt) {
13+
this.code = c;
14+
this.extensible = ext;
15+
this.name = n;
16+
this.subValue = sub;
17+
this.synonyms = syns.split(";");
18+
for(int i=0; i < synonyms.length; i++) {
19+
synonyms[i] = synonyms[i].trim();
20+
}
21+
this.definition = def;
22+
this.pt = ncipt;
23+
}
24+
25+
public String getCode() {
26+
return code;
27+
}
28+
29+
public String getExtensible() {
30+
return extensible;
31+
}
32+
33+
public String getName() {
34+
return name;
35+
}
36+
37+
public String getSubValue() {
38+
return subValue;
39+
}
40+
41+
public String[] getSynonyms() {
42+
return synonyms;
43+
}
44+
45+
public String getDefinition() {
46+
return definition;
47+
}
48+
49+
public String getPT() {
50+
return pt;
51+
}
52+
53+
}

0 commit comments

Comments
 (0)