Class PixPdqV3Utils
java.lang.Object
org.projecthusky.communication.utils.PixPdqV3Utils
- Author:
- Anthony Larocca
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addCountyToAd
(String addressCounty, net.ihe.gazelle.hl7v3.datatypes.AD addressAD) static String[]
adToStringArray
(net.ihe.gazelle.hl7v3.datatypes.AD ad) Convert an AD (Address) object into a String array containing each part as follows: String[0] = Street Address Line String[1] = Additional Locator String[2] = City String[3] = State String[4] = Postal Code String[5] =<not populated>
String[6] =<not populated>
String[7] =<not populated>
String[8] = Countystatic net.ihe.gazelle.hl7v3.datatypes.II
copyII
(net.ihe.gazelle.hl7v3.datatypes.II sourceII) Create a new II with the same root, extension and assignAuthority as the supplied sourceII.static net.ihe.gazelle.hl7v3.datatypes.AD
createAd
(org.hl7.fhir.r4.model.Address address) Create an AD type object containing the supplied address parts that are non-empty (all are optional).static net.ihe.gazelle.hl7v3.datatypes.BL
createBL
(boolean value) Create a BL1 object with the supplied boolean.static net.ihe.gazelle.hl7v3.datatypes.CD
Create a CD type with the supplied values.static net.ihe.gazelle.hl7v3.datatypes.CE
Create a CE type with the code supplied and empty strings for all other attributes.static net.ihe.gazelle.hl7v3.datatypes.CE
Create a CE type with the supplied values.static net.ihe.gazelle.hl7v3.coctmt150002UV01.COCTMT150002UV01Organization
Create a COCTMT150002UV01Organization object with the provided organization IDstatic net.ihe.gazelle.hl7v3.coctmt150003UV03.COCTMT150003UV03Organization
createCOCTMT150003UV03Organization
(String organizationOID, String organizationName, String telecomValue) Create a COCTMT150003UV03Organization with the provided organization ID, name and telecomstatic net.ihe.gazelle.hl7v3.datatypes.CS
Create a CS1 type with the supplied code set.static net.ihe.gazelle.hl7v3.datatypes.EN
Create an EN type with the provided name components.static net.ihe.gazelle.hl7v3.datatypes.II
Create an II type with the specified root, extension, and namespace.static net.ihe.gazelle.hl7v3.datatypes.II
createIINullFlavor
(String nullFlavorType) Creates an II type with the specified NullFlavor ("NI", "MSK", "UNC", or "NA")static net.ihe.gazelle.hl7v3.datatypes.II
Create an II type with the specified root and a unique extension.static net.ihe.gazelle.hl7v3.datatypes.INT
Creates an INT1 type with the value of the supplied integer.static net.ihe.gazelle.hl7v3.datatypes.IVLTS
createIVLTS
(String date) Create an IVLTS type with value of the supplied date.static net.ihe.gazelle.hl7v3.mccimt000100UV01.MCCIMT000100UV01Device
createMCCIMT000100UV01Device
(String applicationOID, String facilityOID) Create a MCCIMT000100UV01Device with the supplied applicationOID (device) and facilityOID (organization).static net.ihe.gazelle.hl7v3.mccimt000100UV01.MCCIMT000100UV01Receiver
createMCCIMT000100UV01Receiver
(String applicationOID, String facilityOID) Create a MCCIMT000100UV01Receiver with the supplied applicationOID (device) and facilityOID (organization).static net.ihe.gazelle.hl7v3.mccimt000100UV01.MCCIMT000100UV01Sender
createMCCIMT000100UV01Sender
(String applicationOID, String facilityOID) Create a MCCIMT000100UV01Sender with the supplied applicationOID (device) and facilityOID (organization).static net.ihe.gazelle.hl7v3.mccimt000300UV01.MCCIMT000300UV01Device
createMCCIMT000300UV01Device
(String applicationOID, String facilityOID) Create a MCCIMT000300UV01Device with the supplied applicationOID (device) and facilityOID (organization).static net.ihe.gazelle.hl7v3.mccimt000300UV01.MCCIMT000300UV01Receiver
createMCCIMT000300UV01Receiver
(String applicationOID, String facilityOID) Create a MCCIMT000300UV01Receiver with the supplied applicationOID (device) and facilityOID (organization).static net.ihe.gazelle.hl7v3.mccimt000300UV01.MCCIMT000300UV01Sender
createMCCIMT000300UV01Sender
(String applicationOID, String facilityOID) Create a MCCIMT000300UV01Sender with the supplied applicationOID (device) and facilityOID (organization).static net.ihe.gazelle.hl7v3.datatypes.PN
Create a PN Object containing the supplied name parts.static net.ihe.gazelle.hl7v3.datatypes.PN
Create a PN Object containing the supplied name parts.static net.ihe.gazelle.hl7v3.mfmimt700701UV01.MFMIMT700701UV01Custodian
createRegistrationCustodian
(String organizationOID, String organizationName) Creates a MFMIMT700701UV01Custodian with the supplied Organization ID and namestatic net.ihe.gazelle.hl7v3.datatypes.ST
Create an ST1 type containing the supplied text value.static net.ihe.gazelle.hl7v3.datatypes.TEL
Create a TEL type object with the supplied telecom value and use value (if supplied)static net.ihe.gazelle.hl7v3.datatypes.TS
Create a TS1 element with the supplied value.static net.ihe.gazelle.hl7v3.datatypes.TS
Create a TS1 element with the current time.static String[]
enToStringArray
(net.ihe.gazelle.hl7v3.datatypes.EN en) Convert a EN object into a string array with the following values: String[0] = Family Name String[1] = Given Name (first instance) String[2] = Given Name (second instance, if available) String[3] = Suffix String[4] = Prefixstatic String
getTelecomByUseCode
(List<net.ihe.gazelle.hl7v3.datatypes.TEL> telecom, String useCode) Get the appropriate telecom value given a particular useCodestatic String[]
iiToStringArray
(net.ihe.gazelle.hl7v3.datatypes.II id) Converts an II type into a String array with the following values: String[0] = id.getExtension(); String[1] = id.getAssigningAuthorityName(); String[2] = id.getRoot(); String[3] = "";static String[]
pnToStringArray
(net.ihe.gazelle.hl7v3.datatypes.PN pn) Convert a PN object into a string array with the following values: String[0] = Family Name String[1] = Given Name (first instance) String[2] = Given Name (second instance, if available) String[3] = Suffix String[4] = Prefix
-
Method Details
-
adToStringArray
Convert an AD (Address) object into a String array containing each part as follows: String[0] = Street Address Line String[1] = Additional Locator String[2] = City String[3] = State String[4] = Postal Code String[5] =<not populated>
String[6] =<not populated>
String[7] =<not populated>
String[8] = County- Parameters:
ad
- (The AD object containing the address)- Returns:
- String array containing each part of the address.
-
copyII
public static net.ihe.gazelle.hl7v3.datatypes.II copyII(net.ihe.gazelle.hl7v3.datatypes.II sourceII) Create a new II with the same root, extension and assignAuthority as the supplied sourceII.- Parameters:
sourceII
-- Returns:
- II with the same root, extension and assignAuthority as the supplied sourceII.
-
createAd
public static net.ihe.gazelle.hl7v3.datatypes.AD createAd(org.hl7.fhir.r4.model.Address address) Create an AD type object containing the supplied address parts that are non-empty (all are optional). If no address parts are supplied, the returned value will be null.- Parameters:
address
-- Returns:
- AD type object containing the non-empty address parts provided.
-
addCountyToAd
public static boolean addCountyToAd(String addressCounty, net.ihe.gazelle.hl7v3.datatypes.AD addressAD) -
createBL
public static net.ihe.gazelle.hl7v3.datatypes.BL createBL(boolean value) Create a BL1 object with the supplied boolean.- Parameters:
value
-- Returns:
- BL1 object with a value equal to the supplied boolean.
-
createCD
public static net.ihe.gazelle.hl7v3.datatypes.CD createCD(String code, String codeSystem, String codeSystemName, String displayValue) Create a CD type with the supplied values. All parameters are optional. Only those that are non-empty will be populated in the CD object.- Parameters:
code
-codeSystem
-codeSystemName
-displayValue
-- Returns:
- CD type containing the supplied values.
-
createCE
Create a CE type with the code supplied and empty strings for all other attributes.- Parameters:
code
-- Returns:
- CE type with the code supplied and empty strings for all other attributes.
-
createCE
public static net.ihe.gazelle.hl7v3.datatypes.CE createCE(String code, String codeSystem, String codeSystemName, String displayValue) Create a CE type with the supplied values. All parameters are optional. Only those that are non-empty will be populated in the CD object.- Parameters:
code
-codeSystem
-codeSystemName
-displayValue
-- Returns:
- CE type containing the supplied values.
-
createCOCTMT150002UV01Organization
public static net.ihe.gazelle.hl7v3.coctmt150002UV01.COCTMT150002UV01Organization createCOCTMT150002UV01Organization(String root) Create a COCTMT150002UV01Organization object with the provided organization ID- Parameters:
root
- (Organization ID)- Returns:
- COCTMT150002UV01Organization object with the provided organization ID.
-
createCOCTMT150003UV03Organization
public static net.ihe.gazelle.hl7v3.coctmt150003UV03.COCTMT150003UV03Organization createCOCTMT150003UV03Organization(String organizationOID, String organizationName, String telecomValue) Create a COCTMT150003UV03Organization with the provided organization ID, name and telecom- Parameters:
organizationOID
-organizationName
-telecomValue
-- Returns:
- COCTMT150003UV03Organization object populated with provided values.
-
createCS
Create a CS1 type with the supplied code set.- Parameters:
code
-- Returns:
- CS1 type with the supplied code set.
-
createEN
public static net.ihe.gazelle.hl7v3.datatypes.EN createEN(String family, String given, String other, String suffix, String prefix) Create an EN type with the provided name components. All components are optional and will only be populated if non-empty.- Parameters:
family
-given
-other
-suffix
-prefix
-- Returns:
- EN Type containing the provided name components.
-
createII
public static net.ihe.gazelle.hl7v3.datatypes.II createII(String root, String extension, String namespace) Create an II type with the specified root, extension, and namespace. All parameters are optional and the resulting object will contain only those that are non-empty.- Parameters:
root
-extension
-namespace
-- Returns:
- II created with the specified root, extension, and namespace.
-
createIINullFlavor
Creates an II type with the specified NullFlavor ("NI", "MSK", "UNC", or "NA")- Parameters:
nullFlavorType
- (one of "NI", "MSK", "UNC", or "NA")- Returns:
- II created with the specified NullFlavor
-
createIIwithUniqueExtension
Create an II type with the specified root and a unique extension.- Parameters:
root
-- Returns:
- II created with an extension generated from currentTimeMillis and an incremented sequence.
-
createINT1
Creates an INT1 type with the value of the supplied integer.- Parameters:
i
- (The integer to create the INT1 type for)- Returns:
- INT1 type with the value of the supplied integer.
-
createIVLTS
Create an IVLTS type with value of the supplied date.- Parameters:
date
- (An appropriate string representation for the IVLTS value)- Returns:
- IVLTS type with value of the supplied date.
-
createMCCIMT000100UV01Device
public static net.ihe.gazelle.hl7v3.mccimt000100UV01.MCCIMT000100UV01Device createMCCIMT000100UV01Device(String applicationOID, String facilityOID) Create a MCCIMT000100UV01Device with the supplied applicationOID (device) and facilityOID (organization).- Parameters:
applicationOID
-facilityOID
- (optional - if omitted, there will be no represented organization)- Returns:
- MCCIMT000100UV01Device with the supplied applicationOID (device) and facilityOID.
-
createMCCIMT000100UV01Receiver
public static net.ihe.gazelle.hl7v3.mccimt000100UV01.MCCIMT000100UV01Receiver createMCCIMT000100UV01Receiver(String applicationOID, String facilityOID) Create a MCCIMT000100UV01Receiver with the supplied applicationOID (device) and facilityOID (organization).- Parameters:
applicationOID
-facilityOID
- (optional - if omitted, there will be no represented organization)- Returns:
- MCCIMT000100UV01Receiver with the supplied applicationOID (device) and facilityOID.
-
createMCCIMT000100UV01Sender
public static net.ihe.gazelle.hl7v3.mccimt000100UV01.MCCIMT000100UV01Sender createMCCIMT000100UV01Sender(String applicationOID, String facilityOID) Create a MCCIMT000100UV01Sender with the supplied applicationOID (device) and facilityOID (organization).- Parameters:
applicationOID
-facilityOID
- (optional - if omitted, there will be no represented organization)- Returns:
- MCCIMT000100UV01Sender with the supplied applicationOID (device) and facilityOID.
-
createMCCIMT000300UV01Device
public static net.ihe.gazelle.hl7v3.mccimt000300UV01.MCCIMT000300UV01Device createMCCIMT000300UV01Device(String applicationOID, String facilityOID) Create a MCCIMT000300UV01Device with the supplied applicationOID (device) and facilityOID (organization).- Parameters:
applicationOID
-facilityOID
- (optional - if omitted, there will be no represented organization)- Returns:
- MCCIMT000300UV01Device with the supplied applicationOID (device) and facilityOID.
-
createMCCIMT000300UV01Receiver
public static net.ihe.gazelle.hl7v3.mccimt000300UV01.MCCIMT000300UV01Receiver createMCCIMT000300UV01Receiver(String applicationOID, String facilityOID) Create a MCCIMT000300UV01Receiver with the supplied applicationOID (device) and facilityOID (organization).- Parameters:
applicationOID
-facilityOID
- (optional - if omitted, there will be no represented organization)- Returns:
- MCCIMT000300UV01Receiver with the supplied applicationOID (device) and facilityOID.
-
createMCCIMT000300UV01Sender
public static net.ihe.gazelle.hl7v3.mccimt000300UV01.MCCIMT000300UV01Sender createMCCIMT000300UV01Sender(String applicationOID, String facilityOID) Create a MCCIMT000300UV01Sender with the supplied applicationOID (device) and facilityOID (organization).- Parameters:
applicationOID
-facilityOID
- (optional - if omitted, there will be no represented organization)- Returns:
- MCCIMT000300UV01Sender with the supplied applicationOID (device) and facilityOID.
-
createPN
public static net.ihe.gazelle.hl7v3.datatypes.PN createPN(String family, String given, String other, String suffix, String prefix) Create a PN Object containing the supplied name parts.- Parameters:
family
-given
-other
-suffix
-prefix
-- Returns:
- PN Object containing the supplied name parts.
-
createPN
public static net.ihe.gazelle.hl7v3.datatypes.PN createPN(String familyName, String givenName, String suffixName, String prefixName) Create a PN Object containing the supplied name parts.- Parameters:
familyName
-givenName
-suffixName
-prefixName
-- Returns:
- PN Object containing the supplied name parts.
-
createRegistrationCustodian
public static net.ihe.gazelle.hl7v3.mfmimt700701UV01.MFMIMT700701UV01Custodian createRegistrationCustodian(String organizationOID, String organizationName) Creates a MFMIMT700701UV01Custodian with the supplied Organization ID and name- Parameters:
organizationOID
-organizationName
-- Returns:
- MFMIMT700701UV01Custodian with the supplied Organization ID and name.
-
createST
Create an ST1 type containing the supplied text value.- Parameters:
text
-- Returns:
- ST1 type containing the supplied text value.
-
createTEL
Create a TEL type object with the supplied telecom value and use value (if supplied)- Parameters:
telecomValue
- (the phone, web, or e-mail address value)useValue
- (either "WP" for Work or "HP" for Home)- Returns:
- TEL type with the supplied telecom and use values.
-
createTS
Create a TS1 element with the supplied value.- Parameters:
value
-- Returns:
- TS1 element with the supplied value.
-
createTSCurrentTime
public static net.ihe.gazelle.hl7v3.datatypes.TS createTSCurrentTime()Create a TS1 element with the current time.- Returns:
- TS1 element with the current time in format "yyyyMMddHHmmss"
-
enToStringArray
Convert a EN object into a string array with the following values: String[0] = Family Name String[1] = Given Name (first instance) String[2] = Given Name (second instance, if available) String[3] = Suffix String[4] = Prefix- Parameters:
en
- (The EN value to convert)- Returns:
- String[] with each component of the name.
-
getTelecomByUseCode
public static String getTelecomByUseCode(List<net.ihe.gazelle.hl7v3.datatypes.TEL> telecom, String useCode) Get the appropriate telecom value given a particular useCode- Parameters:
telecom
- (A list of telecoms)useCode
- (The useCode for the telecom to get)- Returns:
- String containing the value of the telecom with the supplied useCode or empty string.
-
iiToStringArray
Converts an II type into a String array with the following values: String[0] = id.getExtension(); String[1] = id.getAssigningAuthorityName(); String[2] = id.getRoot(); String[3] = "";- Parameters:
id
- (The II type to convert to string array)- Returns:
- String[] containing extension, assignAuthority, and name.
-
pnToStringArray
Convert a PN object into a string array with the following values: String[0] = Family Name String[1] = Given Name (first instance) String[2] = Given Name (second instance, if available) String[3] = Suffix String[4] = Prefix- Parameters:
pn
- (The PN value to convert)- Returns:
- String[] with each component of the name.
-