View Javadoc
1   /*
2    * This class is an auto-generated source file for a HAPI
3    * HL7 v2.x standard structure class.
4    *
5    * For more information, visit: http://hl7api.sourceforge.net/
6    * 
7    * The contents of this file are subject to the Mozilla Public License Version 1.1 
8    * (the "License"); you may not use this file except in compliance with the License. 
9    * You may obtain a copy of the License at http://www.mozilla.org/MPL/ 
10   * Software distributed under the License is distributed on an "AS IS" basis, 
11   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the 
12   * specific language governing rights and limitations under the License. 
13   * 
14   * The Original Code is "[file_name]".  Description: 
15   * "[one_line_description]" 
16   * 
17   * The Initial Developer of the Original Code is University Health Network. Copyright (C) 
18   * 2012.  All Rights Reserved. 
19   * 
20   * Contributor(s): ______________________________________. 
21   * 
22   * Alternatively, the contents of this file may be used under the terms of the 
23   * GNU General Public License (the  "GPL"), in which case the provisions of the GPL are 
24   * applicable instead of those above.  If you wish to allow use of your version of this 
25   * file only under the terms of the GPL and not to allow others to use your version 
26   * of this file under the MPL, indicate your decision by deleting  the provisions above 
27   * and replace  them with the notice and other provisions required by the GPL License.  
28   * If you do not delete the provisions above, a recipient may use your version of 
29   * this file under either the MPL or the GPL. 
30   * 
31   */
32  
33  
34  package ca.uhn.hl7v2.model.v22.group;
35  
36  import ca.uhn.hl7v2.model.v22.segment.*;
37  
38  import ca.uhn.hl7v2.HL7Exception;
39  import ca.uhn.hl7v2.parser.ModelClassFactory;
40  import ca.uhn.hl7v2.model.*;
41  
42  /**
43   * <p>Represents a ORR_O02_ORDER_DETAIL group structure (a Group object).
44   * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
45   * This Group contains the following elements:  
46   * </p>
47   * <ul>
48                           * <li>1: OBR (OBSERVATION REQUEST) <b>  choice</b></li>
49                           * <li>2: RQD (REQUISITION DETAIL) <b>  choice</b></li>
50                           * <li>3: RQ1 (REQUISITION DETAIL-!) <b>  choice</b></li>
51                           * <li>4: RXO (PHARMACY PRESCRIPTION ORDER) <b>  choice</b></li>
52                           * <li>5: ODS (DIETARY ORDERS, SUPPLEMENTS, and PREFERENCES) <b>  choice</b></li>
53                           * <li>6: ODT (DIET TRAY INSTRUCTION) <b>  choice</b></li>
54   * </ul>
55   * <p>
56   * Note that this structure has "choice" elements. This means that one of the 
57   * structures above marked as "choice" must be present, but no more than one.
58   * </p> 
59   */
60  //@SuppressWarnings("unused")
61  public class ORR_O02_ORDER_DETAIL extends AbstractGroup {
62  
63      /** 
64       * Creates a new ORR_O02_ORDER_DETAIL group
65       */
66      public ORR_O02_ORDER_DETAIL(Group parent, ModelClassFactory factory) {
67         super(parent, factory);
68         init(factory);
69      }
70  
71      private void init(ModelClassFactory factory) {
72         try {
73                                    this.add(OBR.class, true, false, true);
74                                    this.add(RQD.class, true, false, true);
75                                    this.add(RQ1.class, true, false, true);
76                                    this.add(RXO.class, true, false, true);
77                                    this.add(ODS.class, true, false, true);
78                                    this.add(ODT.class, true, false, true);
79         } catch(HL7Exception e) {
80            log.error("Unexpected error creating ORR_O02_ORDER_DETAIL - this is probably a bug in the source code generator.", e);
81         }
82      }
83  
84      /** 
85       * Returns "2.2"
86       */
87      public String getVersion() {
88         return "2.2";
89      }
90  
91  
92  
93      /**
94       * Returns
95       * OBR (OBSERVATION REQUEST) - creates it if necessary
96       */
97      public OBR getOBR() { 
98         OBR retVal = getTyped("OBR", OBR.class);
99         return retVal;
100     }
101 
102 
103 
104 
105     /**
106      * Returns
107      * RQD (REQUISITION DETAIL) - creates it if necessary
108      */
109     public RQD getRQD() { 
110        RQD retVal = getTyped("RQD", RQD.class);
111        return retVal;
112     }
113 
114 
115 
116 
117     /**
118      * Returns
119      * RQ1 (REQUISITION DETAIL-!) - creates it if necessary
120      */
121     public RQ1 getRQ1() { 
122        RQ1 retVal = getTyped("RQ1", RQ1.class);
123        return retVal;
124     }
125 
126 
127 
128 
129     /**
130      * Returns
131      * RXO (PHARMACY PRESCRIPTION ORDER) - creates it if necessary
132      */
133     public RXO getRXO() { 
134        RXO retVal = getTyped("RXO", RXO.class);
135        return retVal;
136     }
137 
138 
139 
140 
141     /**
142      * Returns
143      * ODS (DIETARY ORDERS, SUPPLEMENTS, and PREFERENCES) - creates it if necessary
144      */
145     public ODS getODS() { 
146        ODS retVal = getTyped("ODS", ODS.class);
147        return retVal;
148     }
149 
150 
151 
152 
153     /**
154      * Returns
155      * ODT (DIET TRAY INSTRUCTION) - creates it if necessary
156      */
157     public ODT getODT() { 
158        ODT retVal = getTyped("ODT", ODT.class);
159        return retVal;
160     }
161 
162 
163 
164 
165 }
166