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.v22.group;
035
036import ca.uhn.hl7v2.model.v22.segment.*;
037
038import ca.uhn.hl7v2.HL7Exception;
039import ca.uhn.hl7v2.parser.ModelClassFactory;
040import ca.uhn.hl7v2.model.*;
041
042/**
043 * <p>Represents a ORR_O02_ORDER_DETAIL group structure (a Group object).
044 * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
045 * This Group contains the following elements:  
046 * </p>
047 * <ul>
048                         * <li>1: OBR (OBSERVATION REQUEST) <b>  choice</b></li>
049                         * <li>2: RQD (REQUISITION DETAIL) <b>  choice</b></li>
050                         * <li>3: RQ1 (REQUISITION DETAIL-!) <b>  choice</b></li>
051                         * <li>4: RXO (PHARMACY PRESCRIPTION ORDER) <b>  choice</b></li>
052                         * <li>5: ODS (DIETARY ORDERS, SUPPLEMENTS, and PREFERENCES) <b>  choice</b></li>
053                         * <li>6: ODT (DIET TRAY INSTRUCTION) <b>  choice</b></li>
054 * </ul>
055 * <p>
056 * Note that this structure has "choice" elements. This means that one of the 
057 * structures above marked as "choice" must be present, but no more than one.
058 * </p> 
059 */
060//@SuppressWarnings("unused")
061public class ORR_O02_ORDER_DETAIL extends AbstractGroup {
062
063    /** 
064     * Creates a new ORR_O02_ORDER_DETAIL group
065     */
066    public ORR_O02_ORDER_DETAIL(Group parent, ModelClassFactory factory) {
067       super(parent, factory);
068       init(factory);
069    }
070
071    private void init(ModelClassFactory factory) {
072       try {
073                                  this.add(OBR.class, true, false, true);
074                                  this.add(RQD.class, true, false, true);
075                                  this.add(RQ1.class, true, false, true);
076                                  this.add(RXO.class, true, false, true);
077                                  this.add(ODS.class, true, false, true);
078                                  this.add(ODT.class, true, false, true);
079       } catch(HL7Exception e) {
080          log.error("Unexpected error creating ORR_O02_ORDER_DETAIL - this is probably a bug in the source code generator.", e);
081       }
082    }
083
084    /** 
085     * Returns "2.2"
086     */
087    public String getVersion() {
088       return "2.2";
089    }
090
091
092
093    /**
094     * Returns
095     * OBR (OBSERVATION REQUEST) - creates it if necessary
096     */
097    public OBR getOBR() { 
098       OBR retVal = getTyped("OBR", OBR.class);
099       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