Grouping

Aus CTS2-LE
Version vom 8. September 2025, 18:45 Uhr von Billig (Diskussion | Beiträge) (Structure)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

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 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.

Structure

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'-array at the second level (for code systems) there have to be at least two childrens.

 1 {
 2   "groups": [
 3     {
 4       // root of hierarchy for code systems
 5       "_id": "csvGroups",
 6       "children": [
 7         {
 8           // top level items
 9           "name": "Example",
10           "children": [
11             // children items
12             {
13               // tree node name displayed in the frontend
14               "name": "Codesystems",
15               // group names for related resources - used at upload
16               "relGroup": ["ICD", "OPS"]
17             },
18             {
19               "name": "Codesystems by regex",
20               // list of regular expressions for resource id's
21               "resourceIdRegex": ["snomed-.*", "mesh-.*"]
22             }
23           ]
24         }
25       ]
26     },
27     {
28       // hierarchy for value sets
29       "_id": "vsGroups",
30       "children": [
31        {
32           "name": "Example",
33           "relGroup": "EXA-vs"
34         }
35       ]
36     }
37   ]
38 }
  • 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.

Resource Identifier Regex

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

GET 'http://<host>:<port>/WebCts2LE/service/manage/groups

gets the current JSON structure above. To redefine it, call

POST http://<host>:<port>/WebCts2LE/service/manage/groups/update (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).

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="ICD" />
6 	</extension>
7 	...
8 </CodeSystem>