<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:process="http://www.daml.org/services/owl-s/1.1/Process.owl#"
    xmlns:service="http://www.daml.org/services/owl-s/1.1/Service.owl#"
    xmlns:list="http://www.daml.org/services/owl-s/1.1/generic/ObjectList.owl#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:profile="http://www.daml.org/services/owl-s/1.1/Profile.owl#"
    xmlns="http://127.0.0.1/services/1.1/SetUpCostAndHealingPlan_service.owls"
    xmlns:swrl="http://www.w3.org/2003/11/swrl#"
    xmlns:grounding="http://www.daml.org/services/owl-s/1.1/Grounding.owl#"
    xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
    xmlns:expr      = "http://www.daml.org/services/owl-s/1.1/generic/Expression.owl#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xml:base="http://127.0.0.1/services/1.1/SetUpCostAndHealingPlan_service.owls">
  <owl:Ontology rdf:about="">
    <owl:imports rdf:resource="http://127.0.0.1/ontology/Service.owl"/>
    <owl:imports rdf:resource="http://127.0.0.1/ontology/Grounding.owl"/>
    <owl:imports rdf:resource="http://127.0.0.1/ontology/Process.owl"/>
    <owl:imports rdf:resource="http://127.0.0.1/ontology/Profile.owl"/>
    <owl:imports rdf:resource="http://127.0.0.1/ontology/HospitalPhysicianOntology.owl"/>
    <owl:imports rdf:resource="http://127.0.0.1/ontology/Expression.owl" />
	<owl:imports rdf:resource="http://127.0.0.1/ontology/core-plus-office.owl" />
	<owl:imports rdf:resource="http://127.0.0.1/ontology/ontosem.owl" />
  </owl:Ontology>
  <service:Service rdf:ID="SetUpCostAndHealingPlanService">
    <service:presents>
      <profile:Profile rdf:ID="SetUpCostAndHealingPlanProfile"/>
    </service:presents>
    <service:describedBy>
      <process:AtomicProcess rdf:ID="SetUpCostAndHealingPlanProcess"/>
    </service:describedBy>
    <service:supports>
      <grounding:WsdlGrounding rdf:ID="SetUpCostAndHealingPlanGrounding"/>
    </service:supports>
  </service:Service>
  <profile:Profile rdf:about="#SetUpCostAndHealingPlanProfile">
    <profile:hasOutput>
      <process:Output rdf:ID="UpdatePatientMedicalRecords_Acknowledgement">
        <rdfs:label>UpdatePatientMedicalRecords_Acknowledgement</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#Acknowledgement</process:parameterType>
      </process:Output>
    </profile:hasOutput>
    <service:presentedBy rdf:resource="#SetUpCostAndHealingPlanService"/>
    <profile:hasInput>
      <process:Input rdf:ID="SetUpCostAndHealingPlan_TreatmentDateTime">
        <rdfs:label>SetUpCostAndHealingPlan_TreatmentDateTime</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#DateTime</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:hasInput>
      <process:Input rdf:ID="SetUpCostAndHealingPlan_Diagnosis">
        <rdfs:label>SetUpCostAndHealingPlan_Diagnosis</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#Diagnosis</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:textDescription>Before a treatment can take place, the physician has to set up a cost and healing plan. This plan has to be agreed to by the patient's health insurance.</profile:textDescription>
    <profile:hasInput>
      <process:Input rdf:ID="SetUpCostAndHealingPlan_PatientHealthInsuranceNumber">
        <rdfs:label>SetUpCostAndHealingPlan_PatientHealthInsuranceNumber</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#HealthInsuranceNumber</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:hasInput>
      <process:Input rdf:ID="PatientTransport_PatientGpsPosition">
        <rdfs:label>PatientTransport_PatientGpsPosition</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#GpsPosition</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:hasInput>
      <process:Input rdf:ID="SetUpCostAndHealingPlan_PatientName">
        <rdfs:label>SetUpCostAndHealingPlan_PatientName</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#PersonName</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:serviceName>SetUpCostAndHealingPlan</profile:serviceName>
    <profile:hasInput>
      <process:Input rdf:ID="SetUpCostAndHealingPlan_RequiredDrugs">
        <rdfs:label>SetUpCostAndHealingPlan_RequiredDrugs</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#Drug</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:hasOutput>
      <process:Output rdf:ID="SetUpCostAndHealingPlan_CostAndHealingPlan">
        <rdfs:label>SetUpCostAndHealingPlan_CostAndHealingPlan</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#CostAndHealingPlan</process:parameterType>
      </process:Output>
    </profile:hasOutput>
    <profile:hasInput>
      <process:Input rdf:ID="UpdatePatientMedicalRecords_Treatment">
        <rdfs:label>UpdatePatientMedicalRecords_Treatment</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#Treatment</process:parameterType>
      </process:Input>
    </profile:hasInput>
    <profile:hasInput>
      <process:Input rdf:ID="SetUpCostAndHealingPlan_PhysicianID">
        <rdfs:label>SetUpCostAndHealingPlan_PhysicianID</rdfs:label>
        <process:parameterType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/ontology/HospitalPhysicianOntology.owl#PhysicianID</process:parameterType>
      </process:Input>
    </profile:hasInput>
  </profile:Profile>
  <process:AtomicProcess rdf:about="#SetUpCostAndHealingPlanProcess">
    <rdfs:label>SetUpCostAndHealingPlanProcess</rdfs:label>
    <process:hasInput rdf:resource="#SetUpCostAndHealingPlan_Diagnosis"/>
    <process:hasInput rdf:resource="#PatientTransport_PatientGpsPosition"/>
    <process:hasInput rdf:resource="#SetUpCostAndHealingPlan_RequiredDrugs"/>
    <process:hasInput rdf:resource="#UpdatePatientMedicalRecords_Treatment"/>
    <process:hasInput rdf:resource="#SetUpCostAndHealingPlan_TreatmentDateTime"/>
    <process:hasOutput rdf:resource="#SetUpCostAndHealingPlan_CostAndHealingPlan"/>
    <process:hasInput rdf:resource="#SetUpCostAndHealingPlan_PatientName"/>
    <service:describes rdf:resource="#SetUpCostAndHealingPlanService"/>
    <process:hasInput rdf:resource="#SetUpCostAndHealingPlan_PhysicianID"/>
    <process:hasOutput rdf:resource="#UpdatePatientMedicalRecords_Acknowledgement"/>
    <process:hasInput rdf:resource="#SetUpCostAndHealingPlan_PatientHealthInsuranceNumber"/>
	<process:hasPrecondition>
		<expr:SWRL-Condition rdf:ID="Authorization">
			<expr:expressionLanguage rdf:resource="http://www.daml.org/services/owl-s/1.1/generic/Expression.owl#SWRL"/>
			<expr:expressionBody rdf:parseType="Literal">
				<swrl:AtomList>
					<rdf:first>
						<swrl:ClassAtom>
							<swrl:classPredicate rdf:resource="http://127.0.0.1/ontology/core-plus-office.owl#Authorized"/>
							<swrl:argument1 rdf:resource="#SetUpCostAndHealingPlan_PhysicianID"/>
						</swrl:ClassAtom>
					</rdf:first>
					<rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
				</swrl:AtomList>
			</expr:expressionBody>
		</expr:SWRL-Condition>
	</process:hasPrecondition>
	<process:hasResult>
	  <process:Result rdf:ID="AuthorizeTreatment">
	    <process:inCondition>
          <expr:SWRL-Condition rdf:ID="CostAndHealingPlanAccepted">
            <expr:expressionBody rdf:parseType="Literal">
              <swrl:AtomList>
                <rdf:first>
                    <swrl:ClassAtom>
                        <swrl:classPredicate rdf:resource="http://127.0.0.1/ontology/ontosem.owl#Accepted"/>
                        <swrl:argument1 rdf:resource="#SetUpCostAndHealingPlan_CostAndHealingPlan"/>
                    </swrl:ClassAtom>
                </rdf:first>
                <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
              </swrl:AtomList>
            </expr:expressionBody>
          </expr:SWRL-Condition>
        </process:inCondition>
		<process:hasEffect>
			<expr:SWRL-Expression>
				<expr:expressionLanguage rdf:resource="http://www.daml.org/services/owl-s/1.1/generic/Expression.owl#SWRL"/>
				<expr:expressionBody rdf:parseType="Literal">
					<swrl:AtomList>
						<rdf:first>
							<swrl:ClassAtom>
								<swrl:classPredicate rdf:resource="http://127.0.0.1/ontology/core-plus-office.owl#Authorized"/>
								<swrl:argument1 rdf:resource="#UpdatePatientMedicalRecords_Treatment"/>
							</swrl:ClassAtom>
						</rdf:first>
						<rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
					</swrl:AtomList>
				</expr:expressionBody>
			</expr:SWRL-Expression>
		</process:hasEffect>
	  </process:Result>
	</process:hasResult>
  </process:AtomicProcess>
  <grounding:WsdlGrounding rdf:about="#SetUpCostAndHealingPlanGrounding">
    <service:supportedBy rdf:resource="#SetUpCostAndHealingPlanService"/>
    <grounding:hasAtomicProcessGrounding>
      <grounding:WsdlAtomicProcessGrounding rdf:ID="SetUpCostAndHealingPlanAtomicProcessGrounding"/>
    </grounding:hasAtomicProcessGrounding>
  </grounding:WsdlGrounding>
  <grounding:WsdlAtomicProcessGrounding rdf:about="#SetUpCostAndHealingPlanAtomicProcessGrounding">
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_PhysicianID"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_PhysicianID</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_PatientHealthInsuranceNumber"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_PatientHealthInsuranceNumber</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:owlsProcess rdf:resource="#SetUpCostAndHealingPlanProcess"/>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_PatientName"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_PatientName</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlInputMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
    >http://127.0.0.1/wsdl/Setupcostandhealingplan#getUpdatePatientMedicalRecords_AcknowledgementSetUpCostAndHealingPlan_CostAndHealingPlanRequest</grounding:wsdlInputMessage>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#UpdatePatientMedicalRecords_Treatment"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#UpdatePatientMedicalRecords_Treatment</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlOperation>
      <grounding:WsdlOperationRef>
        <grounding:operation rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#getUpdatePatientMedicalRecords_AcknowledgementSetUpCostAndHealingPlan_CostAndHealingPlan</grounding:operation>
        <grounding:portType rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetupcostandhealingplanSoap</grounding:portType>
      </grounding:WsdlOperationRef>
    </grounding:wsdlOperation>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#PatientTransport_PatientGpsPosition"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#PatientTransport_PatientGpsPosition</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_Diagnosis"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_Diagnosis</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlOutputMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
    >http://127.0.0.1/wsdl/Setupcostandhealingplan#getUpdatePatientMedicalRecords_AcknowledgementSetUpCostAndHealingPlan_CostAndHealingPlanResponse</grounding:wsdlOutputMessage>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_TreatmentDateTime"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_TreatmentDateTime</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlDocument rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
    >http://127.0.0.1/wsdl/SetUpCostAndHealingPlan_service.wsdl</grounding:wsdlDocument>
    <grounding:wsdlOutput>
      <grounding:WsdlOutputMessageMap>
        <grounding:owlsParameter rdf:resource="#UpdatePatientMedicalRecords_Acknowledgement"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#UpdatePatientMedicalRecords_Acknowledgement</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlOutputMessageMap>
    </grounding:wsdlOutput>
    <grounding:wsdlInput>
      <grounding:WsdlInputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_RequiredDrugs"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_RequiredDrugs</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlInputMessageMap>
    </grounding:wsdlInput>
    <grounding:wsdlOutput>
      <grounding:WsdlOutputMessageMap>
        <grounding:owlsParameter rdf:resource="#SetUpCostAndHealingPlan_CostAndHealingPlan"/>
        <grounding:wsdlMessagePart rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI"
        >http://127.0.0.1/wsdl/Setupcostandhealingplan#SetUpCostAndHealingPlan_CostAndHealingPlan</grounding:wsdlMessagePart>
        <grounding:xsltTransformationString>None (XSL)</grounding:xsltTransformationString>
      </grounding:WsdlOutputMessageMap>
    </grounding:wsdlOutput>
  </grounding:WsdlAtomicProcessGrounding>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#HealthInsuranceNumber"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#GpsPosition"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#PhysicianID"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#PersonName"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#CostAndHealingPlan"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#Drug"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#Acknowledgement"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#DateTime"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#Treatment"/>
  <owl:Class rdf:about="/ontology/HospitalPhysicianOntology.owl#Diagnosis"/>
</rdf:RDF>
