Skip to content

Commit

Permalink
Merge pull request #984 from HL7/FragmentFix
Browse files Browse the repository at this point in the history
Fix fragment problem with multi-word resource names.  https://chat.fh…
  • Loading branch information
grahamegrieve authored Nov 29, 2024
2 parents bb2a441 + c28cbab commit a75f907
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11685,7 +11685,7 @@ private String processFragment(String arguments, FetchedFile f) throws FHIRExcep
String format = (secondSpace == -1) ? arguments.substring(firstSpace) : arguments.substring(firstSpace, secondSpace);
format = format.trim().toLowerCase();
String filters = (secondSpace == -1) ? "" : arguments.substring(secondSpace).trim();
Pattern refPattern = Pattern.compile("^([A-Z][a-z]+)+\\/([A-Za-z0-9\\-\\.]{1,64})$");
Pattern refPattern = Pattern.compile("^([A-Za-z]+)\\/([A-Za-z0-9\\-\\.]{1,64})$");
Matcher refMatcher = refPattern.matcher(reference);
if (!refMatcher.find())
throw new FHIRException("Fragment syntax error: Referenced instance must be expressed as [ResourceType]/[id]. Found " + reference + " in file " + f.getName());
Expand Down

0 comments on commit a75f907

Please sign in to comment.