diff --git a/api/src/main/java/org/openmrs/module/labintegration/api/advice/EncounterServiceRoundAdvice.java b/api/src/main/java/org/openmrs/module/labintegration/api/advice/EncounterServiceRoundAdvice.java index 17f9f84..2f127df 100644 --- a/api/src/main/java/org/openmrs/module/labintegration/api/advice/EncounterServiceRoundAdvice.java +++ b/api/src/main/java/org/openmrs/module/labintegration/api/advice/EncounterServiceRoundAdvice.java @@ -59,7 +59,6 @@ public Object invoke(MethodInvocation methodInvocation) throws Throwable { String labFormName = administrationService.getGlobalProperty(LabIntegrationConfig.GP_LABORATORY_FORM_NAME, LAB_FORM_NAME); CareSetting careSetting = orderService.getCareSetting(2); - ObsSelector obsSelector = new ObsSelector(); if (args[0] instanceof Encounter) { Encounter encounter = (Encounter) args[0]; log.debug("captured encounter " + encounter.getUuid()); @@ -72,12 +71,11 @@ public Object invoke(MethodInvocation methodInvocation) throws Throwable { if (destinationObs.get().getValueText().equals(OPENELIS_DESTINATION)) { Set testConcepts = new HashSet<>(); encounter.getObs().forEach(obs -> { - if (obsSelector.isValidTestType(obs)) { + if (obs.getValueCoded() != null) { if (obs.getValueCoded().getConceptClass().getName().equals(TEST_CLASS)) { testConcepts.add(obs.getValueCoded()); } } - }); Set orders = testConcepts.stream().map(testConcept -> { TestOrder order = new TestOrder();