Class XdsMetadataUtil

java.lang.Object
org.projecthusky.common.utils.XdsMetadataUtil

public class XdsMetadataUtil extends Object
Class XdsUtil provides helper methods for the IHE XDS Context.
  • Field Details

  • Method Details

    • convertDateToDtmString

      public static String convertDateToDtmString(Date dateTime)
      Method to convert a Date object to an DTM formatted string using the format yyyyMMddHHmmss.
      Parameters:
      dateTime - the date to be formatted to a string
      Returns:
      the string representing the date object
    • convertDtmStringToDate

      public static Date convertDtmStringToDate(String dateTimeString)
      Method to convert the DTM string to a Date object. The String will be parsed using the formats int the following definition and order: yyyyMMddHHmmss yyyyMMddHHmm yyyyMMddHH yyyyMMdd yyyyMM yyyy";
      Parameters:
      dateTimeString - the string with DTM format
      Returns:
      the representing Date object
    • convertEhcCodeToCode

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code convertEhcCodeToCode(Code code)
      Converts eHC Code to IPF Code.
      Parameters:
      code - the code
      Returns:
      the code
    • convertEhcCodeToCode

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code convertEhcCodeToCode(ValueSetEnumInterface code)
      Converts eHC Code to IPF Code.
      Parameters:
      code - the code
      Returns:
      the code
    • convertEhcCodeToIpfCode

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code convertEhcCodeToIpfCode(Code code, String language)
      Converts eHC Code and a given language to IPF Code.
      Parameters:
      code - the code
      language - the language
      Returns:
      the code
    • convertEhcCodeToCode

      public static List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Code> convertEhcCodeToCode(List<Code> codeList)
      Converts a list of eHC Code to a list of IPF Code.
      Parameters:
      codeList - the list of Code
      Returns:
      the list of IPF Code
    • convertEhcCodeToCode

      public static List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Code> convertEhcCodeToCode(ValueSetEnumInterface[] codeList)
      Converts a list of eHC Code to a list of IPF Code.
      Parameters:
      codeList - the list of Code
      Returns:
      the list of IPF Code
    • convertEhcCodeToQueryListCode

      public static org.openehealth.ipf.commons.ihe.xds.core.requests.query.QueryList<org.openehealth.ipf.commons.ihe.xds.core.metadata.Code> convertEhcCodeToQueryListCode(List<Code> codeList)
      Converts a list of eHC Code to a list of IPF Code.
      Parameters:
      codeList - the list of Code
      Returns:
      the list of IPF Code
    • convertEhcCodeToQueryListCode

      public static org.openehealth.ipf.commons.ihe.xds.core.requests.query.QueryList<org.openehealth.ipf.commons.ihe.xds.core.metadata.Code> convertEhcCodeToQueryListCode(ValueSetEnumInterface[] codeList)
      Converts a list of eHC Code to a list of IPF Code.
      Parameters:
      codeList - the list of Code
      Returns:
      the list of IPF Code
    • convertEhcIdentificator

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable convertEhcIdentificator(Identificator id)
      Convert identificator to IPF Identifiable
      Parameters:
      id - id
      Returns:
      the Identifiable
    • convertIpfOrganization

      public static Organization convertIpfOrganization(List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Organization> authorInstitutions)
      Converts an IPF Organization to husky Organization
      Parameters:
      authorInstitutions - the IPF Organization
      Returns:
      the husky Organization
    • convertInternationalStringType

      public static String convertInternationalStringType(org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString ist)
      Converts an OHT InternationalStringType to String
      Parameters:
      ist - the InternationalStringType
      Returns:
      the String
    • convertIpfAuthor

      public static Author convertIpfAuthor(org.openehealth.ipf.commons.ihe.xds.core.metadata.Author at)
      Converts an IPF Author to eHC Author
      Parameters:
      at - the IPF Author
      Returns:
      the eHC Author
    • convertIpfTelecoms

      public static List<Telecom> convertIpfTelecoms(List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Telecom> xtnList)
    • converteHCAuthor

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Author converteHCAuthor(Author at)
      Converts an eHC Author to IPF Author
      Parameters:
      at - the eHC Author
      Returns:
      the IPF Author
    • convertXonToIpfOrganization

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Organization convertXonToIpfOrganization(Organization xon)
      Converts an husky Organization to IPF Organization
      Parameters:
      xon - the husky Organization
      Returns:
      the IPF Organization
    • convertOhtCodedMetadataType

      public static Code convertOhtCodedMetadataType(org.openehealth.ipf.commons.ihe.xds.core.metadata.Code cmt)
      Converts an IPF Code to eHC Code
      Parameters:
      cmt - the Code
      Returns:
      the eHC Code
    • convertOhtCx

      public static Identificator convertOhtCx(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable cx)
      Converts an IPF Identifiable to an eHC Identificator
      Parameters:
      cx - the IPF Identifiable
      Returns:
      the Identificator
    • convertOhtSourcePatientInfoType

      public static Patient convertOhtSourcePatientInfoType(org.openehealth.ipf.commons.ihe.xds.core.metadata.PatientInfo spit)
      Converts an IPF PatientInfo to an eHC Patient
      Parameters:
      spit - the IPF PatientInfo
      Returns:
      the eHC Patient
    • convertOhtXad

      public static Address convertOhtXad(org.openehealth.ipf.commons.ihe.xds.core.metadata.Address xad)
      Converts an IPF Address to an eHC Address
      Parameters:
      xad - the IPF address
      Returns:
      the Address
    • convertOhtXcnIdToEhc

      public static Identificator convertOhtXcnIdToEhc(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority assigningAuthorityUniversalId, String id)
      Converts the parts of an XCN to an eHC Identificator
      Parameters:
      assigningAuthorityUniversalId - the assigningAuthorityUniversalId
      id - the ID part
      Returns:
      the Identificator
    • convertIpfIdentifiableToEhc

      public static Identificator convertIpfIdentifiableToEhc(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable id)
      Converts IPF Identifiable to an eHC Identificator
      Parameters:
      id - the Identifiable
      Returns:
      the Identificator
    • convertOhtXpn

      public static Name convertOhtXpn(org.openehealth.ipf.commons.ihe.xds.core.metadata.Name<?> xpn)
      Converts an IPF XPN (Name) to an eHC Name
      Parameters:
      xpn - the IPF Name
      Returns:
      the OHT Name
    • createCodedMetadata

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code createCodedMetadata(String schemeName, String code, String displayName)
      Creates the IPF code.
      Parameters:
      schemeName - scheme name
      code - code
      displayName - display name
      Returns:
      the code
    • createCodedMetadata

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code createCodedMetadata(String schemeName, String code, String displayName, String language)
      Creates the OHT coded metadata.
      Parameters:
      schemeName - scheme name
      code - code
      displayName - display name
      language - language
      Returns:
      the coded metadata type
    • createInternationalString

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString createInternationalString(String text)
      Creates the IPF LocalizedString.
      Parameters:
      text - text
      Returns:
      the org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString
    • createInternationalString

      public static org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString createInternationalString(String text, String language)
      Creates the IPF LocalizedString
      Parameters:
      text - the text
      language - the language
      Returns:
      the org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString