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