OwS Tutorial: Mapping Properties onto Style Sheets: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K (Custom OwS Style Sheets)
K (Full Example)
 
Zeile 86: Zeile 86:
 
   |<span style="font-family:Courier;font-size:91%">#heading 2 codesystem .Name ( .Version )</span>
 
   |<span style="font-family:Courier;font-size:91%">#heading 2 codesystem .Name ( .Version )</span>
 
   |}
 
   |}
|| || Comment
+
|| || a level 2 headline triggers the definition of a new code system
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS|| ||style="background:#fff588"|  
 
| OwS|| ||style="background:#fff588"|  
Zeile 93: Zeile 93:
 
   |<span style="font-family:Courier;font-size:91%">#heading 3-4 concept .Display ( .Name )</span>
 
   |<span style="font-family:Courier;font-size:91%">#heading 3-4 concept .Display ( .Name )</span>
 
   |}
 
   |}
|| || Comment
+
|| || level 3 and 4 headlines trigger the definition of a new concept. The headline text consists of the concept's display name and its OwS internal name in parentheses (which is also the default for the concept's code).
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS|| ||style="background:#fff588"|  
 
| OwS|| ||style="background:#fff588"|  
Zeile 100: Zeile 100:
 
   |<span style="font-family:Courier;font-size:91%">default Group = EXA</span>
 
   |<span style="font-family:Courier;font-size:91%">default Group = EXA</span>
 
   |}
 
   |}
|| || Comment
+
|| || if the code system is to be uploaded to CTS-LE this default sets the folder in which the code system will be placed.
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS|| ||style="background:#fff588"|  
 
| OwS|| ||style="background:#fff588"|  
Zeile 107: Zeile 107:
 
   |<span style="font-family:Courier;font-size:91%">default Copyright = ($ copyright (c) 2016, Jörg Caumanns</span>
 
   |<span style="font-family:Courier;font-size:91%">default Copyright = ($ copyright (c) 2016, Jörg Caumanns</span>
 
   |}
 
   |}
|| || Comment
+
|| || set the default copyright notice to be linked with newly defined code systems
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Standard|| ||style="background:#fff588"|  
 
| Standard|| ||style="background:#fff588"|  
Zeile 114: Zeile 114:
 
   |<span style="font-family:Arial;font-size:100%"></span>
 
   |<span style="font-family:Arial;font-size:100%"></span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Überschrift 2|| ||style="background:#fff588"|  
 
| Überschrift 2|| ||style="background:#fff588"|  
Zeile 121: Zeile 121:
 
   |<span style="font-family:Arial;font-size:118%">'''T05 Clinics and Wards (0.1)'''</span>
 
   |<span style="font-family:Arial;font-size:118%">'''T05 Clinics and Wards (0.1)'''</span>
 
   |}
 
   |}
|| || Comment
+
|| || A new code system is defined. The scope of the section determines the definition scope of the code system.
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.URI|| ||style="background:#fff588"|  
 
| OwS.URI|| ||style="background:#fff588"|  
Zeile 128: Zeile 128:
 
   |<span style="font-family:Arial;font-size:100%">http://hospital.com/T05</span>
 
   |<span style="font-family:Arial;font-size:100%">http://hospital.com/T05</span>
 
   |}
 
   |}
|| || Comment
+
|| || set the "URI" property of codesystem
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Description|| ||style="background:#fff588"|  
 
| OwS.Description|| ||style="background:#fff588"|  
Zeile 135: Zeile 135:
 
   |<span style="font-family:Times;font-size:100%">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.</span>
 
   |<span style="font-family:Times;font-size:100%">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.</span>
 
   |}
 
   |}
|| || Comment
+
|| || set the "Description" property of the code system
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Überschrift 3|| ||style="background:#fff588"|  
 
| Überschrift 3|| ||style="background:#fff588"|  
Zeile 142: Zeile 142:
 
   |<span style="font-family:Arial;font-size:100%">'''Cardiologic Clinic, Prof. Smyth (cardiologic clinic)'''</span>
 
   |<span style="font-family:Arial;font-size:100%">'''Cardiologic Clinic, Prof. Smyth (cardiologic clinic)'''</span>
 
   |}
 
   |}
|| || Comment
+
|| || A new concept is defined. The scope of the section determines the definition scope of the concept.
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
Zeile 149: Zeile 149:
 
   |<span style="font-family:Arial;font-size:100%">Kardiologische Klinik</span>
 
   |<span style="font-family:Arial;font-size:100%">Kardiologische Klinik</span>
 
   |}
 
   |}
|| || Comment
+
|| || German language designation of the concept
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Definition|| ||style="background:#fff588"|  
 
| OwS.Definition|| ||style="background:#fff588"|  
Zeile 156: Zeile 156:
 
   |<span style="font-family:Times;font-size:100%">''The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.''</span>
 
   |<span style="font-family:Times;font-size:100%">''The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.''</span>
 
   |}
 
   |}
|| || Comment
+
|| || value of the concept's "Definiton" property
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Überschrift 4|| ||style="background:#fff588"|  
 
| Überschrift 4|| ||style="background:#fff588"|  
Zeile 163: Zeile 163:
 
   |<span style="font-family:Arial;font-size:100%">'''''Cardiologic care ward for Women and Children (ward 51.1)'''''</span>
 
   |<span style="font-family:Arial;font-size:100%">'''''Cardiologic care ward for Women and Children (ward 51.1)'''''</span>
 
   |}
 
   |}
|| || Comment
+
|| || a subconcept is defined
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
Zeile 170: Zeile 170:
 
   |<span style="font-family:Arial;font-size:100%">Kardiologische Station für Frauen und Kinder</span>
 
   |<span style="font-family:Arial;font-size:100%">Kardiologische Station für Frauen und Kinder</span>
 
   |}
 
   |}
|| || Comment
+
|| || German language designation of the concept
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Überschrift 4|| ||style="background:#fff588"|  
 
| Überschrift 4|| ||style="background:#fff588"|  
Zeile 177: Zeile 177:
 
   |<span style="font-family:Arial;font-size:100%">'''''Cardiologic care ward for Intensive Care (ward 51.2)'''''</span>
 
   |<span style="font-family:Arial;font-size:100%">'''''Cardiologic care ward for Intensive Care (ward 51.2)'''''</span>
 
   |}
 
   |}
|| || Comment
+
|| || another subconcept is defined
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
Zeile 184: Zeile 184:
 
   |<span style="font-family:Arial;font-size:100%">Kardiologische Intensivstation</span>
 
   |<span style="font-family:Arial;font-size:100%">Kardiologische Intensivstation</span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Überschrift 3|| ||style="background:#fff588"|  
 
| Überschrift 3|| ||style="background:#fff588"|  
Zeile 191: Zeile 191:
 
   |<span style="font-family:Arial;font-size:100%">'''Orthopedic Clinic, Prof. Miller (orthopedic clinic)'''</span>
 
   |<span style="font-family:Arial;font-size:100%">'''Orthopedic Clinic, Prof. Miller (orthopedic clinic)'''</span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
Zeile 198: Zeile 198:
 
   |<span style="font-family:Arial;font-size:100%">Orthopädische Klinik</span>
 
   |<span style="font-family:Arial;font-size:100%">Orthopädische Klinik</span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Definition|| ||style="background:#fff588"|  
 
| OwS.Definition|| ||style="background:#fff588"|  
Zeile 205: Zeile 205:
 
   |<span style="font-family:Times;font-size:100%">''The Orthopedic Clinic (Head: Prof. Miller) takes responsibility for all interventions and therapies related to knee and hip problems.''</span>
 
   |<span style="font-family:Times;font-size:100%">''The Orthopedic Clinic (Head: Prof. Miller) takes responsibility for all interventions and therapies related to knee and hip problems.''</span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Überschrift 4|| ||style="background:#fff588"|  
 
| Überschrift 4|| ||style="background:#fff588"|  
Zeile 212: Zeile 212:
 
   |<span style="font-family:Arial;font-size:100%">'''''Orthopedic care ward for knee and hip patients (ward 52.1)'''''</span>
 
   |<span style="font-family:Arial;font-size:100%">'''''Orthopedic care ward for knee and hip patients (ward 52.1)'''''</span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
 
| OwS.Designation[Language=de]|| ||style="background:#fff588"|  
Zeile 219: Zeile 219:
 
   |<span style="font-family:Arial;font-size:100%">Orthopädische Station für Knie- und Hüft-Patienten</span>
 
   |<span style="font-family:Arial;font-size:100%">Orthopädische Station für Knie- und Hüft-Patienten</span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Standard|| ||style="background:#fff588"|  
 
| Standard|| ||style="background:#fff588"|  
Zeile 226: Zeile 226:
 
   |<span style="font-family:Arial;font-size:100%"></span>
 
   |<span style="font-family:Arial;font-size:100%"></span>
 
   |}
 
   |}
|| || Comment
+
|| ||  
 
|}
 
|}
 
<hr>
 
<hr>

Aktuelle Version vom 25. November 2016, 19:18 Uhr

Motivation

Rationale
In lesson 3 the OwS #heading directive was introduced as a means for deriving OwS object hierarchies from MS Word style sheets. Nevertheless we were still forced to place all property definitions into table which not only gives an OwS document a very artificial style but even requires a full restructuring of existing specification documents which you may want to turn into OwS documents.
In this lesson you will learn how to assign property values by means of custom style sheets. By this OwS definitions look like prosa text which makes them more readable and gives you more flexibility in applying any layout to your OwS documents.
What you need
You should have worked through lesson 3 of this tutorial in order to have a basic understanding on how OwS utilizes MS Word styles sheets. Beside this you need your MS Word with the OwS macro installed.
Example
This example builds upon the example introduced in Lesson 1 which again implements a simple story board:
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.

Custom OwS Style Sheets

The use of custom style sheets follows a very simple rule:

"Any text that is formatted using a stylesheet named OwS.XYZ within the definition scope of a concept A is considered as the value of the property XYZ of the concept A."

E.g. if we want to get rid of the tables for setting the value of the Definition property of a concept, we only need to define a custom style sheet OwS.Definition and format the definition text of the concept with that style sheet.

Style Sheet   Text   Comment
Überschrift 3
Cardiologic Clinic, Prof. Smyth (cardiologic clinic)
assuming that a #heading directive is defined for heading level 3: define a new concept and open its definition space
OwS.Definition
The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.
set the value of the property "Definition"

Defining a Custom Style Sheet

Defining a Style Sheet.png

The definiton of a custom style sheet is done by using existing MS Word features:

  • Write a paragraph of text that shall become the vale of a property
  • Mark the text with the mouse and click the right mouse button. A context menu appears.
  • Select the menu item "Formatvorlagen". Another context menu appears. Select "Auswahl als neue Schnellformatvorlage speichern...". A menu appears.
  • In the menu type the name of the style sheet (e.g. OwS.Definition) into the entry field and click "OK".

Now the new style sheet is also available in the styles quick list and can easily be applied to other paragraphs of text.

Putting Qualifiers into Style Names

MS Words does not impose any restrictions on the names of style sheets. Therefore you may as well name a style sheet "OwS.Designation[Language=de][Use=Synonym]" in order to set a paragraph as the value of the Designation property with the language set to German and marking it as a synonym.

Style Sheet   Text   Comment
Überschrift 3
Cardiologic Clinic, Prof. Smyth (cardiologic clinic)
assuming that a #heading directive is defined for heading level 3: define a new concept and open its definition space
OwS.Designation[Language=de]
Kardiologische Klinik
set the value of a Gwrman language designation of the defined concept
OwS.Definition
The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.
set the value of the property "Definition"

Full Example


Style Sheet   Text   Comment
OwS
#heading 2 codesystem .Name ( .Version )
a level 2 headline triggers the definition of a new code system
OwS
#heading 3-4 concept .Display ( .Name )
level 3 and 4 headlines trigger the definition of a new concept. The headline text consists of the concept's display name and its OwS internal name in parentheses (which is also the default for the concept's code).
OwS
default Group = EXA
if the code system is to be uploaded to CTS-LE this default sets the folder in which the code system will be placed.
OwS
default Copyright = ($ copyright (c) 2016, Jörg Caumanns
set the default copyright notice to be linked with newly defined code systems
Standard
Überschrift 2
T05 Clinics and Wards (0.1)
A new code system is defined. The scope of the section determines the definition scope of the code system.
OwS.URI
http://hospital.com/T05
set the "URI" property of codesystem
OwS.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.
set the "Description" property of the code system
Überschrift 3
Cardiologic Clinic, Prof. Smyth (cardiologic clinic)
A new concept is defined. The scope of the section determines the definition scope of the concept.
OwS.Designation[Language=de]
Kardiologische Klinik
German language designation of the concept
OwS.Definition
The Cardiologic Clinic (Head: Prof. Smyth) takes responsibility for all cardiologic interventions and acute care therapies.
value of the concept's "Definiton" property
Überschrift 4
Cardiologic care ward for Women and Children (ward 51.1)
a subconcept is defined
OwS.Designation[Language=de]
Kardiologische Station für Frauen und Kinder
German language designation of the concept
Überschrift 4
Cardiologic care ward for Intensive Care (ward 51.2)
another subconcept is defined
OwS.Designation[Language=de]
Kardiologische Intensivstation
Überschrift 3
Orthopedic Clinic, Prof. Miller (orthopedic clinic)
OwS.Designation[Language=de]
Orthopädische Klinik
OwS.Definition
The Orthopedic Clinic (Head: Prof. Miller) takes responsibility for all interventions and therapies related to knee and hip problems.
Überschrift 4
Orthopedic care ward for knee and hip patients (ward 52.1)
OwS.Designation[Language=de]
Orthopädische Station für Knie- und Hüft-Patienten
Standard