This document describes the OWL ontology for FHIR Resources represented in RDF.
The detailed list of changes and their diffs can be found in the Git repository.
The Ontology is the formal statement of the intended structure of the individual resources (instances) when exchanged and at rest. The resource instance represented in OWL and formatted in Turtle must be consistent with the ontology.
The Ontology defines Classes, Object Properties, Data Properties, Datatypes and Annotation Properties.
The ontology is based on the implicit structures defined in FHIR and is separated into Structural Definition and ValueSet mappings to OWL.
url Σ1..1uriAbsolute URL used to reference this StructureDefinition
identifier Σ0..*IdentifierOther identifiers for the StructureDefinition
version Σ0..1stringLogical id for this version of the StructureDefinition
name Σ1..1stringInformal name for this StructureDefinition
display Σ0..1stringUse this name when displaying the value
status ?! Σ1..1codedraft | active | retired ConformanceResourceStatus (Required)
experimental Σ0..1booleanIf for testing purposes, not real usage
publisher Σ0..1stringName of the publisher (Organization or individual)
contact Σ0..*BackboneElementContact details of the publisher
name Σ0..1stringName of a individual to contact
telecom Σ0..*ContactPointContact details for individual or publisher
date Σ0..1dateTimeDate for this version of the StructureDefinition
description Σ0..1stringNatural language description of the StructureDefinition
useContext Σ0..*CodeableConceptContent intends to support these contexts Context of Use ValueSet (Extensible)
requirements 0..1stringScope and Usage this structure definition is for
copyright 0..1stringUse and/or publishing restrictions
code Σ0..*CodingAssist with indexing and finding Structure Definition Codes (Example)
fhirVersion Σ0..1idFHIR Version this StructureDefinition targets
mapping
I0..*BackboneElementExternal
specification that the content is mapped to
Must have at a name or a uri (or both)
identity 1..1idInternal id when this mapping is used
uri I0..1uriIdentifies what this mapping refers to
name I0..1stringNames what this mapping refers to
comments 0..1stringVersions, Issues, Scope limitations etc.
kind Σ1..1codedatatype | resource | logical StructureDefinitionKind (Required)
constrainedType Σ I0..1codeAny datatype or resource, including abstract ones FHIRDefinedType (Required)
abstract Σ1..1booleanWhether the structure is abstract
contextType Σ I0..1coderesource | datatype | mapping | extension ExtensionContext (Required)
context Σ I0..*stringWhere the extension can be used in instances
base Σ I0..1uriStructure that this set of constraints applies to
This is just a container for the elements for snapshot.(TBD - define the transformation for Snapshot Elements)
element I1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)
See Element definitiion below
This is just a container for the elemnts for differential (TBD - define the transformation for Differential Elements)
element 1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)
A FHIR Element Definition corresponds to an RDF/OWL Class and associated Object Properties and Data Properties
ericP proposes using logical tables instead of XML notation:
<?xml version="1.0" encoding="UTF-8"?> <StructureDefinition xmlns="http://hl7.org/fhir"> <id value="example"/> <text> --- </text> <url value="http://hl7.org/fhir/StructureDefinition/example"/> <name value="Example Lipid Profile"/> <publisher value="Grahame Grieve"/> <contact> <telecom> <system value="url"/> <value value="grahame@healthintersections.com.au"/> </telecom> </contact> <description value="Describes how the lab report is used for a standard Lipid Profile - Cholesterol, Triglyceride and Cholesterol fractions. Uses LOINC codes"/> <status value="draft"/> <date value="2012-05-12"/> <type value="constraint"/> <abstract value="false"/> <snapshot> <element> ------ </element> </snapshot> </StructureDefinition>
The following is the Element Definition for fhir:Reference:
<entry> <fullUrl value="http://hl7.org/fhir/DataElement/Reference"/> <resource> <DataElement> <id value="Reference"/> <meta> <lastUpdated value="2015-12-31T00:38:37.614+00:00"/> </meta> <url value="http://hl7.org/fhir/DataElement/Reference"/> <status value="draft"/> <experimental value="true"/> <stringency value="fully-specified"/> <element> <path value="Reference"/> <short value="A reference from one resource to another"/> <definition value="A reference from one resource to another."/> <min value="0"/> <max value="*"/> <type> <code value="Element"/> </type> <constraint> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-expression"> <valueString value="reference.startsWith("#").not() or ($context.reference.substring(1).log("url") in $resource.contained.id.log("ids"))"/> </extension> <key value="ref-1"/> <severity value="error"/> <human value="SHALL have a local reference if the resource is provided inline"/> <xpath value="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"/> </constraint> <isSummary value="true"/> <mapping> <identity value="rim"/> <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)"/> </mapping> </element> </DataElement> </resource> </entry
<entry> <fullUrl value="http://hl7.org/fhir/DataElement/Reference.display"/> <resource> <DataElement> <id value="Reference.display"/> <meta> <lastUpdated value="2015-12-31T00:38:37.614+00:00"/> </meta> <url value="http://hl7.org/fhir/DataElement/Reference.display"/> <status value="draft"/> <experimental value="true"/> <stringency value="fully-specified"/> <element> <path value="Reference.display"/> <short value="Text alternative for the resource"/> <definition value="Plain text narrative that identifies the resource in addition to the resource reference."/> <comments value="This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it."/> <min value="0"/> <max value="1"/> <type> <code value="string"/> </type> <isSummary value="true"/> <mapping> <identity value="rim"/> <map value="N/A"/> </mapping> </element> </DataElement> </resource> </entry>
### http://hl7.org/fhir/Reference fhir:Reference rdf:type owl:Class ; rdfs:subClassOf fhir:Element , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.link ; owl:allValuesFrom fhir:DomainResource ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.display ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.display ; owl:allValuesFrom fhir:string ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.reference ; owl:allValuesFrom fhir:string ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.reference ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.link ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ; fhir:lastUpdated "2015-12-31T00:38:37.614+00:00"^^xsd:dateTime ; fhir:isSummary "true"^^xsd:boolean ; fhir:experimental "true"^^xsd:boolean ; fhir:concept_definition "A reference from one resource to another" ; fhir:status "draft" ; fhir:stringency "fully-specified" ; fhir:short "A reference from one resource to another" .
The object property restrictions are all defined in the containing element as opposed to FHIR Element definitions.
### http://hl7.org/fhir/Reference.display fhir:Reference.display rdf:type owl:ObjectProperty ; rdfs:domain fhir:Reference ; rdfs:subPropertyOf fhir:objectProperty ; rdfs:range fhir:string .
fhir:id rdf:type owl:Class ; rdfs:subClassOf fhir:Element , [ rdf:type owl:Restriction ; owl:onProperty fhir:value ; owl:allValuesFrom [ rdf:type rdfs:Datatype ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ xsd:pattern "[A- Za -z0-9\\-\\.]{1,64}" ] ) ] ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:value ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; owl:onDataRange xsd:string ] ; rdfs:comment "Any combination of letters, numerals, ‘-' and ‘.’ with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive." .
Decimal has an additional DataProperty fhir:fractionaDigits which allows the explicit declaration of scale.
[ a fhir:decimal ; fhir:value 123.4 ; fhir:fractionalDigits 3 ]
fhir:decimal rdf:type owl:Class ;
rdfs:subClassOf fhir:Element ,
[ rdf:type owl:Restriction ;
owl:onProperty fhir:fractionDigits ;
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
owl:onDataRange xsd:nonNegativeInteger
] ,
[ rdf:type owl:Restriction ;
owl:onProperty fhir:fractionDigits ;
owl:allValuesFrom xsd:nonNegativeInteger
] ,
[ rdf:type owl:Restriction ;
owl:onProperty fhir:value ;
owl:allValuesFrom xsd:decimal
] ,
[ rdf:type owl:Restriction ;
owl:onProperty fhir:value ;
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
owl:onDataRange xsd:decimal
] ;
rdfs:comment "A rational number with implicit precision" .
<substance> <coding> <system value="http://snomed.info/sct"/> <code value="90614001"/> <display value=" beta-lactam (antibiotic)"/> </coding> <text value=" beta-lactam (antibiotic)"/> </substance>
CodeableConcept Structural Definition
< [name] xmlns="http://hl7.org/fhir"> <!-- from Element: extension --> < coding ><!-- 0..* Coding Code defined by a terminology system --></coding> < text value="[ string ]"/><!-- 0..1 Plain text representation of the concept --> </[name]>
Coding Structural Definition
< [name] xmlns="http://hl7.org/fhir"> <!-- from Element: extension --> < system value="[ uri ]"/><!-- 0..1 Identity of the terminology system --> < version value="[ string ]"/><!-- 0..1 Version of the system - if relevant --> < code value="[ code ]"/><!-- 0..1 Symbol in syntax defined by the system --> < display value="[ string ]"/><!-- 0..1 Representation defined by the system --> < primary value="[ boolean ]"/><!-- 0..1 If this code was chosen directly by the user --> </[name]>
fhir:AllergyIntolerance.substance [ rdf:type fhir:CodeableConcept ; fhir:ConceptBase.coding [ rdf:type fhir:CodingBase ; fhir:CodingBase.code [ rdf:type fhir:codeBase ; fhir:value "90614001" ] ; fhir:CodingBase.system [ rdf:type fhir:uri ; fhir:value "http://snomed.info/sct" ] ; fhir:CodingBase.display [ rdf:type fhir:string ; fhir:value "beta-lactam (antibiotic)" ] ] ; fhir:ConceptBase.text [ rdf:type fhir:string ; fhir:value "beta-lactam (antibiotic)" ] ] .
[ rdf:type owl:AllDisjointClasses ; owl:members ( fhir:CodingBase fhir:ConceptBase fhir:codeBase ) ] .
################################################################# # Classes ################################################################# ### http://hl7.org/fhir/ConceptBase fhir:ConceptBase rdf:type owl:Class ; rdfs:subClassOf fhir:Datatype , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.coding ; owl:allValuesFrom fhir:CodingBase ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.text ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.text ; owl:allValuesFrom fhir:string ] . ### http://hl7.org/fhir/CodingBase fhir:CodingBase rdf:type owl:Class ; rdfs:subClassOf fhir:Element , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.system ; owl:allValuesFrom fhir:uri ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.system ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.version ; owl:allValuesFrom fhir:string ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.version ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.code ; owl:allValuesFrom fhir:codeBase ] [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.code ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.display ; owl:allValuesFrom fhir:string ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.display ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.primary ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.primary ; owl:allValuesFrom fhir:boolean ] .
fhir:codeBase rdf:type owl:Class ; rdfs:subClassOf fhir:Element , [ rdf:type owl:Restriction ; owl:onProperty fhir:value ; owl:allValuesFrom xsd:token ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:value ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; owl:onDataRange xsd:token ] .
The concrete subclasses of ConceptBase apply the additional restrictions:
### http://hl7.org/fhir/CodeableConcept fhir:CodeableConcept rdf:type owl:Class ; rdfs:subClassOf fhir:ConceptBase ; rdfs:comment "The set of possible coded values this coding was chosen from or constrained by." .
### http://hl7.org/fhir/Coding fhir:Coding rdf:type owl:Class ; rdfs:subClassOf fhir:ConceptBase , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.text ; owl:maxCardinality "0"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.coding ; owl:cardinality "1"^^xsd:nonNegativeInteger ] .
fhir:code rdf:type owl:Class ; rdfs:subClassOf fhir:ConceptBase , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.coding ; owl:allValuesFrom [ rdf:type owl:Class ; owl:intersectionOf ( fhir:CodingBase [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.code ; owl:cardinality "1"^^xsd:nonNegativeInteger ] [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.display ; owl:maxCardinality "0"^^xsd:nonNegativeInteger ] [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.primary ; owl:maxCardinality "0"^^xsd:nonNegativeInteger ] [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.system ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] [ rdf:type owl:Restriction ; owl:onProperty fhir:CodingBase.version ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] ) ] ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:ConceptBase.coding ; owl:cardinality "1"^^xsd:nonNegativeInteger ] .
### http://hl7.org/fhir/Reference fhir:Reference rdf:type owl:Class ; rdfs:subClassOf fhir:Element , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.reference ; owl:allValuesFrom fhir:string ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.reference ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.display ; owl:allValuesFrom fhir:string ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.display ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.link ; owl:allValuesFrom fhir:DomainResource ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Reference.link ; owl:maxCardinality "1"^^xsd:nonNegativeInteger ] .
Containment is where a resource or container contains other resources.
It applies to Bundle, Contained and Parameters.
One common operation performed with resources is to gather a collection of resources into a single instance with containing context. In FHIR this is referred to as "bundling" the resources together. These resource bundles are useful for a variety of different reasons, including:
<Bundle xmlns="http://hl7.org/fhir"> <id value="bundle-example"/><!-- this example bundle is a search set --> <meta> <lastUpdated value="2014-08-18T01:43:30Z"/> </meta><!-- when the search was executed --> <type value="searchset"/><!-- the base URL of the server is responding to the search --> <base value="http://example.com/base"/><!-- the total number of matches. This is a stupid example - there's a grand total of 3 matches, and we're only going to return the first 1, with a next link, in order to demonstrate what a page link looks like --> <total value="3"/> <link> <relation value="self"/> <url value="https://example.com/base/MedicationPrescription?patient=347&_include=MedicationPrescription.medication"/> </link><!-- now, the link to the next set of results. Note that a big set of results will include prev, first, last links as well as next --> <link> <relation value="next"/> <url value="https://example.com/base/MedicationPrescription?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2"/> </link><!-- now, the actual entries --> <entry> <resource> <MedicationPrescription><!-- the matching resource --> <id value="3123"/> <text> Omitted </text> <patient> <reference value="Patient/347"/> </patient> <medication> <reference value="Medication/example"/> </medication> </MedicationPrescription> </resource> <search><!-- this resource included as a match to the search criteria. Servers are not required to populate this, but should, because there are a few cases where it might be ambiguous whether a resource is added because it's a match or an include --> <mode value="match"/><!-- score. For matches where the criteria are not determinate, e.g. text search on narrative, the server can include a score to indicate how well the resource matches the conditions. Since this search is by patient identifier, there's nothing fuzzy about it, but for example purposes: --> <score value="1"/> </search> </entry> <entry> <resource> <Medication> <id value="example"/> <text> </text> </Medication> </resource><!-- snip --> <search><!-- added because the client asked to include the medications --> <mode value="include"/> </search> </entry> </Bundle>
< Bundle xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <type value="[code]"/><!-- 1..1 document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection --> <total value="[unsignedInt]"/><!-- 0..1 If search, the total number of matches --> <link> <!-- 0..* Links related to this Bundle --> <relation value="[string]"/><!-- 1..1 http://www.iana.org/assignments/link-relations/link-relations.xhtml --> <url value="[uri]"/><!-- 1..1 Reference details for the link --> </link> <entry> <!-- 0..* Entry in the bundle - will have a resource, or information --> <link><!-- 0..* Content as for Bundle.link Links related to this entry --></link> <fullUrl value="[uri]"/><!-- 0..1 Absolute URL for resource (server address, or UUID/OID) --> <resource><!-- 0..1 Resource A resource in the bundle --></resource> <search> <!-- 0..1 Search related information --> <mode value="[code]"/><!-- 0..1 match | include | outcome - why this is in the result set --> <score value="[decimal]"/><!-- 0..1 Search ranking (between 0 and 1) --> </search> <request> <!-- 0..1 Transaction Related Information --> <method value="[code]"/><!-- 1..1 GET | POST | PUT | DELETE --> <url value="[uri]"/><!-- 1..1 URL for HTTP equivalent of this entry --> <ifNoneMatch value="[string]"/><!-- 0..1 For managing cache currency --> <ifModifiedSince value="[instant]"/><!-- 0..1 For managing update contention --> <ifMatch value="[string]"/><!-- 0..1 For managing update contention --> <ifNoneExist value="[string]"/><!-- 0..1 For conditional creates --> </request> <response> <!-- 0..1 Transaction Related Information --> <status value="[string]"/><!-- 1..1 Status return code for entry --> <location value="[uri]"/><!-- 0..1 The location, if the operation returns a location --> <etag value="[string]"/><!-- 0..1 The etag for the resource (if relevant) --> <lastModified value="[instant]"/><!-- 0..1 Server's date time modified --> </response> </entry> <signature><!-- 0..1 Signature Digital Signature --></signature> </Bundle>
### http://hl7.org/fhir/Bundle fhir:Bundle rdf:type owl:Class ; rdfs:subClassOf fhir:Resource , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.total ; owl:onClass fhir:unsignedInt ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.entry ; owl:allValuesFrom fhir:Bundle.Entry ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.signature ; owl:onClass fhir:Signature ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.type ; owl:onClass fhir:code ; owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.link ; owl:allValuesFrom fhir:Bundle.Link ] . ### http://hl7.org/fhir/Bundle.Entry fhir:Bundle.Entry rdf:type owl:Class ; rdfs:subClassOf fhir:BackboneElement , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.Entry.search ; owl:onClass fhir:Bundle.Search ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.Entry.link ; owl:onClass fhir:Bundle.Link ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.Entry.resource ; owl:onClass fhir:Resource ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Bundle.Entry.fullURI ; owl:onClass fhir:uri ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ] .
### http://hl7.org/fhir/index fhir:index rdf:type owl:DatatypeProperty ; rdfs:range fhir:index-primitive . ### http://hl7.org/fhir/index-primitive fhir:index-primitive rdf:type rdfs:Datatype ; owl:equivalentClass [ rdf:type rdfs:Datatype ; owl:onDatatype xsd:integer ; owl:withRestrictions ( [ xsd:minInclusive 1 ] ) ] . ### http://hl7.org/fhir/Element fhir:Element rdf:type owl:Class ; rdfs:label "Element" ; rdfs:subClassOf [ rdf:type owl:Restriction ; owl:onProperty fhir:Element.extension ; owl:someValuesFrom fhir:Extension ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:Element.id ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; owl:onDataRange fhir:id-primitive ] , [ rdf:type owl:Restriction ; owl:onProperty fhir:index ; owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; owl:onDataRange fhir:index-primitive ] ; rdfs:comment "The base element used for all FHIR elements and resources - allows for them to be extended with extensions" . .
Where object properties need to be ordered to construct the sequence of properties in XML, the fhir:index is defined as an annotation property on the Object Property. The example of ordered properties inside CodingBase is shown:
### http://hl7.org/fhir/index fhir:index rdf:type owl:AnnotationProperty .
### http://hl7.org/fhir/CodingBase.system fhir:CodingBase.system rdf:type owl:ObjectProperty ; fhir:index 1 ; ### http://hl7.org/fhir/CodingBase.version fhir:CodingBase.version rdf:type owl:ObjectProperty ; fhir:index 2 . ### http://hl7.org/fhir/CodingBase.code fhir:CodingBase.code rdf:type owl:ObjectProperty ; fhir:index 3 . ### http://hl7.org/fhir/CodingBase.display fhir:CodingBase.display rdf:type owl:ObjectProperty ; fhir:index 4 ; ### http://hl7.org/fhir/CodingBase.primary fhir:CodingBase.primary rdf:type owl:ObjectProperty ; fhir:index 5 ;
The example shows a ‘profile” ontology restricting the Valueset of Substance:
The AllergyIntolerance Resource is declared again inside the Profile ontology.
<http://record/AllergyIntolerance/1> rdf:type <http://PatientSafetyProfile/AllergyIntolerance>, owl:NamedIndividual ;
profile:AllergyIntolerance.substance is defines a restriction to be applied to the valueset for substance
@prefix profile: <http://PatientSafetyProfile/> . ### http://PatientSafetyProfile/AllergyIntolerance profile:AllergyIntolerance rdf:type owl:Class ; rdfs:subClassOf fhir:AllergyIntolerance , [ rdf:type owl:Restriction ; owl:onProperty <http://hl7.org/fhir/AllergyIntolerance/AllergyIntolerance.substance> ; owl:allValuesFrom profile:substance-type ] .
The valueset definition applies:
### http://PatientSafetyProfile/substance-type <http://PatientSafetyProfile/substance-type> rdf:type owl:Class ; rdfs:subClassOf fhir:ValueSets , [ rdf:type owl:Class ; owl:unionOf ( <http://snomed.info/id/105590001> <http://snomed.info/id/373873005> ) ] .