@prefix cohsi: <https://w3id.org/cohsi2/ontology#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@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 dct:   <http://purl.org/dc/terms/> .
@prefix sosa:  <http://www.w3.org/ns/sosa/> .
@prefix prov:  <http://www.w3.org/ns/prov#> .
@prefix sio:   <http://semanticscience.org/resource/> .
@prefix obo:   <http://purl.obolibrary.org/obo/> .
@prefix vann:  <http://purl.org/vocab/vann/> .

<https://w3id.org/cohsi2/ontology> a owl:Ontology ;
    dct:title "CoHSI2 clinical study data model"@en ;
    dct:description """Application ontology for the CoHSI2 study (Controlled Human Schistosoma mansoni Infection, LUMC),
derived from its Castor EDC export. Observation structure follows W3C SOSA, values and units follow SIO,
and every class is anchored in OBO/NCIT terms so the data can be queried with community vocabularies."""@en ;
    vann:preferredNamespacePrefix "cohsi" ;
    vann:preferredNamespaceUri "https://w3id.org/cohsi2/ontology#" ;
    owl:versionInfo "0.1.0" ;
    dct:license <https://creativecommons.org/licenses/by/4.0/> .

#################################################################
# Classes
#################################################################

cohsi:Study a owl:Class ; rdfs:label "Study"@en ;
    rdfs:subClassOf sio:SIO_000747 , obo:OBI_0003699 , obo:NCIT_C71104 ;
    skos:definition "The CoHSI2 controlled human infection trial."@en .

cohsi:StudyArm a owl:Class ; rdfs:label "Study arm"@en ;
    rdfs:subClassOf obo:NCIT_C174447 ;
    skos:definition "A dose group of the study (A10, A20, B20), defined by the planned number of cercariae."@en .

cohsi:Participant a owl:Class ; rdfs:label "Participant"@en ;
    rdfs:subClassOf sio:SIO_000498 , obo:NCIT_C41189 , sosa:FeatureOfInterest ;
    skos:definition "A pseudonymised volunteer who was screened for, and possibly enrolled in, the study."@en .

cohsi:Visit a owl:Class ; rdfs:label "Visit"@en ;
    rdfs:subClassOf obo:NCIT_C39564 , sio:SIO_000006 ;
    skos:definition "A study contact moment at which data and specimens were collected."@en .
cohsi:ScreeningVisit a owl:Class ; rdfs:label "Screening visit"@en ;
    rdfs:subClassOf cohsi:Visit , obo:NCIT_C48261 .
cohsi:FollowUpVisit a owl:Class ; rdfs:label "Follow-up visit"@en ;
    rdfs:subClassOf cohsi:Visit ;
    skos:definition "A scheduled weekly visit (week 00 to week 52) or an unscheduled visit."@en .

cohsi:Observation a owl:Class ; rdfs:label "Observation"@en ;
    rdfs:subClassOf sosa:Observation , sio:SIO_000070 ;
    skos:definition "One recorded value of one study variable for one participant at one visit."@en .

cohsi:Variable a owl:Class ; rdfs:label "Study variable"@en ;
    rdfs:subClassOf skos:Concept , sosa:ObservableProperty ;
    skos:definition "A field of the Castor EDC case report form, described in the codebook."@en .

cohsi:ControlledInfection a owl:Class ; rdfs:label "Controlled human infection (CoHSI)"@en ;
    rdfs:subClassOf obo:OBI_0600007 , obo:NCIT_C78166 ;
    skos:definition "Percutaneous exposure of a participant to a counted number of Schistosoma mansoni cercariae."@en .

cohsi:Treatment a owl:Class ; rdfs:label "Study treatment"@en ;
    rdfs:subClassOf obo:OBI_0600007 , obo:NCIT_C15986 ;
    skos:definition "Administration of curative medication (praziquantel or artemether/lumefantrine)."@en .

cohsi:AdverseEvent a owl:Class ; rdfs:label "Adverse event"@en ;
    rdfs:subClassOf obo:NCIT_C41331 .

cohsi:ConcomitantMedication a owl:Class ; rdfs:label "Concomitant medication"@en ;
    rdfs:subClassOf obo:NCIT_C53630 .

cohsi:SpecimenCollection a owl:Class ; rdfs:label "Specimen collection"@en ;
    rdfs:subClassOf obo:OBI_0000659 , obo:NCIT_C70945 .

#################################################################
# Object properties
#################################################################

cohsi:hasArm a owl:ObjectProperty ; rdfs:label "has arm"@en ;
    rdfs:subPropertyOf sio:SIO_000028 ; rdfs:domain cohsi:Study ; rdfs:range cohsi:StudyArm .
cohsi:participatesIn a owl:ObjectProperty ; rdfs:label "participates in"@en ;
    rdfs:subPropertyOf sio:SIO_000062 ; rdfs:domain cohsi:Participant ; rdfs:range cohsi:Study .
cohsi:inArm a owl:ObjectProperty ; rdfs:label "in arm"@en ;
    rdfs:domain cohsi:Participant ; rdfs:range cohsi:StudyArm .
cohsi:gender a owl:ObjectProperty ; rdfs:label "gender"@en ;
    rdfs:subPropertyOf sio:SIO_000008 ; rdfs:domain cohsi:Participant ;
    skos:exactMatch obo:NCIT_C17357 .
cohsi:ofParticipant a owl:ObjectProperty ; rdfs:label "of participant"@en ;
    rdfs:subPropertyOf sio:SIO_000132 ; rdfs:range cohsi:Participant ;
    skos:definition "Links a visit, event, intervention or specimen collection to the participant it concerns."@en .
cohsi:atVisit a owl:ObjectProperty ; rdfs:label "at visit"@en ;
    rdfs:subPropertyOf sio:SIO_000068 ; rdfs:range cohsi:Visit .
cohsi:pathogen a owl:ObjectProperty ; rdfs:label "pathogen"@en ;
    rdfs:subPropertyOf sio:SIO_000230 ; rdfs:domain cohsi:ControlledInfection .
cohsi:drug a owl:ObjectProperty ; rdfs:label "drug"@en ;
    rdfs:subPropertyOf sio:SIO_000230 .
cohsi:dosingSchedule a owl:ObjectProperty ; rdfs:label "dosing schedule"@en ; rdfs:domain cohsi:Treatment .
cohsi:icd10 a owl:ObjectProperty ; rdfs:label "ICD-10 classification"@en ;
    rdfs:subPropertyOf sio:SIO_000628 .
cohsi:severity a owl:ObjectProperty ; rdfs:label "severity"@en ;
    rdfs:domain cohsi:AdverseEvent ; skos:exactMatch obo:NCIT_C25676 .
cohsi:relatedness a owl:ObjectProperty ; rdfs:label "relationship to CoHSI"@en ;
    rdfs:domain cohsi:AdverseEvent ; skos:exactMatch obo:NCIT_C41358 .
cohsi:treatmentRequired a owl:ObjectProperty ; rdfs:label "treatment required"@en ; rdfs:domain cohsi:AdverseEvent .
cohsi:route a owl:ObjectProperty ; rdfs:label "route of administration"@en ;
    rdfs:domain cohsi:ConcomitantMedication ; skos:exactMatch obo:NCIT_C38114 .
cohsi:frequencyType a owl:ObjectProperty ; rdfs:label "frequency type"@en ; rdfs:domain cohsi:ConcomitantMedication .
cohsi:forAdverseEvent a owl:ObjectProperty ; rdfs:label "given for adverse event"@en ;
    rdfs:domain cohsi:ConcomitantMedication ; rdfs:range cohsi:AdverseEvent .
cohsi:specimenType a owl:ObjectProperty ; rdfs:label "specimen type"@en ;
    rdfs:subPropertyOf sio:SIO_000229 ; rdfs:domain cohsi:SpecimenCollection .
cohsi:optionGroup a owl:ObjectProperty ; rdfs:label "option group"@en ;
    rdfs:domain cohsi:Variable ; rdfs:range skos:ConceptScheme .
cohsi:unit a owl:ObjectProperty ; rdfs:label "unit (UO)"@en ; rdfs:subPropertyOf sio:SIO_000221 .

#################################################################
# Datatype properties
#################################################################

cohsi:visitCode a owl:DatatypeProperty ; rdfs:label "visit code"@en ; rdfs:domain cohsi:Visit ; rdfs:range xsd:string .
cohsi:weekNumber a owl:DatatypeProperty ; rdfs:label "study week"@en ; rdfs:domain cohsi:Visit ; rdfs:range xsd:integer .
cohsi:visitDate a owl:DatatypeProperty ; rdfs:label "visit date"@en ; rdfs:subPropertyOf dct:date ; rdfs:range xsd:date .
cohsi:ageAtBaseline a owl:DatatypeProperty ; rdfs:label "age in years at week 00"@en ;
    rdfs:domain cohsi:Participant ; rdfs:range xsd:integer ; skos:exactMatch obo:NCIT_C25150 .
cohsi:challenged a owl:DatatypeProperty ; rdfs:label "CoHSI performed"@en ; rdfs:domain cohsi:Participant ; rdfs:range xsd:boolean .
cohsi:plannedCercariae a owl:DatatypeProperty ; rdfs:label "planned number of cercariae"@en ; rdfs:domain cohsi:StudyArm ; rdfs:range xsd:integer .
cohsi:cercariaeDose a owl:DatatypeProperty ; rdfs:label "number of cercariae administered"@en ; rdfs:domain cohsi:ControlledInfection ; rdfs:range xsd:integer .
cohsi:snailBatch a owl:DatatypeProperty ; rdfs:label "snail batch identifier"@en ; rdfs:domain cohsi:ControlledInfection .
cohsi:startedAt a owl:DatatypeProperty ; rdfs:label "started at"@en ; rdfs:subPropertyOf prov:startedAtTime .
cohsi:endedAt a owl:DatatypeProperty ; rdfs:label "ended at"@en ; rdfs:subPropertyOf prov:endedAtTime .
cohsi:serious a owl:DatatypeProperty ; rdfs:label "serious adverse event"@en ; rdfs:domain cohsi:AdverseEvent ; rdfs:range xsd:boolean ; skos:closeMatch obo:NCIT_C41335 .
cohsi:recovered a owl:DatatypeProperty ; rdfs:label "recovered"@en ; rdfs:domain cohsi:AdverseEvent ; rdfs:range xsd:boolean ; skos:closeMatch obo:NCIT_C49498 .
cohsi:bodyWeightKg a owl:DatatypeProperty ; rdfs:label "body weight at treatment (kg)"@en ; rdfs:domain cohsi:Treatment ; rdfs:range xsd:decimal ; skos:closeMatch obo:NCIT_C81328 .
cohsi:tablets a owl:DatatypeProperty ; rdfs:label "number of 600 mg tablets"@en ; rdfs:domain cohsi:Treatment ; rdfs:range xsd:decimal .
cohsi:medicationName a owl:DatatypeProperty ; rdfs:label "medication name"@en ; rdfs:domain cohsi:ConcomitantMedication .
cohsi:doseText a owl:DatatypeProperty ; rdfs:label "dose and units (as recorded)"@en ; skos:closeMatch obo:NCIT_C25488 .
cohsi:frequencyText a owl:DatatypeProperty ; rdfs:label "frequency (as recorded)"@en ; skos:closeMatch obo:NCIT_C89081 .
cohsi:indication a owl:DatatypeProperty ; rdfs:label "indication"@en ; skos:closeMatch obo:NCIT_C41184 .
cohsi:frozenAt a owl:DatatypeProperty ; rdfs:label "freezer time"@en ; rdfs:domain cohsi:SpecimenCollection ; rdfs:range xsd:time .
cohsi:unitUCUM a owl:DatatypeProperty ; rdfs:label "unit (UCUM code)"@en ; rdfs:range xsd:string .
cohsi:fieldType a owl:DatatypeProperty ; rdfs:label "Castor field type"@en ; rdfs:domain cohsi:Variable .
cohsi:form a owl:DatatypeProperty ; rdfs:label "Castor form / report"@en ; rdfs:domain cohsi:Variable .
cohsi:fairCore a owl:DatatypeProperty ; rdfs:label "part of the curated FAIR core set"@en ; rdfs:domain cohsi:Variable ; rdfs:range xsd:boolean .

cohsi:recordStatus a owl:DatatypeProperty ; rdfs:label "Castor record status (sub-cohort)"@en ; rdfs:domain cohsi:Participant .
cohsi:icd10Code a owl:DatatypeProperty ; rdfs:label "ICD-10 code (as recorded, version 2010)"@en ; rdfs:range xsd:string .
cohsi:eventDescription a owl:DatatypeProperty ; rdfs:label "event description"@en ; rdfs:domain cohsi:AdverseEvent .
cohsi:routeText a owl:DatatypeProperty ; rdfs:label "route (free text)"@en .

cohsi:MissingValue a owl:Class ; rdfs:label "Missing value reason"@en ;
    rdfs:subClassOf skos:Concept ;
    skos:definition "A Castor EDC user-missing code (-95 to -99) recorded instead of a value."@en .
