OwS Tutorial: Defining a Terminology

Aus CTS2-LE
Version vom 21. September 2016, 17:00 Uhr von Caumanns (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== Motivation == ;Rationale :In OwS terminologies are defined as objects of type ''codesystem''. The semantics of a terminology is defined through the ''codes…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Motivation

Rationale
In OwS 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 objects of type concept. concept objects which are linked as children to the codesystem-object that represents the terminology. concept objects can be nested for setting up hierarchical code systems.
In this lesson you will learn how to define a terminology and link concepts to that terminology.
What you need
You do not need any prior knowledge or experience with OwS to work through this lesson. All you need is MS Word with the OwS macro installed.
Example
Throughout part 1 and 2 of the OwS tutorial a simple story board will be used in order to motivate the set up of the examples:
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.

Defining a codesystem Object

As each OwS object a newly defined terminology must be given a name which is used for referencing that object within the OwS document. Object names must be unique within an OwS 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 OwS 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 "OwS.dotm" Template. This template already contains a set of predefined style sheets with names all starting with "OwS".
  • In a new paragraph – formatted using the style sheet “OnloDL” - write the OwS statement "define" followed by the type of object to be defined and the name of the object to be defined:
    • In OwS 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 "OwS", 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 “OwS” style sheet.

The code snippet below shows how the terminology definition for the sample storyboard looks like:


Style Sheet      Text      Comment
OwS

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.
OwS
URN http://hospital.com/placeofstay
Version 0.1

Set the values of the object's properties "URN" and "Version".
OwS

}

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 OwS 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
OwS

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.
OwS
URN http://hospital.com/placeofstay
Version 0.1

Set the values of the object's properties "URN" and "Version".
OwS

    define concept (cardiologic clinic) {
        define concept (ward 51.1) { }
        define concept (ward 51.2) { }
    }

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".
OwS

    define concept (orthopedic clinic) {
        define concept (ward 52.1) { }
    }

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".
OwS

}

Close the definiton scope of the object "Clinics and Wards".

Object Names vs. Strings

The properties URI and Version of a codesystem object are defined as strings. Many more properties including the definition of a concept (see next lesson) are defined as strings, too. As OwS is designed to capture existing documents or to define code systems as 'ordinary' Word documents, string values are provided as normal text. In contrast to many programing languages, OwS does not force you to put string values in parentheses. This keeps your documents readable even if they are prepared to be processed by OwS.

The drawback of this is that OwS gets no hints if a word or phrase within a Word document is a text or an object name. To solve this issue, OwS keeps track of all objects defined in a documents and for each provided value checks if this value is registered as an object name. Object names defined as a single word may be used as is - there is no need to put them into parenthesis or to mark them otherwise. In cases where an object name is made up from multiple words (e. g. "Clinics and Wards" in the example above) the object name must be put in parentheses.

For further information on this topic see the definition of the OwS name type.