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.v26.segment;
35  
36  
37  import ca.uhn.hl7v2.model.v26.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  
59  
60  
61  @SuppressWarnings("unused")
62  public class PTH extends AbstractSegment {
63  
64      
65  
66  
67      public PTH(Group parent, ModelClassFactory factory) {
68         super(parent, factory);
69         init(factory);
70      }
71  
72      private void init(ModelClassFactory factory) {
73         try {
74                                                this.add(ID.class, true, 1, 2, new Object[]{ getMessage(), new Integer(287) }, "Action Code");
75                                    this.add(CWE.class, true, 1, 705, new Object[]{ getMessage() }, "Pathway ID");
76                                    this.add(EI.class, true, 1, 60, new Object[]{ getMessage() }, "Pathway Instance ID");
77                                    this.add(DTM.class, true, 1, 24, new Object[]{ getMessage() }, "Pathway Established Date/Time");
78                                    this.add(CWE.class, false, 1, 705, new Object[]{ getMessage() }, "Pathway Life Cycle Status");
79                                    this.add(DTM.class, false, 1, 24, new Object[]{ getMessage() }, "Change Pathway Life Cycle Status Date/Time");
80                                    this.add(CNE.class, false, 1, 60, new Object[]{ getMessage() }, "Mood Code");
81         } catch(HL7Exception e) {
82            log.error("Unexpected error creating PTH - this is probably a bug in the source code generator.", e);
83         }
84      }
85  
86  
87  
88      
89  
90  
91  
92      public ID getActionCode() { 
93  		ID retVal = this.getTypedField(1, 0);
94  		return retVal;
95      }
96      
97      
98  
99  
100 
101     public ID getPth1_ActionCode() { 
102 		ID retVal = this.getTypedField(1, 0);
103 		return retVal;
104     }
105 
106 
107 
108     
109 
110 
111 
112     public CWE getPathwayID() { 
113 		CWE retVal = this.getTypedField(2, 0);
114 		return retVal;
115     }
116     
117     
118 
119 
120 
121     public CWE getPth2_PathwayID() { 
122 		CWE retVal = this.getTypedField(2, 0);
123 		return retVal;
124     }
125 
126 
127 
128     
129 
130 
131 
132     public EI getPathwayInstanceID() { 
133 		EI retVal = this.getTypedField(3, 0);
134 		return retVal;
135     }
136     
137     
138 
139 
140 
141     public EI getPth3_PathwayInstanceID() { 
142 		EI retVal = this.getTypedField(3, 0);
143 		return retVal;
144     }
145 
146 
147 
148     
149 
150 
151 
152     public DTM getPathwayEstablishedDateTime() { 
153 		DTM retVal = this.getTypedField(4, 0);
154 		return retVal;
155     }
156     
157     
158 
159 
160 
161     public DTM getPth4_PathwayEstablishedDateTime() { 
162 		DTM retVal = this.getTypedField(4, 0);
163 		return retVal;
164     }
165 
166 
167 
168     
169 
170 
171 
172     public CWE getPathwayLifeCycleStatus() { 
173 		CWE retVal = this.getTypedField(5, 0);
174 		return retVal;
175     }
176     
177     
178 
179 
180 
181     public CWE getPth5_PathwayLifeCycleStatus() { 
182 		CWE retVal = this.getTypedField(5, 0);
183 		return retVal;
184     }
185 
186 
187 
188     
189 
190 
191 
192     public DTM getChangePathwayLifeCycleStatusDateTime() { 
193 		DTM retVal = this.getTypedField(6, 0);
194 		return retVal;
195     }
196     
197     
198 
199 
200 
201     public DTM getPth6_ChangePathwayLifeCycleStatusDateTime() { 
202 		DTM retVal = this.getTypedField(6, 0);
203 		return retVal;
204     }
205 
206 
207 
208     
209 
210 
211 
212     public CNE getMoodCode() { 
213 		CNE retVal = this.getTypedField(7, 0);
214 		return retVal;
215     }
216     
217     
218 
219 
220 
221     public CNE getPth7_MoodCode() { 
222 		CNE retVal = this.getTypedField(7, 0);
223 		return retVal;
224     }
225 
226 
227 
228 
229 
230        
231     protected Type createNewTypeWithoutReflection(int field) {
232        switch (field) {
233           case 0: return new ID(getMessage(), new Integer( 287 ));
234           case 1: return new CWE(getMessage());
235           case 2: return new EI(getMessage());
236           case 3: return new DTM(getMessage());
237           case 4: return new CWE(getMessage());
238           case 5: return new DTM(getMessage());
239           case 6: return new CNE(getMessage());
240           default: return null;
241        }
242    }
243 
244 
245 }
246