Third-party material bundled with coreval
=========================================

coreval's own R code is MIT licensed; see the package's LICENSE file.

The files below are NOT coreval's own work. Most come from three
MIT-licensed repositories, two published by CDISC and one by Verisian, and
every notice that licence requires is reproduced in full at the end of this
file. Two more, the W3C's XHTML schema modules and IBM's JSONata, are
described in their own sections below.

  * cdisc-org/cdisc-open-rules      - the SENDIG, TIG and USDM rule
                                      definitions and their test data
  * verisianHQ/core-contributor     - the CORE 1.0 SDTMIG and FDA Business
                                      Rules definitions
  * cdisc-org/cdisc-rules-engine    - the offline standards-metadata caches
                                      that project commits to its own git

Each entry below names which it came from. The exact commit each release was
built from is recorded in data-raw/UPSTREAM_SHA (cdisc-open-rules),
data-raw/UPSTREAM_SHA_CORE1 (core-contributor) and data-raw/UPSTREAM_SHA_ENGINE
(metadata) in the source repository; data-raw is not installed, so both rules
commits are also carried at run time on attr(list_rules(), "rules_version")
and written into every findings file.

Where CORE 1.0's engine, verisianHQ/cdisc-rules-engine, reads a rule
differently from CDISC's, coreval follows it for the 1.0 rules. That engine is
a fork of cdisc-org/cdisc-rules-engine under the same MIT notice reproduced
below. No code from it is bundled; a few small reference tables are (see
core1_reference.rds and sdtm_model_versions.rds), at the commit recorded in
data-raw/UPSTREAM_SHA_CORE1_ENGINE.


inst/extdata/rules.rds
----------------------
From verisianHQ/core-contributor and cdisc-org/cdisc-open-rules. The
conformance rule definitions - the check logic, scope, messages, cited
guidance and conformance-rule identifiers - extracted at build time from a
pinned commit of each. The SDTMIG rules come from core-contributor, where CORE
1.0 moved them; everything else, and CDISC's own version of a rule both carry
for the SEND and TIG studies it names, comes from cdisc-open-rules.

inst/extdata/core1_reference.rds
--------------------------------
From verisianHQ/cdisc-rules-engine. Reference tables CORE 1.0's own rules
read: the FDA-supported Therapeutic Area User Guides and the rows of the FDA
Data Standards Catalog (resources/helper_data/), and the ISO 3166-1 and GENC
country names and codes (sql_operations/get_countries.py). They restate
public FDA, ISO and GENC information as that repository publishes it, under
its MIT notice reproduced below.

inst/extdata/sdtm_model_versions.rds
------------------------------------
From verisianHQ/cdisc-rules-engine (resources/cache/). The SDTM Model 1.4, 1.7
and 2.0 variable lists by class and by dataset, and which SDTMIG version links
to which, as that engine's offline cache holds them under its MIT notice
reproduced below. CDISC standards metadata, as the cdisc-rules-engine entry
describes.

inst/extdata/library_variables.rds
inst/extdata/sdtm_model_variables.rds
inst/extdata/sdtm_model_dataset_variables.rds
inst/extdata/ct_packages.rds
inst/extdata/sdtm_domain_classes.rds
inst/extdata/dataset_labels.rds
inst/extdata/ct_codelists.rds
----------------------------------
From cdisc-org/cdisc-rules-engine. CDISC standards metadata - variable names,
labels, roles, data types, Core designations, codelist identifiers, observation
classes, per-standard dataset labels and Controlled Terminology package dates.

