-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from medizininformatik-initiative/feature/382…
…-change-display-and-translations-structure-for-criteria-and-concepts #382 - Change display and translations structure for criteria and concepts
- Loading branch information
Showing
41 changed files
with
1,908 additions
and
737 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/de/numcodex/feasibility_gui_backend/common/api/DisplayEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package de.numcodex.feasibility_gui_backend.common.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import de.numcodex.feasibility_gui_backend.dse.api.LocalizedValue; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.Display; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@Builder | ||
public record DisplayEntry( | ||
@JsonProperty String original, | ||
@JsonProperty List<LocalizedValue> translations | ||
) { | ||
|
||
public static DisplayEntry of(Display display) { | ||
return DisplayEntry.builder() | ||
.original(display.original()) | ||
.translations(List.of( | ||
LocalizedValue.builder() | ||
.language("de-DE") | ||
.value(display.deDe()) | ||
.build(), | ||
LocalizedValue.builder() | ||
.language("en-US") | ||
.value(display.enUs()) | ||
.build() | ||
)) | ||
.build(); | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
src/main/java/de/numcodex/feasibility_gui_backend/dse/api/DisplayEntry.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/de/numcodex/feasibility_gui_backend/terminology/api/CodeableConceptEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.numcodex.feasibility_gui_backend.terminology.api; | ||
|
||
import de.numcodex.feasibility_gui_backend.common.api.TermCode; | ||
import de.numcodex.feasibility_gui_backend.common.api.DisplayEntry; | ||
import de.numcodex.feasibility_gui_backend.dse.api.LocalizedValue; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.CodeableConceptDocument; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record CodeableConceptEntry( | ||
TermCode termCode, | ||
DisplayEntry display | ||
) { | ||
public static CodeableConceptEntry of(CodeableConceptDocument document) { | ||
return CodeableConceptEntry.builder() | ||
.termCode(document.termCode()) | ||
.display(DisplayEntry.builder() | ||
.original(document.display().original()) | ||
.translations(List.of( | ||
LocalizedValue.builder() | ||
.language("de-DE") | ||
.value(document.display().deDe()) | ||
.build(), | ||
LocalizedValue.builder() | ||
.language("en-US") | ||
.value(document.display().enUs()) | ||
.build() | ||
)) | ||
.build() | ||
) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/de/numcodex/feasibility_gui_backend/terminology/api/RelationEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package de.numcodex.feasibility_gui_backend.terminology.api; | ||
|
||
import de.numcodex.feasibility_gui_backend.common.api.DisplayEntry; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.OntologyItemRelationsDocument; | ||
import de.numcodex.feasibility_gui_backend.terminology.es.model.Relative; | ||
import lombok.Builder; | ||
|
||
import java.util.Collection; | ||
|
||
@Builder | ||
public record RelationEntry( | ||
DisplayEntry display, | ||
Collection<Relative> parents, | ||
Collection<Relative> children, | ||
Collection<Relative> relatedTerms | ||
) { | ||
|
||
public static RelationEntry of(OntologyItemRelationsDocument document) { | ||
return RelationEntry.builder() | ||
.display(DisplayEntry.of(document.display())) | ||
.parents(document.parents()) | ||
.children(document.children()) | ||
.relatedTerms(document.relatedTerms()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.