This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
107 changed files
with
73,801 additions
and
1,569 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
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
59 changes: 0 additions & 59 deletions
59
src/main/java/org/ehrbase/fhirbridge/ehr/converter/ContextConverter.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
76 changes: 76 additions & 0 deletions
76
src/main/java/org/ehrbase/fhirbridge/ehr/converter/specific/antibodypanel/AntiBodyPanel.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,76 @@ | ||
package org.ehrbase.fhirbridge.ehr.converter.specific.antibodypanel; | ||
|
||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; | ||
import org.ehrbase.fhirbridge.ehr.opt.geccoserologischerbefundcomposition.definition.VirusnachweistestDefiningCode; | ||
import org.hl7.fhir.r4.model.Observation; | ||
import org.hl7.fhir.r4.model.Resource; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public class AntiBodyPanel { | ||
|
||
private Optional<Observation> antiBodyPanel = Optional.empty(); | ||
private Optional<Immunoassay> aBPresence = Optional.empty(); | ||
private Optional<Immunoassay> aBUnitsVolume = Optional.empty(); | ||
private Optional<Immunoassay> igAAbPresence = Optional.empty(); | ||
private Optional<Immunoassay> igAAbUnitVolume = Optional.empty(); | ||
private Optional<Immunoassay> igMAbPresence = Optional.empty(); | ||
private Optional<Immunoassay> igMAbUnitsVolume = Optional.empty(); | ||
private Optional<Immunoassay> igGAbPresence = Optional.empty(); | ||
private Optional<Immunoassay> igGAbUnitsVolume = Optional.empty(); | ||
|
||
public AntiBodyPanel(Observation observation) { | ||
setObservations(observation); | ||
} | ||
|
||
private void setObservations(Observation observation) { | ||
antiBodyPanel = Optional.of(observation); | ||
for (Resource resource : observation.getContained()) { | ||
setProfiles(resource); | ||
} | ||
} | ||
|
||
private void setProfiles(Resource resource) { | ||
try { | ||
String profileUrl = resource.getMeta().getProfile().get(0).getValue(); | ||
resoulveProfile(resource, profileUrl); | ||
} catch (IndexOutOfBoundsException e) { | ||
throw new UnprocessableEntityException("Make sure only the for Anti body panel supported Profiles are contained in the Bundle"); | ||
} | ||
} | ||
|
||
private void resoulveProfile(Resource resource, String profileUrl) { | ||
if (AntiBodyProfileUrl.AB_PRESENCE.getUrl().equals(profileUrl)) { | ||
this.aBPresence = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_AB_PRESENCE_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.AB_UNITS_VOLUME.getUrl().equals(profileUrl)) { | ||
this.aBUnitsVolume = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_AB_UNITS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.IGA_AB_PRESENCE.getUrl().equals(profileUrl)) { | ||
this.igAAbPresence = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_IGA_AB_PRESENCE_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.IGA_AB_UNITS_VOLUME.getUrl().equals(profileUrl)) { | ||
this.igAAbUnitVolume = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_IGA_AB_UNITS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.IGM_AB_PRESENCE.getUrl().equals(profileUrl)) { | ||
this.igMAbPresence = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_IGM_AB_PRESENCE_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.IGM_AB_UNITS_VOLUME.getUrl().equals(profileUrl)) { | ||
this.igMAbUnitsVolume = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_IGM_AB_UNITS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.IGG_AB_PRESENCE.getUrl().equals(profileUrl)) { | ||
this.igGAbPresence = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_IGG_AB_PRESENCE_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else if (AntiBodyProfileUrl.IGG_AB_UNITS_VOLUME.getUrl().equals(profileUrl)) { | ||
this.igGAbUnitsVolume = Optional.of(new Immunoassay((Observation) resource, VirusnachweistestDefiningCode.SARS_COV2_COVID19_IGG_AB_UNITS_VOLUME_IN_SERUM_OR_PLASMA_BY_IMMUNOASSAY)); | ||
|
||
} else { | ||
throw new UnprocessableEntityException("Anti body panel bundle needs to contain only the profiles for the Anti body panel. Please delete profile " + profileUrl + " from the Bundle."); | ||
} | ||
} | ||
|
||
public List<Optional<Immunoassay>> getAllNonPanel() { | ||
return List.of(aBPresence, aBUnitsVolume, igAAbPresence, igAAbUnitVolume, igMAbPresence, igMAbUnitsVolume, igGAbPresence, igGAbUnitsVolume); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...n/java/org/ehrbase/fhirbridge/ehr/converter/specific/antibodypanel/AntiBodyPanelCode.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,25 @@ | ||
package org.ehrbase.fhirbridge.ehr.converter.specific.antibodypanel; | ||
|
||
|
||
import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; | ||
|
||
public enum AntiBodyPanelCode { | ||
LABORATORY_STUDIES(CodeSystem.LOINC.getUrl(), "26436-6"); | ||
|
||
private final String system; | ||
private final String code; | ||
|
||
|
||
AntiBodyPanelCode( String system, String code) { | ||
this.code = code; | ||
this.system = system; | ||
} | ||
|
||
public String getSystem() { | ||
return system; | ||
} | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
.../java/org/ehrbase/fhirbridge/ehr/converter/specific/antibodypanel/AntiBodyProfileUrl.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,24 @@ | ||
package org.ehrbase.fhirbridge.ehr.converter.specific.antibodypanel; | ||
|
||
|
||
public enum AntiBodyProfileUrl { | ||
AB_PRESENCE("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-ser-pl-ql-ia"), | ||
AB_UNITS_VOLUME("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-ab-ser-pl-ia-acnc"), | ||
IGA_AB_PRESENCE("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-iga-ser-pl-ql-ia"), | ||
IGA_AB_UNITS_VOLUME("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-iga-ser-pl-ia-acnc"), | ||
IGM_AB_PRESENCE("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igm-ser-pl-ql-ia"), | ||
IGM_AB_UNITS_VOLUME("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igm-ser-pl-ia-acnc"), | ||
IGG_AB_PRESENCE("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igg-ser-pl-ql-ia"), | ||
IGG_AB_UNITS_VOLUME("https://www.netzwerk-universitaetsmedizin.de/fhir/StructureDefinition/sars-cov-2-igg-ser-pl-ia-acnc"); | ||
|
||
private final String url; | ||
|
||
AntiBodyProfileUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
} |
Oops, something went wrong.