Grouping: Unterschied zwischen den Versionen
Billig (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Resource grouping is required for structuring resources within the frontend. It is based on a loose coupling between resources (code systems and value sets) an…“) |
Billig (Diskussion | Beiträge) K (→Structure) |
||
| (18 dazwischenliegende Versionen desselben Benutzers werden 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. | 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 == | == Structure == | ||
| − | The content hierarchy is defined by the following json 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. | ||
<syntaxhighlight lang="JSON" line> | <syntaxhighlight lang="JSON" line> | ||
| Zeile 9: | Zeile 15: | ||
"groups": [ | "groups": [ | ||
{ | { | ||
| − | // | + | // root of hierarchy for code systems |
"_id": "csvGroups", | "_id": "csvGroups", | ||
"children": [ | "children": [ | ||
| Zeile 18: | Zeile 24: | ||
// children items | // children items | ||
{ | { | ||
| − | // name displayed in the frontend | + | // tree node name displayed in the frontend |
"name": "Codesystems", | "name": "Codesystems", | ||
| − | // related resources | + | // group names for related resources - used at upload |
| − | + | "relGroup": ["ICD", "OPS"] | |
| − | // | + | }, |
| − | " | + | { |
| − | + | "name": "Codesystems by regex", | |
| − | + | // list of regular expressions for resource id's | |
| − | + | "resourceIdRegex": ["snomed-.*", "mesh-.*"] | |
} | } | ||
] | ] | ||
| Zeile 33: | Zeile 39: | ||
}, | }, | ||
{ | { | ||
| − | // | + | // hierarchy for value sets |
"_id": "vsGroups", | "_id": "vsGroups", | ||
"children": [ | "children": [ | ||
| Zeile 44: | Zeile 50: | ||
] | ] | ||
} | } | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | * 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 | ||
| + | |||
| + | <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> | ||
| + | <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> | ||
Aktuelle Version vom 8. September 2025, 18:45 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 leaves in the hierarchy that enables multiple views over the whole resource set.
Inhaltsverzeichnis
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>