Grouping: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
Zeile 24: Zeile 24:
 
               // group name displayed in the frontend
 
               // group name displayed in the frontend
 
               "name": "Codesystems",
 
               "name": "Codesystems",
               // related resources by 'relGroup'-name or 'children'-property (recursively)
+
               // 'relGroup'-names for related resources or 'children'-property (recursively)
               "relGroup": [
+
               "relGroup": ["ICD", "OPS"]
                "EXA",
 
                "not-exists"
 
              ]
 
 
             }
 
             }
 
           ]
 
           ]
Zeile 46: Zeile 43:
 
   ]
 
   ]
 
}
 
}
 +
</syntaxhighlight>
 +
 +
* The 'relGroup'-names in line 16 have to be referenced in the resource at uploading.
 +
 +
== 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.
 +
 +
== 'relGroup'-name at upload ==
 +
 +
In case of FHIR the resource to upload has to state the 'groupName'-extension where it references the 'relGroup'-name of the group definition (see above).
 +
 +
<syntaxhighlight lang="xml" line>
 +
<CodeSystem xmlns="http://hl7.org/fhir"
 +
xmlns:ext="http://semantik.fokus.fraunhofer.de/ehealth/fhir-extensions#" ...>
 +
<id value="code-system-stu3-88" />
 +
<extension url="ext:groupName">
 +
<valueString value="ICD" />
 +
</extension>
 +
...
 +
</CodeSystem>
 
</syntaxhighlight>
 
</syntaxhighlight>

Version vom 11. August 2021, 12:32 Uhr

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 'relGroup'-name where at resource this name is set at an uploading call (in case of CLAML) or within the resource (in case of FHIR). Note that the 'relGroup'-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 places in the hierarchy that enables multiple views over the whole resource set.

Structure

The content hierarchy is defined by the following json structure

 1 {
 2   "groups": [
 3     {
 4       // root of group hierarchy for code systems
 5       "_id": "csvGroups",
 6       "children": [
 7         {
 8           // top level items
 9           "name": "Example",
10           "children": [
11             // children items
12             {
13               // group name displayed in the frontend
14               "name": "Codesystems",
15               // 'relGroup'-names for related resources or 'children'-property (recursively)
16               "relGroup": ["ICD", "OPS"]
17             }
18           ]
19         }
20       ]
21     },
22     {
23       // group hierarchy for value sets
24       "_id": "vsGroups",
25       "children": [
26        {
27           "name": "Example",
28           "relGroup": "EXA-vs"
29         }
30       ]
31     }
32   ]
33 }
  • The 'relGroup'-names in line 16 have to be referenced in the resource at uploading.

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.

'relGroup'-name at upload

In case of FHIR the resource to upload has to state the 'groupName'-extension where it references the 'relGroup'-name of the group definition (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>