summaryrefslogtreecommitdiff
path: root/src/main/java/dev/dnpm/oshelper/atc/AtcCode.java
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2026-09-07 15:15:19 +0200
committerGitHub2026-09-07 15:15:19 +0200
commit37314fca05468a3bfa8d4c3d23584586463a97fa (patch)
tree7b1def283bed1fe9d7d430ca7e0481491b92f698 /src/main/java/dev/dnpm/oshelper/atc/AtcCode.java
parentcdcdb21eca393b17ac5d075c5a002d30ccf038c5 (diff)
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.
Diffstat (limited to 'src/main/java/dev/dnpm/oshelper/atc/AtcCode.java')
-rw-r--r--src/main/java/dev/dnpm/oshelper/atc/AtcCode.java4
1 files changed, 2 insertions, 2 deletions
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 <code>true</code> 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})?");
}
}