1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package ca.uhn.hl7v2.model.v27.segment;
35
36
37 import ca.uhn.hl7v2.model.v27.datatype.*;
38 import ca.uhn.hl7v2.HL7Exception;
39 import ca.uhn.hl7v2.parser.ModelClassFactory;
40 import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
41 import ca.uhn.hl7v2.model.AbstractMessage;
42 import ca.uhn.hl7v2.model.Group;
43 import ca.uhn.hl7v2.model.Type;
44 import ca.uhn.hl7v2.model.AbstractSegment;
45 import ca.uhn.hl7v2.model.Varies;
46
47
48
49
50
51
52
53
54
55
56
57
58 @SuppressWarnings("unused")
59 public class SID extends AbstractSegment {
60
61
62
63
64 public SID(Group parent, ModelClassFactory factory) {
65 super(parent, factory);
66 init(factory);
67 }
68
69 private void init(ModelClassFactory factory) {
70 try {
71 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Application/Method Identifier");
72 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Substance Lot Number");
73 this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Substance Container Identifier");
74 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Substance Manufacturer Identifier");
75 } catch(HL7Exception e) {
76 log.error("Unexpected error creating SID - this is probably a bug in the source code generator.", e);
77 }
78 }
79
80
81
82
83
84
85
86 public CWE getApplicationMethodIdentifier() {
87 CWE retVal = this.getTypedField(1, 0);
88 return retVal;
89 }
90
91
92
93
94
95 public CWE getSid1_ApplicationMethodIdentifier() {
96 CWE retVal = this.getTypedField(1, 0);
97 return retVal;
98 }
99
100
101
102
103
104
105
106 public ST getSubstanceLotNumber() {
107 ST retVal = this.getTypedField(2, 0);
108 return retVal;
109 }
110
111
112
113
114
115 public ST getSid2_SubstanceLotNumber() {
116 ST retVal = this.getTypedField(2, 0);
117 return retVal;
118 }
119
120
121
122
123
124
125
126 public ST getSubstanceContainerIdentifier() {
127 ST retVal = this.getTypedField(3, 0);
128 return retVal;
129 }
130
131
132
133
134
135 public ST getSid3_SubstanceContainerIdentifier() {
136 ST retVal = this.getTypedField(3, 0);
137 return retVal;
138 }
139
140
141
142
143
144
145
146 public CWE getSubstanceManufacturerIdentifier() {
147 CWE retVal = this.getTypedField(4, 0);
148 return retVal;
149 }
150
151
152
153
154
155 public CWE getSid4_SubstanceManufacturerIdentifier() {
156 CWE retVal = this.getTypedField(4, 0);
157 return retVal;
158 }
159
160
161
162
163
164
165 protected Type createNewTypeWithoutReflection(int field) {
166 switch (field) {
167 case 0: return new CWE(getMessage());
168 case 1: return new ST(getMessage());
169 case 2: return new ST(getMessage());
170 case 3: return new CWE(getMessage());
171 default: return null;
172 }
173 }
174
175
176 }
177