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 MFN_M02_MF_STAFF 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: MFE (Master File Entry) <b> </b></li>
028                     * <li>2: STF (Staff Identification) <b> </b></li>
029                     * <li>3: PRA (Practitioner Detail) <b>optional </b></li>
030                     * <li>4: ORG (Practitioner Organization Unit) <b>optional </b></li>
031     * </ul>
032     */
033    public class MFN_M02_MF_STAFF extends AbstractGroup {
034    
035        /** 
036         * Creates a new MFN_M02_MF_STAFF group
037         */
038        public MFN_M02_MF_STAFF(Group parent, ModelClassFactory factory) {
039           super(parent, factory);
040           init(factory);
041        }
042    
043        private void init(ModelClassFactory factory) {
044           try {
045                              this.add(MFE.class, true, false);
046                              this.add(STF.class, true, false);
047                              this.add(PRA.class, false, false);
048                              this.add(ORG.class, false, false);
049           } catch(HL7Exception e) {
050              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating MFN_M02_MF_STAFF - this is probably a bug in the source code generator.", e);
051           }
052        }
053    
054        /** 
055         * Returns "2.4"
056         */
057        public String getVersion() {
058           return "2.4";
059        }
060    
061    
062    
063        /**
064         * Returns
065         * MFE (Master File Entry) - creates it if necessary
066         */
067        public MFE getMFE() { 
068           MFE ret = null;
069           try {
070              ret = (MFE)this.get("MFE");
071           } catch(HL7Exception e) {
072              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
073              throw new RuntimeException(e);
074           }
075           return ret;
076        }
077    
078    
079    
080    
081        /**
082         * Returns
083         * STF (Staff Identification) - creates it if necessary
084         */
085        public STF getSTF() { 
086           STF ret = null;
087           try {
088              ret = (STF)this.get("STF");
089           } catch(HL7Exception e) {
090              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
091              throw new RuntimeException(e);
092           }
093           return ret;
094        }
095    
096    
097    
098    
099        /**
100         * Returns
101         * PRA (Practitioner Detail) - creates it if necessary
102         */
103        public PRA getPRA() { 
104           PRA ret = null;
105           try {
106              ret = (PRA)this.get("PRA");
107           } catch(HL7Exception e) {
108              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
109              throw new RuntimeException(e);
110           }
111           return ret;
112        }
113    
114    
115    
116    
117        /**
118         * Returns
119         * ORG (Practitioner Organization Unit) - creates it if necessary
120         */
121        public ORG getORG() { 
122           ORG ret = null;
123           try {
124              ret = (ORG)this.get("ORG");
125           } catch(HL7Exception e) {
126              HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
127              throw new RuntimeException(e);
128           }
129           return ret;
130        }
131    
132    
133    
134    
135    }
136