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 033package ca.uhn.hl7v2.model.v23.datatype; 034 035import ca.uhn.hl7v2.model.DataTypeException; 036import ca.uhn.hl7v2.model.Message; 037import ca.uhn.hl7v2.model.Type; 038import ca.uhn.hl7v2.model.AbstractComposite; 039 040/** 041 * <p>Represents an HL7 CM_LA1 (Location with address information) data type. 042 * This type consists of the following components:</p> 043 * <ul> 044 * <li>point of care (ST) (ST) 045 * <li>room (IS) 046 * <li>bed (IS) 047 * <li>facility (HD) (HD) 048 * <li>location status (IS) 049 * <li>person location type (IS) 050 * <li>building (IS) 051 * <li>floor (ST) 052 * <li>street address (ST) 053 * <li>other designation (ST) 054 * <li>city (ST) 055 * <li>state or province (ST) 056 * <li>zip or postal code (ST) 057 * <li>country (ID) 058 * <li>address type (ID) 059 * <li>other geographic designation (ST) 060 * </ul> 061 */ 062@SuppressWarnings("unused") 063public class CM_LA1 extends AbstractComposite { 064 065 private Type[] data; 066 067 /** 068 * Creates a new CM_LA1 type 069 */ 070 public CM_LA1(Message message) { 071 super(message); 072 init(); 073 } 074 075 private void init() { 076 data = new Type[16]; 077 data[0] = new ST(getMessage()); 078 data[1] = new IS(getMessage(), 0); 079 data[2] = new IS(getMessage(), 0); 080 data[3] = new HD(getMessage()); 081 data[4] = new IS(getMessage(), 0); 082 data[5] = new IS(getMessage(), 0); 083 data[6] = new IS(getMessage(), 0); 084 data[7] = new ST(getMessage()); 085 data[8] = new ST(getMessage()); 086 data[9] = new ST(getMessage()); 087 data[10] = new ST(getMessage()); 088 data[11] = new ST(getMessage()); 089 data[12] = new ST(getMessage()); 090 data[13] = new ID(getMessage(), 0); 091 data[14] = new ID(getMessage(), 0); 092 data[15] = new ST(getMessage()); 093 } 094 095 096 /** 097 * Returns an array containing the data elements. 098 */ 099 public Type[] getComponents() { 100 return this.data; 101 } 102 103 /** 104 * Returns an individual data component. 105 * 106 * @param number The component number (0-indexed) 107 * @throws DataTypeException if the given element number is out of range. 108 */ 109 public Type getComponent(int number) throws DataTypeException { 110 111 try { 112 return this.data[number]; 113 } catch (ArrayIndexOutOfBoundsException e) { 114 throw new DataTypeException("Element " + number + " doesn't exist (Type " + getClass().getName() + " has only " + this.data.length + " components)"); 115 } 116 } 117 118 119 /** 120 * Returns point of care (ST) (component 1). This is a convenience method that saves you from 121 * casting and handling an exception. 122 */ 123 public ST getPointOfCare() { 124 return getTyped(0, ST.class); 125 } 126 127 128 /** 129 * Returns point of care (ST) (component 1). This is a convenience method that saves you from 130 * casting and handling an exception. 131 */ 132 public ST getCm_la11_PointOfCare() { 133 return getTyped(0, ST.class); 134 } 135 136 137 /** 138 * Returns room (component 2). This is a convenience method that saves you from 139 * casting and handling an exception. 140 */ 141 public IS getRoom() { 142 return getTyped(1, IS.class); 143 } 144 145 146 /** 147 * Returns room (component 2). This is a convenience method that saves you from 148 * casting and handling an exception. 149 */ 150 public IS getCm_la12_Room() { 151 return getTyped(1, IS.class); 152 } 153 154 155 /** 156 * Returns bed (component 3). This is a convenience method that saves you from 157 * casting and handling an exception. 158 */ 159 public IS getBed() { 160 return getTyped(2, IS.class); 161 } 162 163 164 /** 165 * Returns bed (component 3). This is a convenience method that saves you from 166 * casting and handling an exception. 167 */ 168 public IS getCm_la13_Bed() { 169 return getTyped(2, IS.class); 170 } 171 172 173 /** 174 * Returns facility (HD) (component 4). This is a convenience method that saves you from 175 * casting and handling an exception. 176 */ 177 public HD getFacility() { 178 return getTyped(3, HD.class); 179 } 180 181 182 /** 183 * Returns facility (HD) (component 4). This is a convenience method that saves you from 184 * casting and handling an exception. 185 */ 186 public HD getCm_la14_Facility() { 187 return getTyped(3, HD.class); 188 } 189 190 191 /** 192 * Returns location status (component 5). This is a convenience method that saves you from 193 * casting and handling an exception. 194 */ 195 public IS getLocationStatus() { 196 return getTyped(4, IS.class); 197 } 198 199 200 /** 201 * Returns location status (component 5). This is a convenience method that saves you from 202 * casting and handling an exception. 203 */ 204 public IS getCm_la15_LocationStatus() { 205 return getTyped(4, IS.class); 206 } 207 208 209 /** 210 * Returns person location type (component 6). This is a convenience method that saves you from 211 * casting and handling an exception. 212 */ 213 public IS getPersonLocationType() { 214 return getTyped(5, IS.class); 215 } 216 217 218 /** 219 * Returns person location type (component 6). This is a convenience method that saves you from 220 * casting and handling an exception. 221 */ 222 public IS getCm_la16_PersonLocationType() { 223 return getTyped(5, IS.class); 224 } 225 226 227 /** 228 * Returns building (component 7). This is a convenience method that saves you from 229 * casting and handling an exception. 230 */ 231 public IS getBuilding() { 232 return getTyped(6, IS.class); 233 } 234 235 236 /** 237 * Returns building (component 7). This is a convenience method that saves you from 238 * casting and handling an exception. 239 */ 240 public IS getCm_la17_Building() { 241 return getTyped(6, IS.class); 242 } 243 244 245 /** 246 * Returns floor (component 8). This is a convenience method that saves you from 247 * casting and handling an exception. 248 */ 249 public ST getFloor() { 250 return getTyped(7, ST.class); 251 } 252 253 254 /** 255 * Returns floor (component 8). This is a convenience method that saves you from 256 * casting and handling an exception. 257 */ 258 public ST getCm_la18_Floor() { 259 return getTyped(7, ST.class); 260 } 261 262 263 /** 264 * Returns street address (component 9). This is a convenience method that saves you from 265 * casting and handling an exception. 266 */ 267 public ST getStreetAddress() { 268 return getTyped(8, ST.class); 269 } 270 271 272 /** 273 * Returns street address (component 9). This is a convenience method that saves you from 274 * casting and handling an exception. 275 */ 276 public ST getCm_la19_StreetAddress() { 277 return getTyped(8, ST.class); 278 } 279 280 281 /** 282 * Returns other designation (component 10). This is a convenience method that saves you from 283 * casting and handling an exception. 284 */ 285 public ST getOtherDesignation() { 286 return getTyped(9, ST.class); 287 } 288 289 290 /** 291 * Returns other designation (component 10). This is a convenience method that saves you from 292 * casting and handling an exception. 293 */ 294 public ST getCm_la110_OtherDesignation() { 295 return getTyped(9, ST.class); 296 } 297 298 299 /** 300 * Returns city (component 11). This is a convenience method that saves you from 301 * casting and handling an exception. 302 */ 303 public ST getCity() { 304 return getTyped(10, ST.class); 305 } 306 307 308 /** 309 * Returns city (component 11). This is a convenience method that saves you from 310 * casting and handling an exception. 311 */ 312 public ST getCm_la111_City() { 313 return getTyped(10, ST.class); 314 } 315 316 317 /** 318 * Returns state or province (component 12). This is a convenience method that saves you from 319 * casting and handling an exception. 320 */ 321 public ST getStateOrProvince() { 322 return getTyped(11, ST.class); 323 } 324 325 326 /** 327 * Returns state or province (component 12). This is a convenience method that saves you from 328 * casting and handling an exception. 329 */ 330 public ST getCm_la112_StateOrProvince() { 331 return getTyped(11, ST.class); 332 } 333 334 335 /** 336 * Returns zip or postal code (component 13). This is a convenience method that saves you from 337 * casting and handling an exception. 338 */ 339 public ST getZipOrPostalCode() { 340 return getTyped(12, ST.class); 341 } 342 343 344 /** 345 * Returns zip or postal code (component 13). This is a convenience method that saves you from 346 * casting and handling an exception. 347 */ 348 public ST getCm_la113_ZipOrPostalCode() { 349 return getTyped(12, ST.class); 350 } 351 352 353 /** 354 * Returns country (component 14). This is a convenience method that saves you from 355 * casting and handling an exception. 356 */ 357 public ID getCountry() { 358 return getTyped(13, ID.class); 359 } 360 361 362 /** 363 * Returns country (component 14). This is a convenience method that saves you from 364 * casting and handling an exception. 365 */ 366 public ID getCm_la114_Country() { 367 return getTyped(13, ID.class); 368 } 369 370 371 /** 372 * Returns address type (component 15). This is a convenience method that saves you from 373 * casting and handling an exception. 374 */ 375 public ID getAddressType() { 376 return getTyped(14, ID.class); 377 } 378 379 380 /** 381 * Returns address type (component 15). This is a convenience method that saves you from 382 * casting and handling an exception. 383 */ 384 public ID getCm_la115_AddressType() { 385 return getTyped(14, ID.class); 386 } 387 388 389 /** 390 * Returns other geographic designation (component 16). This is a convenience method that saves you from 391 * casting and handling an exception. 392 */ 393 public ST getOtherGeographicDesignation() { 394 return getTyped(15, ST.class); 395 } 396 397 398 /** 399 * Returns other geographic designation (component 16). This is a convenience method that saves you from 400 * casting and handling an exception. 401 */ 402 public ST getCm_la116_OtherGeographicDesignation() { 403 return getTyped(15, ST.class); 404 } 405 406 407 408} 409