Grouping

Aus CTS2-LE
Zur Navigation springen Zur Suche springen

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.