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.v24.message; 035 036import ca.uhn.hl7v2.model.v24.group.*; 037import ca.uhn.hl7v2.model.v24.segment.*; 038 039import java.util.List; 040 041import ca.uhn.hl7v2.HL7Exception; 042import ca.uhn.hl7v2.parser.ModelClassFactory; 043import ca.uhn.hl7v2.parser.DefaultModelClassFactory; 044import ca.uhn.hl7v2.model.AbstractMessage; 045 046/** 047 * <p>Represents a VXR_V03 message structure (see chapter ?). This structure contains the 048 * following elements: </p> 049 * <ul> 050 * <li>1: MSH (Message Header) <b> </b></li> 051 * <li>2: MSA (Message Acknowledgment) <b> </b></li> 052 * <li>3: QRD (Original-Style Query Definition) <b> </b></li> 053 * <li>4: QRF (Original Style Query Filter) <b>optional </b></li> 054 * <li>5: PID (Patient identification) <b> </b></li> 055 * <li>6: PD1 (patient additional demographic) <b>optional </b></li> 056 * <li>7: NK1 (Next of kin / associated parties) <b>optional repeating</b></li> 057 * <li>8: VXR_V03_PATIENT_VISIT (a Group object) <b>optional </b></li> 058 * <li>9: GT1 (Guarantor) <b>optional repeating</b></li> 059 * <li>10: VXR_V03_INSURANCE (a Group object) <b>optional repeating</b></li> 060 * <li>11: VXR_V03_ORDER (a Group object) <b>optional repeating</b></li> 061 * </ul> 062 */ 063@SuppressWarnings("unused") 064public class VXR_V03 extends AbstractMessage { 065 066 /** 067 * Creates a new VXR_V03 message with DefaultModelClassFactory. 068 */ 069 public VXR_V03() { 070 this(new DefaultModelClassFactory()); 071 } 072 073 /** 074 * Creates a new VXR_V03 message with custom ModelClassFactory. 075 */ 076 public VXR_V03(ModelClassFactory factory) { 077 super(factory); 078 init(factory); 079 } 080 081 private void init(ModelClassFactory factory) { 082 try { 083 this.add(MSH.class, true, false); 084 this.add(MSA.class, true, false); 085 this.add(QRD.class, true, false); 086 this.add(QRF.class, false, false); 087 this.add(PID.class, true, false); 088 this.add(PD1.class, false, false); 089 this.add(NK1.class, false, true); 090 this.add(VXR_V03_PATIENT_VISIT.class, false, false); 091 this.add(GT1.class, false, true); 092 this.add(VXR_V03_INSURANCE.class, false, true); 093 this.add(VXR_V03_ORDER.class, false, true); 094 } catch(HL7Exception e) { 095 log.error("Unexpected error creating VXR_V03 - this is probably a bug in the source code generator.", e); 096 } 097 } 098 099 /** 100 * Returns "2.4" 101 */ 102 public String getVersion() { 103 return "2.4"; 104 } 105 106 107 108 /** 109 * Returns 110 * MSH (Message Header) - creates it if necessary 111 */ 112 public MSH getMSH() { 113 return getTyped("MSH", MSH.class); 114 } 115 116 117 118 119 /** 120 * Returns 121 * MSA (Message Acknowledgment) - creates it if necessary 122 */ 123 public MSA getMSA() { 124 return getTyped("MSA", MSA.class); 125 } 126 127 128 129 130 /** 131 * Returns 132 * QRD (Original-Style Query Definition) - creates it if necessary 133 */ 134 public QRD getQRD() { 135 return getTyped("QRD", QRD.class); 136 } 137 138 139 140 141 /** 142 * Returns 143 * QRF (Original Style Query Filter) - creates it if necessary 144 */ 145 public QRF getQRF() { 146 return getTyped("QRF", QRF.class); 147 } 148 149 150 151 152 /** 153 * Returns 154 * PID (Patient identification) - creates it if necessary 155 */ 156 public PID getPID() { 157 return getTyped("PID", PID.class); 158 } 159 160 161 162 163 /** 164 * Returns 165 * PD1 (patient additional demographic) - creates it if necessary 166 */ 167 public PD1 getPD1() { 168 return getTyped("PD1", PD1.class); 169 } 170 171 172 173 174 /** 175 * Returns 176 * the first repetition of 177 * NK1 (Next of kin / associated parties) - creates it if necessary 178 */ 179 public NK1 getNK1() { 180 return getTyped("NK1", NK1.class); 181 } 182 183 184 /** 185 * Returns a specific repetition of 186 * NK1 (Next of kin / associated parties) - creates it if necessary 187 * 188 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 189 * @throws HL7Exception if the repetition requested is more than one 190 * greater than the number of existing repetitions. 191 */ 192 public NK1 getNK1(int rep) { 193 return getTyped("NK1", rep, NK1.class); 194 } 195 196 /** 197 * Returns the number of existing repetitions of NK1 198 */ 199 public int getNK1Reps() { 200 return getReps("NK1"); 201 } 202 203 /** 204 * <p> 205 * Returns a non-modifiable List containing all current existing repetitions of NK1. 206 * <p> 207 * <p> 208 * Note that unlike {@link #getNK1()}, this method will not create any reps 209 * if none are already present, so an empty list may be returned. 210 * </p> 211 */ 212 public List<NK1> getNK1All() throws HL7Exception { 213 return getAllAsList("NK1", NK1.class); 214 } 215 216 /** 217 * Inserts a specific repetition of NK1 (Next of kin / associated parties) 218 * @see AbstractGroup#insertRepetition(Structure, int) 219 */ 220 public void insertNK1(NK1 structure, int rep) throws HL7Exception { 221 super.insertRepetition( "NK1", structure, rep); 222 } 223 224 225 /** 226 * Inserts a specific repetition of NK1 (Next of kin / associated parties) 227 * @see AbstractGroup#insertRepetition(Structure, int) 228 */ 229 public NK1 insertNK1(int rep) throws HL7Exception { 230 return (NK1)super.insertRepetition("NK1", rep); 231 } 232 233 234 /** 235 * Removes a specific repetition of NK1 (Next of kin / associated parties) 236 * @see AbstractGroup#removeRepetition(String, int) 237 */ 238 public NK1 removeNK1(int rep) throws HL7Exception { 239 return (NK1)super.removeRepetition("NK1", rep); 240 } 241 242 243 244 /** 245 * Returns 246 * PATIENT_VISIT (a Group object) - creates it if necessary 247 */ 248 public VXR_V03_PATIENT_VISIT getPATIENT_VISIT() { 249 return getTyped("PATIENT_VISIT", VXR_V03_PATIENT_VISIT.class); 250 } 251 252 253 254 255 /** 256 * Returns 257 * the first repetition of 258 * GT1 (Guarantor) - creates it if necessary 259 */ 260 public GT1 getGT1() { 261 return getTyped("GT1", GT1.class); 262 } 263 264 265 /** 266 * Returns a specific repetition of 267 * GT1 (Guarantor) - creates it if necessary 268 * 269 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 270 * @throws HL7Exception if the repetition requested is more than one 271 * greater than the number of existing repetitions. 272 */ 273 public GT1 getGT1(int rep) { 274 return getTyped("GT1", rep, GT1.class); 275 } 276 277 /** 278 * Returns the number of existing repetitions of GT1 279 */ 280 public int getGT1Reps() { 281 return getReps("GT1"); 282 } 283 284 /** 285 * <p> 286 * Returns a non-modifiable List containing all current existing repetitions of GT1. 287 * <p> 288 * <p> 289 * Note that unlike {@link #getGT1()}, this method will not create any reps 290 * if none are already present, so an empty list may be returned. 291 * </p> 292 */ 293 public List<GT1> getGT1All() throws HL7Exception { 294 return getAllAsList("GT1", GT1.class); 295 } 296 297 /** 298 * Inserts a specific repetition of GT1 (Guarantor) 299 * @see AbstractGroup#insertRepetition(Structure, int) 300 */ 301 public void insertGT1(GT1 structure, int rep) throws HL7Exception { 302 super.insertRepetition( "GT1", structure, rep); 303 } 304 305 306 /** 307 * Inserts a specific repetition of GT1 (Guarantor) 308 * @see AbstractGroup#insertRepetition(Structure, int) 309 */ 310 public GT1 insertGT1(int rep) throws HL7Exception { 311 return (GT1)super.insertRepetition("GT1", rep); 312 } 313 314 315 /** 316 * Removes a specific repetition of GT1 (Guarantor) 317 * @see AbstractGroup#removeRepetition(String, int) 318 */ 319 public GT1 removeGT1(int rep) throws HL7Exception { 320 return (GT1)super.removeRepetition("GT1", rep); 321 } 322 323 324 325 /** 326 * Returns 327 * the first repetition of 328 * INSURANCE (a Group object) - creates it if necessary 329 */ 330 public VXR_V03_INSURANCE getINSURANCE() { 331 return getTyped("INSURANCE", VXR_V03_INSURANCE.class); 332 } 333 334 335 /** 336 * Returns a specific repetition of 337 * INSURANCE (a Group object) - creates it if necessary 338 * 339 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 340 * @throws HL7Exception if the repetition requested is more than one 341 * greater than the number of existing repetitions. 342 */ 343 public VXR_V03_INSURANCE getINSURANCE(int rep) { 344 return getTyped("INSURANCE", rep, VXR_V03_INSURANCE.class); 345 } 346 347 /** 348 * Returns the number of existing repetitions of INSURANCE 349 */ 350 public int getINSURANCEReps() { 351 return getReps("INSURANCE"); 352 } 353 354 /** 355 * <p> 356 * Returns a non-modifiable List containing all current existing repetitions of INSURANCE. 357 * <p> 358 * <p> 359 * Note that unlike {@link #getINSURANCE()}, this method will not create any reps 360 * if none are already present, so an empty list may be returned. 361 * </p> 362 */ 363 public List<VXR_V03_INSURANCE> getINSURANCEAll() throws HL7Exception { 364 return getAllAsList("INSURANCE", VXR_V03_INSURANCE.class); 365 } 366 367 /** 368 * Inserts a specific repetition of INSURANCE (a Group object) 369 * @see AbstractGroup#insertRepetition(Structure, int) 370 */ 371 public void insertINSURANCE(VXR_V03_INSURANCE structure, int rep) throws HL7Exception { 372 super.insertRepetition( "INSURANCE", structure, rep); 373 } 374 375 376 /** 377 * Inserts a specific repetition of INSURANCE (a Group object) 378 * @see AbstractGroup#insertRepetition(Structure, int) 379 */ 380 public VXR_V03_INSURANCE insertINSURANCE(int rep) throws HL7Exception { 381 return (VXR_V03_INSURANCE)super.insertRepetition("INSURANCE", rep); 382 } 383 384 385 /** 386 * Removes a specific repetition of INSURANCE (a Group object) 387 * @see AbstractGroup#removeRepetition(String, int) 388 */ 389 public VXR_V03_INSURANCE removeINSURANCE(int rep) throws HL7Exception { 390 return (VXR_V03_INSURANCE)super.removeRepetition("INSURANCE", rep); 391 } 392 393 394 395 /** 396 * Returns 397 * the first repetition of 398 * ORDER (a Group object) - creates it if necessary 399 */ 400 public VXR_V03_ORDER getORDER() { 401 return getTyped("ORDER", VXR_V03_ORDER.class); 402 } 403 404 405 /** 406 * Returns a specific repetition of 407 * ORDER (a Group object) - creates it if necessary 408 * 409 * @param rep The repetition index (0-indexed, i.e. the first repetition is at index 0) 410 * @throws HL7Exception if the repetition requested is more than one 411 * greater than the number of existing repetitions. 412 */ 413 public VXR_V03_ORDER getORDER(int rep) { 414 return getTyped("ORDER", rep, VXR_V03_ORDER.class); 415 } 416 417 /** 418 * Returns the number of existing repetitions of ORDER 419 */ 420 public int getORDERReps() { 421 return getReps("ORDER"); 422 } 423 424 /** 425 * <p> 426 * Returns a non-modifiable List containing all current existing repetitions of ORDER. 427 * <p> 428 * <p> 429 * Note that unlike {@link #getORDER()}, this method will not create any reps 430 * if none are already present, so an empty list may be returned. 431 * </p> 432 */ 433 public List<VXR_V03_ORDER> getORDERAll() throws HL7Exception { 434 return getAllAsList("ORDER", VXR_V03_ORDER.class); 435 } 436 437 /** 438 * Inserts a specific repetition of ORDER (a Group object) 439 * @see AbstractGroup#insertRepetition(Structure, int) 440 */ 441 public void insertORDER(VXR_V03_ORDER structure, int rep) throws HL7Exception { 442 super.insertRepetition( "ORDER", structure, rep); 443 } 444 445 446 /** 447 * Inserts a specific repetition of ORDER (a Group object) 448 * @see AbstractGroup#insertRepetition(Structure, int) 449 */ 450 public VXR_V03_ORDER insertORDER(int rep) throws HL7Exception { 451 return (VXR_V03_ORDER)super.insertRepetition("ORDER", rep); 452 } 453 454 455 /** 456 * Removes a specific repetition of ORDER (a Group object) 457 * @see AbstractGroup#removeRepetition(String, int) 458 */ 459 public VXR_V03_ORDER removeORDER(int rep) throws HL7Exception { 460 return (VXR_V03_ORDER)super.removeRepetition("ORDER", rep); 461 } 462 463 464 465} 466