Hi there,

The issue here is that the ST data type is not a composite type, which
means that it can't have subcomponents. The ampersand (&) is a subcomponent
delimiter, so you need to choose a datatype that can be composite. One
random example might be "CE". If you get it's first component, and then get
the first subcomponent of that component, you will be able to generate what
you're looking for.

Cheers,
James


On Fri, Apr 26, 2013 at 12:26 AM, water watersniper
<watersni...@gmail.com>wrote:

> Hello! I'm learning HAPI from beginning.
> Now,I want to create MESSAGE like below:
>
>
> MSH|^~\&|||||||QRY^R02|1203|P|2.3.1<CR>
> QRD|20060731145557|R|I|Q895211|||||RES<CR>
> QRF|MON||||0&0<CR>
>
>
> but,I can't get correct QRF-5 field.
>
> This is my code:
>
> ST data = qrf.getOtherQRYSubjectFilter(0);
> data.setValue("0");
> ST subData = new ST(qrf.getMessage());
> subData.setValue("0");
> data.getExtraComponents().getComponent(0).setData(subData);
>
>
> It generate: QRF|MON||||0^0<CR>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to