From 1a2700088118c487c3e2dbdf0428f55cb1598f77 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Thu, 9 May 2024 15:34:41 -0700 Subject: [PATCH] Moved oml coding contanst to hapi helper --- .../custom/convertToOmlOrder.java | 3 +-- .../hl7fhir/FhirValuesHelper.java | 18 ------------------ .../external/hapi/HapiHelper.java | 6 ++++++ 3 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 etor/src/main/java/gov/hhs/cdc/trustedintermediary/hl7fhir/FhirValuesHelper.java diff --git a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/ruleengine/transformation/custom/convertToOmlOrder.java b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/ruleengine/transformation/custom/convertToOmlOrder.java index 3b19020f3..e869d2056 100644 --- a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/ruleengine/transformation/custom/convertToOmlOrder.java +++ b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/ruleengine/transformation/custom/convertToOmlOrder.java @@ -5,7 +5,6 @@ import gov.hhs.cdc.trustedintermediary.etor.ruleengine.FhirResource; import gov.hhs.cdc.trustedintermediary.etor.ruleengine.transformation.CustomFhirTransformation; import gov.hhs.cdc.trustedintermediary.external.hapi.HapiHelper; -import gov.hhs.cdc.trustedintermediary.hl7fhir.FhirValuesHelper; import gov.hhs.cdc.trustedintermediary.wrappers.MetricMetadata; import java.util.Map; import org.hl7.fhir.r4.model.Bundle; @@ -19,7 +18,7 @@ public class convertToOmlOrder implements CustomFhirTransformation { @Override public void transform(FhirResource resource, Map args) { Bundle bundle = (Bundle) resource.getUnderlyingResource(); - HapiHelper.setMessageTypeCoding(bundle, FhirValuesHelper.OML_CODING); + HapiHelper.setMessageTypeCoding(bundle, HapiHelper.OML_CODING); metadata.put(bundle.getId(), EtorMetadataStep.ORDER_CONVERTED_TO_OML); } } diff --git a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/hl7fhir/FhirValuesHelper.java b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/hl7fhir/FhirValuesHelper.java deleted file mode 100644 index 199fe397d..000000000 --- a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/hl7fhir/FhirValuesHelper.java +++ /dev/null @@ -1,18 +0,0 @@ -package gov.hhs.cdc.trustedintermediary.hl7fhir; - -import java.util.List; -import org.hl7.fhir.r4.model.Coding; - -public class FhirValuesHelper { - - public static final List CODING_LIST = - List.of( - new Coding( - "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "MTH", "mother")); - - public static final Coding OML_CODING = - new Coding( - "http://terminology.hl7.org/CodeSystem/v2-0003", - "O21", - "OML - Laboratory order"); -} diff --git a/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiHelper.java b/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiHelper.java index f80a05c7e..1ab275c6e 100644 --- a/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiHelper.java +++ b/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiHelper.java @@ -12,6 +12,12 @@ public class HapiHelper { private HapiHelper() {} + public static final Coding OML_CODING = + new Coding( + "http://terminology.hl7.org/CodeSystem/v2-0003", + "O21", + "OML - Laboratory order"); + /** * Returns a {@link Stream} of FHIR resources inside the provided {@link Bundle} that match the * given resource type.