1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pdq.v25.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.Type;
23 import ca.uhn.hl7v2.model.v25.datatype.*;
24 import ca.uhn.hl7v2.parser.ModelClassFactory;
25 import org.openehealth.ipf.modules.hl7.HL7v2Exception;
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 @SuppressWarnings("serial")
43 public class QPD extends AbstractSegment {
44
45
46
47
48
49 public QPD(Group parentGroup, ModelClassFactory modelFactory) {
50 super(parentGroup, modelFactory);
51 Message msg = getMessage();
52 try {
53 add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name");
54 add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag");
55 add(QIP.class, true, 0, 256, new Object[]{msg}, "Demographics Fields");
56 add(NM.class, false, 1, 16, new Object[]{msg}, "Search Confidence Threshold");
57 add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Name");
58 add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Version");
59 add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Description");
60 add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned");
61 } catch (HL7Exception e) {
62 throw new HL7v2Exception(e);
63 }
64 }
65
66
67
68
69 public CE getMessageQueryName() {
70 return getTypedField(1, 0);
71 }
72
73
74
75
76 public CE getQpd1_MessageQueryName() {
77 return getTypedField(1, 0);
78 }
79
80
81
82
83 public ST getQueryTag() {
84 return getTypedField(2, 0);
85 }
86
87
88
89
90 public ST getQpd2_QueryTag() {
91 return getTypedField(2, 0);
92 }
93
94
95
96
97 public QIP getDemographicsFields(int rep) {
98 return getTypedField(3, rep);
99 }
100
101
102
103
104 public QIP getQpd3_DemographicsFields(int rep) {
105 return getTypedField(3, rep);
106 }
107
108
109
110
111 public QIP[] getDemographicsFields() {
112 return getTypedField(3, new QIP[0]);
113 }
114
115
116
117
118 public QIP[] getQpd3_DemographicsFields() {
119 return getTypedField(3, new QIP[0]);
120 }
121
122
123
124
125 public int getDemographicsFieldsReps() {
126 return getReps(3);
127 }
128
129
130
131
132 public int getQpd3_DemographicsFieldsReps() {
133 return getReps(3);
134 }
135
136
137
138
139 public QIP insertDemographicsFieldsReps(int rep) throws HL7Exception {
140 return (QIP) super.insertRepetition(3, rep);
141 }
142
143
144
145
146 public QIP insertQpd3_DemographicsFieldsReps(int rep) throws HL7Exception {
147 return (QIP) super.insertRepetition(3, rep);
148 }
149
150
151
152
153 public QIP removeDemographicsFieldsReps(int rep) throws HL7Exception {
154 return (QIP) super.removeRepetition(3, rep);
155 }
156
157
158
159
160 public QIP removeQpd3_DemographicsFieldsReps(int rep) throws HL7Exception {
161 return (QIP) super.removeRepetition(3, rep);
162 }
163
164
165
166
167 public NM getSearchConfidenceThreshold() {
168 return getTypedField(4, 0);
169 }
170
171
172
173
174 public NM getQpd4_SearchConfidenceThreshold() {
175 return getTypedField(4, 0);
176 }
177
178
179
180
181 public ST getAlgorithmName() {
182 return getTypedField(5, 0);
183 }
184
185
186
187
188 public ST getQpd5_AlgorithmName() {
189 return getTypedField(5, 0);
190 }
191
192
193
194
195 public ST getAlgorithmVersion() {
196 return getTypedField(6, 0);
197 }
198
199
200
201
202 public ST getQpd6_AlgorithmVersion() {
203 return getTypedField(6, 0);
204 }
205
206
207
208
209 public ST AlgorithmDescription() {
210 return getTypedField(7, 0);
211 }
212
213
214
215
216 public ST getQpd7_AlgorithmDescription() {
217 return getTypedField(7, 0);
218 }
219
220
221
222
223
224 public CX getWhatDomainsReturned(int rep) {
225 return getTypedField(8, rep);
226 }
227
228
229
230
231 public CX getQpd8_WhatDomainsReturned(int rep) {
232 return getTypedField(8, rep);
233 }
234
235
236
237
238 public CX[] getWhatDomainsReturned() {
239 return getTypedField(8, new CX[0]);
240 }
241
242
243
244
245 public CX[] getQpd8_WhatDomainsReturned() {
246 return getTypedField(8, new CX[0]);
247 }
248
249
250
251
252 public int getWhatDomainsReturnedReps() {
253 return getReps(8);
254 }
255
256
257
258
259 public int getQpd8_WhatDomainsReturnedReps() {
260 return getReps(8);
261 }
262
263
264
265
266 public CX insertWhatDomainsReturnedReps(int rep) throws HL7Exception {
267 return (CX) super.insertRepetition(8, rep);
268 }
269
270
271
272
273 public CX insertQpd8_WhatDomainsReturnedReps(int rep) throws HL7Exception {
274 return (CX) super.insertRepetition(8, rep);
275 }
276
277
278
279
280 public CX removeWhatDomainsReturnedReps(int rep) throws HL7Exception {
281 return (CX) super.removeRepetition(8, rep);
282 }
283
284
285
286
287 public CX removeQpd8_WhatDomainsReturnedReps(int rep) throws HL7Exception {
288 return (CX) super.removeRepetition(8, rep);
289 }
290
291
292
293
294
295 protected Type createNewTypeWithoutReflection(int field) {
296 switch (field) {
297 case 0:
298 return new CE(getMessage());
299 case 1:
300 return new ST(getMessage());
301 case 2:
302 return new QIP(getMessage());
303 case 3:
304 return new NM(getMessage());
305 case 4:
306 return new ST(getMessage());
307 case 5:
308 return new ST(getMessage());
309 case 6:
310 return new ST(getMessage());
311 case 7:
312 return new CX(getMessage());
313 default:
314 return null;
315 }
316 }
317
318 }