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.
Merge pull request #386 from ehrbase/refactor_gecco_diagnose
Refactor gecco diagnose
- Loading branch information
Showing
35 changed files
with
3,731 additions
and
3,780 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
26 changes: 26 additions & 0 deletions
26
...n/java/org/ehrbase/fhirbridge/ehr/converter/specific/geccodiagnose/DvCodedTextParser.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 org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose; | ||
|
||
import com.nedap.archie.rm.datatypes.CodePhrase; | ||
import com.nedap.archie.rm.datavalues.DvCodedText; | ||
import com.nedap.archie.rm.support.identification.TerminologyId; | ||
import org.ehrbase.client.classgenerator.EnumValueSet; | ||
import org.ehrbase.fhirbridge.ehr.converter.specific.CodeSystem; | ||
import org.hl7.fhir.r4.model.Coding; | ||
import java.util.Optional; | ||
|
||
public class DvCodedTextParser { | ||
|
||
public static DvCodedText parseDefiningCode(EnumValueSet enumValueSet){ | ||
return new DvCodedText(enumValueSet.getValue(), new CodePhrase(new TerminologyId(enumValueSet.getTerminologyId(), ""), enumValueSet.getCode())); | ||
} | ||
|
||
public static Optional<DvCodedText> parseFHIRCoding(Coding coding){ | ||
if(coding.hasDisplay() && coding.hasSystem() && coding.hasCode() && coding.getSystem().equals(CodeSystem.SNOMED.getUrl())){ | ||
return Optional.of(new DvCodedText(coding.getDisplay(), new CodePhrase(new TerminologyId("SNOMED Clinical Terms", ""), coding.getCode()))); | ||
}else if (coding.hasCode() && coding.getSystem().equals(CodeSystem.SNOMED.getUrl())){ | ||
return Optional.of(new DvCodedText("", new CodePhrase(new TerminologyId("SNOMED Clinical Terms", ""), coding.getCode()))); | ||
}else{ | ||
return Optional.empty(); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.