If possible, you should upgrade to most recent version (2.1). This version
makes the distinction between ERR segments as of version 2.5 (where ERR-2
and ERR-3 is populated) and before version 2.5 (where ERR-1 is used) when
generateACK is called with an Exception.
Anyway, you can use util classes like Terser to modify fields of the ERR
segment in the ACK message as you wish. In your case you would probably
have to copy values from ERR-1 to ERR-3
Segment err = (Segment)msg.get("ERR");
Terser.set(err, 3, 0, 1, 1, Terser.get(err, 1, 0, 4, 1));
Terser.set(err, 3, 0, 2, 1, Terser.get(err, 1, 0, 4, 2));
Terser.set(err, 3, 0, 3, 1, Terser.get(err, 1, 0, 4, 3));
Terser.set(err, 3, 0, 9, 1, Terser.get(err, 1, 0, 4, 5));
Terser.set(err, 4, 0, 1, 1, "E");
and optionally remove the values in ERR-1 afterwards:
Terser.set(err, 1, 0, 4, 1, "");
....
Hope this helps
Christian
2013/6/7 vijayaratha vijayasingam <vijayara...@gmail.com>
> I'm using hapi 1.2 version
>
> Thanks
>
>
> On 7 June 2013 12:12, Christian Ohr <christian....@gmail.com> wrote:
>
>> What HAPI version are you using?
>>
>> Christian
>>
>>
>> 2013/6/7 vijayaratha vijayasingam <vijayara...@gmail.com>
>>
>>> Dear all;
>>> Any clue?..
>>> How can i make those fields available?
>>> I need it urgently..
>>> Thanks
>>>
>>>
>>> On 6 June 2013 13:34, vijayaratha vijayasingam <vijayara...@gmail.com>wrote:
>>>
>>>> Hi all;
>>>> Any idea why hapi missed to add field 3,4 and 5?
>>>> I checked with Hapi testpanel, above two messages are valid but in very
>>>> first NACK message, i dont get field 3,4,5..
>>>> I would like to get with fields
>>>>
>>>> Thanks
>>>>
>>>>
>>>> On 5 June 2013 13:07, vijayaratha vijayasingam
>>>> <vijayara...@gmail.com>wrote:
>>>>
>>>>> Hi all;
>>>>> I have an issue about the NACK message generated by HAPI,
>>>>>
>>>>> I'm generating the NACK message as follows;
>>>>>
>>>>> * Message msg=
>>>>> hl7Msg.generateACK(HL7Constants.HL7_MSA_ERROR_FIELD_VALUE, *
>>>>> * new HL7Exception(errorMsg));*
>>>>>
>>>>> This returns; following message;
>>>>> MSH|^~\&|||||20130604165513.576+0100||ACK|108|P|2.5
>>>>> MSA|AE|HL7Gtw01361605B49500
>>>>> ERR|^^^207&ERROR&hl70357&&errmsg
>>>>>
>>>>> If you notice the ERR segment, it doesn't have required info;
>>>>>
>>>>> Is the above message valid?
>>>>>
>>>>> I suspect it has to be like this;
>>>>> MSH|^~\&|||||20130604165513.576+0100||ACK|108|P|2.5
>>>>> MSA|AE|HL7Gtw01361605B49500
>>>>> ERR|||207|E|^errmsg
>>>>>
>>>>> Why do i get such invalid message? Am i doing anything wrong here?
>>>>>
>>>>> Thanks
>>>>> -Ratha
>>>>>
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> How ServiceNow helps IT people transform IT departments:
>>> 1. A cloud service to automate IT design, transition and operations
>>> 2. Dashboards that offer high-level views of enterprise services
>>> 3. A single system of record for all IT processes
>>> http://p.sf.net/sfu/servicenow-d2d-j
>>> _______________________________________________
>>> Hl7api-devel mailing list
>>> Hl7api-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>>
>>>
>>
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel