Package org.projecthusky.common.utils
Class Util
java.lang.Object
org.projecthusky.common.utils.Util
Deprecated, for removal: This API element is subject to removal in a future version.
Helper methods for the Husky and CDA.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated, for removal: This API element is subject to removal in a future version.HL7v3 namespace.static final String
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_EMAIL_PREFIX.static final String
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_FAX_PREFIX.static final String
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_PHONE_PREFIX.static final String
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_WEBSITE_PREFIX. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
atLeastOne
(List<?> l) Deprecated, for removal: This API element is subject to removal in a future version.Checks to see if the list has at least one element.static List<Identificator>
convertIds
(List<II> mII) Deprecated.static AD
createAddress
(String zip, String city, PostalAddressUse usage) Deprecated, for removal: This API element is subject to removal in a future version.Creates an address.static POCDMT000040AssignedAuthor
Deprecated, for removal: This API element is subject to removal in a future version.Creates an MDHT assignedEntity object from an MDHT AssignedAuthor object.static POCDMT000040AssignedAuthor
createAssignedAuthorFromOrganization
(Organization organization) Deprecated.(it will be replace by methodOrganization.createHl7CdaR2Pocdmt000040AssignedAuthor()
static POCDMT000040AssignedEntity
Deprecated, for removal: This API element is subject to removal in a future version.Creates an assignedEntity object from an AssignedAuthor object.static POCDMT000040AssignedEntity
createAssignedEntityFromOrganization
(Organization organization) Deprecated, for removal: This API element is subject to removal in a future version.Creates the assigned entity from organization.static POCDMT000040Authenticator
createAuthenticatorFromAuthor
(Author author) Deprecated, for removal: This API element is subject to removal in a future version.Creates the authenticator from author.static POCDMT000040Author
createAuthorFromAuthenticator
(POCDMT000040Authenticator authenticator) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT Author object from an MDHT LegalAuthenticator object.static POCDMT000040Author
createAuthorFromLegalAuthenticator
(POCDMT000040LegalAuthenticator authenticator) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT Author object from an MDHT LegalAuthenticator object.createCustodianOrganizationFromOrganization
(Organization organization) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT CustodianOrganization object from an eHC Organization object.static IVLTS
Deprecated, for removal: This API element is subject to removal in a future version.Creates the effective time null flavor unk.static TEL
createEMail
(String eMail, TelecomAddressUse usage) Deprecated, for removal: This API element is subject to removal in a future version.Creates the MDHT email TEL object.static String
createEurDateStrFromTS
(String hl7Stimestamp) Deprecated, for removal: This API element is subject to removal in a future version.Creates the eur date str from ts.static TEL
createFax
(String faxNr, TelecomAddressUse usage) Deprecated, for removal: This API element is subject to removal in a future version.Creates the MDHT fax TEL object.Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT LegalAuthor object from an MDHT Author object.Deprecated, for removal: This API element is subject to removal in a future version.Creates the organization from custodian organization.static Organization
Deprecated, for removal: This API element is subject to removal in a future version.Creates the organization from participant.static PN
createPnFromOn
(ON on) Deprecated, for removal: This API element is subject to removal in a future version.Creates the pn from on.static ED
createReference
(int contentId, String prefix) Deprecated.static ED
createReference
(String reference) Deprecated.moved toReference.createReference(String)
static ED
createReference
(String url, String narrativeText) Deprecated.static ED
createReference
(ED existingText, String reference) Deprecated.static TEL
createReferenceTel
(String value) Deprecated.moved toReference.createReferenceTel(String)
static TEL
createTel
(String telNr, TelecomAddressUse usage) Deprecated, for removal: This API element is subject to removal in a future version.Creates the MDHT phone TEL object.static int
getChecksum
(Serializable object) Deprecated, for removal: This API element is subject to removal in a future version.Gets the checksum of a serializable object.static String
Deprecated, for removal: This API element is subject to removal in a future version.Extracts the reference to a comment from a given list of MDHT EntryRelationship objects.static String
Deprecated, for removal: This API element is subject to removal in a future version.Returns the text of a comment from a given list of MDHT EntryRelationship objects.static String
getCommentText
(List<POCDMT000040EntryRelationship> e, String contentId) Deprecated, for removal: This API element is subject to removal in a future version.Returns the text of a comment from a given list of MDHT EntryRelationship objects and sets the text reference.static String
Deprecated, for removal: This API element is subject to removal in a future version.Gets the current directory.static Map<String,
TelecomAddressUse> Deprecated, for removal: This API element is subject to removal in a future version.Gets the e mail from an ArrayList of TEL. Liefert e mail aus einer ArrayList of TEL.static Map<String,
TelecomAddressUse> Deprecated, for removal: This API element is subject to removal in a future version.Gets the fax from an ArrayList of TEL. Liefert cax aus einer ArrayList von TEL.static Map<String,
TelecomAddressUse> Deprecated, for removal: This API element is subject to removal in a future version.Gets the e mail from an ArrayList of TEL. Liefert e mail aus einer ArrayList von TEL.static Random
getRand()
Deprecated, for removal: This API element is subject to removal in a future version.static String
Deprecated, for removal: This API element is subject to removal in a future version.Gets the rsc directory (./rsc or ../rsc or specified by the command line argument rscdir).Deprecated, for removal: This API element is subject to removal in a future version.Gets the system fonts paths in relation to the current OS.static String
Deprecated, for removal: This API element is subject to removal in a future version.Gets a temp folder for output files.static String
getUsedMemoryString
(String hint) Deprecated, for removal: This API element is subject to removal in a future version.Gets the used memory as string for display e.g.static InputStream
getUtf8InputStream
(File file) Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.static InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.static InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.static InputStream
getUtf8InputStream
(String fileName) Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.static int
Deprecated, for removal: This API element is subject to removal in a future version.Gets the free Java VM heap space in mega bytes.static int
Deprecated, for removal: This API element is subject to removal in a future version.Gets the total Java VM heap space in mega bytes.static int
Deprecated, for removal: This API element is subject to removal in a future version.Gets the used Java VM heap space in mega bytes.static Map<String,
TelecomAddressUse> getWebsites
(List<TEL> telecoms) Deprecated, for removal: This API element is subject to removal in a future version.Gets the website from an ArrayList of TEL. Liefert die Webseite aus einer ArrayList von TEL.static boolean
Deprecated, for removal: This API element is subject to removal in a future version.Checks if an EntryRelationship is a comment.static String
Deprecated, for removal: This API element is subject to removal in a future version.Join an ArrayList of String with person names to a whole name.static String
joinEListStr
(List<ENXP> list) Deprecated, for removal: This API element is subject to removal in a future version.Join a list of MDHT ENXP (name parts) to a whole person name.static void
logAvailableMemory
(Class theClass, String hint) Deprecated, for removal: This API element is subject to removal in a future version.Logs the available memory.static void
runExternalCommand
(String cmd) Deprecated, for removal: This API element is subject to removal in a future version.Runs the given external command.static void
Deprecated, for removal: This API element is subject to removal in a future version.static ST
Deprecated, for removal: This API element is subject to removal in a future version.Creates an MDHT ST.static InputStream
string2InputStream
(String inputStr) Deprecated, for removal: This API element is subject to removal in a future version.Converts the given string to an InputStream.
-
Field Details
-
TELECOMS_EMAIL_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_EMAIL_PREFIX.- See Also:
-
TELECOMS_FAX_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_FAX_PREFIX.- See Also:
-
TELECOMS_PHONE_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_PHONE_PREFIX.- See Also:
-
TELECOMS_WEBSITE_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.The Constant TELECOMS_WEBSITE_PREFIX. Note: omitting the : here in order to support http and https- See Also:
-
NAMESPACE_HL7_V3
Deprecated, for removal: This API element is subject to removal in a future version.HL7v3 namespace.- See Also:
-
-
Method Details
-
atLeastOne
Deprecated, for removal: This API element is subject to removal in a future version.Checks to see if the list has at least one element.- Parameters:
l
- the list- Returns:
- false if l is null, if l.size() < 1 or if l.get(0) is null. Otherwise, return true.
-
convertIds
Deprecated.(replaced byIdentificator.getIdentificatorList(List)
Converts a list of II int a list of Identificators.- Parameters:
mII
- the list to convert- Returns:
- returns a list of Identificators
-
createAddress
Deprecated, for removal: This API element is subject to removal in a future version.Creates an address.- Parameters:
zip
- ZIP codecity
- the cityusage
- usage of this address- Returns:
- HL7 AD Object
-
createAssignedAuthorFromAssignedEntity
public static POCDMT000040AssignedAuthor createAssignedAuthorFromAssignedEntity(POCDMT000040AssignedEntity a) Deprecated, for removal: This API element is subject to removal in a future version.Creates an MDHT assignedEntity object from an MDHT AssignedAuthor object.- Parameters:
a
- the assignedAuthor- Returns:
- the assignedEntity
-
createAssignedAuthorFromOrganization
public static POCDMT000040AssignedAuthor createAssignedAuthorFromOrganization(Organization organization) Deprecated.(it will be replace by methodOrganization.createHl7CdaR2Pocdmt000040AssignedAuthor()
Creates the assigned author from organization.- Parameters:
organization
- the organization- Returns:
- the assigned author
-
createAssignedEntityFromAssignedAuthor
public static POCDMT000040AssignedEntity createAssignedEntityFromAssignedAuthor(POCDMT000040AssignedAuthor a) Deprecated, for removal: This API element is subject to removal in a future version.Creates an assignedEntity object from an AssignedAuthor object.- Parameters:
a
- the assignedAuthor- Returns:
- the assignedEntity
-
createAssignedEntityFromOrganization
public static POCDMT000040AssignedEntity createAssignedEntityFromOrganization(Organization organization) Deprecated, for removal: This API element is subject to removal in a future version.Creates the assigned entity from organization.- Parameters:
organization
- the organization- Returns:
- the assigned entity
-
createAuthenticatorFromAuthor
Deprecated, for removal: This API element is subject to removal in a future version.Creates the authenticator from author.- Parameters:
author
- the author- Returns:
- the authenticator
-
createAuthorFromAuthenticator
public static POCDMT000040Author createAuthorFromAuthenticator(POCDMT000040Authenticator authenticator) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT Author object from an MDHT LegalAuthenticator object.- Parameters:
authenticator
-
the authenticator- Returns:
- the Author
-
createAuthorFromLegalAuthenticator
public static POCDMT000040Author createAuthorFromLegalAuthenticator(POCDMT000040LegalAuthenticator authenticator) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT Author object from an MDHT LegalAuthenticator object.- Parameters:
authenticator
-
the authenticator- Returns:
- the Author
-
createCustodianOrganizationFromOrganization
public static POCDMT000040CustodianOrganization createCustodianOrganizationFromOrganization(Organization organization) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT CustodianOrganization object from an eHC Organization object.- Parameters:
organization
- the Organization- Returns:
- CustodianOrganization the CustodianOrganization
-
createEffectiveTimeNullFlavorUnk
Deprecated, for removal: This API element is subject to removal in a future version.Creates the effective time null flavor unk.- Returns:
- the ivl ts
-
createEMail
Deprecated, for removal: This API element is subject to removal in a future version.Creates the MDHT email TEL object.- Parameters:
eMail
-
e mailusage
-
usage- Returns:
- the tel
-
createEurDateStrFromTS
Deprecated, for removal: This API element is subject to removal in a future version.Creates the eur date str from ts.- Parameters:
hl7Stimestamp
-
hl7 stimestamp- Returns:
- the string
-
createFax
Deprecated, for removal: This API element is subject to removal in a future version.Creates the MDHT fax TEL object.- Parameters:
faxNr
-
fax nrusage
-
usage- Returns:
- the tel
-
createLegalAuthenticatorFromAuthor
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new MDHT LegalAuthor object from an MDHT Author object. Signature Code will be set to fixed 's'- Parameters:
author
-
the author- Returns:
- the legal authenticator
-
createOrganizationFromCustodianOrganization
public static POCDMT000040CustodianOrganization createOrganizationFromCustodianOrganization(POCDMT000040CustodianOrganization mdhtCO) Deprecated, for removal: This API element is subject to removal in a future version.Creates the organization from custodian organization.- Parameters:
mdhtCO
- the mdht CO- Returns:
- the org.openhealthtools.mdht.uml.cda. organization
-
createOrganizationFromParticipant
Deprecated, for removal: This API element is subject to removal in a future version.Creates the organization from participant.- Parameters:
p
- the p- Returns:
- the organization
-
createPnFromOn
Deprecated, for removal: This API element is subject to removal in a future version.Creates the pn from on.- Parameters:
on
- the on- Returns:
- the pn
-
createReference
Deprecated.Creates an MDHT ED reference from a given String. Adds the hashtag '#' automatically, if not present as first character.- Parameters:
existingText
- the existing textreference
- the reference- Returns:
- the MDHT ED
-
createReference
Deprecated.Creates the reference.- Parameters:
contentId
-
content idprefix
-
prefix- Returns:
- the ed
-
createReference
Deprecated.moved toReference.createReference(String)
Creates an MDHT ED reference from a given String. Adds the hashtag '#' automatically, if not present as first character.- Parameters:
reference
- the reference value- Returns:
- the MDHT ED
-
createReference
Deprecated.Creates an MDHT ED reference from a given String.- Parameters:
url
- the reference urlnarrativeText
- the reference narrative text- Returns:
- the MDHT ED
-
createReferenceTel
Deprecated.moved toReference.createReferenceTel(String)
Creates the reference tel.- Parameters:
value
- the value- Returns:
- the tel
-
createTel
Deprecated, for removal: This API element is subject to removal in a future version.Creates the MDHT phone TEL object.- Parameters:
telNr
-
tel nrusage
-
usage- Returns:
- the tel
-
getChecksum
Deprecated, for removal: This API element is subject to removal in a future version.Gets the checksum of a serializable object.- Parameters:
object
- the object- Returns:
- the checksum
-
getCommentRef
Deprecated, for removal: This API element is subject to removal in a future version.Extracts the reference to a comment from a given list of MDHT EntryRelationship objects.- Parameters:
e
- the EntryRelationship list- Returns:
- the reference to the comment
-
getCommentText
Deprecated, for removal: This API element is subject to removal in a future version.Returns the text of a comment from a given list of MDHT EntryRelationship objects.- Parameters:
e
- the EntryRelationship list- Returns:
- the tet of the comment
-
getCommentText
Deprecated, for removal: This API element is subject to removal in a future version.Returns the text of a comment from a given list of MDHT EntryRelationship objects and sets the text reference.- Parameters:
e
- the EntryRelationship listcontentId
- the content id for the text reference- Returns:
- the tet of the comment
-
getCurrentDirectory
Deprecated, for removal: This API element is subject to removal in a future version.Gets the current directory.- Returns:
- the current directory
-
getEMail
Deprecated, for removal: This API element is subject to removal in a future version.Gets the e mail from an ArrayList of TEL.Liefert e mail aus einer ArrayList of TEL.- Parameters:
telecoms
-
the telecoms- Returns:
- the e mail
-
getFax
Deprecated, for removal: This API element is subject to removal in a future version.Gets the fax from an ArrayList of TEL.Liefert cax aus einer ArrayList von TEL.- Parameters:
telecoms
-
the telecoms- Returns:
- the fax
-
getPhones
Deprecated, for removal: This API element is subject to removal in a future version.Gets the e mail from an ArrayList of TEL.Liefert e mail aus einer ArrayList von TEL.- Parameters:
telecoms
-
the telecoms- Returns:
- the phone
-
getRscDir
Deprecated, for removal: This API element is subject to removal in a future version.Gets the rsc directory (./rsc or ../rsc or specified by the command line argument rscdir).- Returns:
- the rsc dir
-
getSystemFontsPaths
Deprecated, for removal: This API element is subject to removal in a future version.Gets the system fonts paths in relation to the current OS. This is where all the fonts must be found in order to embed them into the PDF/A document.- Returns:
- the system fonts paths
-
getTempDirectory
Deprecated, for removal: This API element is subject to removal in a future version.Gets a temp folder for output files. If you set an environment variable with the name 'eHCTempPath' the Husky will use the path specified in this environment variable. If no such environment variable is set, it will try to use /temp. If the path is not writable the Husky will use the system temp folder.- Returns:
- path to temp folder
-
getUsedMemoryString
Deprecated, for removal: This API element is subject to removal in a future version.Gets the used memory as string for display e.g. to console.- Parameters:
hint
- to be added to the string- Returns:
- the used memory string
-
getUtf8InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.- Parameters:
file
- the file- Returns:
- the utf 8 input stream from file
-
getUtf8InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.- Parameters:
fis
- the fis- Returns:
- the utf 8 input stream from file
-
getUtf8InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.- Parameters:
is
- the is- Returns:
- the utf 8 input stream from file
-
getUtf8InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets the utf 8 input stream from file.- Parameters:
fileName
- the file name- Returns:
- the utf 8 input stream from file
-
getVmMemoryFreeInMegaBytes
public static int getVmMemoryFreeInMegaBytes()Deprecated, for removal: This API element is subject to removal in a future version.Gets the free Java VM heap space in mega bytes.- Returns:
- the free Java VM heap space in mega bytes.
-
getVmMemoryTotalInMegaBytes
public static int getVmMemoryTotalInMegaBytes()Deprecated, for removal: This API element is subject to removal in a future version.Gets the total Java VM heap space in mega bytes.- Returns:
- the total Java VM heap space in mega bytes.
-
getVmMemoryUsedInMegaBytes
public static int getVmMemoryUsedInMegaBytes()Deprecated, for removal: This API element is subject to removal in a future version.Gets the used Java VM heap space in mega bytes.- Returns:
- the used Java VM heap space in mega bytes.
-
getWebsites
Deprecated, for removal: This API element is subject to removal in a future version.Gets the website from an ArrayList of TEL.Liefert die Webseite aus einer ArrayList von TEL.- Parameters:
telecoms
-
the telecoms- Returns:
- the webside
-
isComment
Deprecated, for removal: This API element is subject to removal in a future version.Checks if an EntryRelationship is a comment.- Parameters:
er
- the EntryRelationship- Returns:
- true if the EntryRelationship is a comment, false otherwise
-
join
Deprecated, for removal: This API element is subject to removal in a future version.Join an ArrayList of String with person names to a whole name.- Parameters:
nameList
-
name listdelimiter
-
delimiter- Returns:
- the string
-
joinEListStr
Deprecated, for removal: This API element is subject to removal in a future version.Join a list of MDHT ENXP (name parts) to a whole person name.- Parameters:
list
-
the list- Returns:
- the string
-
logAvailableMemory
Deprecated, for removal: This API element is subject to removal in a future version.Logs the available memory.- Parameters:
theClass
- the the class Class to be used in the Log4J loghint
- the hint hint to be added to the log message
-
runExternalCommand
Deprecated, for removal: This API element is subject to removal in a future version.Runs the given external command.- Parameters:
cmd
- the command to run- Throws:
IOException
- Signals that an I/O exception has occurred.InterruptedException
- the interrupted exception
-
st
Deprecated, for removal: This API element is subject to removal in a future version.Creates an MDHT ST.- Parameters:
text
-
the text- Returns:
- the st
-
string2InputStream
Deprecated, for removal: This API element is subject to removal in a future version.Converts the given string to an InputStream.- Parameters:
inputStr
- the input string- Returns:
- the input stream
-
getRand
Deprecated, for removal: This API element is subject to removal in a future version. -
setRand
Deprecated, for removal: This API element is subject to removal in a future version.
-
Identificator.getIdentificatorList(List)