This page documents the use of the index viewer tools.



These tools are used to generate HTML files and Lucene indexes to feed into the configuration for the index viewer tool.  The code is based around earlier work with a pure-java based index viewer tool.

These tools are really used to build files that should be packaged into a Maven project and be made available as a configuration artifact to the build process. Two configuration artifacts have been provided that can 

When building the application, the version of index viewer data is specified in properties in the config.properties file that corresponds with the config artifact being used for the build.  For example, in config/prod, see that the src/main/resources/config.properties file contains these three entries:

This artifact itself is available via the IHTSDO nexus server (in the "Releases" repository):

The contents of this artifact were created through invocations of these various tools.

The process for creating an index viewer data artifact is this:


Following are some details about these tools:

Mojo: AscToXmlMojoMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/lucene

Configuration Parameters


Mojo: IndexXmlToHtmlMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Mojo: IndexXmlToLuceneMojo.java (in admin/mojo/src/main/resources/java/org/ihtsdo/otf/mapping/mojo)

Project: admin/lucene

Configuration Parameters


Sample command line call to convert ICD10 ASC files to index viewer XML:


% cd ~/code/admin/lucene
% mvn install -Drun.config=~/config/config.properties -PConvertAscToXml -Dinput.dir=/home/ihtsdo/data/indexViewerData


Sample command line call to convert index viewer XML to HTML and Lucene indexes:


% cd ~/code/admin/lucene
% mvn install -Drun.config=/home/ihtsdo/config/config.properties -PConvertXmlToHtmlAndLucene -Dinput.dir=~/data/indexViewerData


Sample Eclipse run configuration to convert ICD10 ASC files to index viewer XML:


Sample Eclipse run configuration to convert index viewer XML to HTML and Lucene indexes:

Index Viewer Additions (ex. ICD10CM) and Updates

Clone git project  "https://git.ihtsdotools.org/ihtsdo/ihtsdo-mapping-tool-data.git" to local machine e.g.  "C:\workspace-mapping-mars\ihtsdo-mapping-tool-data"

That is a project with 2 sub-modules (empty, and icd10). Add a third, icd10cm
And lay it out like icd10 (e.g. just borrow everything you can).

1. All of the code to actually generate the files for the index viewer is in the mapping project itself. You’ll use that to generate the index files.  (see above)
2. Put the index files into a project like the index-viewer-data project under icd10cm and version it appropriately
(e.g. give it a release version when you’re ready)
3. Build the project which will create a .zip file in the index-viewer-data/icd10cm/target directory.  This can be done in eclipse or in cygwin from the index-viewer-data folder  mvn clean build.
4. Log into nexus and add that .zip file as an artifact with the right groupId, artifactId, version
5. In the mapping project, make a mapping-config-prod-icd10cm config module
Look at how the “mapping-config-prod” works -> it has a dependency to the index veiwer data and imports it directly into there.
Thus, when the config project builds its zip file, it completely contains the index viewer data that is needed for that deployment. Then when that gets unpacked into the .war file, the index data is all in the right place in the deployed war package.