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