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.message;
17
18 import java.util.Map;
19
20 import org.openehealth.ipf.commons.ihe.hl7v2.definitions.pdq.v25.segment.ZZI;
21 import org.openehealth.ipf.commons.ihe.hl7v2.definitions.pdq.v25.segment.QPD;
22 import org.openehealth.ipf.modules.hl7.model.AbstractMessage;
23
24 import ca.uhn.hl7v2.HL7Exception;
25 import ca.uhn.hl7v2.model.Structure;
26 import ca.uhn.hl7v2.model.v25.segment.DSC;
27 import ca.uhn.hl7v2.model.v25.segment.MSH;
28 import ca.uhn.hl7v2.model.v25.segment.RCP;
29 import ca.uhn.hl7v2.model.v25.segment.SFT;
30 import ca.uhn.hl7v2.parser.ModelClassFactory;
31
32
33
34
35
36
37
38
39
40
41
42
43 @SuppressWarnings("serial")
44 public class QBP_Q21 extends AbstractMessage {
45
46
47
48
49 public QBP_Q21(ModelClassFactory factory) {
50 super(factory);
51 }
52
53
54
55
56 public QBP_Q21() {
57 super();
58 }
59
60 @Override
61 protected Map<Class<? extends Structure>, Cardinality> structures(
62 Map<Class<? extends Structure>, Cardinality> s) {
63 s.put(MSH.class, Cardinality.REQUIRED);
64 s.put(SFT.class, Cardinality.OPTIONAL_REPEATING);
65 s.put(QPD.class, Cardinality.REQUIRED);
66 s.put(RCP.class, Cardinality.REQUIRED);
67 s.put(DSC.class, Cardinality.OPTIONAL);
68 s.put(ZZI.class, Cardinality.OPTIONAL);
69 return s;
70 }
71
72 public String getVersion() {
73 return "2.5";
74 }
75
76
77
78
79 public MSH getMSH() {
80 return getTyped("MSH", MSH.class);
81 }
82
83
84
85
86
87 public SFT getSFT() {
88 return getTyped("SFT", SFT.class);
89 }
90
91
92
93
94 public java.util.List<SFT> getSFTAll() throws HL7Exception {
95 return getAllAsList("SFT", SFT.class);
96 }
97
98
99
100
101
102
103 public SFT getSFT(int rep) throws HL7Exception {
104 return getTyped("SFT", rep, SFT.class);
105 }
106
107
108
109
110 public int getSFTReps() {
111 return getReps("SFT");
112 }
113
114
115
116
117 public QPD getQPD() {
118 return getTyped("QPD", QPD.class);
119 }
120
121
122
123
124 public RCP getRCP() {
125 return getTyped("RCP", RCP.class);
126 }
127
128
129
130
131 public DSC getDSC() {
132 return getTyped("DSC", DSC.class);
133
134 }
135
136 }