|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openhealthexchange.openpixpdq.ihe.impl_v2.hl7.HL7v231
public class HL7v231
The utility class for HL7 v2.3.1 messages.
Constructor Summary | |
---|---|
HL7v231()
|
Method Summary | |
---|---|
static java.util.Date |
buildDateFromInts(int year,
int month,
int day,
int hour,
int minute,
int second,
int tz,
boolean useTz)
Constructs a Date object from a set of date/time integer values. |
static java.lang.String |
formatDate(java.util.Date date)
Formats a date according to the HL7 v2.3.1 spec. |
static java.lang.String |
formatDate(java.util.Date date,
java.lang.String formatString)
Formats a date according to the HL7 v2.3.1 spec unless a custom format string is supplied, then use that. |
static java.lang.String |
formatDateTime(java.util.Date date)
Formats a date/time according to the HL7 v2.3.1 spec. |
static java.lang.String |
formatDateTime(java.util.Date date,
java.lang.String formatString)
Formats a date/time according to the HL7 v2.3.1 spec unless a custom format string is supplied, then use that. |
static java.lang.String |
formatPhoneNumber(java.lang.String country,
java.lang.String area,
java.lang.String number,
java.lang.String extension,
java.lang.String note)
Formats a phone number into the HL7 v2.3.1 spec. |
static java.lang.String |
getErrorString(java.lang.String code)
Creates a human-readable string our of an HL7 error code. |
static java.util.Date |
parseDate(java.lang.String theDate)
Parses an HL7 v2.3.1 date string into a Date object. |
static java.util.Date |
parseDateTime(java.lang.String theDate)
Parses an HL7 v2.3.1 date/time string into a Java Date object. |
static java.util.Date |
parseDateTimeGMT(java.lang.String theDate)
Parses an HL7 v2.3.1 date/time string into a Java Date object. |
static void |
parsePhoneNumber(com.misyshealthcare.connect.base.demographicdata.PhoneNumber phone,
java.lang.String theNumber)
Parses an HL7 v2.3.1 style formatted phone number into a PhoneNumber object. |
static void |
populateERR(ca.uhn.hl7v2.model.v231.segment.ERR err,
java.lang.String segmentId,
java.lang.String sequence,
java.lang.String fieldPosition,
java.lang.String fieldRepetition,
java.lang.String componentNumber,
java.lang.String hl7ErrorCode,
java.lang.String hl7ErrorText)
Populates ERR segment. |
static void |
populateMSA(ca.uhn.hl7v2.model.v231.segment.MSA msa,
java.lang.String acknowledgmentCode,
java.lang.String messageControlId)
Populates MSA segment, used by, for example, PIX Query response |
static void |
populateMSH(ca.uhn.hl7v2.model.v231.segment.MSH msh,
java.lang.String type,
java.lang.String event,
java.lang.String id,
com.misyshealthcare.connect.net.Identifier sendingApplication,
com.misyshealthcare.connect.net.Identifier sendingFacility,
com.misyshealthcare.connect.net.Identifier receivingApplication,
com.misyshealthcare.connect.net.Identifier receivingFacility)
Populates an HL7 v2.3.1 MSH segment according to the IHE standard |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HL7v231()
Method Detail |
---|
public static void populateMSH(ca.uhn.hl7v2.model.v231.segment.MSH msh, java.lang.String type, java.lang.String event, java.lang.String id, com.misyshealthcare.connect.net.Identifier sendingApplication, com.misyshealthcare.connect.net.Identifier sendingFacility, com.misyshealthcare.connect.net.Identifier receivingApplication, com.misyshealthcare.connect.net.Identifier receivingFacility) throws ca.uhn.hl7v2.model.DataTypeException, IheConfigurationException
msh
- The MSH segmenttype
- The type of message the segment belongs toevent
- The event that triggered this messageid
- The message control ID for this messagesendingApplication
- The sending applicationsendingFacility
- The sending facilityreceivingApplication
- The receiving applicationreceivingFacility
- The receiving facility
ca.uhn.hl7v2.model.DataTypeException
- When supplied data is inappropriate
IheConfigurationException
- When the connection to which this will be sent if not configured properlypublic static java.lang.String formatDateTime(java.util.Date date)
date
- The date/time to format
public static java.lang.String formatDateTime(java.util.Date date, java.lang.String formatString)
date
- The date/time to formatformatString
- A custom format string, or NULL for the default
public static java.util.Date parseDateTime(java.lang.String theDate)
theDate
- The date/time string to parse
public static java.util.Date parseDateTimeGMT(java.lang.String theDate)
theDate
- The date/time string to parse
public static java.lang.String formatDate(java.util.Date date)
date
- The date to format
public static java.lang.String formatDate(java.util.Date date, java.lang.String formatString)
date
- The date to formatformatString
- A custom format string, or NULL for the default
public static java.util.Date parseDate(java.lang.String theDate)
theDate
- The date string to parse
public static java.util.Date buildDateFromInts(int year, int month, int day, int hour, int minute, int second, int tz, boolean useTz)
year
- The year for the Datemonth
- The month (January = 1)day
- The day of the monthhour
- The hour of the day (0-23)minute
- The minutessecond
- The secondstz
- The timezone offset as an integeruseTz
- True if the timezone offset should be used when encoding the time, False to use the local timezone
public static java.lang.String formatPhoneNumber(java.lang.String country, java.lang.String area, java.lang.String number, java.lang.String extension, java.lang.String note)
country
- The country codearea
- The area codenumber
- The numberextension
- The extensionnote
- Any note text
public static void parsePhoneNumber(com.misyshealthcare.connect.base.demographicdata.PhoneNumber phone, java.lang.String theNumber)
phone
- The phone number object to populate from the stringtheNumber
- The phone number string to be parsedpublic static java.lang.String getErrorString(java.lang.String code)
code
- The error code
public static void populateMSA(ca.uhn.hl7v2.model.v231.segment.MSA msa, java.lang.String acknowledgmentCode, java.lang.String messageControlId) throws ca.uhn.hl7v2.model.DataTypeException
msa
- The Message Acknowledgment segmentacknowledgmentCode
- The two letter of acknowledgment codemessageControlId
- The message control Id
ca.uhn.hl7v2.model.DataTypeException
- When MSA segment values cannot be setpublic static void populateERR(ca.uhn.hl7v2.model.v231.segment.ERR err, java.lang.String segmentId, java.lang.String sequence, java.lang.String fieldPosition, java.lang.String fieldRepetition, java.lang.String componentNumber, java.lang.String hl7ErrorCode, java.lang.String hl7ErrorText) throws ca.uhn.hl7v2.model.DataTypeException, ca.uhn.hl7v2.HL7Exception
err
- The ERR segment to be populatedsegmentId
- The id of the segment that caused the errorsequence
- The sequence of the segmentfieldPosition
- The field position where the error isfieldRepetition
- The repetition of the error fieldcomponentNumber
- The component number in the error fieldhl7ErrorCode
- The HL7 error codehl7ErrorText
- The HL7 error text
ca.uhn.hl7v2.model.DataTypeException
- When ERR segment values cannot be set.
ca.uhn.hl7v2.HL7Exception
- When HL7 related issue happens
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |