CDISC external dictionaries
===========================

This directory is a READ-ONLY FALLBACK. It is not where the application writes.

Where the store lives
---------------------
The dictionary store (MedDRA, WHODrug, SNOMED CT, LOINC, UNII, MED-RT, Neoplasm)
lives in your own user directory:

    ~/.cumbaDataBrowser/dictionaries          (Linux / macOS)
    %USERPROFILE%\.cumbaDataBrowser\dictionaries   (Windows)

It is there rather than beside the application because the application WRITES to
it, and an install directory is not reliably writable: Program Files needs
elevation, a signed macOS .app bundle would have its code signature broken, and a
shared install serves several users from one directory.

The application points the CDISC CORE engine at that store when it starts,
creating the directory first. It does NOT do so if you have already said where the
store is; anything set from outside wins, in this order:

    COREJ_DICTIONARIES_DIR environment variable
    -Dcorej.dictionariesDir=<dir> on the command line
    a corej.dictionariesDir entry in databrowser.properties

This directory is still read as a fallback, but only if it already contains an
installed store AND your user directory does not. Nothing is ever written here.

Installing dictionaries
-----------------------
Use Tools > Manage CDISC Dictionaries in the application. Three of the seven can
be downloaded with no account (MED-RT, UNII and the SEND CT neoplasm subset); the
other four you supply yourself from a folder:

    LOINC            needs a free loinc.org account
    MedDRA           your own licensed distribution
    WHODrug          your own licensed distribution
    SNOMED CT        your own licensed distribution

Each supplier's own licence or terms-of-use notice is shown before anything is
acquired and must be acknowledged. The notice is then written beside the installed
data, in <store>/<type>/<version>/LICENSES, and where the terminology came from is
recorded in <store>/SOURCES.md.

Why nothing ships here
----------------------
Every one of those dictionaries is licensed content, per organisation. They cannot
be redistributed inside an application, and four of them cannot be fetched on your
behalf at all. Obtaining those under your own organisation's licence is a step only
you can take.

What happens with an empty store
--------------------------------
A dictionary is loaded only when something names its version -- the store's
selected-versions.json, a per-run version chosen in the CORE check dialog, or an
ExternalCodeList/@Version in your define.xml. With nothing installed, nothing names
a version, so the dictionary is not loaded and the rules that depend on it report
SKIPPED rather than failing. Validation of everything else is unaffected.

So an empty store is a working configuration, not a broken one. You will simply see
dictionary-dependent rules skipped in the report.

Removing a dictionary
---------------------
Removal is a manual filesystem step: delete <store>/<type>/<version> and, if it
names that version, its entry in <store>/selected-versions.json.

The licence texts that apply to each dictionary are distributed by the respective
organisations, not by us.
