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 Details

    • uriToOid

      Optional<String> uriToOid(String uri)
      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

      Optional<String> uriToNamespace(String uri)
      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

      String oidToUri(String oid)
      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 to uriToOid(String) should be applied.
      Parameters:
      oid - the OID
      Returns:
      the mapped URI
    • namespaceToUri

      String namespaceToUri(String namespace)
      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 to uriToNamespace(String) (String)} should be applied.
      Parameters:
      namespace - the namespace
      Returns:
      the mapped URI
    • findFirst

      @SafeVarargs static <T> Optional<T> findFirst(Supplier<Optional<T>>... suppliers)