Return-Path: X-Original-To: apmail-ctakes-commits-archive@www.apache.org Delivered-To: apmail-ctakes-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 223B710EE6 for ; Mon, 16 Dec 2013 16:33:56 +0000 (UTC) Received: (qmail 81596 invoked by uid 500); 16 Dec 2013 16:32:40 -0000 Delivered-To: apmail-ctakes-commits-archive@ctakes.apache.org Received: (qmail 81219 invoked by uid 500); 16 Dec 2013 16:32:19 -0000 Mailing-List: contact commits-help@ctakes.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ctakes.apache.org Delivered-To: mailing list commits@ctakes.apache.org Received: (qmail 80885 invoked by uid 99); 16 Dec 2013 16:31:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 16:31:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Dec 2013 16:31:42 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C48B82388B9B; Mon, 16 Dec 2013 16:30:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1551254 [7/26] - in /ctakes/branches/ytex: ctakes-ytex-res/ ctakes-ytex-res/.settings/ ctakes-ytex-res/src/ ctakes-ytex-res/src/main/ ctakes-ytex-res/src/main/resources/ ctakes-ytex-res/src/main/resources/org/ ctakes-ytex-res/src/main/reso... Date: Mon, 16 Dec 2013 16:30:40 -0000 To: commits@ctakes.apache.org From: vjapache@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131216163057.C48B82388B9B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: ctakes/branches/ytex/ctakes-ytex/pom.xml URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/pom.xml?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/pom.xml (added) +++ ctakes/branches/ytex/ctakes-ytex/pom.xml Mon Dec 16 16:30:30 2013 @@ -0,0 +1,380 @@ + + + + 4.0.0 + ctakes-ytex + Apache cTAKES ytex + + org.apache.ctakes + ctakes + 3.2.0-SNAPSHOT + + + + + org.hibernate + hibernate-core + 4.2.6.Final + + + org.hibernate + hibernate-ehcache + 4.2.6.Final + + + net.sf.ehcache + ehcache-core + + + + + nz.ac.waikato.cms.weka + weka-stable + 3.6.10 + + + mysql + mysql-connector-java + 5.1.26 + + + + com.microsoft.sqlserver + sqljdbc + 4.0 + + + + oracle.jdbc + ojdbc7_g + 12.1.0.1.0 + + + + + ant-contrib + ant-contrib + 1.0b3 + + + ant + ant + + + + + org.apache.ctakes + ctakes-ytex-res + ${ctakes.version} + + + hsqldb + hsqldb + 1.8.0.10 + + + commons-lang + commons-lang + + + commons-cli + commons-cli + + + commons-jxpath + commons-jxpath + 1.3 + + + commons-beanutils + commons-beanutils + 1.8.3 + + + commons-dbcp + commons-dbcp + 1.4 + + + org.apache.solr + solr-commons-csv + 1.4.0 + + + log4j + log4j + + + org.slf4j + slf4j-log4j12 + 1.6.1 + + + junit + junit + + + org.springframework + spring-core + + + org.springframework + spring-jdbc + 3.1.2.RELEASE + + + org.springframework + spring-orm + 3.1.2.RELEASE + + + org.springframework + spring-aop + 3.1.2.RELEASE + + + org.aspectj + aspectjweaver + 1.7.3 + + + + + net.sf.ehcache + ehcache-core + 2.4.6 + + + + net.sf.trove4j + trove4j + 3.0.3 + + + com.rubiconproject.oss + jchronic + 0.2.6 + + + javax.xml.bind + jaxb-api + 2.2.5 + + + com.sun.xml.bind + jaxb-impl + 2.2.5 + + + com.google.guava + guava + + + org.apache.ant + ant-launcher + 1.9.2 + + + + + + + org.apache.maven.wagon + wagon-http-lightweight + 2.2 + + + + + + + + org.codehaus.mojo + jaxb2-maven-plugin + + + + xjc + + + + + + ${project.basedir}/../ctakes-ytex-res/src/main/resources/org/apache/ctakes/jdl + + org.apache.ctakes.jdl.schema.xdl + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + compile + + copy-dependencies + + + ${basedir}/target/lib + false + false + true + + + + + + maven-antrun-plugin + 1.6 + + + generate-config + process-classes + + run + + + + + + + + + + + generate-test-config + process-test-classes + + run + + + + + + + + + + + + + + + setup-test-database + pre-integration-test + + run + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + surefire-it + integration-test + + test + + + false + always + + file:${project.basedir}/src/test/resources/log4j.properties + + + ${project.basedir}/../ctakes-ytex-res/src/main/resources + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [1.0.0,) + + copy-dependencies + + + + + false + + + + + + org.apache.maven.plugins + maven-antrun-plugin + [1.0,) + + run + + + + + false + + + + + + + + + + + \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/build-classpath.xml URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/build-classpath.xml?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/build-classpath.xml (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/build-classpath.xml Mon Dec 16 16:30:30 2013 @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/build-setup.xml URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/build-setup.xml?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/build-setup.xml (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/build-setup.xml Mon Dec 16 16:30:30 2013 @@ -0,0 +1,121 @@ + + + + + + + + + +Ant build script to setup ytex. +Call with option -projecthelp for more info. + ${ctakes.url} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + config.source.dir = ${config.source.dir} + config.generated.dir = ${config.generated.dir} + + + + + + + + + + + + + + + + + + Warning! ${config.local}/org/apache/ctakes/ytex/ytex.properties not available, no files generated + + + + + + + + ${config.local}/org/apache/ctakes/ytex/ytex.properties exists, skipping test ytex.properties generation + + + + + + + + + + + + ${config.local}/org/apache/ctakes/ytex/ytex.properties does not exist, generating ytex.properties for hsqldb in ${ytex.hsql.db} + + + + + + + + ${config.local}/org/apache/ctakes/ytex/ytex.properties does not exist, using ytex.${db.type}.properties + + + + + + + + + + + + Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/build.xml Mon Dec 16 16:30:30 2013 @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + umls.zip.available ${umls.zip.available} + db.schema ${db.schema} + db.type ${db.type} + + + + + + + + + + + + + + + show tables from ${umls.schema} like 'MRCONSO'; + + + + + + use ${umls.catalog}; SELECT count(*) FROM sys.objects WHERE object_id = OBJECT_ID(N'${umls.schema}.[MRCONSO]'); + + + + + + select count(*) from all_tables where lower(table_name) = 'mrconso' and lower(owner) = lower('${umls.schema}'); + + + + + + select count(*) from INFORMATION_SCHEMA.SYSTEM_TABLES where lower(table_name) = 'mrconso' and lower(table_schem) = lower('${umls.schema}'); + + + + mrconso.out = ${mrconso.out} + + + + + + + + mrconso.exists = ${mrconso.exists} + + + + + mrconso.exists = ${mrconso.exists} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + create umls tables + + + + + + + + + + + import umls tables + + + + + + + + + + + + + + + + + index umls tables + + + + + + + + + create umls tables + + + + + import MRCONSO + + + + + import MRSTY + + + + + index umls tables + + + + + + + + + + drop ytex umls_aui_fword table + + + + + + + + create ytex umls_aui_fword tables + + + + + setting up umls_aui_fword table. please be patient - this can take a while + + + + index umls_aui_fword tables + + + + + + + + + + + + + + + + + + + + import v_snomed_fword_lookup. Be patient, this can take a while. + + + + + + + + + + copying script and replacing UMLS_SCHEMA token with ${umls.schema} + + + + + + + + + + + + + + + + create the v_snomed_fword_lookup table + + + + + + + index the v_snomed_fword_lookup table + + + + + + + + drop ytex umls_aui_fword table + + + + + + create ytex umls_aui_fword table + + + + + import umls tables into ${umls.schema} schema. Be patient, this can take a while. + + + + + + + drop v_snomed_fword_lookup table + + + + + + + + create nlm's umls tables + + + + + + + + + + + + + + + execute ${sql.file} + + + + + +use ${sql.catalog} +${sql.delimiter} + + + + + + + + + + + + + + + + + + + + + + +set schema ${sql.schema} +${sql.delimiter} + + + + + + + +use ${sql.schema} +${sql.delimiter} + + + + + + + +ALTER SESSION SET CURRENT_SCHEMA=${sql.schema} +${sql.delimiter} + + + + + + + + + + + + executing ${sql.src} + + + + + + jdl.format ${jdl.format} + jdl.data ${jdl.data} + umls.prefix ${umls.prefix} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/conn.xml.template URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/conn.xml.template?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/conn.xml.template (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/conn.xml.template Mon Dec 16 16:30:30 2013 @@ -0,0 +1,10 @@ + + + + @db.driver@ + @db.url@ + @db.username@ + @db.password@ + + \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.txt URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.txt?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.txt (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.txt Mon Dec 16 16:30:30 2013 @@ -0,0 +1,31 @@ +1 la An AP, lateral, and sunrise view of the left knee is obtained. A standing view of both knees is
obtained. A Rosenberg view is also obtained.

On the left, bony mineralization is normal. There is evidence of a lateral tibial plateau fracture.
Soft tissues demonstrate arterial calcification.

Chondrocalcinosis identified involving the lateral compartment of the knee. There is moderate
narrowing of the medial and lateral compartment of the left knee. The appearance and left knee
similar to May 1, 2011. fracture train +2 chicago Findings: At the fourth distal metatarsal there is a oblique fracture with slight lateral
displacement. There are no other acute fractures or dislocations. There is moderate
degenerative changes of the first tarsal- metatarsal joint with subchondral cysts and osteophyte
formation. The soft tissues are within normal limits. There is ossification of the interosseous
membrane due to prior trauma. fracture train +3 la An AP upright image that extends from the pelvis to the ankles is provided for interpretation.
There is a right knee arthroplasty. There is no apparent leg length discrepancy. no fracture train +4 chicago Impression:

Left knee 3 views, 12/1/2011:

Comparison is made to previous examination of 2/26/2011.

There is a knee prosthesis in place. There is no radiographic evidence of loosening of the
prosthesis. There are no fractures or dislocations. Allowing for technical differences, there has
been no change from 2/26/2011.
no fracture train +5 la Impression:

since 10/2/2007, views of the pelvis and right hip are unchanged except for minimal overgrowth of
the lateral aspect of the acetabular roof apophysis. No other evidence of degenerative changes
seen. No other interval change. no fracture train +6 chicago Lungs are clear focal consolidation. Tracheobronchial tree is patent. No lung masses or nodules
appreciated. There are no pleural pericardial effusions. Right lower base pleural thickening is
stable. There is no axillary, hilar, or mediastinal lymphadenopathy by CT size criteria. The
visualized thyroid is normal. no fracture train +7 la Study: Bilateral standing knees one view.

Findings: AP, standing view of both knees is compared to previous exam of 04/2011. There has been
no significant interval change in the appearance of the knees. Again there is an intramedullary
fracture in the tibia. Joint space narrowing is noted at the lateral compartment of the left knee. fracture train +8 chicago Opacification of the frontal sinus on the right side. Linear streaking of the occipital bone,
likely a non displaced fracture. fracture train +9 la Right humerus 2 views, 7/14/2012

There is a shoulder prosthesis in place. There is no radiographic evidence of loosening of the
prosthesis. Overall position and alignment is anatomic. A fracture of the distil humerus is noted.
The remainder of the humerus is unremarkable. fracture train +10 chicago Chest reveals linear opacity in right base which could be due to atelectasis since January 16, 2011.
There is no congestive heart failure, infiltrate. There are degenerative changes in thoracic
spine. There are vascular calcifications in the thoracic aorta. Accounting for differences in
technique there is no significant interval change.

Conclusion: No acute cardiopulmonary disease. no fracture train +11 la Findings: The heart is not enlarged. There is no congestive failure. The lungs are clear. There
is no adenopathy or pleural effusion. There are old healed fractures of the left second through
sixth ribs and an old fracture of the left clavicle. There are degenerative changes in the spine.

Conclusion: No active cardiopulmonary disease. No interval change. fracture train +12 chicago Impression:
Views of the hand and thumb accomplished on May 6, 2011.

The interphalangeal joint shows mild narrowing. Osseous structures are normally developed and
well-preserved. The MP joint of the thumb shows some eburnation and narrowing particularly of the
lateral aspect of the joint. The metacarpal articulation with the greater multangular has some mild
eburnation and some pseudocystic change is that joint is well.

Summary: osteoarthritic changes. The most prominent changes are of the proximal and distal
articulations of the first metacarpal
no fracture train +13 la Views of the coccyx and sacrum dated January 21, 2009.

normal osseous development and no fracture is seen. The SI joints are normal. Soft tissues are
normal

Summary: no fracture is seen. Note that injuries of the coccyx are not always visible on
radiographs and this study needs to be augmented by physical exam. no fracture train +14 chicago Impression:
PA and lateral chest accomplished on January 20, 2012.

The heart and mediastinal contours are normal. Hilar structures and pulmonary vessels are normal as
well. There no acute infiltrates or effusions. An old fracture of the left third rib is evident. fracture train +15 la Menisci: There is intrasubstance degeneration in the lateral meniscus without discrete tear. There
is complex degeneration of the posterior horn and body of the medial meniscus with extrusion.

Tendons: The quadriceps and patellar tendons are intact.

Ligaments: There is increased signal within it the ACL consistent with degeneration. The PCL, LCL
and MCL appear intact.

Bone/cartilage: There are tricompartmental degenerative changes. There are extensive degenerative
changes in the medial compartment with diffuse cartilage loss in the weight bearing region. There
is moderate thinning of the anterior aspect of the lateral femoral condyle cartilage with mild
heterogeneity. There is heterogeneity of the patellofemoral cartilage. Note is made of a distil
femur hairline fracture not previously noted. fracture train +16 chicago The study was compared to the prior dated 04/09/2011. The liver is heterogeneous with no focal
lesion. There is status post cholecystectomy. The common bile duct measures 3.4 mm.The portal
vein is patent and demonstrate hepatopetal flow. The kidneys are normal in size measuring 10.1 cm
on the right and 10.2 cm on the left side. No hydronephrosis is noted. A hypoechogenic lesion in
the superior pole of the right kidney is noted measuring 1.6 x 1.2 cm that may suggest a cyst.. The
infrarenal abdominal aorta measures 2.2 x 2.1 cm. Again bilateral aneurysm of common iliac arteries
is noted measuring 1.8 x 1.9 cm on the right and 1.6 x 1.9 cm in the left side. There is no fluid
in the Morrison's pouch. The spleen is normal in size and echotexture.

Conclusion:

Heterogeneous liver with no focal lesion. Stable aneurysm of common iliac arteries. no fracture train +17 la AP and lateral view of the left lower leg is obtained.

Bony mineralization is normal. There is no evidence of a fracture. Soft tissues are unremarkable.

Clips noted posteriorly in the soft tissues.

CONCLUSION:

1. No acute process no fracture train +18 chicago An AP of the left hand and 3 additional views of the fourth digit were done. There is a non
dislocated fracture. No other significant bone or joint abnormality. fracture train +19 la Diffuse osteopenia with evidence of L1-2 compression fracture. fracture train +20 chicago Impression:
Routine views of the left foot demonstrate normal development and no fracture or dislocation. No
foreign bodies seen. There is probable soft tissue swelling about the head of the metatarsals and
there is some minimal vascular calcification noted. no fracture train +21 la There is no evidence of axillary, hilar or mediastinal adenopathy. The great vessels are normal
throughout their course. There is extensive calcification of the coronary arteries as well as
some calcification of the aorta. The thyroid gland is normal.

The visualized unenhanced liver, spleen, pancreas, adrenal glands and kidneys are grossly normal.

There are no lytic or sclerotic lesions visualized. fracture test +22 chicago Findings: There is now evidence of a nondisplaced fracture involving the right superior pubic ramus
close to the symphysis. There is diffuse osteopenia with a stable old healed right
intertrochanteric fracture with internal stabilization as well as a left subcapital fracture
internally stabilized as well. There is an old left ischiopubic junction fracture deformity. Sacrum
and coccyx are mostly obscured by bowel content. There is heavy aorto iliac and branch
calcification.

Conclusion: Nondisplaced right superior pubic ramus fracture. fracture test +23 la There is no rib fracture, rib abnormality, pneumothorax, or pleural effusion. Other than for
clearing of the lungs, the chest examination has not changed from 2/29/2011. Cardiomediastinal
silhouette is stable. There are sternotomy wires. There is no evidence of congestive failure and
the lungs are now clear.

Conclusion:

No acute rib fracture, pneumothorax, or pleural effusion. No active cardiopulmonary disease. Other
than for the clearing of the lungs, no significant interval change from 2/9/2011. no fracture test +24 chicago Study: Left knee 3 views.

Findings: AP, lateral and sunrise views of the left knee are compared to previous exam of
05/07/2011. Accounting for difference in technique, has been no significant interval change in the
appearance of the left knee. Again there is tricompartmental degenerative arthropathy with joint
space narrowing which is worst at the lateral facet of the patellofemoral joint, and
tricompartmental osteophytes. There is no significant knee joint effusion.
no fracture test +25 la Findings: Multiple images of the right shoulder reveal a full thickness, near full width tear of
supraspinatus tendon with a few anterior fibers remaining. There is approximately 3 cm retraction
of the myotendinous junction. In addition, there is a small, articular surface tear of the
infraspinatus tendon at its insertion with laminar extension into the myotendinous junction.
There is mild fatty atrophy of the supraspinatus and moderate fatty atrophy of the infraspinatus
muscle. Overall there is diffuse muscular fatty atrophy throughout the shoulder musculature. There
is superior subluxation of the humeral head. There is increased longitudinal signal and thickening
of the interarticular portion of the biceps tendon consistent with a split tear. Thickening and
increased signal of the subscapularis tendon is consistent with tendinopathy. no fracture test +26 chicago Left fifth finger multiple views, 5/5/2015:

Comparison: 4/10/2015.

Findings: And AP of the left hand and for additional views of the fifth
finger are provided for interpretation.

There is a healing comminuted spiral fracture of the proximal phalanx of the
fifth digit. Other than for signs of healing, there has been no significant
interval change from the previous examination.
fracture test +27 la Comparison is made to the previous examination of 5/23/2011.

The heart is not enlarged. There is no evidence of congestive failure. The lungs are clear. There
is no adenopathy or pleural effusion.

Conclusion:

No active cardiopulmonary disease. No significant interval change.
no fracture test +28 chicago Left fifth digit multiple views, 6/16/2066:

An AP of the left hand and 3 additional views of the left fifth digit are
provided were done. There is a comminuted spiral fracture of the proximal
phalanx of the fifth digit with medial and dorsal angulation of the major
distal fracture fragment.
fracture test +29 la Clinical History
Man had cxr today f/u after fall 2-05 and per radiologist request left rib
views today to better view 9th rib left and adjacent ribs; still some pain
there. thanks

Impression
LEFT RIBS: 10/10/2012

Four views of the left ribs reveal fractures of the left ribs at the mid
axillary line of the left 5, 6, 7, 8 and 9th ribs. This was not shown on the
previous study. There is no definite hemothorax on the left side.
fracture test +30 chicago There is a non dislocated fracture in the second digit of the right hand.
No other significant bone or joint abnormality. fracture test +31 la Retroperitoneal ultrasound from 3/30/2011 is compared to the prior from 9/3/2011.

Findings: Right kidney measures 11.3 cm and left kidney measures 11.7 cm in length. No evidence
for hydronephrosis. Spleen measures 10.4 cm in the craniocaudal dimension. heterogenous liver
with no focal lesions. Liver measures 16 cm in the craniocaudal dimension. Hepatopetal flow in
the portal vein. CBD measures 4 mm and is within normal limits. Gallbladder and pancreas is
unremarkable. No evidence for aortic aneurysm. No free fluid.

Conclusion: 1. heterogenous liver with no focal lesions. no fracture test Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.xml URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.xml?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.xml (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/examples/fracture_demo.xml Mon Dec 16 16:30:30 2013 @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/create_tables.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/create_tables.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/create_tables.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/create_tables.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,250 @@ + +CREATE CACHED TABLE kernel_eval ( + kernel_eval_id IDENTITY, + corpus_name varchar(50) DEFAULT '' NOT NULL , + experiment varchar(50) not null , + label varchar(50) default '' not NULL , + cv_fold_id int default 0 not null , + param1 double default 0 not null , + param2 varchar(50) default '' not null +) +; +CREATE unique index NK_kernel_eval on kernel_eval (corpus_name, experiment, label, cv_fold_id, param1, param2) +; + +CREATE CACHED TABLE kernel_eval_instance ( + kernel_eval_instance IDENTITY, + kernel_eval_id int not null , + instance_id1 bigint NOT NULL, + instance_id2 bigint NOT NULL, + similarity double NOT NULL +) ; +CREATE index IX_kernel_eval1 on kernel_eval_instance(kernel_eval_id, instance_id1); +CREATE index IX_kernel_eval2 on kernel_eval_instance(kernel_eval_id, instance_id2); +create UNIQUE index NK_kernel_eval_instance on kernel_eval_instance(kernel_eval_id, instance_id1, instance_id2); + +CREATE CACHED TABLE classifier_eval ( + classifier_eval_id IDENTITY, + name varchar(50) not null, + experiment varchar(50) default '' null , + fold int null, + run int null, + algorithm varchar(50) default '' null , + label varchar(50) default '' null , + options varchar(1000) default '' null , + model LONGVARBINARY null, + param1 double NULL, + param2 varchar(50) NULL +) ; + +CREATE CACHED TABLE classifier_eval_svm ( + classifier_eval_id int not null , + cost double DEFAULT '0', + weight varchar(50), + degree int DEFAULT '0', + gamma double DEFAULT '0', + kernel int NULL, + supportVectors int null, + vcdim double null +) ; + +CREATE CACHED TABLE classifier_eval_semil ( + classifier_eval_id int not null , + distance varchar(50), + degree int default 0 not null , + gamma double default 0 not null, + soft_label bit default 0 not null, + norm_laplace bit default 0 not null, + mu double default 0 not null, + lambda double default 0 not null, + pct_labeled double default 0 not null +) ; + +CREATE CACHED TABLE classifier_eval_ir ( + classifier_eval_ir_id int IDENTITY, + classifier_eval_id int not null , + ir_type varchar(5) not null , + ir_class varchar(5) not null , + ir_class_id int null , + tp int not null, + tn int not null, + fp int not null, + fn int not null, + ppv double default 0 not null, + npv double default 0 not null , + sens double default 0 not null, + spec double default 0 not null, + f1 double default 0 not null +) ; +create unique index NK_classifier_eval_ircls on classifier_eval_ir(classifier_eval_id, ir_type, ir_class); +create index IX_classifier_eval_id on classifier_eval_ir (classifier_eval_id); + +CREATE CACHED TABLE classifier_instance_eval ( + classifier_instance_eval_id int identity, + classifier_eval_id int not null , + instance_id bigint not null, + pred_class_id int not null, + target_class_id int null +) +; +create unique index nk_result on classifier_instance_eval(classifier_eval_id, instance_id) +; + +CREATE CACHED TABLE classifier_instance_eval_prob ( + classifier_eval_result_prob_id int identity, + classifier_instance_eval_id int , + class_id int not null, + probability double not null +) ; +create unique index nk_result_prob on classifier_instance_eval_prob (classifier_instance_eval_id, class_id); + + +CREATE CACHED TABLE cv_fold ( + cv_fold_id int identity, + corpus_name varchar(50) not null , + split_name varchar(50) default '' not null , + label varchar(50) default '' not null , + run int default 0 not null , + fold int default 0 not null +) +; +create unique index nk_cv_fold on cv_fold(corpus_name, split_name, label, run, fold) +; + +CREATE CACHED TABLE cv_fold_instance ( + cv_fold_instance_id int identity, + cv_fold_id int not null, + instance_id bigint not null, + train bit default 0 not null +) +; +create unique index nk_cv_fold_instance on cv_fold_instance (cv_fold_id, instance_id, train) +; + +CREATE CACHED TABLE cv_best_svm ( + corpus_name varchar(50) NOT NULL, + label varchar(50) NOT NULL, + experiment varchar(50) DEFAULT '' NOT NULL, + f1 double NULL, + kernel int NULL, + cost double NULL, + weight varchar(50) NULL, + param1 double NULL, + param2 varchar(50) NULL, + PRIMARY KEY (corpus_name,label,experiment) +) ; + +CREATE CACHED TABLE feature_eval ( + feature_eval_id int identity, + corpus_name varchar(50) not null , + featureset_name varchar(50) DEFAULT '' NOT NULL , + label varchar(50) DEFAULT '' NOT NULL , + cv_fold_id int default 0 not null , + param1 double default 0 not null , + param2 varchar(50) DEFAULT '' NOT NULL , + type varchar(50) not null +) +; +create unique index nk_feature_eval on feature_eval (corpus_name, featureset_name, label, cv_fold_id, param1, param2, type) +; +create index ix_feature_eval on feature_eval(corpus_name, cv_fold_id, type) +; + +CREATE CACHED TABLE feature_rank ( + feature_rank_id int identity, + feature_eval_id int not null , + feature_name varchar(50) not null , + evaluation double default 0 not null , + rank int default 0 not null +) ; +create unique index nk_feature_name on feature_rank(feature_eval_id, feature_name); +create index ix_feature_rank on feature_rank(feature_eval_id, rank); +create index ix_feature_evaluation on feature_rank(feature_eval_id, evaluation); +create index fk_feature_eval on feature_rank(feature_eval_id); + +CREATE CACHED TABLE feature_parchd ( + feature_parchd_id int IDENTITY, + par_feature_rank_id int NOT NULL , + chd_feature_rank_id int NOT NULL +) +; +create UNIQUE index NK_feature_parent on feature_parchd(par_feature_rank_id,chd_feature_rank_id) +; + +CREATE CACHED TABLE tfidf_doclength ( + tfidf_doclength_id int identity, + feature_eval_id int NOT NULL , + instance_id bigint NOT NULL, + length int DEFAULT 0 NOT NULL +) +; +create UNIQUE index nk_instance_id on tfidf_doclength(feature_eval_id,instance_id) +; + +CREATE CACHED TABLE hotspot ( + hotspot_id int identity, + instance_id int not null , + anno_base_id int not null , + feature_rank_id int not null +) ; +create unique index NK_hotspot on hotspot(instance_id, anno_base_id, feature_rank_id); +create INDEX ix_hotspot_instance_id on hotspot(instance_id); +create INDEX ix_hotspot_anno_base_id on hotspot(anno_base_id); +create INDEX ix_hotspot_feature_rank_id on hotspot(feature_rank_id); + +CREATE CACHED TABLE hotspot_instance ( + hotspot_instance_id int identity, + corpus_name varchar(50) not null, + experiment varchar(50) DEFAULT '' NOT NULL, + label varchar(50) DEFAULT '' NOT NULL, + instance_id int not null, + max_evaluation double default 0 not null , + min_rank int default 0 not null +) +; +create unique index NK_hotspot_instance on hotspot_instance (corpus_name, experiment, label, instance_id); + +CREATE CACHED TABLE hotspot_sentence ( + hotspot_sentence_id int identity, + hotspot_instance_id int not null , + anno_base_id int not null , + evaluation double default 0 not null , + rank int default 0 not null +) +; +create unique index NK_hotspot_sentence on hotspot_sentence(hotspot_instance_id, anno_base_id); +create index FK_hotspot_instance_id on hotspot_sentence(hotspot_instance_id); +create index FK_anno_base_id on hotspot_sentence(anno_base_id); +create index IX_evaluation on hotspot_sentence(hotspot_instance_id, evaluation); +create index IX_rank on hotspot_sentence(hotspot_instance_id, rank); + +CREATE CACHED TABLE corpus_doc ( + corpus_name varchar(50) not null , + instance_id bigint not null , + doc_text LONGVARCHAR, + doc_group varchar(50) NULL, + primary key (corpus_name, instance_id) +) +; +create index IX_doc_group on corpus_doc(corpus_name, doc_group) +; + +CREATE CACHED TABLE corpus_label ( + corpus_name varchar(50) not null , + instance_id bigint not null , + label varchar(20) DEFAULT '' NOT NULL, + class varchar(5) DEFAULT '' NOT NULL, + primary key (corpus_name, instance_id, label) +) +; +create index FK_corpus_doc on corpus_label(corpus_name, instance_id) +; + +create view v_corpus_group_class +as +select distinct d.corpus_name, l.label, doc_group, class +from corpus_doc d +inner join corpus_label l + on d.corpus_name = l.corpus_name + and d.instance_id = l.instance_id +; Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/drop_tables.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/drop_tables.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/drop_tables.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/drop_tables.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,21 @@ +drop view if exists v_corpus_group_class; +drop table if exists hotspot_sentence; +drop table if exists hotspot_instance; +drop table if exists hotspot; +drop table if exists feature_parchd; +drop table if exists feature_rank; +drop table if exists feature_eval; +drop table if exists tfidf_doclength; +drop table if exists cv_fold; +drop table if exists cv_fold_instance; +drop table if exists cv_best_svm; +drop table if exists classifier_instance_eval_prob; +drop table if exists classifier_instance_eval; +drop table if exists classifier_eval_svm; +drop table if exists classifier_eval_semil; +drop table if exists classifier_eval_ir; +drop table if exists classifier_eval; +DROP TABLE IF EXISTS kernel_eval; +DROP TABLE IF EXISTS kernel_eval_instance; +drop table if exists corpus_label; +drop table if exists corpus_doc; Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_copy.template.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_copy.template.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_copy.template.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_copy.template.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,21 @@ +-- create a feature_eval record for the concept graph +delete r +from feature_eval e inner join feature_rank r on e.feature_eval_id = r.feature_eval_id +where param2 = '@ytex.conceptGraphName@' +and type = 'intrinsic-infocontent'; + +delete e +from feature_eval e +where param2 = '@ytex.conceptGraphName@' +and type = 'intrinsic-infocontent'; + +insert into feature_eval (corpus_name, param2, type) values ('', '@ytex.conceptGraphName@', 'intrinsic-infocontent'); + +-- copy the feature_rank records from tmp_ic +insert into feature_rank (feature_eval_id, feature_name, evaluation, rank) +select feature_eval_id, feature_name, evaluation, rank +from feature_eval, tmp_ic +where param2 = '@ytex.conceptGraphName@' and type = 'intrinsic-infocontent'; + +-- cleanup +drop table tmp_ic; \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_create.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_create.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_create.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/kernel/ic_create.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,8 @@ +-- create temporary table to hold feature_rank records +drop TABLE if exists tmp_ic +; +create table tmp_ic( + feature_name varchar(50) not null, + evaluation double not null, + rank int not null +); Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_document.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_document.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_document.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_document.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,208 @@ +CREATE CACHED TABLE document( + document_id int NOT NULL primary key, + instance_id bigint default 0 not null, + instance_key varchar(256) null, + analysis_batch varchar(50) NOT NULL, + cas LONGVARBINARY NULL, + doc_text longvarchar NULL +) +; + +CREATE INDEX IX_document_analysis_batch ON document +( + analysis_batch, + document_id +) +; + +CREATE INDEX IX_instance_id ON document +( + instance_id +) +; + +CREATE INDEX IX_instance_key ON document +( + instance_key +) +; +CREATE CACHED TABLE anno_base ( + anno_base_id int not null primary key, + document_id int not null, + span_begin int, + span_end int, + uima_type_id int not null +) +; + + +create INDEX IX_type_span on anno_base(document_id, span_begin, span_end, uima_type_id); +create INDEX IX_type on anno_base(document_id, uima_type_id); +CREATE INDEX IX_docanno_doc ON anno_base (document_id); + +CREATE CACHED TABLE anno_sentence ( + anno_base_id int not null primary key, + sentenceNumber int, + segmentId varchar(20) +); + +CREATE CACHED TABLE anno_named_entity ( + anno_base_id int not null primary key, + discoveryTechnique int, + status int, + polarity int, + uncertainty int, + conditional bit, + generic bit, + typeID int, + confidence float, + segmentID varchar(20) +); + +CREATE CACHED TABLE anno_med_event ( + anno_base_id int not null primary key, + discoveryTechnique int, + status int, + polarity int, + uncertainty int, + conditional bit, + generic bit, + typeID int, + confidence float, + segmentID varchar(20), + freqNumber varchar(10) , + freqUnit varchar(10) , + strengthNumber varchar(10) , + strengthUnit varchar(10) , + change varchar(10), + dosage varchar(10) +); + + +CREATE CACHED TABLE anno_ontology_concept ( + anno_ontology_concept_id int IDENTITY not null primary key, + anno_base_id int not null , + code varchar(20) , + cui char(8) , + disambiguated bit default 0 not null +); +create index IX_anno_base_id on anno_ontology_concept(anno_base_id); +create index IX_code on anno_ontology_concept(code); +create index IX_anno_code on anno_ontology_concept(anno_base_id,code); +create index IX_anno_cui on anno_ontology_concept(anno_base_id,cui); + +CREATE CACHED TABLE anno_segment( + anno_base_id int NOT NULL , + id varchar(20) NULL, +PRIMARY KEY +( + anno_base_id +) +) +; + +CREATE INDEX IX_segment_anno_seg ON anno_segment +( + anno_base_id, + id +) +; + +-- mapped to BaseToken, WordToken +CREATE CACHED TABLE anno_token ( + anno_base_id int NOT NULL PRIMARY KEY , + tokenNumber int default 0 NOT NULL , + normalizedForm varchar(20) , + partofSpeech varchar(5) , + coveredText varchar(20) null, + capitalization int default 0 not null , + numPosition int default 0 not null , + suggestion varchar(20) , + canonicalForm varchar(20) +) ; +create index IX_coveredText on anno_token(coveredText); +create index IX_canonicalForm on anno_token(canonicalForm); + +CREATE CACHED TABLE anno_date ( + anno_base_id int not null primary key, + tstamp datetime +) ; + +CREATE CACHED TABLE anno_markable ( + anno_base_id int not null primary key , + id int default 0, + anaphoric_prob double default 0, + content int default 0 +) ; + +CREATE CACHED TABLE anno_treebank_node ( + anno_base_id int not null primary key , + parent int default 0, + nodeType varchar(10), + nodeValue varchar(10), + leaf bit default 0, + headIndex int default 0, + index int default 0, + tokenIndex int default 0 +) ; + +CREATE CACHED TABLE anno_link ( + anno_link_id int IDENTITY not null primary key, + parent_anno_base_id int not null , + child_anno_base_id int not null , + feature varchar(20) +) ; +create index IX_link on anno_link(parent_anno_base_id, child_anno_base_id, feature); + +CREATE CACHED TABLE anno_contain ( + parent_anno_base_id int not null , + parent_uima_type_id int not null , + child_anno_base_id int not null , + child_uima_type_id int not null , + primary key (parent_anno_base_id, child_anno_base_id) +); +create index IX_parent_id_child_type on anno_contain(parent_anno_base_id, child_uima_type_id); +create index IX_child_id_parent_type on anno_contain(child_anno_base_id, parent_uima_type_id); + +CREATE CACHED TABLE fracture_demo( + note_id int IDENTITY NOT NULL primary key, + site_id varchar(10) NULL, + note_text longvarchar NULL, + fracture varchar(20) NULL, + note_set varchar(10) NULL +); + + +-- metamap tables +CREATE CACHED TABLE anno_mm_candidate ( + anno_base_id int not null primary key, + cui char(8), + score int default 0, + head bit default 0, + overmatch bit default 0 +); + +CREATE CACHED TABLE anno_mm_acronym ( + anno_base_id int not null primary key, + acronym varchar(10), + expansion varchar(30) +); + +CREATE CACHED TABLE anno_mm_utterance ( + anno_base_id int not null primary key, + pmid varchar(10), + location varchar(30) +); + + +CREATE CACHED TABLE anno_mm_cuiconcept ( + anno_mm_cuiconcept_id int IDENTITY not null primary key, + anno_base_id int, + negExCui char(8) +); + +CREATE CACHED TABLE anno_mm_negation ( + anno_base_id int not null primary key, + negType varchar(10), + negTrigger varchar(10) +); \ No newline at end of file Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_reference.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_reference.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_reference.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_reference.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,45 @@ +CREATE CACHED TABLE hibernate_sequences ( + sequence_name varchar(100) not null primary key, + next_val int default 1 not null +); +insert into hibernate_sequences(sequence_name, next_val) values ('document_id_sequence', 1); + +CREATE CACHED TABLE anno_base_sequence ( + sequence_name varchar(100) not null primary key, + next_val int default 1 not null +); +insert into anno_base_sequence(sequence_name, next_val) values ('anno_base_id_sequence', 1); + + +CREATE CACHED TABLE ref_named_entity_regex ( + named_entity_regex_id int IDENTITY NOT NULL primary key, + regex varchar(512) not null, + coding_scheme varchar(20) not null, + code varchar(20) not null, + oid varchar(10), + context varchar(256) +) ; + +CREATE CACHED TABLE ref_segment_regex ( + segment_regex_id int IDENTITY NOT NULL primary key, + regex varchar(256) not null, + segment_id varchar(20), + limit_to_regex bit default 0 null +) ; + +CREATE CACHED TABLE ref_uima_type ( + uima_type_id int not null primary key, + uima_type_name varchar(256) not null, + table_name varchar(100) null +) ; + +CREATE UNIQUE INDEX NK_ref_uima_type ON ref_uima_type +( + uima_type_name +) +; + +CREATE CACHED TABLE ref_stopword ( + stopword varchar(50) not null primary key +) +; Added: ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_view.sql URL: http://svn.apache.org/viewvc/ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_view.sql?rev=1551254&view=auto ============================================================================== --- ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_view.sql (added) +++ ctakes/branches/ytex/ctakes-ytex/scripts/data/hsql/uima/create_view.sql Mon Dec 16 16:30:30 2013 @@ -0,0 +1,52 @@ +-- We assume the metadata about documents (patient id, date) come from +-- some table in your database. modify this view to join with that table +-- and get this info +create view v_document as +select analysis_batch, document_id, doc_text, instance_id, null patient_id, null doc_date, null doc_title, null document_type_name +from document; + + +create view v_annotation +AS +SELECT anno.*, ur.uima_type_name, substr(doc.doc_text, anno.span_begin+1, anno.span_end-anno.span_begin) anno_text, doc.analysis_batch +FROM anno_base AS anno +INNER JOIN document AS doc ON doc.document_id = anno.document_id +INNER JOIN ref_uima_type AS ur on ur.uima_type_id = anno.uima_type_id +; + + +-- this view gives the document info, cui info, and sentence info in which a cui is found. +create view v_document_cui_sent +as +SELECT + da.anno_base_id, + d.analysis_batch, + da.document_id, + ne.polarity, + o.code, + o.cui, + substr(d.doc_text, da.span_begin+1, da.span_end-da.span_begin) cui_text, + substr(d.doc_text, s.span_begin+1, s.span_end-s.span_begin) sentence_text, + o.disambiguated, + null patient_id, + null doc_date, + null doc_title, + null document_type_name +FROM anno_base da +INNER JOIN anno_named_entity ne ON da.anno_base_id = ne.anno_base_id +INNER JOIN anno_ontology_concept o ON o.anno_base_id = ne.anno_base_id +inner join anno_contain ac on da.anno_base_id = ac.child_anno_base_id +INNER join anno_base s + on ac.parent_anno_base_id = s.anno_base_id + and s.uima_type_id in (select uima_type_id from ref_uima_type where uima_type_name = 'edu.mayo.bmi.uima.core.type.textspan.Sentence') +INNER JOIN document d on da.document_id = d.document_id +; + +CREATE VIEW v_document_ontoanno +AS +SELECT d.document_id, da.span_begin, da.span_end, ne.polarity, o.code, o.cui, d.analysis_batch, o.disambiguated +FROM document AS d INNER JOIN +anno_base AS da ON d.document_id = da.document_id INNER JOIN +anno_named_entity AS ne ON da.anno_base_id = ne.anno_base_id INNER JOIN +anno_ontology_concept AS o ON o.anno_base_id = ne.anno_base_id +;