From 57926073bc53a36bbb860d26637cd2efd2417781 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 9 Oct 2024 23:10:35 +0800 Subject: [PATCH] Add support for $id$ in terminology tests --- .../main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java index e6d799919..63a857ce7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java @@ -64,6 +64,7 @@ public class CompareUtilities extends BaseTestingUtilities { case "$$" : return "$$"; case "$instant$": return "\"An Instant\""; case "$uuid$": return "\"A Uuid\""; + case "$id$": return "\"An Id\""; default: return "Unhandled template: "+expected; } } @@ -465,6 +466,7 @@ public class CompareUtilities extends BaseTestingUtilities { case "$$" : return true; case "$instant$": return actualJsonString.matches("([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]{1,9})?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))"); case "$uuid$": return actualJsonString.matches("urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"); + case "$id$": return actualJsonString.matches("[A-Za-z0-9\\-\\.]{1,64}"); default: throw new Error("Unhandled template: "+expectedJsonString); }