Grouping: Unterschied zwischen den Versionen
Billig (Diskussion | Beiträge) K |
Billig (Diskussion | Beiträge) K |
||
| 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. | 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 ' | + | 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 places in the hierarchy that enables multiple views over the whole resource set. | 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. | ||
| Zeile 13: | Zeile 13: | ||
"groups": [ | "groups": [ | ||
{ | { | ||
| − | // root of | + | // root of hierarchy for code systems |
"_id": "csvGroups", | "_id": "csvGroups", | ||
"children": [ | "children": [ | ||
| Zeile 22: | Zeile 22: | ||
// children items | // children items | ||
{ | { | ||
| − | // | + | // tree node name displayed in the frontend |
"name": "Codesystems", | "name": "Codesystems", | ||
| − | // | + | // group names for related resources or 'children'-property (recursively) - used at upload |
"relGroup": ["ICD", "OPS"] | "relGroup": ["ICD", "OPS"] | ||
} | } | ||
| Zeile 32: | Zeile 32: | ||
}, | }, | ||
{ | { | ||
| − | // | + | // hierarchy for value sets |
"_id": "vsGroups", | "_id": "vsGroups", | ||
"children": [ | "children": [ | ||
| Zeile 45: | Zeile 45: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | * The ' | + | * The ''group'' names in line 16 have to be referenced in the resource at uploading. |
== REST calls == | == REST calls == | ||
| Zeile 60: | Zeile 60: | ||
with the new JSON structure. | with the new JSON structure. | ||
| − | == ' | + | == ''group'' name at upload == |
| − | In case of FHIR the resource to upload has to state the 'groupName'-extension | + | 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> | ||
Version vom 23. August 2021, 23:56 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 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 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 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 or 'children'-property (recursively) - used at upload
16 "relGroup": ["ICD", "OPS"]
17 }
18 ]
19 }
20 ]
21 },
22 {
23 // hierarchy for value sets
24 "_id": "vsGroups",
25 "children": [
26 {
27 "name": "Example",
28 "relGroup": "EXA-vs"
29 }
30 ]
31 }
32 ]
33 }
- The group 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.
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>