@prefix ros:     <https://rosetta.covlescu.com/ontology#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix eli:     <http://data.europa.eu/eli/ontology#> .

# Rosetta Stone ontology (MVP). Instances: /api/kg.ttl and /api/kg.jsonld.
# Design: procedure steps are SKOS-like concepts in a pathway; EU obligations attach to steps and are
# defined in legal acts (aligned with ELI); national measures implement obligations or add national rules;
# gap findings record mismatches in two directions; mitigations point to gaps and, where possible, to a peer model.

<https://rosetta.covlescu.com/ontology> a owl:Ontology ;
    rdfs:label "Rosetta Stone: EU and national cancer diagnostic pathway ontology" ;
    dcterms:creator "Rosetta Stone project (MVP, non-commercial)" ;
    owl:versionInfo "2026-11-15" ;
    rdfs:comment "Classes and properties for comparing how EU cancer-care obligations are implemented nationally, in both directions." .

# ── Classes ──
ros:ProcedureStep    a owl:Class ; rdfs:subClassOf skos:Concept ; rdfs:label "Procedure step" ;
    rdfs:comment "A step of the cancer diagnostic pathway derived from EU legislation (e.g. screening, biopsy, biomarker testing)." .
ros:ProcedureVariant a owl:Class ; rdfs:label "National procedure variant" ;
    rdfs:comment "How a procedure step is named, coded, accessed and paid for in one country." .
ros:LegalAct         a owl:Class ; rdfs:subClassOf eli:LegalResource ; rdfs:label "Legal act or instrument" .
ros:Obligation       a owl:Class ; rdfs:label "EU obligation" ;
    rdfs:comment "A requirement, recommendation or policy target in an EU instrument that applies to a procedure step." .
ros:BindingObligation      a owl:Class ; rdfs:subClassOf ros:Obligation .
ros:RecommendedObligation  a owl:Class ; rdfs:subClassOf ros:Obligation .
ros:NationalMeasure  a owl:Class ; rdfs:label "National measure" ;
    rdfs:comment "A national law, regulation, programme or professional standard governing a step." .
ros:Jurisdiction     a owl:Class ; rdfs:label "Jurisdiction" .
ros:GapFinding       a owl:Class ; rdfs:label "Gap finding" ;
    rdfs:comment "A mismatch between EU and national layers; direction is eu_to_national or national_to_eu." .
ros:EuToNationalGap  a owl:Class ; rdfs:subClassOf ros:GapFinding .
ros:NationalToEuGap  a owl:Class ; rdfs:subClassOf ros:GapFinding .
ros:Mitigation       a owl:Class ; rdfs:label "Mitigation" .

# ── Pathway relations (between steps) ──
ros:precedes  a owl:ObjectProperty, owl:TransitiveProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range ros:ProcedureStep .
ros:requires  a owl:ObjectProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range ros:ProcedureStep .
ros:informs   a owl:ObjectProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range ros:ProcedureStep .
ros:reviews   a owl:ObjectProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range ros:ProcedureStep .
ros:supports  a owl:ObjectProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range ros:ProcedureStep .
ros:feedsData a owl:ObjectProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range ros:ProcedureStep .
ros:leadsTo   a owl:ObjectProperty ; rdfs:domain ros:ProcedureStep ; rdfs:range skos:Concept .

# ── Law and implementation ──
ros:definedIn     a owl:ObjectProperty ; rdfs:domain ros:Obligation ; rdfs:range ros:LegalAct .
ros:appliesTo     a owl:ObjectProperty ; rdfs:domain ros:Obligation ; rdfs:range ros:ProcedureStep .
ros:implements    a owl:ObjectProperty ; rdfs:domain ros:NationalMeasure ; rdfs:range ros:Obligation .
ros:implementedBy a owl:ObjectProperty ; owl:inverseOf ros:implements .
ros:governs       a owl:ObjectProperty ; rdfs:domain ros:NationalMeasure ; rdfs:range ros:ProcedureStep .
ros:basedOn       a owl:ObjectProperty ; rdfs:domain ros:NationalMeasure ; rdfs:range ros:LegalAct .
ros:inJurisdiction a owl:ObjectProperty ; rdfs:range ros:Jurisdiction .
ros:variantOf     a owl:ObjectProperty ; rdfs:domain ros:ProcedureVariant ; rdfs:range ros:ProcedureStep .

# ── Audit ──
ros:concernsStep       a owl:ObjectProperty ; rdfs:domain ros:GapFinding ; rdfs:range ros:ProcedureStep .
ros:concernsObligation a owl:ObjectProperty ; rdfs:domain ros:GapFinding ; rdfs:range ros:Obligation .
ros:concernsMeasure    a owl:ObjectProperty ; rdfs:domain ros:GapFinding ; rdfs:range ros:NationalMeasure .
ros:mitigates          a owl:ObjectProperty ; rdfs:domain ros:Mitigation ; rdfs:range ros:GapFinding .
ros:modelledOn         a owl:ObjectProperty ; rdfs:domain ros:Mitigation ; rdfs:range ros:NationalMeasure ;
    rdfs:comment "The peer implementation a mitigation copies." .

# ── Literals ──
ros:verification    a owl:DatatypeProperty ; rdfs:range xsd:string ;
    rdfs:comment "verified | secondary | cited_unverified | needs_research" .
ros:direction       a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:comment "eu_to_national | national_to_eu" .
ros:severity        a owl:DatatypeProperty ; rdfs:range xsd:integer ; rdfs:comment "0 (informational) to 3 (major)" .
ros:strength        a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:comment "binding | recommendation | soft_law | policy" .
ros:measure_type    a owl:DatatypeProperty ; rdfs:range xsd:string .
ros:summary         a owl:DatatypeProperty ; rdfs:range xsd:string .
ros:jurisdictionCode a owl:DatatypeProperty ; rdfs:range xsd:string .
ros:parameters      a owl:DatatypeProperty ; rdfs:range xsd:string ; rdfs:comment "JSON object of comparable parameters (age band, test, interval)." .

# ── Inference rules (documented; executed by /api/kg/infer) ──
# R1 downstream risk      : GapFinding(sev>=2, X, C) ∧ X ros:precedes+ Y  ⇒ Y atRisk in C
# R2 silent obligation    : Obligation O appliesTo X ∧ ¬∃ NationalMeasure(C) implements O ∧ ¬∃ Gap(C,O) ⇒ unknown(C,O)
# R3 peer model           : Gap(A,O) ∧ NationalMeasure(B) implements O ∧ ¬Gap(B,O,sev>=2) ⇒ candidateMitigation(A, measure_B)
# R4 portability risk     : NationalMeasure(national_only) governs X ∧ X under an EU cross-border route ⇒ portabilityRisk
# R5 parameter mismatch   : parameters(Obligation) ≠ parameters(NationalMeasure implementing it) ⇒ divergence
