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    
008    package ca.uhn.hl7v2.model.v24.group;
009    
010    import ca.uhn.hl7v2.model.v24.segment.*;
011    
012    import ca.uhn.log.HapiLogFactory;
013    import ca.uhn.hl7v2.HL7Exception;
014    import ca.uhn.hl7v2.parser.ModelClassFactory;
015    import ca.uhn.hl7v2.parser.DefaultModelClassFactory;
016    import ca.uhn.hl7v2.model.AbstractMessage;
017    import ca.uhn.hl7v2.model.Group;
018    import ca.uhn.hl7v2.model.AbstractGroup;
019    import ca.uhn.hl7v2.model.GenericSegment;
020    
021    /**
022     * <p>Represents a RGV_O15_ORDER_DETAIL group structure (a Group object).
023     * A Group is an ordered collection of message segments that can repeat together or be optionally in/excluded together.
024     * This Group contains the following elements:  
025     * </p>
026     * <ul>
027                     * <li>1: RXO (Pharmacy/Treatment Order) <b> </b></li>
028                     * <li>2: RGV_O15_ORDER_DETAIL_SUPPLEMENT (a Group object) <b>optional </b></li>
029     * </ul>
030     */
031    public class RGV_O15_ORDER_DETAIL extends AbstractGroup {
032    
033        /** 
034         * Creates a new RGV_O15_ORDER_DETAIL group
035         */
036        public RGV_O15_ORDER_DETAIL(Group parent, ModelClassFactory factory) {
037           super(parent, factory);
038           init(factory);
039        }
040    
041        private void init(ModelClassFactory factory) {
042           try {
043                              this.add(RXO.class, true, false);
044                              this.add(RGV_O15_ORDER_DETAIL_SUPPLEMENT.class, false, false);
045           } catch(HL7Exception e) {
046              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating RGV_O15_ORDER_DETAIL - this is probably a bug in the source code generator.", e);
047           }
048        }
049    
050        /** 
051         * Returns "2.4"
052         */
053        public String getVersion() {
054           return "2.4";
055        }
056    
057    
058    
059        /**
060         * Returns
061         * RXO (Pharmacy/Treatment Order) - creates it if necessary
062         */
063        public RXO getRXO() { 
064           RXO ret = null;
065           try {
066              ret = (RXO)this.get("RXO");
067           } catch(HL7Exception e) {
068              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
069              throw new RuntimeException(e);
070           }
071           return ret;
072        }
073    
074    
075    
076    
077        /**
078         * Returns
079         * ORDER_DETAIL_SUPPLEMENT (a Group object) - creates it if necessary
080         */
081        public RGV_O15_ORDER_DETAIL_SUPPLEMENT getORDER_DETAIL_SUPPLEMENT() { 
082           RGV_O15_ORDER_DETAIL_SUPPLEMENT ret = null;
083           try {
084              ret = (RGV_O15_ORDER_DETAIL_SUPPLEMENT)this.get("ORDER_DETAIL_SUPPLEMENT");
085           } catch(HL7Exception e) {
086              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
087              throw new RuntimeException(e);
088           }
089           return ret;
090        }
091    
092    
093    
094    
095    }
096