|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openhealthexchange.openpixpdq.ihe.registry.HL7
public class HL7
This class implements a number of HL7 parsing and generation utilities used by the XDS Repository Actors. The HAPI code could not be used in this class because the repository uses partial message pieces. It was easier just to implement them directly.
Constructor Summary | |
---|---|
HL7()
|
Method Summary | |
---|---|
static void |
fromCX(com.misyshealthcare.connect.base.PatientID pid,
java.lang.String cx)
Decodes an HL7 CX identifier string into a PatientID. |
static java.util.Date |
fromDT(java.lang.String date)
Decodes a DT data type into a Java date object. |
static java.util.Date |
fromDTM(java.lang.String dtm)
Extracts a Java date object from a DTM date/time type. |
static com.misyshealthcare.connect.base.SharedEnums.SexType |
fromSex(java.lang.String code)
Decodes and HL7 adminstrative sex value into a SexType enum. |
static com.misyshealthcare.connect.base.demographicdata.Address |
fromXAD(java.lang.String xad)
Decodes an HL7 XAD data type into an Address. |
static com.misyshealthcare.connect.base.clinicaldata.Provider |
fromXCN(java.lang.String xcn)
Extracts a Provide from an HL7 XCN data type. |
static java.lang.String |
fromXON(java.lang.String xon)
Gets the institution string from an HL7 encoded XON. |
static boolean |
fromXPN(PersonName personName,
java.lang.String xpn)
Decodes an HL7 XPN data type and put the name fields into a PersonName |
static com.misyshealthcare.connect.net.Identifier |
getAssigningAuthorityFromCX(java.lang.String cx)
Gets the Assigning Authority component from an HL7 CX identifier string. |
static com.misyshealthcare.connect.net.Identifier |
getAssigningAuthorityFromCXAuth(java.lang.String aa)
Gets the Assigning Authority component from an HL7 CX identifier Authority string. |
static java.lang.String |
getCXauthority(java.lang.String input)
Gets the 'assigning authority' component from an HL7 CX string. |
static java.lang.String |
getCXid(java.lang.String input)
Gets the 'id' component from an HL7 CX string. |
static java.lang.String |
getIdFromCX(java.lang.String cx)
Gets the ID component from an HL7 CX identifier string. |
static java.lang.String |
toCX(java.util.List<PatientIdentifier> pids)
Generates a CX list from a list of PatientIdentifier. |
static java.lang.String |
toCX(java.lang.String id,
com.misyshealthcare.connect.net.Identifier authority)
Generates a CX data type from an ID and an AssigningAuthority. |
static java.lang.String |
toCX(java.lang.String id,
java.lang.String authority)
Generates a CX data type from an ID and an AssigningAuthority. |
static java.lang.String |
toCXAuth(com.misyshealthcare.connect.net.Identifier authority)
Generates a CX data type from an AssigningAuthority. |
static java.lang.String |
toDT(java.util.Date date)
Generates a DT date type from a Java date object. |
static java.lang.String |
toDTM(java.util.Date date)
Generates a DTM date/time type from a Java date object. |
static java.lang.String |
toSex(com.misyshealthcare.connect.base.SharedEnums.SexType sex)
Converts an enum gender value to the coded value used in XDS HL7 PID-8 messages. |
static java.lang.String |
toXAD(com.misyshealthcare.connect.base.demographicdata.Address address)
Generates an XAD data type from an Address object. |
static java.lang.String |
toXCN(com.misyshealthcare.connect.base.clinicaldata.Provider person)
Generates an XCN name data type from a Provider. |
static java.lang.String |
toXON(java.lang.String institution)
Generates an XON data type from a string. |
static java.lang.String |
toXPN(PersonName personName)
Generates an XPN name data type from a Patient. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HL7()
Method Detail |
---|
public static java.lang.String toCX(java.lang.String id, com.misyshealthcare.connect.net.Identifier authority)
id
- The ID
public static java.lang.String toCX(java.util.List<PatientIdentifier> pids)
pids
- The PatientIdentifier List
public static java.lang.String toCX(java.lang.String id, java.lang.String authority)
id
- The IDauthority
- The assigning authority
public static java.lang.String toCXAuth(com.misyshealthcare.connect.net.Identifier authority)
authority
- The assigning authority
public static void fromCX(com.misyshealthcare.connect.base.PatientID pid, java.lang.String cx)
This method is used directly in some Mesa testing programs.
pid
- The PatientID to hold the decoded patient IDcx
- The CX string holding the patient ID to decodepublic static java.lang.String getIdFromCX(java.lang.String cx)
cx
- The CX string holding the ID to decodepublic static com.misyshealthcare.connect.net.Identifier getAssigningAuthorityFromCX(java.lang.String cx)
cx
- The CX string holding the Assigning Authority to decodepublic static com.misyshealthcare.connect.net.Identifier getAssigningAuthorityFromCXAuth(java.lang.String aa)
aa
- The CXAuth string holding the Assigning Authority to decodepublic static java.lang.String toDTM(java.util.Date date)
date
- The Java date to format
public static java.util.Date fromDTM(java.lang.String dtm)
dtm
- The HL7 encoded DTM
public static java.lang.String toDT(java.util.Date date)
date
- The Java date to format
public static java.util.Date fromDT(java.lang.String date)
date
- The DT date string
public static java.lang.String toXAD(com.misyshealthcare.connect.base.demographicdata.Address address)
address
- The address to format
public static com.misyshealthcare.connect.base.demographicdata.Address fromXAD(java.lang.String xad)
xad
- The XAD encoded address
public static java.lang.String toXON(java.lang.String institution)
institution
- The string to be formatted
public static java.lang.String fromXON(java.lang.String xon)
xon
- The XON to decode
public static java.lang.String toXCN(com.misyshealthcare.connect.base.clinicaldata.Provider person)
person
- The person's name to be formatted
public static com.misyshealthcare.connect.base.clinicaldata.Provider fromXCN(java.lang.String xcn)
xcn
- The XCN to decode
public static java.lang.String toXPN(PersonName personName)
personName
- The patient's name to be formatted
public static boolean fromXPN(PersonName personName, java.lang.String xpn)
PersonName
personName
- The PersonName
to get the namexpn
- The XPN data type to decode
public static java.lang.String toSex(com.misyshealthcare.connect.base.SharedEnums.SexType sex)
sex
- The gender enum to convert
public static com.misyshealthcare.connect.base.SharedEnums.SexType fromSex(java.lang.String code)
code
- The adminstrative sex code to decode
public static java.lang.String getCXid(java.lang.String input)
input
- The CX string
public static java.lang.String getCXauthority(java.lang.String input)
input
- The CX string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |