fix fragile handling of URLs in XVerExtensionManager

This commit is contained in:
Grahame Grieve 2021-11-16 17:24:35 +11:00
parent 4339299b27
commit dd5f204797
1 changed files with 8 additions and 0 deletions

View File

@ -40,7 +40,15 @@ public class XVerExtensionManager {
this.context = context;
}
public boolean isR5(String url) {
String v = url.substring(20, 23);
return "5.0".equals(v);
}
public XVerExtensionStatus status(String url) throws FHIRException {
if (url.length() < 24) {
return XVerExtensionStatus.Invalid;
}
String v = url.substring(20, 23);
if ("5.0".equals(v)) {
v = "4.6"; // for now