Description
For a leading hash, validate the remaining 1-64-character identifier and return it as a contained target with empty resourceType.
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.
For a leading hash, validate the remaining 1-64-character identifier and return it as a contained target with empty resourceType.
When to use this tool
Use FHIR Reference Target Token when you need one supported clinical-reference or scoped-identifier component.
How to use the tool and how it works
- Enter reference. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read targetId, contained, resourceType. Inspect contained before interpreting the associated values.
For a leading hash, validate the remaining 1-64-character identifier and return it as a contained target with empty resourceType. Otherwise delegate to the linked relative reference parser and return its type and ID.1
The linked version-history reference parser handles the noncontained branch and supplies its resource type and identifier.2
FHIR distinguishes contained-resource fragment references from references to other resources. A contained identifier needs its surrounding resource context, which this extractor does not inspect.3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| reference | Supplied reference token under the supported grammar. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| targetId | Target Id | Required. Text; maximum UTF-16 length 8192. |
| contained | Contained | Required. Boolean. |
| resourceType | Relative resource type, or empty-string placeholder for a contained reference. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"reference": "#local-1"
},
"output": {
"targetId": "local-1",
"contained": true,
"resourceType": ""
}
} Limitations and assumptions
- No referenced resource is fetched or checked, and an empty type is the documented contained-reference placeholder rather than a missing parsed relative type.
- 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
-
Calculation and input contract: health-informatics/fhir-reference-target-token — tool.io
-
Calculation or validation: health-informatics/fhir-reference-version-history-token — tool.io
-
FHIR R4: References — Health Level Seven International
Similar or alternative tools
- FHIR Reference Relative Type ID
Parse exactly an uppercase-leading alphanumeric resource-type token, slash, and 1-64 ASCII letters, digits, dots, or hyphens for logicalId.
- FHIR Reference Depth Count
Separate the first fragment, remove a scheme-and-authority prefix and query, then count nonempty slash path segments.