Class FHIRUtilities


  • public class FHIRUtilities
    extends Object
    A collection of miscellaneous utility functions used by the various fhir-* projects.
    • Constructor Detail

      • FHIRUtilities

        public FHIRUtilities()
    • Method Detail

      • getObjectHandle

        public static String getObjectHandle​(Object o)
        Returns the specified object's handle in hex format.
      • stripNamespaceIfPresentInDiv

        public static String stripNamespaceIfPresentInDiv​(String str)
        This function will remove any whitspace characters which appear in a '
        ...
        ' section within the specified string.
        Parameters:
        str - the string to process
        Returns:
        the input string with the 'div' whitespace characters removed
      • stripNewLineWhitespaceIfPresentInDiv

        public static String stripNewLineWhitespaceIfPresentInDiv​(String str)
        This function will remove any newlines which appear in a '
        ...
        ' section within the specified string.
        Parameters:
        str - the string to process
        Returns:
        the input string with the 'div' new lines removed
      • decode

        public static String decode​(String encodedString)
                             throws Exception
        This function can be used to decode an xor-encoded value that was produced by the WebSphere Liberty 'securityUtility' command.
        Parameters:
        encodedString - the encoded string to be decoded
        Returns:
        the decoded version of the input string
        Throws:
        Exception
      • isEncoded

        public static boolean isEncoded​(String s)
        Returns true if and only if the specified string 's' is an encoded value, which means it starts with the string "{xor}".
        Parameters:
        s - the string value to check
      • convertToTimestamp

        public static Timestamp convertToTimestamp​(ZonedDateTime zdt)
        For R4 model, generate a sql timestamp
        Parameters:
        zdt -
        Returns:
      • formatTimestamp

        public static String formatTimestamp​(Date date)