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