001/*
002 * This class is an auto-generated source file for a HAPI
003 * HL7 v2.x standard structure class.
004 *
005 * For more information, visit: http://hl7api.sourceforge.net/
006 * 
007 * The contents of this file are subject to the Mozilla Public License Version 1.1 
008 * (the "License"); you may not use this file except in compliance with the License. 
009 * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
010 * Software distributed under the License is distributed on an "AS IS" basis, 
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
012 * specific language governing rights and limitations under the License. 
013 * 
014 * The Original Code is "[file_name]".  Description: 
015 * "[one_line_description]" 
016 * 
017 * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
018 * 2012.  All Rights Reserved. 
019 * 
020 * Contributor(s): ______________________________________. 
021 * 
022 * Alternatively, the contents of this file may be used under the terms of the 
023 * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
024 * applicable instead of those above.  If you wish to allow use of your version of this 
025 * file only under the terms of the GPL and not to allow others to use your version 
026 * of this file under the MPL, indicate your decision by deleting  the provisions above 
027 * and replace  them with the notice and other provisions required by the GPL License.  
028 * If you do not delete the provisions above, a recipient may use your version of 
029 * this file under either the MPL or the GPL. 
030 * 
031 */
032
033
034package ca.uhn.hl7v2.model.v27.segment;
035
036// import ca.uhn.hl7v2.model.v27.group.*;
037import ca.uhn.hl7v2.model.v27.datatype.*;
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
041import ca.uhn.hl7v2.model.AbstractMessage;
042import ca.uhn.hl7v2.model.Group;
043import ca.uhn.hl7v2.model.Type;
044import ca.uhn.hl7v2.model.AbstractSegment;
045import ca.uhn.hl7v2.model.Varies;
046
047
048/**
049 *<p>Represents an HL7 MSH message segment (Message Header). 
050 * This segment has the following fields:</p>
051 * <ul>
052     * <li>MSH-1: Field Separator (ST) <b> </b>
053     * <li>MSH-2: Encoding Characters (ST) <b> </b>
054     * <li>MSH-3: Sending Application (HD) <b>optional </b>
055     * <li>MSH-4: Sending Facility (HD) <b>optional </b>
056     * <li>MSH-5: Receiving Application (HD) <b>optional </b>
057     * <li>MSH-6: Receiving Facility (HD) <b>optional </b>
058     * <li>MSH-7: Date/Time of Message (DTM) <b> </b>
059     * <li>MSH-8: Security (ST) <b>optional </b>
060     * <li>MSH-9: Message Type (MSG) <b> </b>
061     * <li>MSH-10: Message Control ID (ST) <b> </b>
062     * <li>MSH-11: Processing ID (PT) <b> </b>
063     * <li>MSH-12: Version ID (VID) <b> </b>
064     * <li>MSH-13: Sequence Number (NM) <b>optional </b>
065     * <li>MSH-14: Continuation Pointer (ST) <b>optional </b>
066     * <li>MSH-15: Accept Acknowledgment Type (ID) <b>optional </b>
067     * <li>MSH-16: Application Acknowledgment Type (ID) <b>optional </b>
068     * <li>MSH-17: Country Code (ID) <b>optional </b>
069     * <li>MSH-18: Character Set (ID) <b>optional repeating</b>
070     * <li>MSH-19: Principal Language Of Message (CWE) <b>optional </b>
071     * <li>MSH-20: Alternate Character Set Handling Scheme (ID) <b>optional </b>
072     * <li>MSH-21: Message Profile Identifier (EI) <b>optional repeating</b>
073     * <li>MSH-22: Sending Responsible Organization (XON) <b>optional </b>
074     * <li>MSH-23: Receiving Responsible Organization (XON) <b>optional </b>
075     * <li>MSH-24: Sending Network Address (HD) <b>optional </b>
076     * <li>MSH-25: Receiving Network Address (HD) <b>optional </b>
077 * </ul>
078 */
079@SuppressWarnings("unused")
080public class MSH extends AbstractSegment {
081
082    /** 
083     * Creates a new MSH segment
084     */
085    public MSH(Group parent, ModelClassFactory factory) {
086       super(parent, factory);
087       init(factory);
088    }
089
090    private void init(ModelClassFactory factory) {
091       try {
092                                  this.add(ST.class, true, 1, 1, new Object[]{ getMessage() }, "Field Separator");
093                                  this.add(ST.class, true, 1, 5, new Object[]{ getMessage() }, "Encoding Characters");
094                                  this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Sending Application");
095                                  this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Sending Facility");
096                                  this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Receiving Application");
097                                  this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Receiving Facility");
098                                  this.add(DTM.class, true, 1, 0, new Object[]{ getMessage() }, "Date/Time of Message");
099                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Security");
100                                  this.add(MSG.class, true, 1, 0, new Object[]{ getMessage() }, "Message Type");
101                                  this.add(ST.class, true, 1, 199, new Object[]{ getMessage() }, "Message Control ID");
102                                  this.add(PT.class, true, 1, 0, new Object[]{ getMessage() }, "Processing ID");
103                                  this.add(VID.class, true, 1, 0, new Object[]{ getMessage() }, "Version ID");
104                                  this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Sequence Number");
105                                  this.add(ST.class, false, 1, 0, new Object[]{ getMessage() }, "Continuation Pointer");
106                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(155) }, "Accept Acknowledgment Type");
107                                              this.add(ID.class, false, 1, 2, new Object[]{ getMessage(), new Integer(155) }, "Application Acknowledgment Type");
108                                              this.add(ID.class, false, 1, 3, new Object[]{ getMessage(), new Integer(399) }, "Country Code");
109                                              this.add(ID.class, false, 0, 15, new Object[]{ getMessage(), new Integer(211) }, "Character Set");
110                                  this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Principal Language Of Message");
111                                              this.add(ID.class, false, 1, 13, new Object[]{ getMessage(), new Integer(356) }, "Alternate Character Set Handling Scheme");
112                                  this.add(EI.class, false, 0, 0, new Object[]{ getMessage() }, "Message Profile Identifier");
113                                  this.add(XON.class, false, 1, 0, new Object[]{ getMessage() }, "Sending Responsible Organization");
114                                  this.add(XON.class, false, 1, 0, new Object[]{ getMessage() }, "Receiving Responsible Organization");
115                                  this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Sending Network Address");
116                                  this.add(HD.class, false, 1, 0, new Object[]{ getMessage() }, "Receiving Network Address");
117       } catch(HL7Exception e) {
118          log.error("Unexpected error creating MSH - this is probably a bug in the source code generator.", e);
119       }
120    }
121
122
123
124    /**
125     * Returns
126     * MSH-1: "Field Separator" - creates it if necessary
127     */
128    public ST getFieldSeparator() { 
129                ST retVal = this.getTypedField(1, 0);
130                return retVal;
131    }
132    
133    /**
134     * Returns
135     * MSH-1: "Field Separator" - creates it if necessary
136     */
137    public ST getMsh1_FieldSeparator() { 
138                ST retVal = this.getTypedField(1, 0);
139                return retVal;
140    }
141
142
143
144    /**
145     * Returns
146     * MSH-2: "Encoding Characters" - creates it if necessary
147     */
148    public ST getEncodingCharacters() { 
149                ST retVal = this.getTypedField(2, 0);
150                return retVal;
151    }
152    
153    /**
154     * Returns
155     * MSH-2: "Encoding Characters" - creates it if necessary
156     */
157    public ST getMsh2_EncodingCharacters() { 
158                ST retVal = this.getTypedField(2, 0);
159                return retVal;
160    }
161
162
163
164    /**
165     * Returns
166     * MSH-3: "Sending Application" - creates it if necessary
167     */
168    public HD getSendingApplication() { 
169                HD retVal = this.getTypedField(3, 0);
170                return retVal;
171    }
172    
173    /**
174     * Returns
175     * MSH-3: "Sending Application" - creates it if necessary
176     */
177    public HD getMsh3_SendingApplication() { 
178                HD retVal = this.getTypedField(3, 0);
179                return retVal;
180    }
181
182
183
184    /**
185     * Returns
186     * MSH-4: "Sending Facility" - creates it if necessary
187     */
188    public HD getSendingFacility() { 
189                HD retVal = this.getTypedField(4, 0);
190                return retVal;
191    }
192    
193    /**
194     * Returns
195     * MSH-4: "Sending Facility" - creates it if necessary
196     */
197    public HD getMsh4_SendingFacility() { 
198                HD retVal = this.getTypedField(4, 0);
199                return retVal;
200    }
201
202
203
204    /**
205     * Returns
206     * MSH-5: "Receiving Application" - creates it if necessary
207     */
208    public HD getReceivingApplication() { 
209                HD retVal = this.getTypedField(5, 0);
210                return retVal;
211    }
212    
213    /**
214     * Returns
215     * MSH-5: "Receiving Application" - creates it if necessary
216     */
217    public HD getMsh5_ReceivingApplication() { 
218                HD retVal = this.getTypedField(5, 0);
219                return retVal;
220    }
221
222
223
224    /**
225     * Returns
226     * MSH-6: "Receiving Facility" - creates it if necessary
227     */
228    public HD getReceivingFacility() { 
229                HD retVal = this.getTypedField(6, 0);
230                return retVal;
231    }
232    
233    /**
234     * Returns
235     * MSH-6: "Receiving Facility" - creates it if necessary
236     */
237    public HD getMsh6_ReceivingFacility() { 
238                HD retVal = this.getTypedField(6, 0);
239                return retVal;
240    }
241
242
243
244    /**
245     * Returns
246     * MSH-7: "Date/Time of Message" - creates it if necessary
247     */
248    public DTM getDateTimeOfMessage() { 
249                DTM retVal = this.getTypedField(7, 0);
250                return retVal;
251    }
252    
253    /**
254     * Returns
255     * MSH-7: "Date/Time of Message" - creates it if necessary
256     */
257    public DTM getMsh7_DateTimeOfMessage() { 
258                DTM retVal = this.getTypedField(7, 0);
259                return retVal;
260    }
261
262
263
264    /**
265     * Returns
266     * MSH-8: "Security" - creates it if necessary
267     */
268    public ST getSecurity() { 
269                ST retVal = this.getTypedField(8, 0);
270                return retVal;
271    }
272    
273    /**
274     * Returns
275     * MSH-8: "Security" - creates it if necessary
276     */
277    public ST getMsh8_Security() { 
278                ST retVal = this.getTypedField(8, 0);
279                return retVal;
280    }
281
282
283
284    /**
285     * Returns
286     * MSH-9: "Message Type" - creates it if necessary
287     */
288    public MSG getMessageType() { 
289                MSG retVal = this.getTypedField(9, 0);
290                return retVal;
291    }
292    
293    /**
294     * Returns
295     * MSH-9: "Message Type" - creates it if necessary
296     */
297    public MSG getMsh9_MessageType() { 
298                MSG retVal = this.getTypedField(9, 0);
299                return retVal;
300    }
301
302
303
304    /**
305     * Returns
306     * MSH-10: "Message Control ID" - creates it if necessary
307     */
308    public ST getMessageControlID() { 
309                ST retVal = this.getTypedField(10, 0);
310                return retVal;
311    }
312    
313    /**
314     * Returns
315     * MSH-10: "Message Control ID" - creates it if necessary
316     */
317    public ST getMsh10_MessageControlID() { 
318                ST retVal = this.getTypedField(10, 0);
319                return retVal;
320    }
321
322
323
324    /**
325     * Returns
326     * MSH-11: "Processing ID" - creates it if necessary
327     */
328    public PT getProcessingID() { 
329                PT retVal = this.getTypedField(11, 0);
330                return retVal;
331    }
332    
333    /**
334     * Returns
335     * MSH-11: "Processing ID" - creates it if necessary
336     */
337    public PT getMsh11_ProcessingID() { 
338                PT retVal = this.getTypedField(11, 0);
339                return retVal;
340    }
341
342
343
344    /**
345     * Returns
346     * MSH-12: "Version ID" - creates it if necessary
347     */
348    public VID getVersionID() { 
349                VID retVal = this.getTypedField(12, 0);
350                return retVal;
351    }
352    
353    /**
354     * Returns
355     * MSH-12: "Version ID" - creates it if necessary
356     */
357    public VID getMsh12_VersionID() { 
358                VID retVal = this.getTypedField(12, 0);
359                return retVal;
360    }
361
362
363
364    /**
365     * Returns
366     * MSH-13: "Sequence Number" - creates it if necessary
367     */
368    public NM getSequenceNumber() { 
369                NM retVal = this.getTypedField(13, 0);
370                return retVal;
371    }
372    
373    /**
374     * Returns
375     * MSH-13: "Sequence Number" - creates it if necessary
376     */
377    public NM getMsh13_SequenceNumber() { 
378                NM retVal = this.getTypedField(13, 0);
379                return retVal;
380    }
381
382
383
384    /**
385     * Returns
386     * MSH-14: "Continuation Pointer" - creates it if necessary
387     */
388    public ST getContinuationPointer() { 
389                ST retVal = this.getTypedField(14, 0);
390                return retVal;
391    }
392    
393    /**
394     * Returns
395     * MSH-14: "Continuation Pointer" - creates it if necessary
396     */
397    public ST getMsh14_ContinuationPointer() { 
398                ST retVal = this.getTypedField(14, 0);
399                return retVal;
400    }
401
402
403
404    /**
405     * Returns
406     * MSH-15: "Accept Acknowledgment Type" - creates it if necessary
407     */
408    public ID getAcceptAcknowledgmentType() { 
409                ID retVal = this.getTypedField(15, 0);
410                return retVal;
411    }
412    
413    /**
414     * Returns
415     * MSH-15: "Accept Acknowledgment Type" - creates it if necessary
416     */
417    public ID getMsh15_AcceptAcknowledgmentType() { 
418                ID retVal = this.getTypedField(15, 0);
419                return retVal;
420    }
421
422
423
424    /**
425     * Returns
426     * MSH-16: "Application Acknowledgment Type" - creates it if necessary
427     */
428    public ID getApplicationAcknowledgmentType() { 
429                ID retVal = this.getTypedField(16, 0);
430                return retVal;
431    }
432    
433    /**
434     * Returns
435     * MSH-16: "Application Acknowledgment Type" - creates it if necessary
436     */
437    public ID getMsh16_ApplicationAcknowledgmentType() { 
438                ID retVal = this.getTypedField(16, 0);
439                return retVal;
440    }
441
442
443
444    /**
445     * Returns
446     * MSH-17: "Country Code" - creates it if necessary
447     */
448    public ID getCountryCode() { 
449                ID retVal = this.getTypedField(17, 0);
450                return retVal;
451    }
452    
453    /**
454     * Returns
455     * MSH-17: "Country Code" - creates it if necessary
456     */
457    public ID getMsh17_CountryCode() { 
458                ID retVal = this.getTypedField(17, 0);
459                return retVal;
460    }
461
462
463    /**
464     * Returns all repetitions of Character Set (MSH-18).
465     */
466    public ID[] getCharacterSet() {
467        ID[] retVal = this.getTypedField(18, new ID[0]);
468        return retVal;
469    }
470
471
472    /**
473     * Returns all repetitions of Character Set (MSH-18).
474     */
475    public ID[] getMsh18_CharacterSet() {
476        ID[] retVal = this.getTypedField(18, new ID[0]);
477        return retVal;
478    }
479
480
481    /**
482     * Returns a count of the current number of repetitions of Character Set (MSH-18).
483     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
484     * it will return zero.
485     */
486    public int getCharacterSetReps() {
487        return this.getReps(18);
488    }
489
490
491    /**
492     * Returns a specific repetition of
493     * MSH-18: "Character Set" - creates it if necessary
494     *
495     * @param rep The repetition index (0-indexed)
496     */
497    public ID getCharacterSet(int rep) { 
498                ID retVal = this.getTypedField(18, rep);
499                return retVal;
500    }
501
502    /**
503     * Returns a specific repetition of
504     * MSH-18: "Character Set" - creates it if necessary
505     *
506     * @param rep The repetition index (0-indexed)
507     */
508    public ID getMsh18_CharacterSet(int rep) { 
509                ID retVal = this.getTypedField(18, rep);
510                return retVal;
511    }
512
513    /**
514     * Returns a count of the current number of repetitions of Character Set (MSH-18).
515     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
516     * it will return zero.
517     */
518    public int getMsh18_CharacterSetReps() {
519        return this.getReps(18);
520    }
521
522
523    /**
524     * Inserts a repetition of
525     * MSH-18: "Character Set" at a specific index
526     *
527     * @param rep The repetition index (0-indexed)
528     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
529     */
530    public ID insertCharacterSet(int rep) throws HL7Exception { 
531        return (ID) super.insertRepetition(18, rep);
532    }
533
534
535    /**
536     * Inserts a repetition of
537     * MSH-18: "Character Set" at a specific index
538     *
539     * @param rep The repetition index (0-indexed)
540     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
541     */
542    public ID insertMsh18_CharacterSet(int rep) throws HL7Exception { 
543        return (ID) super.insertRepetition(18, rep);
544    }
545
546
547    /**
548     * Removes a repetition of
549     * MSH-18: "Character Set" at a specific index
550     *
551     * @param rep The repetition index (0-indexed)
552     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
553     */
554    public ID removeCharacterSet(int rep) throws HL7Exception { 
555        return (ID) super.removeRepetition(18, rep);
556    }
557
558
559    /**
560     * Removes a repetition of
561     * MSH-18: "Character Set" at a specific index
562     *
563     * @param rep The repetition index (0-indexed)
564     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
565     */
566    public ID removeMsh18_CharacterSet(int rep) throws HL7Exception { 
567        return (ID) super.removeRepetition(18, rep);
568    }
569
570
571
572
573    /**
574     * Returns
575     * MSH-19: "Principal Language Of Message" - creates it if necessary
576     */
577    public CWE getPrincipalLanguageOfMessage() { 
578                CWE retVal = this.getTypedField(19, 0);
579                return retVal;
580    }
581    
582    /**
583     * Returns
584     * MSH-19: "Principal Language Of Message" - creates it if necessary
585     */
586    public CWE getMsh19_PrincipalLanguageOfMessage() { 
587                CWE retVal = this.getTypedField(19, 0);
588                return retVal;
589    }
590
591
592
593    /**
594     * Returns
595     * MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary
596     */
597    public ID getAlternateCharacterSetHandlingScheme() { 
598                ID retVal = this.getTypedField(20, 0);
599                return retVal;
600    }
601    
602    /**
603     * Returns
604     * MSH-20: "Alternate Character Set Handling Scheme" - creates it if necessary
605     */
606    public ID getMsh20_AlternateCharacterSetHandlingScheme() { 
607                ID retVal = this.getTypedField(20, 0);
608                return retVal;
609    }
610
611
612    /**
613     * Returns all repetitions of Message Profile Identifier (MSH-21).
614     */
615    public EI[] getMessageProfileIdentifier() {
616        EI[] retVal = this.getTypedField(21, new EI[0]);
617        return retVal;
618    }
619
620
621    /**
622     * Returns all repetitions of Message Profile Identifier (MSH-21).
623     */
624    public EI[] getMsh21_MessageProfileIdentifier() {
625        EI[] retVal = this.getTypedField(21, new EI[0]);
626        return retVal;
627    }
628
629
630    /**
631     * Returns a count of the current number of repetitions of Message Profile Identifier (MSH-21).
632     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
633     * it will return zero.
634     */
635    public int getMessageProfileIdentifierReps() {
636        return this.getReps(21);
637    }
638
639
640    /**
641     * Returns a specific repetition of
642     * MSH-21: "Message Profile Identifier" - creates it if necessary
643     *
644     * @param rep The repetition index (0-indexed)
645     */
646    public EI getMessageProfileIdentifier(int rep) { 
647                EI retVal = this.getTypedField(21, rep);
648                return retVal;
649    }
650
651    /**
652     * Returns a specific repetition of
653     * MSH-21: "Message Profile Identifier" - creates it if necessary
654     *
655     * @param rep The repetition index (0-indexed)
656     */
657    public EI getMsh21_MessageProfileIdentifier(int rep) { 
658                EI retVal = this.getTypedField(21, rep);
659                return retVal;
660    }
661
662    /**
663     * Returns a count of the current number of repetitions of Message Profile Identifier (MSH-21).
664     * This method does not create a repetition, so if no repetitions have currently been defined or accessed,
665     * it will return zero.
666     */
667    public int getMsh21_MessageProfileIdentifierReps() {
668        return this.getReps(21);
669    }
670
671
672    /**
673     * Inserts a repetition of
674     * MSH-21: "Message Profile Identifier" at a specific index
675     *
676     * @param rep The repetition index (0-indexed)
677     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
678     */
679    public EI insertMessageProfileIdentifier(int rep) throws HL7Exception { 
680        return (EI) super.insertRepetition(21, rep);
681    }
682
683
684    /**
685     * Inserts a repetition of
686     * MSH-21: "Message Profile Identifier" at a specific index
687     *
688     * @param rep The repetition index (0-indexed)
689     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
690     */
691    public EI insertMsh21_MessageProfileIdentifier(int rep) throws HL7Exception { 
692        return (EI) super.insertRepetition(21, rep);
693    }
694
695
696    /**
697     * Removes a repetition of
698     * MSH-21: "Message Profile Identifier" at a specific index
699     *
700     * @param rep The repetition index (0-indexed)
701     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
702     */
703    public EI removeMessageProfileIdentifier(int rep) throws HL7Exception { 
704        return (EI) super.removeRepetition(21, rep);
705    }
706
707
708    /**
709     * Removes a repetition of
710     * MSH-21: "Message Profile Identifier" at a specific index
711     *
712     * @param rep The repetition index (0-indexed)
713     * @throws HL7Exception If the rep is invalid (below 0, or too high for the allowable repetitions)
714     */
715    public EI removeMsh21_MessageProfileIdentifier(int rep) throws HL7Exception { 
716        return (EI) super.removeRepetition(21, rep);
717    }
718
719
720
721
722    /**
723     * Returns
724     * MSH-22: "Sending Responsible Organization" - creates it if necessary
725     */
726    public XON getSendingResponsibleOrganization() { 
727                XON retVal = this.getTypedField(22, 0);
728                return retVal;
729    }
730    
731    /**
732     * Returns
733     * MSH-22: "Sending Responsible Organization" - creates it if necessary
734     */
735    public XON getMsh22_SendingResponsibleOrganization() { 
736                XON retVal = this.getTypedField(22, 0);
737                return retVal;
738    }
739
740
741
742    /**
743     * Returns
744     * MSH-23: "Receiving Responsible Organization" - creates it if necessary
745     */
746    public XON getReceivingResponsibleOrganization() { 
747                XON retVal = this.getTypedField(23, 0);
748                return retVal;
749    }
750    
751    /**
752     * Returns
753     * MSH-23: "Receiving Responsible Organization" - creates it if necessary
754     */
755    public XON getMsh23_ReceivingResponsibleOrganization() { 
756                XON retVal = this.getTypedField(23, 0);
757                return retVal;
758    }
759
760
761
762    /**
763     * Returns
764     * MSH-24: "Sending Network Address" - creates it if necessary
765     */
766    public HD getSendingNetworkAddress() { 
767                HD retVal = this.getTypedField(24, 0);
768                return retVal;
769    }
770    
771    /**
772     * Returns
773     * MSH-24: "Sending Network Address" - creates it if necessary
774     */
775    public HD getMsh24_SendingNetworkAddress() { 
776                HD retVal = this.getTypedField(24, 0);
777                return retVal;
778    }
779
780
781
782    /**
783     * Returns
784     * MSH-25: "Receiving Network Address" - creates it if necessary
785     */
786    public HD getReceivingNetworkAddress() { 
787                HD retVal = this.getTypedField(25, 0);
788                return retVal;
789    }
790    
791    /**
792     * Returns
793     * MSH-25: "Receiving Network Address" - creates it if necessary
794     */
795    public HD getMsh25_ReceivingNetworkAddress() { 
796                HD retVal = this.getTypedField(25, 0);
797                return retVal;
798    }
799
800
801
802
803
804    /** {@inheritDoc} */   
805    protected Type createNewTypeWithoutReflection(int field) {
806       switch (field) {
807          case 0: return new ST(getMessage());
808          case 1: return new ST(getMessage());
809          case 2: return new HD(getMessage());
810          case 3: return new HD(getMessage());
811          case 4: return new HD(getMessage());
812          case 5: return new HD(getMessage());
813          case 6: return new DTM(getMessage());
814          case 7: return new ST(getMessage());
815          case 8: return new MSG(getMessage());
816          case 9: return new ST(getMessage());
817          case 10: return new PT(getMessage());
818          case 11: return new VID(getMessage());
819          case 12: return new NM(getMessage());
820          case 13: return new ST(getMessage());
821          case 14: return new ID(getMessage(), new Integer( 155 ));
822          case 15: return new ID(getMessage(), new Integer( 155 ));
823          case 16: return new ID(getMessage(), new Integer( 399 ));
824          case 17: return new ID(getMessage(), new Integer( 211 ));
825          case 18: return new CWE(getMessage());
826          case 19: return new ID(getMessage(), new Integer( 356 ));
827          case 20: return new EI(getMessage());
828          case 21: return new XON(getMessage());
829          case 22: return new XON(getMessage());
830          case 23: return new HD(getMessage());
831          case 24: return new HD(getMessage());
832          default: return null;
833       }
834   }
835
836
837}
838