OntoDL Statement: Base Types

Aus CTS2-LE
Zur Navigation springen Zur Suche springen

Syntax

PropertyName := Name  
StyleName := Name
TypeName := codesystem
| system
| concept
| predicate
| property
| type
Name := SimpleName
| SilentName
| ( TextNoParentheses )
Mask := DottedPropertyName? ( Separator DottedPropertyName? )*
DottedPropertyName := . PropertyName
SimpleName := StartLetter LettersAndDigits*
SilenteName := _ 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 OntoDL

In order to allow for processing existing MS Word texts, OntoDL does allow for any kind of text as an OntoDL 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 OntoDL 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, OntoDL allows for two notations for OntoDL 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)

Silent Names

By default OntoDL 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 OntoDL 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 OntoDL 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 OntoDL objects. The table below shows, how OntoDL 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
OntoDL define concept Cardiology { "Cardiology" is a SimpleName and therefore needs no parentheses
OntoDL    set me.Code = D-34 "D-34" is another SimpleName
OntoDL    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 OntoDL interpreter.
OntoDL    set me.Designation[Language=de] = Kardiologie "Kardiologie" again is a SimpleName
OntoDL } Comment

Example 2


Style Sheet      Text      Comment
OntoDL define concept (Cardiology Department){ Concept name must be put in parentheses in order to signal the OntoDL interperter that both words ("Cardiology" and "Department") together make up the concept name.
OntoDL    set me.Code = (D.34) Again parentheses are needed, because SimpleName does not allow for dots in names
OntoDL    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
OntoDL    set me.Designation[Language=de] = ($ Kardiologie (Prof. Sommer) see above
OntoDL } Comment