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.segment; 035 036// import ca.uhn.hl7v2.model.v22.group.*; 037import ca.uhn.hl7v2.model.v22.datatype.*; 038import ca.uhn.hl7v2.HL7Exception; 039import ca.uhn.hl7v2.parser.ModelClassFactory; 040import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 041import ca.uhn.hl7v2.model.AbstractMessage; 042import ca.uhn.hl7v2.model.Group; 043import ca.uhn.hl7v2.model.Type; 044import ca.uhn.hl7v2.model.AbstractSegment; 045import ca.uhn.hl7v2.model.Varies; 046 047 048/** 049 *<p>Represents an HL7 RQ1 message segment (REQUISITION DETAIL-!). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>RQ1-1: Anticipated Price (SI) <b>optional </b> 053 * <li>RQ1-2: Manufacturer ID (CE) <b>optional </b> 054 * <li>RQ1-3: Manufacturer's Catalog (ST) <b>optional </b> 055 * <li>RQ1-4: Vendor ID (CE) <b>optional </b> 056 * <li>RQ1-5: Vendor Catalog (ST) <b>optional </b> 057 * <li>RQ1-6: Taxable (ID) <b>optional </b> 058 * <li>RQ1-7: Substitute Allowed (ID) <b>optional </b> 059 * </ul> 060 */ 061@SuppressWarnings("unused") 062public class RQ1 extends AbstractSegment { 063 064 /** 065 * Creates a new RQ1 segment 066 */ 067 public RQ1(Group parent, ModelClassFactory factory) { 068 super(parent, factory); 069 init(factory); 070 } 071 072 private void init(ModelClassFactory factory) { 073 try { 074 this.add(SI.class, false, 1, 10, new Object[]{ getMessage() }, "Anticipated Price"); 075 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Manufacturer ID"); 076 this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "Manufacturer's Catalog"); 077 this.add(CE.class, false, 1, 60, new Object[]{ getMessage() }, "Vendor ID"); 078 this.add(ST.class, false, 1, 16, new Object[]{ getMessage() }, "Vendor Catalog"); 079 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Taxable"); 080 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Substitute Allowed"); 081 } catch(HL7Exception e) { 082 log.error("Unexpected error creating RQ1 - this is probably a bug in the source code generator.", e); 083 } 084 } 085 086 087 088 /** 089 * Returns 090 * RQ1-1: "Anticipated Price" - creates it if necessary 091 */ 092 public SI getAnticipatedPrice() { 093 SI retVal = this.getTypedField(1, 0); 094 return retVal; 095 } 096 097 /** 098 * Returns 099 * RQ1-1: "Anticipated Price" - creates it if necessary 100 */ 101 public SI getRq11_AnticipatedPrice() { 102 SI retVal = this.getTypedField(1, 0); 103 return retVal; 104 } 105 106 107 108 /** 109 * Returns 110 * RQ1-2: "Manufacturer ID" - creates it if necessary 111 */ 112 public CE getManufacturerID() { 113 CE retVal = this.getTypedField(2, 0); 114 return retVal; 115 } 116 117 /** 118 * Returns 119 * RQ1-2: "Manufacturer ID" - creates it if necessary 120 */ 121 public CE getRq12_ManufacturerID() { 122 CE retVal = this.getTypedField(2, 0); 123 return retVal; 124 } 125 126 127 128 /** 129 * Returns 130 * RQ1-3: "Manufacturer's Catalog" - creates it if necessary 131 */ 132 public ST getManufacturerSCatalog() { 133 ST retVal = this.getTypedField(3, 0); 134 return retVal; 135 } 136 137 /** 138 * Returns 139 * RQ1-3: "Manufacturer's Catalog" - creates it if necessary 140 */ 141 public ST getRq13_ManufacturerSCatalog() { 142 ST retVal = this.getTypedField(3, 0); 143 return retVal; 144 } 145 146 147 148 /** 149 * Returns 150 * RQ1-4: "Vendor ID" - creates it if necessary 151 */ 152 public CE getVendorID() { 153 CE retVal = this.getTypedField(4, 0); 154 return retVal; 155 } 156 157 /** 158 * Returns 159 * RQ1-4: "Vendor ID" - creates it if necessary 160 */ 161 public CE getRq14_VendorID() { 162 CE retVal = this.getTypedField(4, 0); 163 return retVal; 164 } 165 166 167 168 /** 169 * Returns 170 * RQ1-5: "Vendor Catalog" - creates it if necessary 171 */ 172 public ST getVendorCatalog() { 173 ST retVal = this.getTypedField(5, 0); 174 return retVal; 175 } 176 177 /** 178 * Returns 179 * RQ1-5: "Vendor Catalog" - creates it if necessary 180 */ 181 public ST getRq15_VendorCatalog() { 182 ST retVal = this.getTypedField(5, 0); 183 return retVal; 184 } 185 186 187 188 /** 189 * Returns 190 * RQ1-6: "Taxable" - creates it if necessary 191 */ 192 public ID getTaxable() { 193 ID retVal = this.getTypedField(6, 0); 194 return retVal; 195 } 196 197 /** 198 * Returns 199 * RQ1-6: "Taxable" - creates it if necessary 200 */ 201 public ID getRq16_Taxable() { 202 ID retVal = this.getTypedField(6, 0); 203 return retVal; 204 } 205 206 207 208 /** 209 * Returns 210 * RQ1-7: "Substitute Allowed" - creates it if necessary 211 */ 212 public ID getSubstituteAllowed() { 213 ID retVal = this.getTypedField(7, 0); 214 return retVal; 215 } 216 217 /** 218 * Returns 219 * RQ1-7: "Substitute Allowed" - creates it if necessary 220 */ 221 public ID getRq17_SubstituteAllowed() { 222 ID retVal = this.getTypedField(7, 0); 223 return retVal; 224 } 225 226 227 228 229 230 /** {@inheritDoc} */ 231 protected Type createNewTypeWithoutReflection(int field) { 232 switch (field) { 233 case 0: return new SI(getMessage()); 234 case 1: return new CE(getMessage()); 235 case 2: return new ST(getMessage()); 236 case 3: return new CE(getMessage()); 237 case 4: return new ST(getMessage()); 238 case 5: return new ID(getMessage(), new Integer( 136 )); 239 case 6: return new ID(getMessage(), new Integer( 136 )); 240 default: return null; 241 } 242 } 243 244 245} 246