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. They come from two MIT-licensed
repositories published by CDISC, and both notices that licence requires are
reproduced in full at the end of this file:

  * cdisc-org/cdisc-open-rules      - the rule definitions and their test data
  * cdisc-org/cdisc-rules-engine    - the offline standards-metadata caches
                                      that project commits to its own git

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


inst/extdata/rules.rds
----------------------
From cdisc-org/cdisc-open-rules. 797 conformance rule definitions - the check
logic, scope, messages, cited guidance and conformance-rule identifiers -
extracted at build time from a pinned commit of that repository.

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
59 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/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 96 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
two source repositories carry different notices, so both are 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 cdisc-org/cdisc-rules-engine (the standards metadata and Controlled
Terminology in inst/extdata/):

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, and is not a CORE-certified
conformance engine. Bundling CDISC's openly licensed material does not imply
any relationship with CDISC.
