001package org.hl7.fhir.r5.model; 002 003 004/* 005 * #%L 006 * org.hl7.fhir.r5 007 * %% 008 * Copyright (C) 2014 - 2019 Health Level 7 009 * %% 010 * Licensed under the Apache License, Version 2.0 (the \"License\"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an \"AS IS\" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * #L% 022 */ 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, \ 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this \ 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, \ 034 this list of conditions and the following disclaimer in the documentation \ 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 049 POSSIBILITY OF SUCH DAMAGE. 050 */ 051 052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent 053 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057import org.hl7.fhir.utilities.Utilities; 058import org.hl7.fhir.r5.model.Enumerations.*; 059import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 060import org.hl7.fhir.exceptions.FHIRException; 061import org.hl7.fhir.instance.model.api.ICompositeType; 062import ca.uhn.fhir.model.api.annotation.ResourceDef; 063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 064import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 065import ca.uhn.fhir.model.api.annotation.Child; 066import ca.uhn.fhir.model.api.annotation.ChildOrder; 067import ca.uhn.fhir.model.api.annotation.Description; 068import ca.uhn.fhir.model.api.annotation.Block; 069 070/** 071 * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource. 072 */ 073@ResourceDef(name="EnrollmentResponse", profile="http://hl7.org/fhir/StructureDefinition/EnrollmentResponse") 074public class EnrollmentResponse extends DomainResource { 075 076 /** 077 * The Response business identifier. 078 */ 079 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 080 @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) 081 protected List<Identifier> identifier; 082 083 /** 084 * The status of the resource instance. 085 */ 086 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 087 @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." ) 088 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status") 089 protected Enumeration<FinancialResourceStatusCodes> status; 090 091 /** 092 * Original request resource reference. 093 */ 094 @Child(name = "request", type = {EnrollmentRequest.class}, order=2, min=0, max=1, modifier=false, summary=false) 095 @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) 096 protected Reference request; 097 098 /** 099 * Processing status: error, complete. 100 */ 101 @Child(name = "outcome", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 102 @Description(shortDefinition="queued | complete | error | partial", formalDefinition="Processing status: error, complete." ) 103 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome") 104 protected Enumeration<ClaimProcessingCodes> outcome; 105 106 /** 107 * A description of the status of the adjudication. 108 */ 109 @Child(name = "disposition", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 110 @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) 111 protected StringType disposition; 112 113 /** 114 * The date when the enclosed suite of services were performed or completed. 115 */ 116 @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 117 @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) 118 protected DateTimeType created; 119 120 /** 121 * The Insurer who produced this adjudicated response. 122 */ 123 @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=false) 124 @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) 125 protected Reference organization; 126 127 /** 128 * The practitioner who is responsible for the services rendered to the patient. 129 */ 130 @Child(name = "requestProvider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=false) 131 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 132 protected Reference requestProvider; 133 134 private static final long serialVersionUID = -1692369510L; 135 136 /** 137 * Constructor 138 */ 139 public EnrollmentResponse() { 140 super(); 141 } 142 143 /** 144 * @return {@link #identifier} (The Response business identifier.) 145 */ 146 public List<Identifier> getIdentifier() { 147 if (this.identifier == null) 148 this.identifier = new ArrayList<Identifier>(); 149 return this.identifier; 150 } 151 152 /** 153 * @return Returns a reference to <code>this</code> for easy method chaining 154 */ 155 public EnrollmentResponse setIdentifier(List<Identifier> theIdentifier) { 156 this.identifier = theIdentifier; 157 return this; 158 } 159 160 public boolean hasIdentifier() { 161 if (this.identifier == null) 162 return false; 163 for (Identifier item : this.identifier) 164 if (!item.isEmpty()) 165 return true; 166 return false; 167 } 168 169 public Identifier addIdentifier() { //3 170 Identifier t = new Identifier(); 171 if (this.identifier == null) 172 this.identifier = new ArrayList<Identifier>(); 173 this.identifier.add(t); 174 return t; 175 } 176 177 public EnrollmentResponse addIdentifier(Identifier t) { //3 178 if (t == null) 179 return this; 180 if (this.identifier == null) 181 this.identifier = new ArrayList<Identifier>(); 182 this.identifier.add(t); 183 return this; 184 } 185 186 /** 187 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 188 */ 189 public Identifier getIdentifierFirstRep() { 190 if (getIdentifier().isEmpty()) { 191 addIdentifier(); 192 } 193 return getIdentifier().get(0); 194 } 195 196 /** 197 * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 198 */ 199 public Enumeration<FinancialResourceStatusCodes> getStatusElement() { 200 if (this.status == null) 201 if (Configuration.errorOnAutoCreate()) 202 throw new Error("Attempt to auto-create EnrollmentResponse.status"); 203 else if (Configuration.doAutoCreate()) 204 this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); // bb 205 return this.status; 206 } 207 208 public boolean hasStatusElement() { 209 return this.status != null && !this.status.isEmpty(); 210 } 211 212 public boolean hasStatus() { 213 return this.status != null && !this.status.isEmpty(); 214 } 215 216 /** 217 * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 218 */ 219 public EnrollmentResponse setStatusElement(Enumeration<FinancialResourceStatusCodes> value) { 220 this.status = value; 221 return this; 222 } 223 224 /** 225 * @return The status of the resource instance. 226 */ 227 public FinancialResourceStatusCodes getStatus() { 228 return this.status == null ? null : this.status.getValue(); 229 } 230 231 /** 232 * @param value The status of the resource instance. 233 */ 234 public EnrollmentResponse setStatus(FinancialResourceStatusCodes value) { 235 if (value == null) 236 this.status = null; 237 else { 238 if (this.status == null) 239 this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); 240 this.status.setValue(value); 241 } 242 return this; 243 } 244 245 /** 246 * @return {@link #request} (Original request resource reference.) 247 */ 248 public Reference getRequest() { 249 if (this.request == null) 250 if (Configuration.errorOnAutoCreate()) 251 throw new Error("Attempt to auto-create EnrollmentResponse.request"); 252 else if (Configuration.doAutoCreate()) 253 this.request = new Reference(); // cc 254 return this.request; 255 } 256 257 public boolean hasRequest() { 258 return this.request != null && !this.request.isEmpty(); 259 } 260 261 /** 262 * @param value {@link #request} (Original request resource reference.) 263 */ 264 public EnrollmentResponse setRequest(Reference value) { 265 this.request = value; 266 return this; 267 } 268 269 /** 270 * @return {@link #outcome} (Processing status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 271 */ 272 public Enumeration<ClaimProcessingCodes> getOutcomeElement() { 273 if (this.outcome == null) 274 if (Configuration.errorOnAutoCreate()) 275 throw new Error("Attempt to auto-create EnrollmentResponse.outcome"); 276 else if (Configuration.doAutoCreate()) 277 this.outcome = new Enumeration<ClaimProcessingCodes>(new ClaimProcessingCodesEnumFactory()); // bb 278 return this.outcome; 279 } 280 281 public boolean hasOutcomeElement() { 282 return this.outcome != null && !this.outcome.isEmpty(); 283 } 284 285 public boolean hasOutcome() { 286 return this.outcome != null && !this.outcome.isEmpty(); 287 } 288 289 /** 290 * @param value {@link #outcome} (Processing status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value 291 */ 292 public EnrollmentResponse setOutcomeElement(Enumeration<ClaimProcessingCodes> value) { 293 this.outcome = value; 294 return this; 295 } 296 297 /** 298 * @return Processing status: error, complete. 299 */ 300 public ClaimProcessingCodes getOutcome() { 301 return this.outcome == null ? null : this.outcome.getValue(); 302 } 303 304 /** 305 * @param value Processing status: error, complete. 306 */ 307 public EnrollmentResponse setOutcome(ClaimProcessingCodes value) { 308 if (value == null) 309 this.outcome = null; 310 else { 311 if (this.outcome == null) 312 this.outcome = new Enumeration<ClaimProcessingCodes>(new ClaimProcessingCodesEnumFactory()); 313 this.outcome.setValue(value); 314 } 315 return this; 316 } 317 318 /** 319 * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 320 */ 321 public StringType getDispositionElement() { 322 if (this.disposition == null) 323 if (Configuration.errorOnAutoCreate()) 324 throw new Error("Attempt to auto-create EnrollmentResponse.disposition"); 325 else if (Configuration.doAutoCreate()) 326 this.disposition = new StringType(); // bb 327 return this.disposition; 328 } 329 330 public boolean hasDispositionElement() { 331 return this.disposition != null && !this.disposition.isEmpty(); 332 } 333 334 public boolean hasDisposition() { 335 return this.disposition != null && !this.disposition.isEmpty(); 336 } 337 338 /** 339 * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value 340 */ 341 public EnrollmentResponse setDispositionElement(StringType value) { 342 this.disposition = value; 343 return this; 344 } 345 346 /** 347 * @return A description of the status of the adjudication. 348 */ 349 public String getDisposition() { 350 return this.disposition == null ? null : this.disposition.getValue(); 351 } 352 353 /** 354 * @param value A description of the status of the adjudication. 355 */ 356 public EnrollmentResponse setDisposition(String value) { 357 if (Utilities.noString(value)) 358 this.disposition = null; 359 else { 360 if (this.disposition == null) 361 this.disposition = new StringType(); 362 this.disposition.setValue(value); 363 } 364 return this; 365 } 366 367 /** 368 * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 369 */ 370 public DateTimeType getCreatedElement() { 371 if (this.created == null) 372 if (Configuration.errorOnAutoCreate()) 373 throw new Error("Attempt to auto-create EnrollmentResponse.created"); 374 else if (Configuration.doAutoCreate()) 375 this.created = new DateTimeType(); // bb 376 return this.created; 377 } 378 379 public boolean hasCreatedElement() { 380 return this.created != null && !this.created.isEmpty(); 381 } 382 383 public boolean hasCreated() { 384 return this.created != null && !this.created.isEmpty(); 385 } 386 387 /** 388 * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 389 */ 390 public EnrollmentResponse setCreatedElement(DateTimeType value) { 391 this.created = value; 392 return this; 393 } 394 395 /** 396 * @return The date when the enclosed suite of services were performed or completed. 397 */ 398 public Date getCreated() { 399 return this.created == null ? null : this.created.getValue(); 400 } 401 402 /** 403 * @param value The date when the enclosed suite of services were performed or completed. 404 */ 405 public EnrollmentResponse setCreated(Date value) { 406 if (value == null) 407 this.created = null; 408 else { 409 if (this.created == null) 410 this.created = new DateTimeType(); 411 this.created.setValue(value); 412 } 413 return this; 414 } 415 416 /** 417 * @return {@link #organization} (The Insurer who produced this adjudicated response.) 418 */ 419 public Reference getOrganization() { 420 if (this.organization == null) 421 if (Configuration.errorOnAutoCreate()) 422 throw new Error("Attempt to auto-create EnrollmentResponse.organization"); 423 else if (Configuration.doAutoCreate()) 424 this.organization = new Reference(); // cc 425 return this.organization; 426 } 427 428 public boolean hasOrganization() { 429 return this.organization != null && !this.organization.isEmpty(); 430 } 431 432 /** 433 * @param value {@link #organization} (The Insurer who produced this adjudicated response.) 434 */ 435 public EnrollmentResponse setOrganization(Reference value) { 436 this.organization = value; 437 return this; 438 } 439 440 /** 441 * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 442 */ 443 public Reference getRequestProvider() { 444 if (this.requestProvider == null) 445 if (Configuration.errorOnAutoCreate()) 446 throw new Error("Attempt to auto-create EnrollmentResponse.requestProvider"); 447 else if (Configuration.doAutoCreate()) 448 this.requestProvider = new Reference(); // cc 449 return this.requestProvider; 450 } 451 452 public boolean hasRequestProvider() { 453 return this.requestProvider != null && !this.requestProvider.isEmpty(); 454 } 455 456 /** 457 * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) 458 */ 459 public EnrollmentResponse setRequestProvider(Reference value) { 460 this.requestProvider = value; 461 return this; 462 } 463 464 protected void listChildren(List<Property> children) { 465 super.listChildren(children); 466 children.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 467 children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status)); 468 children.add(new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, 1, request)); 469 children.add(new Property("outcome", "code", "Processing status: error, complete.", 0, 1, outcome)); 470 children.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition)); 471 children.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created)); 472 children.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization)); 473 children.add(new Property("requestProvider", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider)); 474 } 475 476 @Override 477 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 478 switch (_hash) { 479 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier); 480 case -892481550: /*status*/ return new Property("status", "code", "The status of the resource instance.", 0, 1, status); 481 case 1095692943: /*request*/ return new Property("request", "Reference(EnrollmentRequest)", "Original request resource reference.", 0, 1, request); 482 case -1106507950: /*outcome*/ return new Property("outcome", "code", "Processing status: error, complete.", 0, 1, outcome); 483 case 583380919: /*disposition*/ return new Property("disposition", "string", "A description of the status of the adjudication.", 0, 1, disposition); 484 case 1028554472: /*created*/ return new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, 1, created); 485 case 1178922291: /*organization*/ return new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, 1, organization); 486 case 1601527200: /*requestProvider*/ return new Property("requestProvider", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestProvider); 487 default: return super.getNamedProperty(_hash, _name, _checkValid); 488 } 489 490 } 491 492 @Override 493 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 494 switch (hash) { 495 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 496 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FinancialResourceStatusCodes> 497 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference 498 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<ClaimProcessingCodes> 499 case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType 500 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 501 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference 502 case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Reference 503 default: return super.getProperty(hash, name, checkValid); 504 } 505 506 } 507 508 @Override 509 public Base setProperty(int hash, String name, Base value) throws FHIRException { 510 switch (hash) { 511 case -1618432855: // identifier 512 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 513 return value; 514 case -892481550: // status 515 value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 516 this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes> 517 return value; 518 case 1095692943: // request 519 this.request = TypeConvertor.castToReference(value); // Reference 520 return value; 521 case -1106507950: // outcome 522 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 523 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 524 return value; 525 case 583380919: // disposition 526 this.disposition = TypeConvertor.castToString(value); // StringType 527 return value; 528 case 1028554472: // created 529 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 530 return value; 531 case 1178922291: // organization 532 this.organization = TypeConvertor.castToReference(value); // Reference 533 return value; 534 case 1601527200: // requestProvider 535 this.requestProvider = TypeConvertor.castToReference(value); // Reference 536 return value; 537 default: return super.setProperty(hash, name, value); 538 } 539 540 } 541 542 @Override 543 public Base setProperty(String name, Base value) throws FHIRException { 544 if (name.equals("identifier")) { 545 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 546 } else if (name.equals("status")) { 547 value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 548 this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes> 549 } else if (name.equals("request")) { 550 this.request = TypeConvertor.castToReference(value); // Reference 551 } else if (name.equals("outcome")) { 552 value = new ClaimProcessingCodesEnumFactory().fromType(TypeConvertor.castToCode(value)); 553 this.outcome = (Enumeration) value; // Enumeration<ClaimProcessingCodes> 554 } else if (name.equals("disposition")) { 555 this.disposition = TypeConvertor.castToString(value); // StringType 556 } else if (name.equals("created")) { 557 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 558 } else if (name.equals("organization")) { 559 this.organization = TypeConvertor.castToReference(value); // Reference 560 } else if (name.equals("requestProvider")) { 561 this.requestProvider = TypeConvertor.castToReference(value); // Reference 562 } else 563 return super.setProperty(name, value); 564 return value; 565 } 566 567 @Override 568 public Base makeProperty(int hash, String name) throws FHIRException { 569 switch (hash) { 570 case -1618432855: return addIdentifier(); 571 case -892481550: return getStatusElement(); 572 case 1095692943: return getRequest(); 573 case -1106507950: return getOutcomeElement(); 574 case 583380919: return getDispositionElement(); 575 case 1028554472: return getCreatedElement(); 576 case 1178922291: return getOrganization(); 577 case 1601527200: return getRequestProvider(); 578 default: return super.makeProperty(hash, name); 579 } 580 581 } 582 583 @Override 584 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 585 switch (hash) { 586 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 587 case -892481550: /*status*/ return new String[] {"code"}; 588 case 1095692943: /*request*/ return new String[] {"Reference"}; 589 case -1106507950: /*outcome*/ return new String[] {"code"}; 590 case 583380919: /*disposition*/ return new String[] {"string"}; 591 case 1028554472: /*created*/ return new String[] {"dateTime"}; 592 case 1178922291: /*organization*/ return new String[] {"Reference"}; 593 case 1601527200: /*requestProvider*/ return new String[] {"Reference"}; 594 default: return super.getTypesForProperty(hash, name); 595 } 596 597 } 598 599 @Override 600 public Base addChild(String name) throws FHIRException { 601 if (name.equals("identifier")) { 602 return addIdentifier(); 603 } 604 else if (name.equals("status")) { 605 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.status"); 606 } 607 else if (name.equals("request")) { 608 this.request = new Reference(); 609 return this.request; 610 } 611 else if (name.equals("outcome")) { 612 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.outcome"); 613 } 614 else if (name.equals("disposition")) { 615 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.disposition"); 616 } 617 else if (name.equals("created")) { 618 throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.created"); 619 } 620 else if (name.equals("organization")) { 621 this.organization = new Reference(); 622 return this.organization; 623 } 624 else if (name.equals("requestProvider")) { 625 this.requestProvider = new Reference(); 626 return this.requestProvider; 627 } 628 else 629 return super.addChild(name); 630 } 631 632 public String fhirType() { 633 return "EnrollmentResponse"; 634 635 } 636 637 public EnrollmentResponse copy() { 638 EnrollmentResponse dst = new EnrollmentResponse(); 639 copyValues(dst); 640 return dst; 641 } 642 643 public void copyValues(EnrollmentResponse dst) { 644 super.copyValues(dst); 645 if (identifier != null) { 646 dst.identifier = new ArrayList<Identifier>(); 647 for (Identifier i : identifier) 648 dst.identifier.add(i.copy()); 649 }; 650 dst.status = status == null ? null : status.copy(); 651 dst.request = request == null ? null : request.copy(); 652 dst.outcome = outcome == null ? null : outcome.copy(); 653 dst.disposition = disposition == null ? null : disposition.copy(); 654 dst.created = created == null ? null : created.copy(); 655 dst.organization = organization == null ? null : organization.copy(); 656 dst.requestProvider = requestProvider == null ? null : requestProvider.copy(); 657 } 658 659 protected EnrollmentResponse typedCopy() { 660 return copy(); 661 } 662 663 @Override 664 public boolean equalsDeep(Base other_) { 665 if (!super.equalsDeep(other_)) 666 return false; 667 if (!(other_ instanceof EnrollmentResponse)) 668 return false; 669 EnrollmentResponse o = (EnrollmentResponse) other_; 670 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(request, o.request, true) 671 && compareDeep(outcome, o.outcome, true) && compareDeep(disposition, o.disposition, true) && compareDeep(created, o.created, true) 672 && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true) 673 ; 674 } 675 676 @Override 677 public boolean equalsShallow(Base other_) { 678 if (!super.equalsShallow(other_)) 679 return false; 680 if (!(other_ instanceof EnrollmentResponse)) 681 return false; 682 EnrollmentResponse o = (EnrollmentResponse) other_; 683 return compareValues(status, o.status, true) && compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) 684 && compareValues(created, o.created, true); 685 } 686 687 public boolean isEmpty() { 688 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, request 689 , outcome, disposition, created, organization, requestProvider); 690 } 691 692 @Override 693 public ResourceType getResourceType() { 694 return ResourceType.EnrollmentResponse; 695 } 696 697 /** 698 * Search parameter: <b>identifier</b> 699 * <p> 700 * Description: <b>The business identifier of the EnrollmentResponse</b><br> 701 * Type: <b>token</b><br> 702 * Path: <b>EnrollmentResponse.identifier</b><br> 703 * </p> 704 */ 705 @SearchParamDefinition(name="identifier", path="EnrollmentResponse.identifier", description="The business identifier of the EnrollmentResponse", type="token" ) 706 public static final String SP_IDENTIFIER = "identifier"; 707 /** 708 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 709 * <p> 710 * Description: <b>The business identifier of the EnrollmentResponse</b><br> 711 * Type: <b>token</b><br> 712 * Path: <b>EnrollmentResponse.identifier</b><br> 713 * </p> 714 */ 715 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 716 717 /** 718 * Search parameter: <b>request</b> 719 * <p> 720 * Description: <b>The reference to the claim</b><br> 721 * Type: <b>reference</b><br> 722 * Path: <b>EnrollmentResponse.request</b><br> 723 * </p> 724 */ 725 @SearchParamDefinition(name="request", path="EnrollmentResponse.request", description="The reference to the claim", type="reference", target={EnrollmentRequest.class } ) 726 public static final String SP_REQUEST = "request"; 727 /** 728 * <b>Fluent Client</b> search parameter constant for <b>request</b> 729 * <p> 730 * Description: <b>The reference to the claim</b><br> 731 * Type: <b>reference</b><br> 732 * Path: <b>EnrollmentResponse.request</b><br> 733 * </p> 734 */ 735 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); 736 737/** 738 * Constant for fluent queries to be used to add include statements. Specifies 739 * the path value of "<b>EnrollmentResponse:request</b>". 740 */ 741 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("EnrollmentResponse:request").toLocked(); 742 743 /** 744 * Search parameter: <b>status</b> 745 * <p> 746 * Description: <b>The status of the enrollment response</b><br> 747 * Type: <b>token</b><br> 748 * Path: <b>EnrollmentResponse.status</b><br> 749 * </p> 750 */ 751 @SearchParamDefinition(name="status", path="EnrollmentResponse.status", description="The status of the enrollment response", type="token" ) 752 public static final String SP_STATUS = "status"; 753 /** 754 * <b>Fluent Client</b> search parameter constant for <b>status</b> 755 * <p> 756 * Description: <b>The status of the enrollment response</b><br> 757 * Type: <b>token</b><br> 758 * Path: <b>EnrollmentResponse.status</b><br> 759 * </p> 760 */ 761 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 762 763 764} 765