Be aware that in HL7 the segment separator is a "\r" (CR).
So if you print out the encoded message, only the last segment remains 
visible on Linux.
If you do something like 
System.out.println(encodedMessage.replace("\r","\n")) instead, you 
should see the complete message.

cheers
Christian

Am 12.04.2016 um 19:45 schrieb moparisthebest:
> Hello,
>
> I'm new to HAPI and HL7 in general, and I tried this example exactly:
>
> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/CreateAMessage.html
>
> With these maven dependencies:
>
>        <dependency>
>          <groupId>ca.uhn.hapi</groupId>
>          <artifactId>hapi-base</artifactId>
>          <version>2.2</version>
>        </dependency>
>        <dependency>
>          <groupId>ca.uhn.hapi</groupId>
>          <artifactId>hapi-structures-v24</artifactId>
>          <version>2.2</version>
>        </dependency>
>
> And though the example says it should print:
>
> MSH|^~\&|TestSendingSystem||||200701011539||ADT^A01^ADT A01||||123
> PID|||123456||Doe^John
>
> What it *actually* prints is only:
>
> PID|||123456||Doe^John
>
> What do I need to do to get it to print the entire message?
>
> I am using java version "1.8.0_74" amd64 on a Linux machine, if that
> matters.
>
> Thanks much!
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to