OwS Statement: Base Types

Aus CTS2-LE
Zur Navigation springen Zur Suche springen

Syntax

Property := PropertyName PropertyQualifier*  
PropertyName := Name
PropertyQualifier := [ PropertyName = Name ]
StyleName := Name
TypeName := codesystem
| system
| concept
| predicate
| property
| type
Name := SimpleName
| SilentName
| ( TextNoParentheses )
Mask := DottedPropertyName? ( Separator DottedPropertyName? )*
DottedPropertyName := . PropertyName
SimpleName := StartLetter LettersAndDigits*
SilentName := _ SimpleName
StartLetter := [A-Z] | [0-9] | ä | ö | ü | Ä | Ö | Ü
LettersAndDigits := - | _ | ß | *
Separator := TextNoDots
Text := any kind of text
TextNoParentheses := any kind of text that must not contain "(" or ")"
TextNoDots := any kind of text that must not contain "."


Description

Names in OwS

In order to allow for processing existing MS Word texts, OwS does allow for any kind of text as an OwS name. E.g. when parsing a headline as an object definiton, you may want to use the headline text as the name of the newly defined object. If OwS was to rigid with respect to name syntax, you wold have to rewrite your text such that all affected headline comply to this syntax. In order to provide this flexibility, OwS allows for two notations for OwS names:

  • if an object name is just a single word, there is nothing to consider; just write down that word whenever you want to refer to the object
  • in an object's name consists of multiple words or includes special characters, the name must be put in parentheses.

When writing a directive it is a good choice to always use parentheses unless you are sure that all object names processed by this directive consist of single words only. E.g. a directive for changing the syntax of object relationship definitions

#pattern Predicate => %p : %t => --%p--> %t

would fail if the predicate name or the target object name concsists of multiple words (e.g. for a predicate named "is conatined in"). Therefore it is more safe to write:

#pattern Predicate => %p : %t => --(%p)--> (%t)

Embedding Concept References

When setting the Definition property of a concept, the given value may include references to conceots within the same or any other code system. The syntax for this is:


EmbeddedConceptReference := [[ ObjectName TextToBeShown? ]]  
| [[ ObjectName @ CodesystemName TextToBeShown? ]] for external code systems the ObjectName shall be the code of the concept that is referenced
TextToBeShown := any text

By default OwS replaces an embedded concept reference with a HMTL hyperlink that refers to the CTS2-LE page if the referenced object. In addition a tooltip is created that shows the value of the concept's Tooltip property. If no such property is defined for the concept, the concept's display name is used as a tooltip. For each embedded concept reference a seeAlso concept reference will be generated that points from the reference's source concept to it's target concept.

Example

define codesystem cs {
  define concept a {
    set me.Tooltip = ($ I am a concept  
    define concept b {
      set me.Definition = ($ this concept is a child of [[a | concept a]]
    }
  }
}

In this example a hyperlink with "concept a" an its anchir will be rendered into the definition text of concept b that points to concept a. A tooltip saying "I am a concept" is shown whenever the user hoovers over the hyperlink. In addition a seeAlso concept reference will be generated that points from concept b to concept a.

Silent Names

By default OwS considers all defined codesystems, concepts and properties with the generated FHIR resources. There may be scenarios where you may just want to use an object within your OwS file but don't want this object to be included with the generated code systems. E.g. there may be a need to define a special property on concepts that is only used for filtering a terminology into a value set (e.g. set me.Concepts = terminology.Concepts[Scale=kg] for creating a value set that only contains the concepts of a code system "terminology" that are measured as kilo grams). If you don't want an object to appear in the final OwS output, you shall use a SilentName which is just an ordinary object name that starts with an underscore ("_"). E.g. in the example above, if you would have defined the custom property with a name of "_Scale" instead of "Scale", it would not be addedd as a property to the FHIR resource that is assempled for the code system named "terminology".

Silent names can be used for all types of OwS objects. The table below shows, how OwS processes silent name for the defined kinds of objects:

Object Type Behavior for Silent Names
codesystem The code system is set as "experimental". Per FHIR experimental code systems are just for testing and not for "real" use.
concept The concept is set as "abstract". Per FHIR abstract concepts' codes may not be used as "real" concepts.
property Properties with silent names are not considered for the FHIR resource generation.
predicate Predicates with silent names are not considered for the FHIR resource generation.

Examples

Example 1


Style Sheet      Text      Comment
OwS define concept Cardiology { "Cardiology" is a SimpleName and therefore needs no parentheses
OwS    set me.Code = D-34 "D-34" is another SimpleName
OwS    set me.Display = (Cardiology Department) "Cardiology Department" contains a space character and therefore must be put in parenthesis to be considered as a single nyme by the OwS interpreter.
OwS    set me.Designation[Language=de] = Kardiologie "Kardiologie" again is a SimpleName
OwS } Comment

Example 2


Style Sheet      Text      Comment
OwS define concept (Cardiology Department){ Concept name must be put in parentheses in order to signal the OwS interperter that both words ("Cardiology" and "Department") together make up the concept name.
OwS    set me.Code = (D.34) Again parentheses are needed, because SimpleName does not allow for dots in names
OwS    set me.Display = ($ Cardiology (Prof. Sommer) The property value is a string and includes parentheses: in this case only "($" as a prexif can be used
OwS    set me.Designation[Language=de] = ($ Kardiologie (Prof. Sommer) see above
OwS } Comment