Search in sources :

Example 1 with HL7Message

use of org.talend.hl7.HL7Message in project tdi-studio-se by Talend.

the class TestMain method main.

public static void main(String[] args) throws Exception {
    String[][] paths = getMSH3();
    for (String[] arrPaths : paths) {
        for (String arrPath : arrPaths) {
            System.out.println(arrPath);
        }
    }
    HL7Message message = new HL7Message();
    Segment seg = new Segment("MSH");
    message.addSegment(seg);
    for (String[] path : paths) {
        Field field = TalendHL7Util.setValue(path[0], path[1]);
        seg.addField(field);
    }
    System.out.println(message.message());
}
Also used : Field(org.talend.hl7.Field) HL7Message(org.talend.hl7.HL7Message) Segment(org.talend.hl7.Segment)

Aggregations

Field (org.talend.hl7.Field)1 HL7Message (org.talend.hl7.HL7Message)1 Segment (org.talend.hl7.Segment)1