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_M08_MF_TEST_NUMERIC 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: OM1 (General Segment) <b> </b></li>
029 * <li>3: OM2 (Numeric Observation) <b>optional </b></li>
030 * <li>4: OM3 (Categorical Service/Test/Observation) <b>optional </b></li>
031 * <li>5: OM4 (Observations that Require Specimens) <b>optional </b></li>
032 * </ul>
033 */
034 public class MFN_M08_MF_TEST_NUMERIC extends AbstractGroup {
035
036 /**
037 * Creates a new MFN_M08_MF_TEST_NUMERIC group
038 */
039 public MFN_M08_MF_TEST_NUMERIC(Group parent, ModelClassFactory factory) {
040 super(parent, factory);
041 init(factory);
042 }
043
044 private void init(ModelClassFactory factory) {
045 try {
046 this.add(MFE.class, true, false);
047 this.add(OM1.class, true, false);
048 this.add(OM2.class, false, false);
049 this.add(OM3.class, false, false);
050 this.add(OM4.class, false, false);
051 } catch(HL7Exception e) {
052 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error creating MFN_M08_MF_TEST_NUMERIC - this is probably a bug in the source code generator.", e);
053 }
054 }
055
056 /**
057 * Returns "2.4"
058 */
059 public String getVersion() {
060 return "2.4";
061 }
062
063
064
065 /**
066 * Returns
067 * MFE (Master File Entry) - creates it if necessary
068 */
069 public MFE getMFE() {
070 MFE ret = null;
071 try {
072 ret = (MFE)this.get("MFE");
073 } catch(HL7Exception e) {
074 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
075 throw new RuntimeException(e);
076 }
077 return ret;
078 }
079
080
081
082
083 /**
084 * Returns
085 * OM1 (General Segment) - creates it if necessary
086 */
087 public OM1 getOM1() {
088 OM1 ret = null;
089 try {
090 ret = (OM1)this.get("OM1");
091 } catch(HL7Exception e) {
092 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
093 throw new RuntimeException(e);
094 }
095 return ret;
096 }
097
098
099
100
101 /**
102 * Returns
103 * OM2 (Numeric Observation) - creates it if necessary
104 */
105 public OM2 getOM2() {
106 OM2 ret = null;
107 try {
108 ret = (OM2)this.get("OM2");
109 } catch(HL7Exception e) {
110 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
111 throw new RuntimeException(e);
112 }
113 return ret;
114 }
115
116
117
118
119 /**
120 * Returns
121 * OM3 (Categorical Service/Test/Observation) - creates it if necessary
122 */
123 public OM3 getOM3() {
124 OM3 ret = null;
125 try {
126 ret = (OM3)this.get("OM3");
127 } catch(HL7Exception e) {
128 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
129 throw new RuntimeException(e);
130 }
131 return ret;
132 }
133
134
135
136
137 /**
138 * Returns
139 * OM4 (Observations that Require Specimens) - creates it if necessary
140 */
141 public OM4 getOM4() {
142 OM4 ret = null;
143 try {
144 ret = (OM4)this.get("OM4");
145 } catch(HL7Exception e) {
146 HapiLogFactory.getHapiLog(this.getClass()).error("Unexpected error accessing data - this is probably a bug in the source code generator.", e);
147 throw new RuntimeException(e);
148 }
149 return ret;
150 }
151
152
153
154
155 }
156