## ---------------------------------------------------------
## NCCR Data Request Form — structured description
## ---------------------------------------------------------
## Describes the NCCR Data Request form so tools can validate a draft:
## field inventory, character limits, which fields are publicly displayed,
## and the controlled vocabulary for Research Areas.
##
## SEPARATE FILE BY DESIGN. Nothing here modifies nccr_vocab.ttl or
## nccr_instances.ttl, so the CLI, MCP server, examples, and JSON-LD
## generation are unaffected. New tooling opts in by loading this file.
##
## Source: the NCCR Data Request form (see docs/NCCR-DataRequest-Template.txt).
## CAVEAT: that template was captured from web copy and may be incomplete.
## Verify against the live form before relying on this for submission.
##
## TWO SENSES OF "RECOMMENDED" — do not conflate them:
##
##  1. BASELINE DEFAULTS (modelled here, as nccr-req:recommendedForRequest).
##     Per data source, the elements the form selects by default and requires
##     whenever that source is in the request. Fixed, and independent of the
##     research aims. Confirmed as of 2026-06-26 for CTC (6 elements) and CCDI
##     (2 elements). Because CTC is in every request
##     (nccr-req:alwaysIncludedSource), its six are always present; CCDI's two
##     apply only when the CCDI Mappings source is requested.
##
##  2. REVIEWER RECOMMENDATIONS (deliberately NOT modelled here).
##     During human review of a submitted request, NCCR staff read the stated
##     research aims and flag variables the researcher did not select but that
##     the aims imply they need. This is per-request judgement against the
##     science, not a property of a variable, so it cannot be a static triple.
##     It is handled by the `nccr-data-request` skill, which does the same
##     coverage check against the analytic plan before submission.
## ---------------------------------------------------------

@prefix nccr-req: <https://nccrdataplatform.ccdi.cancer.gov/request#> .
@prefix nccr-var: <https://nccrdataplatform.ccdi.cancer.gov/variable/> .
@prefix nccr-sec: <https://nccrdataplatform.ccdi.cancer.gov/section/> .
@prefix nccr-ds:  <https://nccrdataplatform.ccdi.cancer.gov/datasource/> .
@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos:     <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
@prefix dct:      <http://purl.org/dc/terms/> .
@prefix owl:      <http://www.w3.org/2002/07/owl#> .

## ==========================================================
## CLASSES / PROPERTIES (minimal, local to this file)
## ==========================================================

nccr-req: a owl:Ontology ;
    rdfs:label "NCCR Data Request Form Description"@en ;
    dct:description "Field inventory, limits, and controlled vocabularies for the NCCR Data Request form."@en ;
    dct:created "2026-09-23"^^xsd:date ;
    owl:versionInfo "0.1.0-draft" .

nccr-req:RequestField a owl:Class ;
    rdfs:label "Request Field"@en ;
    skos:definition "A single input field on the NCCR Data Request form."@en .

nccr-req:RequestSection a owl:Class ;
    rdfs:label "Request Section"@en .

nccr-req:fieldOrder a owl:DatatypeProperty ;
    rdfs:label "field order"@en ; rdfs:range xsd:integer .
nccr-req:maxCharacters a owl:DatatypeProperty ;
    rdfs:label "maximum characters"@en ; rdfs:range xsd:integer .
nccr-req:publiclyDisplayed a owl:DatatypeProperty ;
    rdfs:label "publicly displayed"@en ; rdfs:range xsd:boolean ;
    skos:definition "True if the field's content is shown publicly on the Data Requests page."@en .
nccr-req:required a owl:DatatypeProperty ;
    rdfs:label "required"@en ; rdfs:range xsd:boolean .
nccr-req:fieldGuidance a owl:DatatypeProperty ;
    rdfs:label "field guidance"@en ;
    skos:definition "The instruction text shown to the user on the form."@en .
nccr-req:inputType a owl:DatatypeProperty ;
    rdfs:label "input type"@en ;
    skos:definition "text | longtext | multiselect | boolean | fileupload | elementpicker"@en .
nccr-req:valueSet a owl:ObjectProperty ;
    rdfs:label "value set"@en .
nccr-req:alwaysIncludedSource a owl:ObjectProperty ;
    rdfs:label "always included data source"@en ;
    skos:definition "A data source present in every request. Other sources link to it and cannot be requested on their own, so its baseline default elements are always part of the dataset."@en .
nccr-req:recommendedForRequest a owl:DatatypeProperty ;
    rdfs:label "recommended for request"@en ; rdfs:range xsd:boolean ;
    skos:definition "True if the Data Elements step selects this variable by default, and requires it, whenever its data source is included in the request. A fixed baseline, independent of the research aims. Distinct from the aim-specific variables NCCR staff recommend during human review, which are per-request judgement and are not modelled here."@en .

## ==========================================================
## FIELDS
## ==========================================================

nccr-req:projectName a nccr-req:RequestField ;
    rdfs:label "Project Name" ;
    nccr-req:fieldOrder 1 ;
    nccr-req:inputType "text" ;
    nccr-req:publiclyDisplayed true ;
    nccr-req:required true ;
    nccr-req:fieldGuidance "Enter a unique and descriptive project name that will be easy to identify later." .

nccr-req:scientificResearchAims a nccr-req:RequestField ;
    rdfs:label "Scientific Research Aims" ;
    nccr-req:fieldOrder 2 ;
    nccr-req:inputType "longtext" ;
    nccr-req:maxCharacters 1500 ;
    nccr-req:publiclyDisplayed true ;
    nccr-req:required true ;
    nccr-req:fieldGuidance "Briefly describe your proposed research, its aims, and its value to science or public health." .

