OntoDL Tutorial: Defining a Terminology: Unterschied zwischen den Versionen
(→Defining a codesystem Object) |
|||
| Zeile 18: | Zeile 18: | ||
The code snippet below shows how the terminology definition for the sample storyboard looks like: | The code snippet below shows how the terminology definition for the sample storyboard looks like: | ||
| − | < | + | <hr> |
| − | + | {|border="0" cellspacing="0" cellpadding="5" | |
| − | |||
| − | {|border = " | ||
| − | |||
| − | |||
|- | |- | ||
| − | |Version | + | !! style="text-align:left" | Style Sheet !! !! style="text-align:left" style="width:25%" | Text !! !! style="text-align:left" | ''Comment'' |
| − | | 0.1 | + | |- |
| + | || OntoDL || || style="background:#fff588"| | ||
| + | <font face="courier">define codesystem (Clinics and Wards) {</font> | ||
| + | || || ''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 || || style="background:#fff588"|<font face="courier"> | ||
| + | {|border = "1" cellspacing="0" cellpadding="4" | ||
| + | |URN | ||
| + | | http://hospital.com/placeofstay | ||
| + | |- | ||
| + | |Version | ||
| + | | 0.1 | ||
| + | |} | ||
| + | </font> | ||
| + | || || ''Set the values of the object's properties "URN" and "Version".'' | ||
| + | |- | ||
| + | || OntoDL || ||style="background:#fff588"| | ||
| + | <font face="courier">}</font> | ||
| + | || || Close the definiton scope of the object "Clinics and Wards". | ||
|} | |} | ||
| − | + | <hr> | |
| − | |||
| − | < | ||
== Adding ''concept'' Objects to the Terminology == | == Adding ''concept'' Objects to the Terminology == | ||
Version vom 30. August 2016, 15:13 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. define codesystem (Clinics and Wards) { URN http://hospital.com/placeofstay
Version 0.1 Description This terminology lists all clinics and wards of the ABC-hospital. All internal IT-Systems shall dynamically load information about clinics and wards from this terminology.
define concept (cardiologic clinic) { define concept (ward 51.1) define concept (ward 51.2) } define concept (orthopedic clinic) { define concept (ward 52.1) } }