1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pix.v231.segment;
17
18 import ca.uhn.hl7v2.HL7Exception;
19 import ca.uhn.hl7v2.model.AbstractSegment;
20 import ca.uhn.hl7v2.model.Group;
21 import ca.uhn.hl7v2.model.Message;
22 import ca.uhn.hl7v2.model.v231.datatype.NM;
23 import ca.uhn.hl7v2.model.v231.datatype.ST;
24 import ca.uhn.hl7v2.parser.ModelClassFactory;
25 import org.openehealth.ipf.modules.hl7.HL7v2Exception;
26
27
28
29
30
31
32
33
34 @SuppressWarnings("serial")
35 public class ZZI extends AbstractSegment {
36
37
38
39
40
41 public ZZI(Group parent, ModelClassFactory factory) {
42 super(parent, factory);
43 Message message = getMessage();
44 try {
45 add(ST.class, true, 1, 8, new Object[] { message }, "Trace ID");
46 add(ST.class, true, 1, 8, new Object[] { message }, "Span ID");
47 add(ST.class, false, 1, 8, new Object[] { message }, "Parent Span ID");
48 add(NM.class, false, 1, 1, new Object[] { message }, "Sampled");
49 add(NM.class, false, 1, 1, new Object[] { message }, "Flag");
50 } catch (HL7Exception he) {
51 throw new HL7v2Exception(he);
52 }
53 }
54
55
56
57
58
59
60 public ST getTraceID() {
61 return getTypedField(1, 0);
62 }
63
64
65
66
67
68
69 public ST getSpanID() {
70 return getTypedField(2, 0);
71 }
72
73
74
75
76
77
78 public ST getParentSpanID() {
79 return getTypedField(3, 0);
80 }
81
82
83
84
85
86
87 public NM getSampled() {
88 return getTypedField(4, 0);
89 }
90
91
92
93
94
95
96 public NM getFlags() {
97 return getTypedField(5, 0);
98 }
99
100 }