OntoDL Statement: define: Unterschied zwischen den Versionen
(→Full Definitions) |
(→Full Definitions) |
||
| Zeile 114: | Zeile 114: | ||
|} | |} | ||
| − | === Full | + | === Full Definition === |
| + | The OntoDL full definition syntax is applicable to all types of objects. A full definition consists of a sequence of OnotDL statements within a definition scope that is confided by curly brackets. A full definition may be empty; in that case it only consists of a pair of curly brackets. | ||
| + | The example below shows a full definion of a code system "animals" that consists of different kinds of OntoDL statements to define the semantics and content of the code system. The included concept "mouse" is not further defined as its definition scope is empty. | ||
<pre>define codesystem animals { | <pre>define codesystem animals { | ||
default Language = en | default Language = en | ||
| Zeile 125: | Zeile 127: | ||
} | } | ||
</pre> | </pre> | ||
| + | |||
| + | A special way for setting property values to an object is to place a MS Word table with two columns into the definition scope. This table holds the name of the property in the first column and the property value in the second column. You may advise the OntoDL interpreter to consider a property value as a string by prefixing it with "($". See the first two lessons of the tutorial for examples of this notation. | ||
=== Qualified Concepts === | === Qualified Concepts === | ||
Version vom 16. September 2016, 17:59 Uhr
Inhaltsverzeichnis
Syntax
| DefinitionStatement | := | define TypeName ObjectName DefinitionBody | ||
| ObjectName | := | Name | ||
| DefinitionBody | := | { FullDefinition * } | ||
| | | = QualifiedConcept | |||
| | | = InternalReference | |||
| Fulldefinition | := | DefineStatement | ||
| | | DefaultStatement | |||
| | | SetStatement | |||
| | | PredicateStatement | |||
| | | SetAsTableStatement | Must be formatted as 2-column MS Word table using style "OntoDL" | ||
| SetAsTableStatement | := | PropertyName ($? Text | The prefix "($" advises the OntoDL interpreter to consider the provided text as a string (which will not be further processed) | |
| | | PropertyName InternalReference | |||
| PropertyName | := | Name |
Description
The define statement is used for introducing a new named object to OntoDL. Upon introduction a new object is given a name and assigned a type. These properties are fixed through the define statement and cannot be changed afterwards. The immediate binding of a new object to a type is important because not only the object's behavior but even the way you may use that object within OntoDL is determined by its type. The table below lists, how you may further define objects of the defined OntoDL types.
| type | definiton | specific behavior |
|---|---|---|
| codesystem | full definition | exported as a FHIR ValueSet resource (or FHIR STU-3 Codesystem resource) |
| system | full definition, internal reference | ID and version information goes into references to external code systems |
| concept | full definition, internal reference, qualified concept | exported as part of a code system unless given a silent name |
| predicate | full definition | exported as concept reference unless given a silent name |
| property | full definition | exported as string reference unless given a silent name |
Full Definition
The OntoDL full definition syntax is applicable to all types of objects. A full definition consists of a sequence of OnotDL statements within a definition scope that is confided by curly brackets. A full definition may be empty; in that case it only consists of a pair of curly brackets.
The example below shows a full definion of a code system "animals" that consists of different kinds of OntoDL statements to define the semantics and content of the code system. The included concept "mouse" is not further defined as its definition scope is empty.
define codesystem animals {
default Language = en
set me.URI = (http://test.com/animals)
define concept mouse { }
define concept elephant {
--(bigger than)--> mouse
}
}
A special way for setting property values to an object is to place a MS Word table with two columns into the definition scope. This table holds the name of the property in the first column and the property value in the second column. You may advise the OntoDL interpreter to consider a property value as a string by prefixing it with "($". See the first two lessons of the tutorial for examples of this notation.
Qualified Concepts
Defining Objects from Internal References
Nesting of definition Statements
| left=outside top=inside |
codesystem | system | concept | property | predicate |
|---|---|---|---|---|---|
| codesystem | not allowed | not allowed | top-level concept within the codesystem | property applicable to the code system and all contained objects | predicate applicable to all concepts within the code system |
| system | not allowed | not allowed | concept within the system. shall be identified by its code |
property applicable to the code system and all contained objects. properties values will not be exported |
predicate applicable to all concepts within the code system. concepts within the codesystem are only allowed as targets to concept relationships |
| concept | not allowed | not allowed | sub-concept | property applicable to the concept and all of its sub-concepts | predicate applicable to the concept and all of its sub-concepts |
| property | not allowed | not allowed | not allowed | not allowed | not allowed |
| predicate | not allowed | not allowed | not allowed | not allowed | not allowed |