Class Identifiers

java.lang.Object
org.projecthusky.fhir.emed.ch.common.util.Identifiers

public class Identifiers extends Object
Helper for HAPI Identifiers.
Author:
Quentin Ligier
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<org.hl7.fhir.r4.model.Identifier>
    findBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system)
    Finds identifiers by their system in a list.
    static org.hl7.fhir.r4.model.Identifier
    Constructs an Identifier from an OID.
    static org.hl7.fhir.r4.model.Identifier
    fromUuid(UUID uuid)
    Constructs an Identifier from a UUID.
    static @Nullable org.hl7.fhir.r4.model.Identifier
    getBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system)
    Gets a single identifier by its system in a list.
    static @Nullable String
    getValueBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system)
    Gets the value of a single identifier by its system in a list.
    static org.hl7.fhir.r4.model.Identifier
    setValueBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system, String value)
    Sets the value of a single identifier by its system in a list.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getBySystem

      public static @Nullable org.hl7.fhir.r4.model.Identifier getBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system)
      Gets a single identifier by its system in a list.
      Parameters:
      identifiers - All identifiers.
      system - The system to find.
      Returns:
      the first identifier with the given system or null if none found.
    • getValueBySystem

      public static @Nullable String getValueBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system)
      Gets the value of a single identifier by its system in a list.
      Parameters:
      identifiers - All identifiers.
      system - The system to find.
      Returns:
      the value of first identifier with the given system or null if none found.
    • setValueBySystem

      public static org.hl7.fhir.r4.model.Identifier setValueBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system, String value)
      Sets the value of a single identifier by its system in a list.
      Parameters:
      identifiers - All identifiers.
      system - The system to find.
      value - The value to set
      Returns:
      the created/modified Identifier
    • findBySystem

      public static List<org.hl7.fhir.r4.model.Identifier> findBySystem(List<org.hl7.fhir.r4.model.Identifier> identifiers, String system)
      Finds identifiers by their system in a list.
      Parameters:
      identifiers - All identifiers.
      system - The system to find.
      Returns:
      a list of the identifiers with the given system.
    • fromUuid

      public static org.hl7.fhir.r4.model.Identifier fromUuid(UUID uuid)
      Constructs an Identifier from a UUID.
      Parameters:
      uuid - The UUID to use as identifier.
      Returns:
      the constructed identifier.
    • fromOid

      public static org.hl7.fhir.r4.model.Identifier fromOid(String oid)
      Constructs an Identifier from an OID.
      Parameters:
      oid - The OID to use as identifier.
      Returns:
      the constructed identifier.