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.--- src/main/java/dev/dnpm/oshelper/atc/AtcCode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/dev/dnpm/oshelper/atc/AtcCode.java') diff --git a/src/main/java/dev/dnpm/oshelper/atc/AtcCode.java b/src/main/java/dev/dnpm/oshelper/atc/AtcCode.java index beff5bf..ba42737 100644 --- a/src/main/java/dev/dnpm/oshelper/atc/AtcCode.java +++ b/src/main/java/dev/dnpm/oshelper/atc/AtcCode.java @@ -91,7 +91,7 @@ public class AtcCode implements AgentCode { } /** - * Checks for usable ATC code starting at level 2 + * Checks for usable ATC code starting at level 4 * * @param code Code to be checked * @return Will return true if code matches ATC code scheme @@ -99,6 +99,6 @@ public class AtcCode implements AgentCode { public static boolean isAtcCode(String code) { return null != code && !code.isBlank() - && code.matches("[ABCDGHJLMNPRSV][0-2][1-9]([A-Z]([A-Z](\\d{2})?)?)?"); + && code.matches("[ABCDGHJLMNPRSV][0-2][1-9][A-Z][A-Z](\\d{2})?"); } } -- cgit v1.2.3