nccr-req:researchRelevance a nccr-req:RequestField ;
    rdfs:label "Research Relevance" ;
    nccr-req:fieldOrder 3 ;
    nccr-req:inputType "longtext" ;
    nccr-req:maxCharacters 1500 ;
    nccr-req:publiclyDisplayed true ;
    nccr-req:required true ;
    nccr-req:fieldGuidance "Briefly describe how your research will advance a particular scientific field of inquiry." .

nccr-req:scientificApproach a nccr-req:RequestField ;
    rdfs:label "Scientific Approach and Analytic Plan" ;
    nccr-req:fieldOrder 4 ;
    nccr-req:inputType "longtext" ;
    nccr-req:maxCharacters 1500 ;
    nccr-req:publiclyDisplayed true ;
    nccr-req:required true ;
    nccr-req:fieldGuidance "Briefly summarize your analytic plan, including key outcomes of interest." .

nccr-req:researchAreas a nccr-req:RequestField ;
    rdfs:label "Research Areas" ;
    nccr-req:fieldOrder 5 ;
    nccr-req:inputType "multiselect" ;
    nccr-req:publiclyDisplayed true ;
    nccr-req:required true ;
    nccr-req:valueSet nccr-req:ResearchAreaScheme .

nccr-req:collaborators a nccr-req:RequestField ;
    rdfs:label "Specify Collaborators" ;
    nccr-req:fieldOrder 6 ;
    nccr-req:inputType "boolean+list" ;
    nccr-req:publiclyDisplayed false ;
    nccr-req:fieldGuidance "List any members of your research team who need access to the requested dataset. Collaborators must register for SEER Research Plus. External collaborators at a different institution must each have a SEER Research Plus account and submit a data request referencing this data request ID, citing the exact project title, cohorts and project details. NIH permits release of controlled-access data only to individuals and organizations meeting the security requirements in NOT-OD-25-083." .

nccr-req:dataElements a nccr-req:RequestField ;
    rdfs:label "Data Elements Requested" ;
    nccr-req:fieldOrder 7 ;
    nccr-req:inputType "elementpicker" ;
    nccr-req:publiclyDisplayed false ;
    nccr-req:required true ;
    nccr-req:fieldGuidance "For each data source, select the specific fields to include in your requested dataset. Recommended fields are selected by default and are required; other defaulted fields may be updated if necessary." .

nccr-req:ccdiMappingsApproval a nccr-req:RequestField ;
    rdfs:label "CCDI Mappings Approval Documentation" ;
    nccr-req:fieldOrder 8 ;
    nccr-req:inputType "fileupload" ;
    nccr-req:publiclyDisplayed false ;
    nccr-req:fieldGuidance "Upload a PDF of your approval from other resources to link data, e.g., dbGaP profile." .

## ==========================================================
## BASELINE DEFAULT DATA ELEMENTS
## ==========================================================
## Per the Data Elements step: "Recommended fields are selected by default and
## are required; other defaulted fields may be updated if necessary."
## These six identify the tumor record and place it in the patient's sequence of
## primaries, so every CTC request carries them whether or not they are analysed.
## This is the baseline set only. Aim-specific additions come out of human review
## (see the header note) and are not represented as triples.
##
## CTC is in every request. Other sources link to it and cannot be requested on
## their own, which is why only the CTC copies of the shared identifiers are
## flagged below. ABM also carries a Tumor Record Number
## (nccr-var:abm-tumorrecordnumber), but since CTC is always present its copy is
## always there too, so flagging ABM's would be redundant.
nccr-req:dataElements nccr-req:alwaysIncludedSource nccr-ds:ctc .
##
## Tumor identity
nccr-var:ctc-tumorrecordnumber nccr-req:recommendedForRequest true .
nccr-var:ctc-sequencenumbercentral nccr-req:recommendedForRequest true .
##
## Virtual Pooled Registry (VPR) — all four members of
## nccr-sec:virtual-pooled-registry-vpr
nccr-var:ctc-indexcancer nccr-req:recommendedForRequest true .
nccr-var:ctc-numberofprimaries nccr-req:recommendedForRequest true .
nccr-var:ctc-tumororder nccr-req:recommendedForRequest true .
nccr-var:ctc-monthsfromindexdxtotumor nccr-req:recommendedForRequest true .

## CCDI Mappings (nccr-ds:ccdi) — conditional on requesting that source.
## A mapping is the pair (which external resource, which participant ID inside
## it), so both are required together; either one alone is not usable. The third
## CCDI variable, nccr-var:ccdi-nccrid, is the patient key shared across sources
## and is not flagged here.
nccr-var:ccdi-resourcename nccr-req:recommendedForRequest true .
nccr-var:ccdi-resourceparticipantid nccr-req:recommendedForRequest true .

## ==========================================================
## RESEARCH AREAS — controlled vocabulary
## ==========================================================

nccr-req:ResearchAreaScheme a skos:ConceptScheme ;
    rdfs:label "NCCR Research Areas"@en ;
    skos:definition "Controlled list of research areas selectable on the NCCR Data Request form."@en .

nccr-req:area-health-disparities a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Health disparities"@en .
nccr-req:area-methods-development a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Methods development"@en .
nccr-req:area-particular-diagnosis a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ;
    skos:prefLabel "Research focused on particular cancer diagnosis"@en .
nccr-req:area-social-behavioral a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Social/Behavioral"@en .
nccr-req:area-population-health a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Population health"@en .
nccr-req:area-late-effects a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Late-effects of cancer"@en .
nccr-req:area-health-services a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Health services"@en .
nccr-req:area-treatment-patterns a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Treatment patterns"@en .
nccr-req:area-epidemiology a skos:Concept ;
    skos:inScheme nccr-req:ResearchAreaScheme ; skos:prefLabel "Epidemiology"@en .
