OwS Example 1: Simple Body Parts Terminology
Zur Navigation springen
Zur Suche springen
The FHIR XML as generated by OwS from example 1 is shown below.
<?xml version="1.0" encoding="UTF-8"?>
<ValueSet xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#" xsi:schemaLocation="http://hl7.org/fhir ../fhir-std/spec-v1.0.2/valueset.xsd">
<name value="Body Parts"/>
<status/>
<description value="This terminology provides concepts for the parts of the body."/>
<codeSystem>
<extension url="ext:language">
<valueCode/>
</extension>
<extension url="ext:groupName">
<valueString value="Body Parts"/>
</extension>
<extension url="ext:resourceId">
<valueString value="Body Parts"/>
</extension>
<system value="http://sample.com/bodyparts"/>
<version value="2016-08-29"/>
<concept>
<code value="organs"/>
<display value="Organe"/>
<definition/>
<designation>
<language value="de"/>
<value value="Organe"/>
</designation>
<concept>
<code value="heart"/>
<display value="Herz"/>
<definition value="The heart pumps blood through the body."/>
<designation>
<language value="de"/>
<value value="Herz"/>
</designation>
</concept>
<concept>
<code value="kidney"/>
<display value="Niere"/>
<definition/>
<designation>
<language value="de"/>
<value value="Niere"/>
</designation>
</concept>
</concept>
<concept>
<code value="extremities"/>
<display value="Extremitäten"/>
<definition/>
<designation>
<language value="de"/>
<value value="Extremitäten"/>
</designation>
<concept>
<code value="arm"/>
<display value="Arm"/>
<definition/>
<designation>
<language value="de"/>
<value value="Arm"/>
</designation>
</concept>
<concept>
<code value="leg"/>
<display value="Bein"/>
<definition/>
<designation>
<language value="de"/>
<value value="Bein"/>
</designation>
</concept>
</concept>
</codeSystem>
</ValueSet>
As one can see, the Display element is set to the German translation of the concept as this is the only designation explicitly provided. In order to provide an English designation, too and to set the Display to the english designation, we only need to add the following OwS code:
default lang=en #obligation Überschrift 2 => set me.Designation[lang=en] == me.Code #obligation Überschrift 3 => set me.Designation[lang=en] == me.Code
The defined obligations are executed after the text of the given style sheet has been processed. It directs the OwS interpreter to set the English name of the concept to the value of its code. By defining English as the default language, the OwS Interpreter selects the English designation as the display name (unless a display name is explicitly given).