Description
Locate the first pipe and hash, flag a version only when pipe precedes any hash, flag fragment presence, and return text before either separator as canonicalBase.
Clinical identifiers and references have a namespace, target, and sometimes a version or contained-resource scope. Parsing their spelling does not resolve the target or establish semantic identity.
Locate the first pipe and hash, flag a version only when pipe precedes any hash, flag fragment presence, and return text before either separator as canonicalBase.
When to use this tool
Use FHIR Canonical Fragment Separator Flag when you need one supported clinical-reference or scoped-identifier component.
How to use the tool and how it works
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read hasVersion, hasFragment, versionSeparatorBeforeFragment, canonicalBase. Inspect hasVersion, hasFragment, versionSeparatorBeforeFragment before interpreting the associated values.
Locate the first pipe and hash, flag a version only when pipe precedes any hash, flag fragment presence, and return text before either separator as canonicalBase.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Text in the explicitly supported lexical grammar. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| hasVersion | Has Version | Required. Boolean. |
| hasFragment | Has Fragment | Required. Boolean. |
| versionSeparatorBeforeFragment | Version Separator Before Fragment | Required. Boolean. |
| canonicalBase | Canonical Base | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"token": "http://example.org/Plan|1#part"
},
"output": {
"hasVersion": true,
"hasFragment": true,
"versionSeparatorBeforeFragment": true,
"canonicalBase": "http://example.org/Plan"
}
} Limitations and assumptions
- This is a separator diagnostic without validating a canonical URI, version, fragment grammar, resource identity, or resolution.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a complete standard-aware resolver and verify terminology, resource identity, and applicable profiles separately.
References
Similar or alternative tools
- FHIR Reference Depth Count
Separate the first fragment, remove a scheme-and-authority prefix and query, then count nonempty slash path segments.
- FHIR Reference Version History Token
Parse a supported relative ResourceType/id with optional /_history/version, using 1-64 ASCII identifier characters.