Extracted at build time from the offline caches (resources/cache/*.pkl) that
CDISC's own rules engine commits directly to its repository. This matters for
licensing, not only for convenience. That engine reaches the CDISC Library
through an API that requires a CDISC_LIBRARY_API_KEY and is governed by the
Library's own terms of use. coreval holds no such key and makes no such
request. The material here is taken only from files CDISC chose to commit to a
public repository under the MIT licence reproduced below, and is used under
that licence.

ct_codelists.rds is the Controlled Terminology: every published CT package,
reduced to the codelist and term submission values and C-codes a conformance
rule can ask about, plus whether each codelist is extensible. The definitions
and synonyms that make up most of the source caches are not included, which is
why 438 MB of caches becomes 0.54 MB here. CDISC Controlled Terminology is
developed by CDISC in collaboration with the National Cancer Institute's
Enterprise Vocabulary Services (NCI EVS), which publishes it.

inst/extdata/ct_pref_terms.rds
------------------------------
From cdisc-org/cdisc-rules-engine, extracted from the same offline caches under
the same MIT licence, in the same build step, and likewise never through the
CDISC Library API.

The preferred term of each of the terms in ct_codelists.rds, keyed the same way
and in the same order. A separate file rather than a column of that one because
the USDM rules ask for a preferred term and the rest should not pay for it: the R side
reads each file only when a rule reaches for it. Also CDISC Controlled
Terminology, developed with NCI EVS.

inst/extdata/ct_synonyms.rds
----------------------------
From cdisc-org/cdisc-rules-engine, extracted from the same offline caches under
the same MIT licence, in the same build step, and likewise never through the
CDISC Library API.

The synonyms of each term of the extensible codelists in ct_codelists.rds,
keyed the same way and in the same term order. One rule reads it. Also CDISC
Controlled Terminology, developed with NCI EVS.

inst/extdata/usdm_entities.rds
------------------------------
From cdisc-org/cdisc-rules-engine, under the MIT licence reproduced below.
CDISC's map from a USDM key or class name to the entity it holds, extracted
from its USDM.yaml. Reading a study document into tables needs it: an object
that does not declare its own instanceType is named after the key that held it,
and a key like `epochId` names a StudyEpoch.

inst/extdata/schema/xml/
------------------------
XML Schema files used to validate the XHTML in USDM narrative content, which
four rules ask about. Two licensors, not one.

cdisc-usdm-xhtml-1.0/ is CDISC's own, from cdisc-org/cdisc-rules-engine, under
the MIT licence reproduced below. One line differs from upstream: the
schemaLocation in usdm-xhtml-ns.xsd pointed at a w3.org URL, which libxml2
fetches over the network on every validation, and coreval does not touch the
network at run time, so it points at the copy of that file sitting beside it
instead.

xhtml-1.1/ is the W3C's XHTML Schema modules, redistributed verbatim. They are
not CDISC's work and not MIT; they carry their own permission, reproduced here
from xhtml-copyright-1.xsd, which also ships:

    This is XHTML, a reformulation of HTML as a modular XML application
    The Extensible HyperText Markup Language (XHTML)
    Copyright (c)1998-2005 World Wide Web Consortium
    (Massachusetts Institute of Technology, European Research Consortium
     for Informatics and Mathematics, Keio University).
    All Rights Reserved.

    Permission to use, copy, modify and distribute the XHTML Schema
    modules and their accompanying xs:documentation for any purpose
    and without fee is hereby granted in perpetuity, provided that the above
    copyright notice and this paragraph appear in all copies.
    The copyright holders make no representation about the suitability of
    these XML Schema modules for any purpose.

    They are provided "as is" without expressed or implied warranty.

inst/extdata/jsonata/
---------------------
From cdisc-org/cdisc-rules-engine, under the MIT licence reproduced below.
CDISC's own JSONata utility functions, parse_refs.jsonata and
sift_tree.jsonata, which the JSONata rules call as `$utils`. Copied unmodified;
coreval assembles them into the expression prelude the same way CDISC's engine
does.

inst/extdata/js/jsonata.min.js
------------------------------
JSONata 1.8.7, the reference implementation of the JSONata query language, from
https://cdn.jsdelivr.net/npm/jsonata@1.8.7/jsonata.min.js. Not CDISC's work: it
is IBM's, and it is bundled because the USDM rules are written in that language and
there is no R implementation of it.

Unmodified apart from a copyright banner restored to the top of the file. The
minified build carries no banner and the packaged LICENSE omits the copyright
line its own terms refer to, so the notice is taken verbatim from the source
file's header at the tagged release and reproduced here:

    (c) Copyright IBM Corp. 2016, 2017 All Rights Reserved
      Project name: JSONata
      This project is licensed under the MIT License.

The MIT terms are the same ones reproduced at the end of this file. The
evaluator runs inside QuickJSR's embedded engine, entirely offline; it is given
the study document and nothing else.

tests/testthat/fixtures/
------------------------
From cdisc-org/cdisc-open-rules. Test data and expected results published
alongside the rules, used to verify coreval's implementation against CDISC's
own reference output.


Licence of the bundled material
-------------------------------

The MIT licence requires its copyright notice to travel with the material. The
source repositories carry different notices, so each is reproduced.

From cdisc-org/cdisc-open-rules (rules.rds, tests/testthat/fixtures/):

MIT License

Copyright (c) 2026 cdisc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

From verisianHQ/core-contributor (rules.rds):

MIT License

Copyright (c) 2025 verisian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

From cdisc-org/cdisc-rules-engine (the standards metadata and Controlled
Terminology in inst/extdata/), and its fork verisianHQ/cdisc-rules-engine:

MIT License

Copyright (c) 2022 cdisc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Trademarks
----------
CDISC, CORE, SDTM, SEND, ADaM, Define-XML and TIG are trademarks or registered
trademarks of the Clinical Data Interchange Standards Consortium. They appear
in this package only to identify the standards and rules it reads, which is
their ordinary descriptive use. No claim to them is made, and their use here
does not imply CDISC sponsorship or approval.


Not a CDISC product
-------------------
coreval is an independent, personal open-source project. It is not affiliated
with, endorsed by, or certified by CDISC or Verisian, and is not a
CORE-certified conformance engine. Bundling their openly licensed material
does not imply any relationship with either.
