# PxButton | check with cwm   | bash .cwm ACPOntologyRIM1.n3
# PxButton | check with euler | bash .euler ACPOntologyRIM1.n3 
#
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. 
@prefix owl: <http://www.w3.org/2002/07/owl#>. 
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. 
@prefix math: <http://www.w3.org/2000/10/swap/math#>. 
@prefix list: <http://www.w3.org/2000/10/swap/list#>.

@prefix umls: <http://protege.stanford.edu/umls#> .
@prefix rim: <http://wopeg.he.agfa.be/rules/RIMV3OWL#>.
@prefix pi: <http://eulersharp.sourceforge.net/2003/03swap/pi-rules#>.
@prefix atype: <http://wopeg.he.agfa.be/rules/ArthetypeRIM#>.

@prefix : <http://wopeg.he.agfa.be/rules/ACPOntologyRIM1#>.



# This ontology is a semantic model of adapatable clinical pathway, 
# containing axioms of expressing adapatble clinical pathway in a declerative manner.
# This is based on PI-Calculus and HL7 RIM V3 framework

# Research and Innovation
# Agfa Healthcare
# Helen Chen 
#
#

# mapping concepts to RIMV3OWL.owl, June 2006
#
#Basic elements of composing a clinical Pathway for a patient (may have multiple clinical problems) 
#

<>		a	owl:Ontology;
		rdfs:comment	"Adaptable Clinical Pathway Ontology in RIM";
		rdfs:label	"ACPOntologyRIM".

#Top Level Class Declaration

# A recommendation is a intented/planned clinical act for fulfilling a given medical intention. 
# It can be accepted by the medical team thus carried out as a series of events in healthcare system
# or can be rejected by  

:Recommendation	rdfs:subClassOf	 rim:Act,
	        [ a 	owl:Restriction;
		  owl:onProperty rim:actMoodCd;
		  owl:hasValue rim:Recommendation];
		rdfs:comment	"""A recommendation is a step or a group of medical acts, 
		can consist of multiple procedures.  A non-mandated intent to perform an act 
		where a level of professional responsibility is being accepted by making the proposal.
		Each recommendation made by the system to patient and his physician need to be explicited confirmed
		in order to be excuted""".
		  

		
:PatientState	a 	owl:Class;
		rdfs:comment """ Patient State is a composited concept that presents a patient's clinical (i.e. clinical problem), 
		physicial (e.g. comfortable with pain management, able to walk in 5 meters, self-caring), 
		and operational (e.g. in the middle of an operation, or undergoing a therapy) states.  In the ACP, 
		the patient state is a major trigger for making a recommendation or change a planned procedure.  
		As a pre-condition, it can cause a observation or procedure to be executed in order to achive a goal; 
		As a post-condition, it can state the actual outcome of a medical intervention;
		As a goal, it also can state the expected outcome """.


:ClinicalState	rdfs:subClassOf	:PatientState;
		rdfs:comment """ a clinical problem that a patient is suspected/diagnosed to have, can be mapped to to an established terminology base such as umls or snomed""".  
					
:PhysicalState	rdfs:subClassOf	:PatientState;
		rdfs:comment """ Identify something as a physical state depends on individual care plan or institution""". 		

:OperationalState rdfs:subClassOf :PatientState;
		rdfs:comment """ Operational State will be deduced based on act (mood = event) and its status (active or completed) a patient participated in""".
										


:inPatientState		a	owl:ObjectProperty;
			rdfs:domain	atype:Patient;
			rdfs:range	:PatientState.


:hasExpectedState		a	owl:ObjectProperty;
			rdfs:domain	atype:Patient;
			rdfs:range	:PatientState.
			
:hasPossiblePlan	a	owl:ObjectProperty;
			rdfs:domain	atype:Patient;
			rdfs:range	rim:Act.			

:nextStep	a	owl:ObjectProperty;
		owl:inverseOf rim:actRelationshipSequel.

:connect	a	owl:ObjectProperty.
			
# there are other participation types such as physicians, consultant and nurses, who are clearly defined in HL7,
# thus not to be repeated in this ontology 


#Properties of Recommendation for a careplan

:preCondition	a	rdf:Property;
		rdfs:domain :Recommendation;
		rdfs:range  :PatientState;
		rdfs:comment """ the condition (patient clinical, physical, and operattional state) that causes the recommendation to be proposed""".

:postCondition	a	rdf:Property;
		rdfs:domain :Recommendation;
		rdfs:range  :PatientStatet;
		rdfs:comment """ the expected condition (patient clinical, physical, and operattional state) that results from the 
		successful execution of the recommendation""".


:isConfirmed	a 	rdf:Property;
		rdfs:domain	:Recommendation;
		rdfs:range	xsd:boolean;
		rdfs:comment	""" when set to true, the sequel action or order will be executed""".
					  

#A Variance can be an task noted on the clinical path not occuring within 24 hours, 
#or a task not recommended by the existing guidelines and protocol.

:Variance	rdfs:subClassOf	rim:Act,
		[ a 	owl:Restriction;
		  owl:onProperty rim:actStatus;
		  owl:hasValuesFrom :UnsuccessfulStatus].
		  
:varianceExplanation	a	rdf:Property;
		rdfs:domain	:Variance;
		rdfs:range	xsd:string.
		
:varianceCode	a	rdf:Property;
		rdfs:domain	:Variance;
		rdfs:range	xsd:string.

:UnsuccessfulStatus  owl:oneOf (rim:actAborted rim:actCancelled rim:actSuspended).

:hasVariance  	a	rdf:Property;
		rdfs:domain	atype:Patient;
		rdfs:range	:Variance.
		
			

#################################################################################################
# Time Taxonomy
# There are two types of time: time for a plan and time for a execution of a plan
# Due to the clear seperation between a "recommendaiton (plan)" and an "order (with schedules)
# only time for a plan will be discussed here
# This time Taxonmy is based on Prof. Ken Mckay's presentation "The meaning of time in work flow"	
#################################################################################################

# HL7 makes no distinction in time.  So there is no HL7 mapping for the following concept.
:PlanTime a rdfs:Class.
:AbsoluteTime a rdfs:Class.
:RelativeTime a rdfs:Class.
:BusinessTime a rdfs:Class.
:EnvironmentalTime a rdfs:Class.
:CulturalTime a rdfs:Class.
:CalendarTime a rdfs:Class.

