use of org.hl7.fhir.dstu3.model.CodeableConcept in project loinc2hpo by monarch-initiative.
the class ObservationDtu3 method getOutcomeFromCodedValue.
Optional<Outcome> getOutcomeFromCodedValue() {
CodeableConcept codeableConcept = this.observation.getValueCodeableConcept();
if (codeableConcept == null) {
// should never happen
LOGGER.error("Codable concept null in getOutcomeFromCodedValue");
}
List<Coding> codings = codeableConcept != null ? codeableConcept.getCoding() : List.of();
for (Coding coding : codings) {
String code = coding.getCode();
String system = coding.getSystem();
String display = coding.getDisplay();
String outcomeString = code + ":" + system + ":" + display;
Outcome outcome = Outcome.nominal(outcomeString);
return Optional.of(outcome);
}
return Optional.empty();
}
use of org.hl7.fhir.dstu3.model.CodeableConcept in project loinc2hpo by monarch-initiative.
the class ObservationR5 method getOutcomeFromCodedValue.
Optional<Outcome> getOutcomeFromCodedValue() {
CodeableConcept codeableConcept = this.observation.getValueCodeableConcept();
if (codeableConcept == null) {
// should never happen
LOGGER.error("Codable concept null in getOutcomeFromCodedValue");
}
List<Coding> codings = codeableConcept != null ? codeableConcept.getCoding() : List.of();
for (Coding coding : codings) {
String code = coding.getCode();
String system = coding.getSystem();
String display = coding.getDisplay();
String outcomeString = code + ":" + system + ":" + display;
Outcome outcome = Outcome.nominal(outcomeString);
return Optional.of(outcome);
}
return Optional.empty();
}
use of org.hl7.fhir.dstu3.model.CodeableConcept in project loinc2hpo by monarch-initiative.
the class ObservationR4 method getOutcomeFromCodedValue.
Optional<Outcome> getOutcomeFromCodedValue() {
CodeableConcept codeableConcept = this.observation.getValueCodeableConcept();
if (codeableConcept == null) {
// should never happen
LOGGER.error("Codable concept null in getOutcomeFromCodedValue");
}
List<Coding> codings = codeableConcept != null ? codeableConcept.getCoding() : List.of();
for (Coding coding : codings) {
String code = coding.getCode();
String system = coding.getSystem();
String display = coding.getDisplay();
String outcomeString = code + ":" + system + ":" + display;
Outcome outcome = Outcome.nominal(outcomeString);
return Optional.of(outcome);
}
return Optional.empty();
}
Aggregations