I have troubles to parse a string with HAPI (*HL7 v2.6*).
This is my code:
public static void main(String[] args) {
String msg = "MSH|^~
\\&|HUB||server||201010172015||ACK^W01^ACK|1234|P|2.6<cr>"
+ "MSA|AA|2468|<cr>";
Parser p = new GenericParser();
Message hapiMsg;
try {
// The parse method performs the actual parsing
hapiMsg = p.parse(msg);
} catch (EncodingNotSupportedException e) {
e.printStackTrace();
return;
} catch (HL7Exception e) {
e.printStackTrace();
return;
}
It throws a HL7Exception.
------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment. Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel