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.segment; 035 036// import ca.uhn.hl7v2.model.v26.group.*; 037import ca.uhn.hl7v2.model.v26.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 *<p>Represents an HL7 ADJ message segment (Adjustment). 049 * This segment has the following fields:</p> 050 * <ul> 051 * <li>ADJ-1: Provider Adjustment Number (EI) <b> </b> 052 * <li>ADJ-2: Payer Adjustment Number (EI) <b> </b> 053 * <li>ADJ-3: Adjustment Sequence Number (SI) <b> </b> 054 * <li>ADJ-4: Adjustment Category (IS) <b> </b> 055 * <li>ADJ-5: Adjustment Amount (CP) <b>optional </b> 056 * <li>ADJ-6: Adjustment Quantity (CQ) <b>optional </b> 057 * <li>ADJ-7: Adjustment Reason PA (CWE) <b>optional </b> 058 * <li>ADJ-8: Adjustment Description (ST) <b>optional </b> 059 * <li>ADJ-9: Original Value (NM) <b>optional </b> 060 * <li>ADJ-10: Substitute Value (NM) <b>optional </b> 061 * <li>ADJ-11: Adjustment Action (IS) <b>optional </b> 062 * <li>ADJ-12: Provider Adjustment Number Cross Reference (EI) <b>optional </b> 063 * <li>ADJ-13: Provider Product/Service Line Item Number Cross Reference (EI) <b>optional </b> 064 * <li>ADJ-14: Adjustment Date (DTM) <b> </b> 065 * <li>ADJ-15: Responsible Organization (XON) <b>optional </b> 066 * </ul> 067 */ 068@SuppressWarnings("unused") 069public class ADJ extends AbstractSegment { 070 071 /** 072 * Creates a new ADJ segment 073 */ 074 public ADJ(Group parent, ModelClassFactory factory) { 075 super(parent, factory); 076 init(factory); 077 } 078 079 private void init(ModelClassFactory factory) { 080 try { 081 this.add(EI.class, true, 1, 73, new Object[]{ getMessage() }, "Provider Adjustment Number"); 082 this.add(EI.class, true, 1, 73, new Object[]{ getMessage() }, "Payer Adjustment Number"); 083 this.add(SI.class, true, 1, 4, new Object[]{ getMessage() }, "Adjustment Sequence Number"); 084 this.add(IS.class, true, 1, 4, new Object[]{ getMessage(), new Integer(564) }, "Adjustment Category"); 085 this.add(CP.class, false, 1, 254, new Object[]{ getMessage() }, "Adjustment Amount"); 086 this.add(CQ.class, false, 1, 222, new Object[]{ getMessage() }, "Adjustment Quantity"); 087 this.add(CWE.class, false, 1, 211, new Object[]{ getMessage() }, "Adjustment Reason PA"); 088 this.add(ST.class, false, 1, 250, new Object[]{ getMessage() }, "Adjustment Description"); 089 this.add(NM.class, false, 1, 250, new Object[]{ getMessage() }, "Original Value"); 090 this.add(NM.class, false, 1, 250, new Object[]{ getMessage() }, "Substitute Value"); 091 this.add(IS.class, false, 1, 4, new Object[]{ getMessage(), new Integer(569) }, "Adjustment Action"); 092 this.add(EI.class, false, 1, 73, new Object[]{ getMessage() }, "Provider Adjustment Number Cross Reference"); 093 this.add(EI.class, false, 1, 73, new Object[]{ getMessage() }, "Provider Product/Service Line Item Number Cross Reference"); 094 this.add(DTM.class, true, 1, 26, new Object[]{ getMessage() }, "Adjustment Date"); 095 this.add(XON.class, false, 1, 183, new Object[]{ getMessage() }, "Responsible Organization"); 096 } catch(HL7Exception e) { 097 log.error("Unexpected error creating ADJ - this is probably a bug in the source code generator.", e); 098 } 099 } 100 101 102 103 /** 104 * Returns 105 * ADJ-1: "Provider Adjustment Number" - creates it if necessary 106 */ 107 public EI getProviderAdjustmentNumber() { 108 EI retVal = this.getTypedField(1, 0); 109 return retVal; 110 } 111 112 /** 113 * Returns 114 * ADJ-1: "Provider Adjustment Number" - creates it if necessary 115 */ 116 public EI getAdj1_ProviderAdjustmentNumber() { 117 EI retVal = this.getTypedField(1, 0); 118 return retVal; 119 } 120 121 122 123 /** 124 * Returns 125 * ADJ-2: "Payer Adjustment Number" - creates it if necessary 126 */ 127 public EI getPayerAdjustmentNumber() { 128 EI retVal = this.getTypedField(2, 0); 129 return retVal; 130 } 131 132 /** 133 * Returns 134 * ADJ-2: "Payer Adjustment Number" - creates it if necessary 135 */ 136 public EI getAdj2_PayerAdjustmentNumber() { 137 EI retVal = this.getTypedField(2, 0); 138 return retVal; 139 } 140 141 142 143 /** 144 * Returns 145 * ADJ-3: "Adjustment Sequence Number" - creates it if necessary 146 */ 147 public SI getAdjustmentSequenceNumber() { 148 SI retVal = this.getTypedField(3, 0); 149 return retVal; 150 } 151 152 /** 153 * Returns 154 * ADJ-3: "Adjustment Sequence Number" - creates it if necessary 155 */ 156 public SI getAdj3_AdjustmentSequenceNumber() { 157 SI retVal = this.getTypedField(3, 0); 158 return retVal; 159 } 160 161 162 163 /** 164 * Returns 165 * ADJ-4: "Adjustment Category" - creates it if necessary 166 */ 167 public IS getAdjustmentCategory() { 168 IS retVal = this.getTypedField(4, 0); 169 return retVal; 170 } 171 172 /** 173 * Returns 174 * ADJ-4: "Adjustment Category" - creates it if necessary 175 */ 176 public IS getAdj4_AdjustmentCategory() { 177 IS retVal = this.getTypedField(4, 0); 178 return retVal; 179 } 180 181 182 183 /** 184 * Returns 185 * ADJ-5: "Adjustment Amount" - creates it if necessary 186 */ 187 public CP getAdjustmentAmount() { 188 CP retVal = this.getTypedField(5, 0); 189 return retVal; 190 } 191 192 /** 193 * Returns 194 * ADJ-5: "Adjustment Amount" - creates it if necessary 195 */ 196 public CP getAdj5_AdjustmentAmount() { 197 CP retVal = this.getTypedField(5, 0); 198 return retVal; 199 } 200 201 202 203 /** 204 * Returns 205 * ADJ-6: "Adjustment Quantity" - creates it if necessary 206 */ 207 public CQ getAdjustmentQuantity() { 208 CQ retVal = this.getTypedField(6, 0); 209 return retVal; 210 } 211 212 /** 213 * Returns 214 * ADJ-6: "Adjustment Quantity" - creates it if necessary 215 */ 216 public CQ getAdj6_AdjustmentQuantity() { 217 CQ retVal = this.getTypedField(6, 0); 218 return retVal; 219 } 220 221 222 223 /** 224 * Returns 225 * ADJ-7: "Adjustment Reason PA" - creates it if necessary 226 */ 227 public CWE getAdjustmentReasonPA() { 228 CWE retVal = this.getTypedField(7, 0); 229 return retVal; 230 } 231 232 /** 233 * Returns 234 * ADJ-7: "Adjustment Reason PA" - creates it if necessary 235 */ 236 public CWE getAdj7_AdjustmentReasonPA() { 237 CWE retVal = this.getTypedField(7, 0); 238 return retVal; 239 } 240 241 242 243 /** 244 * Returns 245 * ADJ-8: "Adjustment Description" - creates it if necessary 246 */ 247 public ST getAdjustmentDescription() { 248 ST retVal = this.getTypedField(8, 0); 249 return retVal; 250 } 251 252 /** 253 * Returns 254 * ADJ-8: "Adjustment Description" - creates it if necessary 255 */ 256 public ST getAdj8_AdjustmentDescription() { 257 ST retVal = this.getTypedField(8, 0); 258 return retVal; 259 } 260 261 262 263 /** 264 * Returns 265 * ADJ-9: "Original Value" - creates it if necessary 266 */ 267 public NM getOriginalValue() { 268 NM retVal = this.getTypedField(9, 0); 269 return retVal; 270 } 271 272 /** 273 * Returns 274 * ADJ-9: "Original Value" - creates it if necessary 275 */ 276 public NM getAdj9_OriginalValue() { 277 NM retVal = this.getTypedField(9, 0); 278 return retVal; 279 } 280 281 282 283 /** 284 * Returns 285 * ADJ-10: "Substitute Value" - creates it if necessary 286 */ 287 public NM getSubstituteValue() { 288 NM retVal = this.getTypedField(10, 0); 289 return retVal; 290 } 291 292 /** 293 * Returns 294 * ADJ-10: "Substitute Value" - creates it if necessary 295 */ 296 public NM getAdj10_SubstituteValue() { 297 NM retVal = this.getTypedField(10, 0); 298 return retVal; 299 } 300 301 302 303 /** 304 * Returns 305 * ADJ-11: "Adjustment Action" - creates it if necessary 306 */ 307 public IS getAdjustmentAction() { 308 IS retVal = this.getTypedField(11, 0); 309 return retVal; 310 } 311 312 /** 313 * Returns 314 * ADJ-11: "Adjustment Action" - creates it if necessary 315 */ 316 public IS getAdj11_AdjustmentAction() { 317 IS retVal = this.getTypedField(11, 0); 318 return retVal; 319 } 320 321 322 323 /** 324 * Returns 325 * ADJ-12: "Provider Adjustment Number Cross Reference" - creates it if necessary 326 */ 327 public EI getProviderAdjustmentNumberCrossReference() { 328 EI retVal = this.getTypedField(12, 0); 329 return retVal; 330 } 331 332 /** 333 * Returns 334 * ADJ-12: "Provider Adjustment Number Cross Reference" - creates it if necessary 335 */ 336 public EI getAdj12_ProviderAdjustmentNumberCrossReference() { 337 EI retVal = this.getTypedField(12, 0); 338 return retVal; 339 } 340 341 342 343 /** 344 * Returns 345 * ADJ-13: "Provider Product/Service Line Item Number Cross Reference" - creates it if necessary 346 */ 347 public EI getProviderProductServiceLineItemNumberCrossReference() { 348 EI retVal = this.getTypedField(13, 0); 349 return retVal; 350 } 351 352 /** 353 * Returns 354 * ADJ-13: "Provider Product/Service Line Item Number Cross Reference" - creates it if necessary 355 */ 356 public EI getAdj13_ProviderProductServiceLineItemNumberCrossReference() { 357 EI retVal = this.getTypedField(13, 0); 358 return retVal; 359 } 360 361 362 363 /** 364 * Returns 365 * ADJ-14: "Adjustment Date" - creates it if necessary 366 */ 367 public DTM getAdjustmentDate() { 368 DTM retVal = this.getTypedField(14, 0); 369 return retVal; 370 } 371 372 /** 373 * Returns 374 * ADJ-14: "Adjustment Date" - creates it if necessary 375 */ 376 public DTM getAdj14_AdjustmentDate() { 377 DTM retVal = this.getTypedField(14, 0); 378 return retVal; 379 } 380 381 382 383 /** 384 * Returns 385 * ADJ-15: "Responsible Organization" - creates it if necessary 386 */ 387 public XON getResponsibleOrganization() { 388 XON retVal = this.getTypedField(15, 0); 389 return retVal; 390 } 391 392 /** 393 * Returns 394 * ADJ-15: "Responsible Organization" - creates it if necessary 395 */ 396 public XON getAdj15_ResponsibleOrganization() { 397 XON retVal = this.getTypedField(15, 0); 398 return retVal; 399 } 400 401 402 403 404 405 /** {@inheritDoc} */ 406 protected Type createNewTypeWithoutReflection(int field) { 407 switch (field) { 408 case 0: return new EI(getMessage()); 409 case 1: return new EI(getMessage()); 410 case 2: return new SI(getMessage()); 411 case 3: return new IS(getMessage(), new Integer( 564 )); 412 case 4: return new CP(getMessage()); 413 case 5: return new CQ(getMessage()); 414 case 6: return new CWE(getMessage()); 415 case 7: return new ST(getMessage()); 416 case 8: return new NM(getMessage()); 417 case 9: return new NM(getMessage()); 418 case 10: return new IS(getMessage(), new Integer( 569 )); 419 case 11: return new EI(getMessage()); 420 case 12: return new EI(getMessage()); 421 case 13: return new DTM(getMessage()); 422 case 14: return new XON(getMessage()); 423 default: return null; 424 } 425 } 426 427 428} 429