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.v27.segment; 035 036// import ca.uhn.hl7v2.model.v27.group.*; 037import ca.uhn.hl7v2.model.v27.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 REL message segment (Clinical Relationship Segment). 050 * This segment has the following fields:</p> 051 * <ul> 052 * <li>REL-1: Set ID -REL (SI) <b>optional </b> 053 * <li>REL-2: Relationship Type (CWE) <b> </b> 054 * <li>REL-3: This Relationship Instance Identifier (EI) <b> </b> 055 * <li>REL-4: Source Information Instance Identifier (EI) <b> </b> 056 * <li>REL-5: Target Information Instance Identifier (EI) <b> </b> 057 * <li>REL-6: Asserting Entity Instance ID (EI) <b>optional </b> 058 * <li>REL-7: Asserting Person (XCN) <b>optional </b> 059 * <li>REL-8: Asserting Organization (XON) <b>optional </b> 060 * <li>REL-9: Assertor Address (XAD) <b>optional </b> 061 * <li>REL-10: Assertor Contact (XTN) <b>optional </b> 062 * <li>REL-11: Assertion Date Range (DR) <b>optional </b> 063 * <li>REL-12: Negation Indicator (ID) <b>optional </b> 064 * <li>REL-13: Certainty of Relationship (CWE) <b>optional </b> 065 * <li>REL-14: Priority No (NM) <b>optional </b> 066 * <li>REL-15: Priority Sequence No (rel preference for consideration) (NM) <b>optional </b> 067 * <li>REL-16: Separability Indicator (ID) <b>optional </b> 068 * </ul> 069 */ 070@SuppressWarnings("unused") 071public class REL extends AbstractSegment { 072 073 /** 074 * Creates a new REL segment 075 */ 076 public REL(Group parent, ModelClassFactory factory) { 077 super(parent, factory); 078 init(factory); 079 } 080 081 private void init(ModelClassFactory factory) { 082 try { 083 this.add(SI.class, false, 1, 4, new Object[]{ getMessage() }, "Set ID -REL"); 084 this.add(CWE.class, true, 1, 0, new Object[]{ getMessage() }, "Relationship Type"); 085 this.add(EI.class, true, 1, 0, new Object[]{ getMessage() }, "This Relationship Instance Identifier"); 086 this.add(EI.class, true, 1, 0, new Object[]{ getMessage() }, "Source Information Instance Identifier"); 087 this.add(EI.class, true, 1, 0, new Object[]{ getMessage() }, "Target Information Instance Identifier"); 088 this.add(EI.class, false, 1, 0, new Object[]{ getMessage() }, "Asserting Entity Instance ID"); 089 this.add(XCN.class, false, 1, 0, new Object[]{ getMessage() }, "Asserting Person"); 090 this.add(XON.class, false, 1, 0, new Object[]{ getMessage() }, "Asserting Organization"); 091 this.add(XAD.class, false, 1, 0, new Object[]{ getMessage() }, "Assertor Address"); 092 this.add(XTN.class, false, 1, 0, new Object[]{ getMessage() }, "Assertor Contact"); 093 this.add(DR.class, false, 1, 0, new Object[]{ getMessage() }, "Assertion Date Range"); 094 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Negation Indicator"); 095 this.add(CWE.class, false, 1, 0, new Object[]{ getMessage() }, "Certainty of Relationship"); 096 this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Priority No"); 097 this.add(NM.class, false, 1, 0, new Object[]{ getMessage() }, "Priority Sequence No (rel preference for consideration)"); 098 this.add(ID.class, false, 1, 1, new Object[]{ getMessage(), new Integer(136) }, "Separability Indicator"); 099 } catch(HL7Exception e) { 100 log.error("Unexpected error creating REL - this is probably a bug in the source code generator.", e); 101 } 102 } 103 104 105 106 /** 107 * Returns 108 * REL-1: "Set ID -REL" - creates it if necessary 109 */ 110 public SI getSetIDREL() { 111 SI retVal = this.getTypedField(1, 0); 112 return retVal; 113 } 114 115 /** 116 * Returns 117 * REL-1: "Set ID -REL" - creates it if necessary 118 */ 119 public SI getRel1_SetIDREL() { 120 SI retVal = this.getTypedField(1, 0); 121 return retVal; 122 } 123 124 125 126 /** 127 * Returns 128 * REL-2: "Relationship Type" - creates it if necessary 129 */ 130 public CWE getRelationshipType() { 131 CWE retVal = this.getTypedField(2, 0); 132 return retVal; 133 } 134 135 /** 136 * Returns 137 * REL-2: "Relationship Type" - creates it if necessary 138 */ 139 public CWE getRel2_RelationshipType() { 140 CWE retVal = this.getTypedField(2, 0); 141 return retVal; 142 } 143 144 145 146 /** 147 * Returns 148 * REL-3: "This Relationship Instance Identifier" - creates it if necessary 149 */ 150 public EI getThisRelationshipInstanceIdentifier() { 151 EI retVal = this.getTypedField(3, 0); 152 return retVal; 153 } 154 155 /** 156 * Returns 157 * REL-3: "This Relationship Instance Identifier" - creates it if necessary 158 */ 159 public EI getRel3_ThisRelationshipInstanceIdentifier() { 160 EI retVal = this.getTypedField(3, 0); 161 return retVal; 162 } 163 164 165 166 /** 167 * Returns 168 * REL-4: "Source Information Instance Identifier" - creates it if necessary 169 */ 170 public EI getSourceInformationInstanceIdentifier() { 171 EI retVal = this.getTypedField(4, 0); 172 return retVal; 173 } 174 175 /** 176 * Returns 177 * REL-4: "Source Information Instance Identifier" - creates it if necessary 178 */ 179 public EI getRel4_SourceInformationInstanceIdentifier() { 180 EI retVal = this.getTypedField(4, 0); 181 return retVal; 182 } 183 184 185 186 /** 187 * Returns 188 * REL-5: "Target Information Instance Identifier" - creates it if necessary 189 */ 190 public EI getTargetInformationInstanceIdentifier() { 191 EI retVal = this.getTypedField(5, 0); 192 return retVal; 193 } 194 195 /** 196 * Returns 197 * REL-5: "Target Information Instance Identifier" - creates it if necessary 198 */ 199 public EI getRel5_TargetInformationInstanceIdentifier() { 200 EI retVal = this.getTypedField(5, 0); 201 return retVal; 202 } 203 204 205 206 /** 207 * Returns 208 * REL-6: "Asserting Entity Instance ID" - creates it if necessary 209 */ 210 public EI getAssertingEntityInstanceID() { 211 EI retVal = this.getTypedField(6, 0); 212 return retVal; 213 } 214 215 /** 216 * Returns 217 * REL-6: "Asserting Entity Instance ID" - creates it if necessary 218 */ 219 public EI getRel6_AssertingEntityInstanceID() { 220 EI retVal = this.getTypedField(6, 0); 221 return retVal; 222 } 223 224 225 226 /** 227 * Returns 228 * REL-7: "Asserting Person" - creates it if necessary 229 */ 230 public XCN getAssertingPerson() { 231 XCN retVal = this.getTypedField(7, 0); 232 return retVal; 233 } 234 235 /** 236 * Returns 237 * REL-7: "Asserting Person" - creates it if necessary 238 */ 239 public XCN getRel7_AssertingPerson() { 240 XCN retVal = this.getTypedField(7, 0); 241 return retVal; 242 } 243 244 245 246 /** 247 * Returns 248 * REL-8: "Asserting Organization" - creates it if necessary 249 */ 250 public XON getAssertingOrganization() { 251 XON retVal = this.getTypedField(8, 0); 252 return retVal; 253 } 254 255 /** 256 * Returns 257 * REL-8: "Asserting Organization" - creates it if necessary 258 */ 259 public XON getRel8_AssertingOrganization() { 260 XON retVal = this.getTypedField(8, 0); 261 return retVal; 262 } 263 264 265 266 /** 267 * Returns 268 * REL-9: "Assertor Address" - creates it if necessary 269 */ 270 public XAD getAssertorAddress() { 271 XAD retVal = this.getTypedField(9, 0); 272 return retVal; 273 } 274 275 /** 276 * Returns 277 * REL-9: "Assertor Address" - creates it if necessary 278 */ 279 public XAD getRel9_AssertorAddress() { 280 XAD retVal = this.getTypedField(9, 0); 281 return retVal; 282 } 283 284 285 286 /** 287 * Returns 288 * REL-10: "Assertor Contact" - creates it if necessary 289 */ 290 public XTN getAssertorContact() { 291 XTN retVal = this.getTypedField(10, 0); 292 return retVal; 293 } 294 295 /** 296 * Returns 297 * REL-10: "Assertor Contact" - creates it if necessary 298 */ 299 public XTN getRel10_AssertorContact() { 300 XTN retVal = this.getTypedField(10, 0); 301 return retVal; 302 } 303 304 305 306 /** 307 * Returns 308 * REL-11: "Assertion Date Range" - creates it if necessary 309 */ 310 public DR getAssertionDateRange() { 311 DR retVal = this.getTypedField(11, 0); 312 return retVal; 313 } 314 315 /** 316 * Returns 317 * REL-11: "Assertion Date Range" - creates it if necessary 318 */ 319 public DR getRel11_AssertionDateRange() { 320 DR retVal = this.getTypedField(11, 0); 321 return retVal; 322 } 323 324 325 326 /** 327 * Returns 328 * REL-12: "Negation Indicator" - creates it if necessary 329 */ 330 public ID getNegationIndicator() { 331 ID retVal = this.getTypedField(12, 0); 332 return retVal; 333 } 334 335 /** 336 * Returns 337 * REL-12: "Negation Indicator" - creates it if necessary 338 */ 339 public ID getRel12_NegationIndicator() { 340 ID retVal = this.getTypedField(12, 0); 341 return retVal; 342 } 343 344 345 346 /** 347 * Returns 348 * REL-13: "Certainty of Relationship" - creates it if necessary 349 */ 350 public CWE getCertaintyOfRelationship() { 351 CWE retVal = this.getTypedField(13, 0); 352 return retVal; 353 } 354 355 /** 356 * Returns 357 * REL-13: "Certainty of Relationship" - creates it if necessary 358 */ 359 public CWE getRel13_CertaintyOfRelationship() { 360 CWE retVal = this.getTypedField(13, 0); 361 return retVal; 362 } 363 364 365 366 /** 367 * Returns 368 * REL-14: "Priority No" - creates it if necessary 369 */ 370 public NM getPriorityNo() { 371 NM retVal = this.getTypedField(14, 0); 372 return retVal; 373 } 374 375 /** 376 * Returns 377 * REL-14: "Priority No" - creates it if necessary 378 */ 379 public NM getRel14_PriorityNo() { 380 NM retVal = this.getTypedField(14, 0); 381 return retVal; 382 } 383 384 385 386 /** 387 * Returns 388 * REL-15: "Priority Sequence No (rel preference for consideration)" - creates it if necessary 389 */ 390 public NM getPrioritySequenceNoRelpreferenceforconsideration() { 391 NM retVal = this.getTypedField(15, 0); 392 return retVal; 393 } 394 395 /** 396 * Returns 397 * REL-15: "Priority Sequence No (rel preference for consideration)" - creates it if necessary 398 */ 399 public NM getRel15_PrioritySequenceNoRelpreferenceforconsideration() { 400 NM retVal = this.getTypedField(15, 0); 401 return retVal; 402 } 403 404 405 406 /** 407 * Returns 408 * REL-16: "Separability Indicator" - creates it if necessary 409 */ 410 public ID getSeparabilityIndicator() { 411 ID retVal = this.getTypedField(16, 0); 412 return retVal; 413 } 414 415 /** 416 * Returns 417 * REL-16: "Separability Indicator" - creates it if necessary 418 */ 419 public ID getRel16_SeparabilityIndicator() { 420 ID retVal = this.getTypedField(16, 0); 421 return retVal; 422 } 423 424 425 426 427 428 /** {@inheritDoc} */ 429 protected Type createNewTypeWithoutReflection(int field) { 430 switch (field) { 431 case 0: return new SI(getMessage()); 432 case 1: return new CWE(getMessage()); 433 case 2: return new EI(getMessage()); 434 case 3: return new EI(getMessage()); 435 case 4: return new EI(getMessage()); 436 case 5: return new EI(getMessage()); 437 case 6: return new XCN(getMessage()); 438 case 7: return new XON(getMessage()); 439 case 8: return new XAD(getMessage()); 440 case 9: return new XTN(getMessage()); 441 case 10: return new DR(getMessage()); 442 case 11: return new ID(getMessage(), new Integer( 136 )); 443 case 12: return new CWE(getMessage()); 444 case 13: return new NM(getMessage()); 445 case 14: return new NM(getMessage()); 446 case 15: return new ID(getMessage(), new Integer( 136 )); 447 default: return null; 448 } 449 } 450 451 452} 453