From 37314fca05468a3bfa8d4c3d23584586463a97fa Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Mon, 7 Sep 2026 15:15:19 +0200 Subject: feat!: only add level 4/5 ATC codes (#295) ATC codes like `L`, `L01`, `L01E` are not imported any more and cannot be used as ATC code from database. These codes (from database) will be treated as unregistered code instead.--- .../java/dev/dnpm/oshelper/atc/services/AgentCodeService.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/dev/dnpm/oshelper/atc/services/AgentCodeService.java') diff --git a/src/main/java/dev/dnpm/oshelper/atc/services/AgentCodeService.java b/src/main/java/dev/dnpm/oshelper/atc/services/AgentCodeService.java index f1dc2e2..6540023 100644 --- a/src/main/java/dev/dnpm/oshelper/atc/services/AgentCodeService.java +++ b/src/main/java/dev/dnpm/oshelper/atc/services/AgentCodeService.java @@ -25,6 +25,7 @@ import dev.dnpm.oshelper.atc.AgentCode; import java.util.Comparator; import java.util.List; import java.util.Objects; +import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; import org.jspecify.annotations.NullMarked; @@ -100,4 +101,12 @@ public interface AgentCodeService { * @return A list with agent codes */ List findAgentCodes(String query, int size); + + /** + * Queries source for agents with code matching code string. + * + * @param code The code string + * @return An optional agent code if found + */ + Optional getAgentCode(String code); } -- cgit v1.2.3