Package org.projecthusky.common.utils
Class XdsMetadataUtil
java.lang.Object
org.projecthusky.common.utils.XdsMetadataUtil
Class XdsUtil provides helper methods for the IHE XDS Context.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertDateToDtmString
(Date dateTime) Method to convert a Date object to an DTM formatted string using the format yyyyMMddHHmmss.static Date
convertDtmStringToDate
(String dateTimeString) Method to convert the DTM string to a Date object.static org.openehealth.ipf.commons.ihe.xds.core.metadata.Author
Converts an eHC Author to IPF Authorstatic 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.static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code
Converts eHC Code to IPF Code.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.static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code
convertEhcCodeToCode
(Code code) Converts eHC Code to IPF Code.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.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.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.static org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable
Convert identificator to IPF Identifiablestatic String
convertInternationalStringType
(org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString ist) Converts an OHT InternationalStringType to Stringstatic Author
convertIpfAuthor
(org.openehealth.ipf.commons.ihe.xds.core.metadata.Author at) Converts an IPF Author to eHC Authorstatic Identificator
convertIpfIdentifiableToEhc
(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable id) Converts IPF Identifiable to an eHC Identificatorstatic Organization
convertIpfOrganization
(List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Organization> authorInstitutions) Converts an IPF Organization to husky OrganizationconvertIpfTelecoms
(List<org.openehealth.ipf.commons.ihe.xds.core.metadata.Telecom> xtnList) static Code
convertOhtCodedMetadataType
(org.openehealth.ipf.commons.ihe.xds.core.metadata.Code cmt) Converts an IPF Code to eHC Codestatic Identificator
convertOhtCx
(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable cx) Converts an IPF Identifiable to an eHC Identificatorstatic Patient
convertOhtSourcePatientInfoType
(org.openehealth.ipf.commons.ihe.xds.core.metadata.PatientInfo spit) Converts an IPF PatientInfo to an eHC Patientstatic Address
convertOhtXad
(org.openehealth.ipf.commons.ihe.xds.core.metadata.Address xad) Converts an IPF Address to an eHC Addressstatic Identificator
convertOhtXcnIdToEhc
(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority assigningAuthorityUniversalId, String id) Converts the parts of an XCN to an eHC Identificatorstatic Name
convertOhtXpn
(org.openehealth.ipf.commons.ihe.xds.core.metadata.Name<?> xpn) Converts an IPF XPN (Name) to an eHC Namestatic org.openehealth.ipf.commons.ihe.xds.core.metadata.Organization
Converts an husky Organization to IPF Organizationstatic org.openehealth.ipf.commons.ihe.xds.core.metadata.Code
createCodedMetadata
(String schemeName, String code, String displayName) Creates the IPF code.static org.openehealth.ipf.commons.ihe.xds.core.metadata.Code
createCodedMetadata
(String schemeName, String code, String displayName, String language) Creates the OHT coded metadata.static org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString
Creates the IPF LocalizedString.static org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString
createInternationalString
(String text, String language) Creates the IPF LocalizedString
-
Field Details
-
DTM_FMT_Y
- See Also:
-
DTM_FMT_YM
- See Also:
-
DTM_FMT_YMD
- See Also:
-
DTM_FMT_YMDH
- See Also:
-
DTM_FMT_YMDHM
- See Also:
-
DTM_FMT_YMDHMS
- See Also:
-
DTM_FMT
-
-
Method Details
-
convertDateToDtmString
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
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 codelanguage
- 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
Converts an IPF Author to eHC Author- Parameters:
at
- the IPF Author- Returns:
- the eHC Author
-
convertIpfTelecoms
-
converteHCAuthor
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
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 assigningAuthorityUniversalIdid
- 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
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 namecode
- codedisplayName
- 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 namecode
- codedisplayName
- display namelanguage
- 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 textlanguage
- the language- Returns:
- the org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString
-