Grouping: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K (Structure)
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
Resource grouping is required for structuring resources within the frontend. It is based on a loose coupling between resources (code systems and value sets) and the group hierarchy.
+
            <h1 id="introduction">Introduction</h1>
 
+
<p>Resource grouping is required for structuring resources within the frontend. It is based on a loose coupling between resources (code systems and value sets) and the group hierarchy.</p>
Loose coupling has the advantage that hierarchies and resources can be treated separately. The only link is the ''group'' name used at uploading resources. Note that ''group'' names for value sets and code systems have to be disjoint.
+
<p>Loose coupling has the advantage that hierarchies and resources can be treated separately. The only link is the <em>group</em> name used at uploading resources. Note that <em>group</em> names for value sets and code systems have to be disjoint.</p>
 
+
<p>Another advantage of loose coupling is that arbitrary N to M relationsS between hierarchy nodes and resources can be built. E.g. ICD could occur at different leaves in the hierarchy that enables multiple views over the whole resource set.</p>
Another advantage of loose coupling is that arbitrary N to M relations between hierarchy nodes and resources can be built. E.g. ICD could occur at different leaves in the hierarchy that enables multiple views over the whole resource set.
+
<h1 id="structure">Structure</h1>
 
+
<p>The content hierarchy is defined by the following json structure. For code systems (&quot;_id&quot;: &quot;csvGroups&quot;), the hierarchy is limited to two levels, namely the top level and its children level. For value sets (&quot;_id&quot;: &quot;vsGroups&quot;), only one level (&quot;children&quot;) is allowed.</p>
== Structure ==
+
<p>The first level corresponds exactly to the items that are displayed on the left side of the navigator (top level items).</p>
 
+
<p>Within the 'children'-array at the second level (for code systems) there have to be at least two children.</p>
The content hierarchy is defined by the following json structure ('''comments below (//) are only for documentary purposes, do not use them at uploading'''). For code systems ("_id": "csvGroups"), the hierarchy is limited to two levels, namely the top level and its children level. For value sets ("_id": "vsGroups"), only one level ("children") is allowed.
 
 
 
Within the 'children'-arrays there have to be at least two childrens.
 
 
 
 
<syntaxhighlight lang="JSON" line>
 
<syntaxhighlight lang="JSON" line>
 
{
 
{
Zeile 19: Zeile 15:
 
       "children": [
 
       "children": [
 
         {
 
         {
           // top level items
+
           // top level item
           "name": "Example",
+
          "name": "<display-name>",
 +
          // group names (regex) for related resources
 +
          "relGroup": [
 +
            "<group-name-regex>"
 +
            //, ...
 +
          ]
 +
        },
 +
        {
 +
          // top level item
 +
           "name": "<display-name>",
 +
          // children items
 
           "children": [
 
           "children": [
            // children items
 
 
             {
 
             {
              // tree node name displayed in the frontend
+
               "name": "<display-name>",
               "name": "Codesystems",
+
               "relGroup": [
              // group names for related resources - used at upload
+
                "<group-name-regex>"
               "relGroup": ["ICD", "OPS"]
+
                //, ...
            },
+
               ]
            {
 
              "name": "Codesystems by regex",
 
              // list of regular expressions for resource id's
 
               "resourceIdRegex": ["snomed-.*", "mesh-.*"]
 
 
             }
 
             }
 +
            // , ...
 
           ]
 
           ]
 
         }
 
         }
Zeile 39: Zeile 41:
 
     },
 
     },
 
     {
 
     {
       // hierarchy for value sets
+
       // value sets
 
       "_id": "vsGroups",
 
       "_id": "vsGroups",
 
       "children": [
 
       "children": [
      {
+
        {
           "name": "Example",
+
           "name": "<display-name>",
           "relGroup": "EXA-vs"
+
           "relGroup": [
 +
            "<group-name-regex>"
 +
            //, ...
 +
          ]
 
         }
 
         }
 
       ]
 
       ]
Zeile 51: Zeile 56:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
<h2 id="group-names">Group Names</h2>
* The ''group'' names in line 16 have to be referenced in the resource at uploading. Every code system or value set that has this group name is displayed.
+
<p>Within a (sub)group, only those code systems or value sets are displayed whose group name matches the value <code>&lt;group-name-regex&gt;</code> of an item of the  <code>relGroup</code> property.</p>
 
+
<h2 id="setting-the-group-name">Setting the Group Name</h2>
=== Resource Identifier Regex ===
+
<p>Group names can be set manually, or, if not specified, are generated automatically during upload.</p>
 
+
<h3 id="manually-setting-the-group-name">Manually setting the Group Name</h3>
The resources referenced by group name above (line 16) are provided in alphabetical order over the resource identifiers. Alternatively, the referenced resources can be defined by giving a list of regular expressions. For instance, line 19 ff. references all code systems whose resource identifier starts with 'snomed-' or 'mesh-' in the given order.
 
 
 
== REST calls ==
 
 
 
The call
 
 
 
<code>GET 'http://<host>:<port>/WebCts2LE/service/manage/groups</code>
 
 
 
gets the current JSON structure above. To redefine it, call
 
 
 
<code>POST http://<host>:<port>/WebCts2LE/service/manage/groups/update</code>
 
(Content-Type: application/json)
 
 
 
with the new JSON structure.
 
 
 
== ''group'' name at upload ==
 
 
 
In case of FHIR the resource to upload has to state the 'groupName'-extension that corresponds to the ''group'' name of the hierarchy tree (see above).
 
 
 
 
<syntaxhighlight lang="xml" line>
 
<syntaxhighlight lang="xml" line>
 
<CodeSystem xmlns="http://hl7.org/fhir"
 
<CodeSystem xmlns="http://hl7.org/fhir"
Zeile 80: Zeile 66:
 
<id value="code-system-stu3-88" />
 
<id value="code-system-stu3-88" />
 
<extension url="ext:groupName">
 
<extension url="ext:groupName">
<valueString value="ICD" />
+
<valueString value="<group-name>" />
 
</extension>
 
</extension>
 
...
 
...
 
</CodeSystem>
 
</CodeSystem>
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
<h3 id="automatically-generated-group-names">Automatically generated Group Names</h3>
 +
<p>If an Fhir resource does not contain a group name, the following group name is generated</p>
 +
<ul>
 +
<li><code>default-group:canonical:&lt;canonical-resource-url&gt;</code></li>
 +
</ul>
 +
<p>where <code>&lt;canonical-resource-url&gt;</code> is the canonical url defined at <a href="https://hl7.org/fhir/R4/references.html#canonical">Canonical URLs</a>. Note that the version is suffixed.</p>
 +
<h1 id="modification-of-the-group-structure">Modification of the Group Structure</h1>
 +
<p>In most cases, the initial or current grouping must be adapted to the actual content of the terminology server. This can be done by the following steps.</p>
 +
<ul>
 +
<li>
 +
<p>display the content of the server: open <code>http://&lt;host&gt;:&lt;port&gt;/WebCts2LE/admin/manager.jsp</code> in a browser</p>
 +
</li>
 +
<li>
 +
<p>Get the grouping structure: <code>HTTP GET 'http://&lt;host&gt;:&lt;port&gt;/WebCts2LE/service/manage/groups</code></p>
 +
</li>
 +
</ul>
 +
<p>Modify or expand the group structure based on the content</p>
 +
<ul>
 +
<li>
 +
<p>Choose appropriate display names</p>
 +
</li>
 +
<li>
 +
<p>Define the regular expressions for the relGroup property based on the group names displayed in the browser</p>
 +
</li>
 +
<li>
 +
<p>Upload Group Structure: <code>HTTP POST http://&lt;host&gt;:&lt;port&gt;/WebCts2LE/service/manage/groups/update</code> (Content-Type: application/json)</p>
 +
</li>
 +
</ul>
 +
<p>with the new group structure.</p>

Aktuelle Version vom 5. Mai 2026, 14:34 Uhr

Introduction

Resource grouping is required for structuring resources within the frontend. It is based on a loose coupling between resources (code systems and value sets) and the group hierarchy.

Loose coupling has the advantage that hierarchies and resources can be treated separately. The only link is the group name used at uploading resources. Note that group names for value sets and code systems have to be disjoint.

Another advantage of loose coupling is that arbitrary N to M relationsS between hierarchy nodes and resources can be built. E.g. ICD could occur at different leaves in the hierarchy that enables multiple views over the whole resource set.

Structure

The content hierarchy is defined by the following json structure. For code systems ("_id": "csvGroups"), the hierarchy is limited to two levels, namely the top level and its children level. For value sets ("_id": "vsGroups"), only one level ("children") is allowed.

The first level corresponds exactly to the items that are displayed on the left side of the navigator (top level items).

Within the 'children'-array at the second level (for code systems) there have to be at least two children.

 1 {
 2   "groups": [
 3     {
 4       // root of hierarchy for code systems
 5       "_id": "csvGroups",
 6       "children": [
 7         {
 8           // top level item
 9           "name": "<display-name>",
10           // group names (regex) for related resources
11           "relGroup": [
12             "<group-name-regex>"
13             //, ...
14           ]
15         },
16         {
17           // top level item
18           "name": "<display-name>",
19           // children items
20           "children": [
21             {
22               "name": "<display-name>",
23               "relGroup": [
24                 "<group-name-regex>"
25                 //, ...
26               ]
27             }
28             // , ...
29           ]
30         }
31       ]
32     },
33     {
34       // value sets
35       "_id": "vsGroups",
36       "children": [
37         {
38           "name": "<display-name>",
39           "relGroup": [
40             "<group-name-regex>"
41             //, ...
42           ]
43         }
44       ]
45     }
46   ]
47 }

Group Names

Within a (sub)group, only those code systems or value sets are displayed whose group name matches the value <group-name-regex> of an item of the relGroup property.

Setting the Group Name

Group names can be set manually, or, if not specified, are generated automatically during upload.

Manually setting the Group Name

1 <CodeSystem xmlns="http://hl7.org/fhir"
2 	xmlns:ext="http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#" ...>
3 	<id value="code-system-stu3-88" />
4 	<extension url="ext:groupName">
5 		<valueString value="<group-name>" />
6 	</extension>
7 	...
8 </CodeSystem>

Automatically generated Group Names

If an Fhir resource does not contain a group name, the following group name is generated

  • default-group:canonical:<canonical-resource-url>

where <canonical-resource-url> is the canonical url defined at <a href="https://hl7.org/fhir/R4/references.html#canonical">Canonical URLs</a>. Note that the version is suffixed.

Modification of the Group Structure

In most cases, the initial or current grouping must be adapted to the actual content of the terminology server. This can be done by the following steps.

  • display the content of the server: open http://<host>:<port>/WebCts2LE/admin/manager.jsp in a browser

  • Get the grouping structure: HTTP GET 'http://<host>:<port>/WebCts2LE/service/manage/groups

Modify or expand the group structure based on the content

  • Choose appropriate display names

  • Define the regular expressions for the relGroup property based on the group names displayed in the browser

  • Upload Group Structure: HTTP POST http://<host>:<port>/WebCts2LE/service/manage/groups/update (Content-Type: application/json)

with the new group structure.