OntoDL Tutorial: Defining a Terminology: Unterschied zwischen den Versionen
(→Adding concept Objects to the Terminology) |
K (→Adding concept Objects to the Terminology) |
||
| Zeile 72: | Zeile 72: | ||
<font face="courier"> | <font face="courier"> | ||
define concept (cardiologic clinic) {<br> | define concept (cardiologic clinic) {<br> | ||
| − | define concept (ward 51.1)<br> | + | define concept (ward 51.1) { }<br> |
| − | define concept (ward 51.2)<br> | + | define concept (ward 51.2) { }<br> |
} | } | ||
</font> | </font> | ||
| Zeile 81: | Zeile 81: | ||
<font face="courier"> | <font face="courier"> | ||
define concept (orthopedic clinic) {<br> | define concept (orthopedic clinic) {<br> | ||
| − | define concept (ward 52.1)<br> | + | define concept (ward 52.1) { }<br> |
}<br> | }<br> | ||
</font> | </font> | ||
Version vom 8. September 2016, 18:07 Uhr
Storyboard: In order to foster semantic interoperability among its IT-systems a hospital wants to define unique terminologies for its clinics. Each clinic and each ward shall be assigned a unique code that shall be used throughout all IT-systems for referring to that clinic or ward.
In OntoDL terminologies are defined as objects of type codesystem. The semantics of a terminology is defined through the codesystem object's properties. Concepts within the terminology are defined as concept-objects which are linked as children to the codesystem-object that represents the terminology.
Defining a codesystem Object
As each OntoDL object a newly defined terminology must be given a name which is used for referencing that object within the OntoDL document. Object names must be unique within an OntoDL document. Additionally each terminology must be assigned an OID or/and a URN. This is a globally unique identifier that is used for identifying and referencing the terminology outside the closed scope of an OntoDL document.
For the example storyboard sketched above, we first create a terminology "Clinics and Wards" that will contain a hierarchical list of all clinics and wards within the hospital. For this the following steps must be taken:
- Open a new MS Word Document using the "OntoDL.dotm" Template. This template already contains a set of predefined style sheets with names all starting with "OntoDL".
- In a new paragraph – formatted using the style sheet “OnloDL” - write the OntoDL statement "define" followed by the type of object to be defined and the name of the object to be defined:
- In OntoDL terminologies and value sets have the type "codesystem"
- Object names may consist of multiple words. For the interpreter to recognize that these words together make up the object name, they have to be put in parentheses.
- All further information about the terminology is provided within a pair of curly brackets ("{" "}"). These brackets have to be formatted as "OntoDL", too.
- Part of this information is the definition of descriptive attributes about the terminology. While the provisioning of an OID or URN is mandatory, there are several other attributes that are optional and should only be given when needed. For the example we want to provide information about the version of the terminology.
- For defining the attribute values a two-column table is placed into the definition scope of the codesystem-object which is delimited by the curly braces. The first column of the table gives the name of the attribute while the second gives the attribute value. Both columns must be formatted using the “OntoDL” style sheet.
The code snippet below shows how the terminology definition for the sample storyboard looks like:
| Style Sheet | Text | Comment | ||||||
|---|---|---|---|---|---|---|---|---|
| OntoDL |
define codesystem (Clinics and Wards) { |
Create a new codesystem object named "Clinics and Wards". The curly bracket opens the object's definiton scope. Everything defined in this scope is linked with the object. | ||||||
| OntoDL |
|
Set the values of the object's properties "URN" and "Version". | ||||||
| OntoDL |
} |
Close the definiton scope of the object "Clinics and Wards". |
Adding concept Objects to the Terminology
In a next step concepts can be added to the terminology. Each concept is an OntoDL object. The object's definition follows the same principles and syntax as the definition of the terminology. Again curly brackets are used to delimiter the scope of a concept definition. Concept hierarchies can be set up by placing a concept within the definition scope of another concept.
The code below shows how a hierarchy of clinics and wards can be defined. In the example there are no further attributes defined for the concepts, because the only mandatory attribute – the code of the concept – defaults to the concept name which is stated in the object definition.
| Style Sheet | Text | Comment | ||||||
|---|---|---|---|---|---|---|---|---|
| OntoDL |
define codesystem (Clinics and Wards) { |
Create a new codesystem object named "Clinics and Wards". The curly bracket opens the object's definiton scope. Everything defined in this scope is linked with the object. | ||||||
| OntoDL |
|
Set the values of the object's properties "URN" and "Version". | ||||||
| OntoDL |
define concept (cardiologic clinic) { |
Create a new concept object named "cardiologic clinic". Because the object is defined inside the definition scope of the codesystem object "Clinics and Wards" it is assigned as a child to the respective code system. Within the definition scope of "cardiologic clinic" two concept objects "ward 51.1" and "ward 51.2" are defined. These are assigned as children (sub-concepts) to "cardiologic clinic". | ||||||
| OntoDL |
define concept (orthopedic clinic) { |
Create a new concept object named "orthopedic clinic" as a child of the codesystem object "Clinics and Wards". Within the definition scope of "orthopedic clinic" a concept object "ward 52.1" is defined. This concept is assigned as a child (sub-concept) to "orthopedic clinic". | ||||||
| OntoDL |
} |
Close the definiton scope of the object "Clinics and Wards". |