Menu

#250 Adding external segment with particular repeatation of Repeatable Segment

2.2
open
nobody
7
2018-06-11
2018-06-08
No

hii,
currently i have a requirement of grouping external segments with standard segment which i am doing with message.addNonstandardSegment(uniqueZSeg,zSegNameFromReorderKeyMap.get(externalZseg));.This is working fine with standard segments but with repeatable segments this does not work.I have the requirement of grouping my external segment with the the particular repeatation of the repeatbale segment but this is placing it directly down the whole repeatable segment.

For example i need this :IN1||dsdh|jk
ZAR|hdkh|sdk
IN1|hdshjd|hjdjs
ZAR|hsdshdjk

But I am getting this: IN1||dsdh|jk
IN1|hdshjd|hjdjs
ZAR|hdkh|sdk
ZAR|hsdshdjk
Please suggest me a way through..

Discussion

  • Brajesh Kumar Mondal

    Please reply fast

     
  • Christian Ohr

    Christian Ohr - 2018-06-11

    What event type do you build in which HL7 version?
    addNonstandardSegment is implemented for Groups in general. So, if you want to append a non-standard segment to a repeating group, you have to create/obtain the group repetition and append your segment here instead of at message level.

    E.g. if you try to construct a ADT_A01 in HL7v2.5:

        ADT_A01 a01 = new ADT_A01();
        // ...
        // add a repetition
        ADT_A01_INSURANCE insurance = a01.insertINSURANCE(0);
        Segment in1 = insurance.getIN1();
        // ... populate IN1
        String name = insurance.addNonstandardSegment("ZAR");
        Segment zar = (Segment)insurance.get(name);
        // ... populate ZAR
    

    Two remarks:
    1. Questions like this should be posted to hl7api-devel@lists.sourceforge.net, where everyone in the community has the chance to participate
    2. Pushing for fast(er) responses in OSS projects often causes the opposite effect.... Please be patient, we are all doing this voluntarily and as time allows.

     

Log in to post a comment.