Skip to content

Instantly share code, notes, and snippets.

@jmora
Created March 27, 2012 16:35
Show Gist options
  • Save jmora/2217737 to your computer and use it in GitHub Desktop.
Save jmora/2217737 to your computer and use it in GitHub Desktop.
Small real-like ontology about Hospitals. There is a mistake, try to find it!
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix : <http://github.com/jmora/ontologies/Hospital.owl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@base <http://github.com/jmora/ontologies/Hospital.owl> .
<http://github.com/jmora/ontologies/Hospital.owl> rdf:type owl:Ontology .
#################################################################
#
# Object Properties
#
#################################################################
### http://github.com/jmora/ontologies/Hospital.owl#affects
:affects rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#alleviates
:alleviates rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :treats .
### http://github.com/jmora/ontologies/Hospital.owl#applies
:applies rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :treats .
### http://github.com/jmora/ontologies/Hospital.owl#assigns
:assigns rdf:type owl:ObjectProperty ;
owl:inverseOf :isAssignedBy ;
rdfs:subPropertyOf :treats .
### http://github.com/jmora/ontologies/Hospital.owl#cures
:cures rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :treats .
### http://github.com/jmora/ontologies/Hospital.owl#dealsWith
:dealsWith rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#diagnoses
:diagnoses rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :treats .
### http://github.com/jmora/ontologies/Hospital.owl#hasSpeciality
:hasSpeciality rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#isAppliedBy
:isAppliedBy rdf:type owl:ObjectProperty ;
owl:inverseOf :applies .
### http://github.com/jmora/ontologies/Hospital.owl#isAppliedTo
:isAppliedTo rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#isAssignedBy
:isAssignedBy rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#isAssignedTo
:isAssignedTo rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#isDiagnosedWith
:isDiagnosedWith rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :presents .
### http://github.com/jmora/ontologies/Hospital.owl#isTreatedBy
:isTreatedBy rdf:type owl:ObjectProperty ;
owl:inverseOf :treats .
### http://github.com/jmora/ontologies/Hospital.owl#presents
:presents rdf:type owl:ObjectProperty .
### http://github.com/jmora/ontologies/Hospital.owl#shows
:shows rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :presents .
### http://github.com/jmora/ontologies/Hospital.owl#suffers
:suffers rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :presents .
### http://github.com/jmora/ontologies/Hospital.owl#treats
:treats rdf:type owl:ObjectProperty .
### http://www.w3.org/2002/07/owl#topObjectProperty
owl:topObjectProperty rdf:type owl:ObjectProperty .
#################################################################
#
# Classes
#
#################################################################
### http://github.com/jmora/ontologies/Hospital.owl#Cancer
:Cancer rdf:type owl:Class ;
rdfs:subClassOf :Disease .
### http://github.com/jmora/ontologies/Hospital.owl#ClinicallyDiagnosedSymptom
:ClinicallyDiagnosedSymptom rdf:type owl:Class ;
rdfs:subClassOf :Symptom ,
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :presents
] ;
owl:someValuesFrom :Disease
] ,
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :diagnoses
] ;
owl:someValuesFrom :Doctor
] ,
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :isDiagnosedWith
] ;
owl:someValuesFrom :Patient
] ,
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :isDiagnosedWith
] ;
owl:someValuesFrom :Person
] .
### http://github.com/jmora/ontologies/Hospital.owl#Condition
:Condition rdf:type owl:Class ;
rdfs:subClassOf :Process .
### http://github.com/jmora/ontologies/Hospital.owl#Cutaneous
:Cutaneous rdf:type owl:Class ;
rdfs:subClassOf :Treatment .
### http://github.com/jmora/ontologies/Hospital.owl#Dermatologist
:Dermatologist rdf:type owl:Class ;
rdfs:subClassOf :Doctor .
### http://github.com/jmora/ontologies/Hospital.owl#Diagnosis
:Diagnosis rdf:type owl:Class ;
rdfs:subClassOf :Process .
### http://github.com/jmora/ontologies/Hospital.owl#Disease
:Disease rdf:type owl:Class ;
rdfs:subClassOf :Condition ,
[ rdf:type owl:Restriction ;
owl:onProperty :affects ;
owl:someValuesFrom owl:Thing
] .
### http://github.com/jmora/ontologies/Hospital.owl#Doctor
:Doctor rdf:type owl:Class ;
rdfs:subClassOf :Person ,
[ rdf:type owl:Restriction ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom :MedicineSpeciality
] .
### http://github.com/jmora/ontologies/Hospital.owl#GeneralPracticeDoctor
:GeneralPracticeDoctor rdf:type owl:Class ;
rdfs:subClassOf :Doctor .
### http://github.com/jmora/ontologies/Hospital.owl#Intravenous
:Intravenous rdf:type owl:Class ;
rdfs:subClassOf :Treatment .
### http://github.com/jmora/ontologies/Hospital.owl#Knowledge
:Knowledge rdf:type owl:Class ;
rdfs:subClassOf owl:Thing .
### http://github.com/jmora/ontologies/Hospital.owl#MedicineSpeciality
:MedicineSpeciality rdf:type owl:Class ;
rdfs:subClassOf :Knowledge ,
[ rdf:type owl:Restriction ;
owl:onProperty :dealsWith ;
owl:someValuesFrom :Disease
] .
### http://github.com/jmora/ontologies/Hospital.owl#Oncologist
:Oncologist rdf:type owl:Class ;
rdfs:subClassOf :Doctor ,
[ rdf:type owl:Restriction ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :oncology
)
]
] .
### http://github.com/jmora/ontologies/Hospital.owl#Oral
:Oral rdf:type owl:Class ;
rdfs:subClassOf :Treatment .
### http://github.com/jmora/ontologies/Hospital.owl#Patient
:Patient rdf:type owl:Class ;
rdfs:subClassOf :SickPerson ,
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :treats
] ;
owl:someValuesFrom :Doctor
] ,
[ rdf:type owl:Restriction ;
owl:onProperty :isDiagnosedWith ;
owl:someValuesFrom :Condition
] .
### http://github.com/jmora/ontologies/Hospital.owl#PatientAndDoctor
:PatientAndDoctor rdf:type owl:Class ;
rdfs:subClassOf :Doctor ,
:Patient .
### http://github.com/jmora/ontologies/Hospital.owl#Person
:Person rdf:type owl:Class ;
rdfs:subClassOf owl:Thing .
### http://github.com/jmora/ontologies/Hospital.owl#Process
:Process rdf:type owl:Class .
### http://github.com/jmora/ontologies/Hospital.owl#SelfIdentifiedSymptom
:SelfIdentifiedSymptom rdf:type owl:Class ;
rdfs:subClassOf :Symptom ,
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :presents
] ;
owl:someValuesFrom :SickPerson
] .
### http://github.com/jmora/ontologies/Hospital.owl#SickPerson
:SickPerson rdf:type owl:Class ;
rdfs:subClassOf :Person ,
[ rdf:type owl:Restriction ;
owl:onProperty :suffers ;
owl:someValuesFrom :Disease
] .
### http://github.com/jmora/ontologies/Hospital.owl#Surgeon
:Surgeon rdf:type owl:Class ;
rdfs:subClassOf :Doctor ,
[ rdf:type owl:Restriction ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :surgery
)
]
] .
### http://github.com/jmora/ontologies/Hospital.owl#Surgery
:Surgery rdf:type owl:Class ;
rdfs:subClassOf :Treatment .
### http://github.com/jmora/ontologies/Hospital.owl#Symptom
:Symptom rdf:type owl:Class ;
rdfs:subClassOf :Condition .
### http://github.com/jmora/ontologies/Hospital.owl#Trauma
:Trauma rdf:type owl:Class ;
rdfs:subClassOf :Disease .
### http://github.com/jmora/ontologies/Hospital.owl#Traumatologist
:Traumatologist rdf:type owl:Class ;
rdfs:subClassOf :Doctor ,
[ rdf:type owl:Restriction ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :traumatology
)
]
] .
### http://github.com/jmora/ontologies/Hospital.owl#Treatment
:Treatment rdf:type owl:Class ;
rdfs:subClassOf :Process ,
[ rdf:type owl:Restriction ;
owl:onProperty :treats ;
owl:someValuesFrom :Condition
] .
### http://www.w3.org/2002/07/owl#Thing
owl:Thing rdf:type owl:Class .
#################################################################
#
# Individuals
#
#################################################################
### http://github.com/jmora/ontologies/Hospital.owl#oncology
:oncology rdf:type :MedicineSpeciality ,
owl:NamedIndividual .
### http://github.com/jmora/ontologies/Hospital.owl#surgery
:surgery rdf:type :MedicineSpeciality ,
owl:NamedIndividual .
### http://github.com/jmora/ontologies/Hospital.owl#traumatology
:traumatology rdf:type :MedicineSpeciality ,
owl:NamedIndividual .
#################################################################
#
# General axioms
#
#################################################################
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :suffers ;
owl:someValuesFrom :Condition
] ;
owl:onProperty :shows ;
owl:someValuesFrom :Symptom
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :shows ;
owl:someValuesFrom :Symptom
] ;
owl:onProperty :presents ;
owl:someValuesFrom :Symptom
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Surgeon ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :surgery
)
]
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Oncologist ;
owl:onProperty :treats ;
owl:someValuesFrom :Cancer
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Cancer ;
owl:onProperty [ owl:inverseOf :treats
] ;
owl:someValuesFrom :Oncologist
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Symptom ;
owl:onProperty [ owl:inverseOf :shows
] ;
owl:someValuesFrom owl:Thing
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Doctor ;
owl:onProperty :treats ;
owl:someValuesFrom :Disease
] .
[ rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :shows
] ;
owl:someValuesFrom :Symptom
] ;
owl:intersectionOf ( :Symptom
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :presents
] ;
owl:someValuesFrom owl:Thing
]
)
] .
[ rdf:type owl:Class ;
rdfs:subClassOf :Patient ;
owl:intersectionOf ( :Person
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :treats
] ;
owl:someValuesFrom owl:Thing
]
)
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Patient ;
owl:onProperty [ owl:inverseOf :isAppliedTo
] ;
owl:someValuesFrom :Treatment
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Traumatologist ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :traumatology
)
]
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Trauma ;
owl:onProperty [ owl:inverseOf :treats
] ;
owl:someValuesFrom :Traumatologist
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Oncologist ;
owl:onProperty :hasSpeciality ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :oncology
)
]
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Disease ;
owl:onProperty [ owl:inverseOf :cures
] ;
owl:someValuesFrom owl:Thing
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :suffers ;
owl:someValuesFrom :Disease
] ;
owl:onProperty :presents ;
owl:someValuesFrom :Disease
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Doctor ;
owl:onProperty :applies ;
owl:someValuesFrom :Intravenous
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Surgeon ;
owl:onProperty :applies ;
owl:someValuesFrom :Surgery
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :SickPerson ;
owl:onProperty :suffers ;
owl:someValuesFrom :Condition
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Patient ;
owl:onProperty :applies ;
owl:someValuesFrom :Oral
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isAssignedTo ;
owl:someValuesFrom owl:Thing
] ;
owl:onProperty :isAssignedBy ;
owl:someValuesFrom owl:Thing
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :SickPerson ;
owl:onProperty :shows ;
owl:someValuesFrom :Symptom
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Patient ;
owl:onProperty :isTreatedBy ;
owl:someValuesFrom owl:Thing
] .
[ rdf:type owl:Class ;
rdfs:subClassOf :Patient ;
owl:intersectionOf ( :Person
[ rdf:type owl:Restriction ;
owl:onProperty :isDiagnosedWith ;
owl:someValuesFrom owl:Thing
]
)
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Traumatologist ;
owl:onProperty :treats ;
owl:someValuesFrom :Trauma
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :dealsWith
] ;
owl:someValuesFrom :MedicineSpeciality
] ;
owl:onProperty [ owl:inverseOf :affects
] ;
owl:someValuesFrom :Condition
] .
[ rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :suffers
] ;
owl:someValuesFrom owl:Thing
] ;
owl:intersectionOf ( :Disease
[ rdf:type owl:Restriction ;
owl:onProperty [ owl:inverseOf :presents
] ;
owl:someValuesFrom owl:Thing
]
)
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Person ;
owl:onProperty :applies ;
owl:someValuesFrom :Cutaneous
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Doctor ;
owl:onProperty :assigns ;
owl:someValuesFrom :Treatment
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isAppliedBy ;
owl:someValuesFrom owl:Thing
] ;
owl:onProperty :isAppliedTo ;
owl:someValuesFrom owl:Thing
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isAssignedBy ;
owl:someValuesFrom owl:Thing
] ;
owl:onProperty :isAssignedTo ;
owl:someValuesFrom owl:Thing
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isDiagnosedWith ;
owl:someValuesFrom :Condition
] ;
owl:onProperty :isAppliedTo ;
owl:someValuesFrom :Treatment
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf :Disease ;
owl:onProperty [ owl:inverseOf :suffers
] ;
owl:someValuesFrom :SickPerson
] .
[ rdf:type owl:Restriction ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isAppliedTo ;
owl:someValuesFrom owl:Thing
] ;
owl:onProperty :isAppliedBy ;
owl:someValuesFrom owl:Thing
] .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment