canonical helper methods

This commit is contained in:
Grahame Grieve 2023-09-10 13:12:05 -07:00
parent 30ed1bf615
commit ef401d0fe8
1 changed files with 10 additions and 0 deletions

View File

@ -77,6 +77,16 @@ public class CanonicalType extends UriType {
public String fhirType() {
return "canonical";
}
public String baseUrl() {
var s = primitiveValue();
return s == null || !s.contains("|") ? s : s.substring(0, s.indexOf("|"));
}
public String version() {
var s = primitiveValue();
return s == null || !s.contains("|") ? null : s.substring(s.indexOf("|")+1);
}
}