Interface UriMapper
- All Known Implementing Classes:
AbstractUriMapper
,DefaultUriMapper
,NamingSystemUriMapper
public interface UriMapper
The FHIR Identifier type introduces a new mechanism for conveying the originating system of a particular identifier. Whereas HL7-based messages identify an assigning organization as a HD or an OID in the 'root' attribute respectively, HL7 FHIR permits the use of a URI. This requires some configuration on the part of actors to correctly map a URI to an OID or HD to maintain consistency with other actors which are not implementing the FHIR specification.
The same is basically true for code system identifications. HL7 FHIR permits the use of a URI, whereas HL7-based messages and requests use HD or OIDs.
- Since:
- 3.1
- Author:
- Christian Ohr
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Optional<T>
namespaceToUri
(String namespace) Translates an Namespace into an URI.Translates an OID into an URI.uriToNamespace
(String uri) Translates an URI into a Namespace.Translates an URI into an OID.
-
Method Details
-
uriToOid
Translates an URI into an OID. If the URI is an (OID) URN, the namespace-specific part should, be used as the OID.- Parameters:
uri
- the URI- Returns:
- the mapped OID
- Throws:
InvalidUriSyntaxException
- if the uri string is no valid URI
-
uriToNamespace
Translates an URI into a Namespace.- Parameters:
uri
- the URI- Returns:
- the mapped namespace
- Throws:
InvalidUriSyntaxException
- if the uri string is no valid URI
-
oidToUri
Translates an OID into an URI. Instead of a real mapping, an URN can be derived from the OID (i.e. urn:oid:1.2.3.4), but in general the inverse mapping touriToOid(String)
should be applied.- Parameters:
oid
- the OID- Returns:
- the mapped URI
-
namespaceToUri
Translates an Namespace into an URI. Instead of a real mapping, an URN can be derived from the namespace (i.e. urn:pin:namespace), but in general the inverse mapping touriToNamespace(String)
(String)} should be applied.- Parameters:
namespace
- the namespace- Returns:
- the mapped URI
-
findFirst
-