001package org.hl7.fhir.dstu2016may.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.utilities.Utilities; 039 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044/** 045 * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. 046 */ 047@ResourceDef(name="AppointmentResponse", profile="http://hl7.org/fhir/Profile/AppointmentResponse") 048public class AppointmentResponse extends DomainResource { 049 050 /** 051 * This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate. 052 */ 053 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 054 @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate." ) 055 protected List<Identifier> identifier; 056 057 /** 058 * Appointment that this response is replying to. 059 */ 060 @Child(name = "appointment", type = {Appointment.class}, order=1, min=1, max=1, modifier=false, summary=true) 061 @Description(shortDefinition="Appointment this response relates to", formalDefinition="Appointment that this response is replying to." ) 062 protected Reference appointment; 063 064 /** 065 * The actual object that is the target of the reference (Appointment that this response is replying to.) 066 */ 067 protected Appointment appointmentTarget; 068 069 /** 070 * Date/Time that the appointment is to take place, or requested new start time. 071 */ 072 @Child(name = "start", type = {InstantType.class}, order=2, min=0, max=1, modifier=false, summary=false) 073 @Description(shortDefinition="Time from appointment, or requested new start time", formalDefinition="Date/Time that the appointment is to take place, or requested new start time." ) 074 protected InstantType start; 075 076 /** 077 * This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time. 078 */ 079 @Child(name = "end", type = {InstantType.class}, order=3, min=0, max=1, modifier=false, summary=false) 080 @Description(shortDefinition="Time from appointment, or requested new end time", formalDefinition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time." ) 081 protected InstantType end; 082 083 /** 084 * Role of participant in the appointment. 085 */ 086 @Child(name = "participantType", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 087 @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) 088 protected List<CodeableConcept> participantType; 089 090 /** 091 * A Person, Location/HealthcareService or Device that is participating in the appointment. 092 */ 093 @Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=5, min=0, max=1, modifier=false, summary=true) 094 @Description(shortDefinition="Person, Location/HealthcareService or Device", formalDefinition="A Person, Location/HealthcareService or Device that is participating in the appointment." ) 095 protected Reference actor; 096 097 /** 098 * The actual object that is the target of the reference (A Person, Location/HealthcareService or Device that is participating in the appointment.) 099 */ 100 protected Resource actorTarget; 101 102 /** 103 * Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. 104 */ 105 @Child(name = "participantStatus", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 106 @Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty." ) 107 protected CodeType participantStatus; 108 109 /** 110 * Additional comments about the appointment. 111 */ 112 @Child(name = "comment", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 113 @Description(shortDefinition="Additional comments", formalDefinition="Additional comments about the appointment." ) 114 protected StringType comment; 115 116 private static final long serialVersionUID = -1645343660L; 117 118 /** 119 * Constructor 120 */ 121 public AppointmentResponse() { 122 super(); 123 } 124 125 /** 126 * Constructor 127 */ 128 public AppointmentResponse(Reference appointment, CodeType participantStatus) { 129 super(); 130 this.appointment = appointment; 131 this.participantStatus = participantStatus; 132 } 133 134 /** 135 * @return {@link #identifier} (This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.) 136 */ 137 public List<Identifier> getIdentifier() { 138 if (this.identifier == null) 139 this.identifier = new ArrayList<Identifier>(); 140 return this.identifier; 141 } 142 143 public boolean hasIdentifier() { 144 if (this.identifier == null) 145 return false; 146 for (Identifier item : this.identifier) 147 if (!item.isEmpty()) 148 return true; 149 return false; 150 } 151 152 /** 153 * @return {@link #identifier} (This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.) 154 */ 155 // syntactic sugar 156 public Identifier addIdentifier() { //3 157 Identifier t = new Identifier(); 158 if (this.identifier == null) 159 this.identifier = new ArrayList<Identifier>(); 160 this.identifier.add(t); 161 return t; 162 } 163 164 // syntactic sugar 165 public AppointmentResponse addIdentifier(Identifier t) { //3 166 if (t == null) 167 return this; 168 if (this.identifier == null) 169 this.identifier = new ArrayList<Identifier>(); 170 this.identifier.add(t); 171 return this; 172 } 173 174 /** 175 * @return {@link #appointment} (Appointment that this response is replying to.) 176 */ 177 public Reference getAppointment() { 178 if (this.appointment == null) 179 if (Configuration.errorOnAutoCreate()) 180 throw new Error("Attempt to auto-create AppointmentResponse.appointment"); 181 else if (Configuration.doAutoCreate()) 182 this.appointment = new Reference(); // cc 183 return this.appointment; 184 } 185 186 public boolean hasAppointment() { 187 return this.appointment != null && !this.appointment.isEmpty(); 188 } 189 190 /** 191 * @param value {@link #appointment} (Appointment that this response is replying to.) 192 */ 193 public AppointmentResponse setAppointment(Reference value) { 194 this.appointment = value; 195 return this; 196 } 197 198 /** 199 * @return {@link #appointment} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Appointment that this response is replying to.) 200 */ 201 public Appointment getAppointmentTarget() { 202 if (this.appointmentTarget == null) 203 if (Configuration.errorOnAutoCreate()) 204 throw new Error("Attempt to auto-create AppointmentResponse.appointment"); 205 else if (Configuration.doAutoCreate()) 206 this.appointmentTarget = new Appointment(); // aa 207 return this.appointmentTarget; 208 } 209 210 /** 211 * @param value {@link #appointment} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Appointment that this response is replying to.) 212 */ 213 public AppointmentResponse setAppointmentTarget(Appointment value) { 214 this.appointmentTarget = value; 215 return this; 216 } 217 218 /** 219 * @return {@link #start} (Date/Time that the appointment is to take place, or requested new start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value 220 */ 221 public InstantType getStartElement() { 222 if (this.start == null) 223 if (Configuration.errorOnAutoCreate()) 224 throw new Error("Attempt to auto-create AppointmentResponse.start"); 225 else if (Configuration.doAutoCreate()) 226 this.start = new InstantType(); // bb 227 return this.start; 228 } 229 230 public boolean hasStartElement() { 231 return this.start != null && !this.start.isEmpty(); 232 } 233 234 public boolean hasStart() { 235 return this.start != null && !this.start.isEmpty(); 236 } 237 238 /** 239 * @param value {@link #start} (Date/Time that the appointment is to take place, or requested new start time.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value 240 */ 241 public AppointmentResponse setStartElement(InstantType value) { 242 this.start = value; 243 return this; 244 } 245 246 /** 247 * @return Date/Time that the appointment is to take place, or requested new start time. 248 */ 249 public Date getStart() { 250 return this.start == null ? null : this.start.getValue(); 251 } 252 253 /** 254 * @param value Date/Time that the appointment is to take place, or requested new start time. 255 */ 256 public AppointmentResponse setStart(Date value) { 257 if (value == null) 258 this.start = null; 259 else { 260 if (this.start == null) 261 this.start = new InstantType(); 262 this.start.setValue(value); 263 } 264 return this; 265 } 266 267 /** 268 * @return {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value 269 */ 270 public InstantType getEndElement() { 271 if (this.end == null) 272 if (Configuration.errorOnAutoCreate()) 273 throw new Error("Attempt to auto-create AppointmentResponse.end"); 274 else if (Configuration.doAutoCreate()) 275 this.end = new InstantType(); // bb 276 return this.end; 277 } 278 279 public boolean hasEndElement() { 280 return this.end != null && !this.end.isEmpty(); 281 } 282 283 public boolean hasEnd() { 284 return this.end != null && !this.end.isEmpty(); 285 } 286 287 /** 288 * @param value {@link #end} (This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value 289 */ 290 public AppointmentResponse setEndElement(InstantType value) { 291 this.end = value; 292 return this; 293 } 294 295 /** 296 * @return This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time. 297 */ 298 public Date getEnd() { 299 return this.end == null ? null : this.end.getValue(); 300 } 301 302 /** 303 * @param value This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time. 304 */ 305 public AppointmentResponse setEnd(Date value) { 306 if (value == null) 307 this.end = null; 308 else { 309 if (this.end == null) 310 this.end = new InstantType(); 311 this.end.setValue(value); 312 } 313 return this; 314 } 315 316 /** 317 * @return {@link #participantType} (Role of participant in the appointment.) 318 */ 319 public List<CodeableConcept> getParticipantType() { 320 if (this.participantType == null) 321 this.participantType = new ArrayList<CodeableConcept>(); 322 return this.participantType; 323 } 324 325 public boolean hasParticipantType() { 326 if (this.participantType == null) 327 return false; 328 for (CodeableConcept item : this.participantType) 329 if (!item.isEmpty()) 330 return true; 331 return false; 332 } 333 334 /** 335 * @return {@link #participantType} (Role of participant in the appointment.) 336 */ 337 // syntactic sugar 338 public CodeableConcept addParticipantType() { //3 339 CodeableConcept t = new CodeableConcept(); 340 if (this.participantType == null) 341 this.participantType = new ArrayList<CodeableConcept>(); 342 this.participantType.add(t); 343 return t; 344 } 345 346 // syntactic sugar 347 public AppointmentResponse addParticipantType(CodeableConcept t) { //3 348 if (t == null) 349 return this; 350 if (this.participantType == null) 351 this.participantType = new ArrayList<CodeableConcept>(); 352 this.participantType.add(t); 353 return this; 354 } 355 356 /** 357 * @return {@link #actor} (A Person, Location/HealthcareService or Device that is participating in the appointment.) 358 */ 359 public Reference getActor() { 360 if (this.actor == null) 361 if (Configuration.errorOnAutoCreate()) 362 throw new Error("Attempt to auto-create AppointmentResponse.actor"); 363 else if (Configuration.doAutoCreate()) 364 this.actor = new Reference(); // cc 365 return this.actor; 366 } 367 368 public boolean hasActor() { 369 return this.actor != null && !this.actor.isEmpty(); 370 } 371 372 /** 373 * @param value {@link #actor} (A Person, Location/HealthcareService or Device that is participating in the appointment.) 374 */ 375 public AppointmentResponse setActor(Reference value) { 376 this.actor = value; 377 return this; 378 } 379 380 /** 381 * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A Person, Location/HealthcareService or Device that is participating in the appointment.) 382 */ 383 public Resource getActorTarget() { 384 return this.actorTarget; 385 } 386 387 /** 388 * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A Person, Location/HealthcareService or Device that is participating in the appointment.) 389 */ 390 public AppointmentResponse setActorTarget(Resource value) { 391 this.actorTarget = value; 392 return this; 393 } 394 395 /** 396 * @return {@link #participantStatus} (Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.). This is the underlying object with id, value and extensions. The accessor "getParticipantStatus" gives direct access to the value 397 */ 398 public CodeType getParticipantStatusElement() { 399 if (this.participantStatus == null) 400 if (Configuration.errorOnAutoCreate()) 401 throw new Error("Attempt to auto-create AppointmentResponse.participantStatus"); 402 else if (Configuration.doAutoCreate()) 403 this.participantStatus = new CodeType(); // bb 404 return this.participantStatus; 405 } 406 407 public boolean hasParticipantStatusElement() { 408 return this.participantStatus != null && !this.participantStatus.isEmpty(); 409 } 410 411 public boolean hasParticipantStatus() { 412 return this.participantStatus != null && !this.participantStatus.isEmpty(); 413 } 414 415 /** 416 * @param value {@link #participantStatus} (Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.). This is the underlying object with id, value and extensions. The accessor "getParticipantStatus" gives direct access to the value 417 */ 418 public AppointmentResponse setParticipantStatusElement(CodeType value) { 419 this.participantStatus = value; 420 return this; 421 } 422 423 /** 424 * @return Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. 425 */ 426 public String getParticipantStatus() { 427 return this.participantStatus == null ? null : this.participantStatus.getValue(); 428 } 429 430 /** 431 * @param value Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. 432 */ 433 public AppointmentResponse setParticipantStatus(String value) { 434 if (this.participantStatus == null) 435 this.participantStatus = new CodeType(); 436 this.participantStatus.setValue(value); 437 return this; 438 } 439 440 /** 441 * @return {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 442 */ 443 public StringType getCommentElement() { 444 if (this.comment == null) 445 if (Configuration.errorOnAutoCreate()) 446 throw new Error("Attempt to auto-create AppointmentResponse.comment"); 447 else if (Configuration.doAutoCreate()) 448 this.comment = new StringType(); // bb 449 return this.comment; 450 } 451 452 public boolean hasCommentElement() { 453 return this.comment != null && !this.comment.isEmpty(); 454 } 455 456 public boolean hasComment() { 457 return this.comment != null && !this.comment.isEmpty(); 458 } 459 460 /** 461 * @param value {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 462 */ 463 public AppointmentResponse setCommentElement(StringType value) { 464 this.comment = value; 465 return this; 466 } 467 468 /** 469 * @return Additional comments about the appointment. 470 */ 471 public String getComment() { 472 return this.comment == null ? null : this.comment.getValue(); 473 } 474 475 /** 476 * @param value Additional comments about the appointment. 477 */ 478 public AppointmentResponse setComment(String value) { 479 if (Utilities.noString(value)) 480 this.comment = null; 481 else { 482 if (this.comment == null) 483 this.comment = new StringType(); 484 this.comment.setValue(value); 485 } 486 return this; 487 } 488 489 protected void listChildren(List<Property> childrenList) { 490 super.listChildren(childrenList); 491 childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.", 0, java.lang.Integer.MAX_VALUE, identifier)); 492 childrenList.add(new Property("appointment", "Reference(Appointment)", "Appointment that this response is replying to.", 0, java.lang.Integer.MAX_VALUE, appointment)); 493 childrenList.add(new Property("start", "instant", "Date/Time that the appointment is to take place, or requested new start time.", 0, java.lang.Integer.MAX_VALUE, start)); 494 childrenList.add(new Property("end", "instant", "This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.", 0, java.lang.Integer.MAX_VALUE, end)); 495 childrenList.add(new Property("participantType", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, participantType)); 496 childrenList.add(new Property("actor", "Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)", "A Person, Location/HealthcareService or Device that is participating in the appointment.", 0, java.lang.Integer.MAX_VALUE, actor)); 497 childrenList.add(new Property("participantStatus", "code", "Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.", 0, java.lang.Integer.MAX_VALUE, participantStatus)); 498 childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment)); 499 } 500 501 @Override 502 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 503 switch (hash) { 504 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 505 case -1474995297: /*appointment*/ return this.appointment == null ? new Base[0] : new Base[] {this.appointment}; // Reference 506 case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // InstantType 507 case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType 508 case 841294093: /*participantType*/ return this.participantType == null ? new Base[0] : this.participantType.toArray(new Base[this.participantType.size()]); // CodeableConcept 509 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 510 case 996096261: /*participantStatus*/ return this.participantStatus == null ? new Base[0] : new Base[] {this.participantStatus}; // CodeType 511 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType 512 default: return super.getProperty(hash, name, checkValid); 513 } 514 515 } 516 517 @Override 518 public void setProperty(int hash, String name, Base value) throws FHIRException { 519 switch (hash) { 520 case -1618432855: // identifier 521 this.getIdentifier().add(castToIdentifier(value)); // Identifier 522 break; 523 case -1474995297: // appointment 524 this.appointment = castToReference(value); // Reference 525 break; 526 case 109757538: // start 527 this.start = castToInstant(value); // InstantType 528 break; 529 case 100571: // end 530 this.end = castToInstant(value); // InstantType 531 break; 532 case 841294093: // participantType 533 this.getParticipantType().add(castToCodeableConcept(value)); // CodeableConcept 534 break; 535 case 92645877: // actor 536 this.actor = castToReference(value); // Reference 537 break; 538 case 996096261: // participantStatus 539 this.participantStatus = castToCode(value); // CodeType 540 break; 541 case 950398559: // comment 542 this.comment = castToString(value); // StringType 543 break; 544 default: super.setProperty(hash, name, value); 545 } 546 547 } 548 549 @Override 550 public void setProperty(String name, Base value) throws FHIRException { 551 if (name.equals("identifier")) 552 this.getIdentifier().add(castToIdentifier(value)); 553 else if (name.equals("appointment")) 554 this.appointment = castToReference(value); // Reference 555 else if (name.equals("start")) 556 this.start = castToInstant(value); // InstantType 557 else if (name.equals("end")) 558 this.end = castToInstant(value); // InstantType 559 else if (name.equals("participantType")) 560 this.getParticipantType().add(castToCodeableConcept(value)); 561 else if (name.equals("actor")) 562 this.actor = castToReference(value); // Reference 563 else if (name.equals("participantStatus")) 564 this.participantStatus = castToCode(value); // CodeType 565 else if (name.equals("comment")) 566 this.comment = castToString(value); // StringType 567 else 568 super.setProperty(name, value); 569 } 570 571 @Override 572 public Base makeProperty(int hash, String name) throws FHIRException { 573 switch (hash) { 574 case -1618432855: return addIdentifier(); // Identifier 575 case -1474995297: return getAppointment(); // Reference 576 case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // InstantType 577 case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // InstantType 578 case 841294093: return addParticipantType(); // CodeableConcept 579 case 92645877: return getActor(); // Reference 580 case 996096261: throw new FHIRException("Cannot make property participantStatus as it is not a complex type"); // CodeType 581 case 950398559: throw new FHIRException("Cannot make property comment as it is not a complex type"); // StringType 582 default: return super.makeProperty(hash, name); 583 } 584 585 } 586 587 @Override 588 public Base addChild(String name) throws FHIRException { 589 if (name.equals("identifier")) { 590 return addIdentifier(); 591 } 592 else if (name.equals("appointment")) { 593 this.appointment = new Reference(); 594 return this.appointment; 595 } 596 else if (name.equals("start")) { 597 throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.start"); 598 } 599 else if (name.equals("end")) { 600 throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.end"); 601 } 602 else if (name.equals("participantType")) { 603 return addParticipantType(); 604 } 605 else if (name.equals("actor")) { 606 this.actor = new Reference(); 607 return this.actor; 608 } 609 else if (name.equals("participantStatus")) { 610 throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.participantStatus"); 611 } 612 else if (name.equals("comment")) { 613 throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.comment"); 614 } 615 else 616 return super.addChild(name); 617 } 618 619 public String fhirType() { 620 return "AppointmentResponse"; 621 622 } 623 624 public AppointmentResponse copy() { 625 AppointmentResponse dst = new AppointmentResponse(); 626 copyValues(dst); 627 if (identifier != null) { 628 dst.identifier = new ArrayList<Identifier>(); 629 for (Identifier i : identifier) 630 dst.identifier.add(i.copy()); 631 }; 632 dst.appointment = appointment == null ? null : appointment.copy(); 633 dst.start = start == null ? null : start.copy(); 634 dst.end = end == null ? null : end.copy(); 635 if (participantType != null) { 636 dst.participantType = new ArrayList<CodeableConcept>(); 637 for (CodeableConcept i : participantType) 638 dst.participantType.add(i.copy()); 639 }; 640 dst.actor = actor == null ? null : actor.copy(); 641 dst.participantStatus = participantStatus == null ? null : participantStatus.copy(); 642 dst.comment = comment == null ? null : comment.copy(); 643 return dst; 644 } 645 646 protected AppointmentResponse typedCopy() { 647 return copy(); 648 } 649 650 @Override 651 public boolean equalsDeep(Base other) { 652 if (!super.equalsDeep(other)) 653 return false; 654 if (!(other instanceof AppointmentResponse)) 655 return false; 656 AppointmentResponse o = (AppointmentResponse) other; 657 return compareDeep(identifier, o.identifier, true) && compareDeep(appointment, o.appointment, true) 658 && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(participantType, o.participantType, true) 659 && compareDeep(actor, o.actor, true) && compareDeep(participantStatus, o.participantStatus, true) 660 && compareDeep(comment, o.comment, true); 661 } 662 663 @Override 664 public boolean equalsShallow(Base other) { 665 if (!super.equalsShallow(other)) 666 return false; 667 if (!(other instanceof AppointmentResponse)) 668 return false; 669 AppointmentResponse o = (AppointmentResponse) other; 670 return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(participantStatus, o.participantStatus, true) 671 && compareValues(comment, o.comment, true); 672 } 673 674 public boolean isEmpty() { 675 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (appointment == null || appointment.isEmpty()) 676 && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (participantType == null || participantType.isEmpty()) 677 && (actor == null || actor.isEmpty()) && (participantStatus == null || participantStatus.isEmpty()) 678 && (comment == null || comment.isEmpty()); 679 } 680 681 @Override 682 public ResourceType getResourceType() { 683 return ResourceType.AppointmentResponse; 684 } 685 686 /** 687 * Search parameter: <b>patient</b> 688 * <p> 689 * Description: <b>This Response is for this Patient</b><br> 690 * Type: <b>reference</b><br> 691 * Path: <b>AppointmentResponse.actor</b><br> 692 * </p> 693 */ 694 @SearchParamDefinition(name="patient", path="AppointmentResponse.actor", description="This Response is for this Patient", type="reference" ) 695 public static final String SP_PATIENT = "patient"; 696 /** 697 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 698 * <p> 699 * Description: <b>This Response is for this Patient</b><br> 700 * Type: <b>reference</b><br> 701 * Path: <b>AppointmentResponse.actor</b><br> 702 * </p> 703 */ 704 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 705 706/** 707 * Constant for fluent queries to be used to add include statements. Specifies 708 * the path value of "<b>AppointmentResponse:patient</b>". 709 */ 710 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("AppointmentResponse:patient").toLocked(); 711 712 /** 713 * Search parameter: <b>practitioner</b> 714 * <p> 715 * Description: <b>This Response is for this Practitioner</b><br> 716 * Type: <b>reference</b><br> 717 * Path: <b>AppointmentResponse.actor</b><br> 718 * </p> 719 */ 720 @SearchParamDefinition(name="practitioner", path="AppointmentResponse.actor", description="This Response is for this Practitioner", type="reference" ) 721 public static final String SP_PRACTITIONER = "practitioner"; 722 /** 723 * <b>Fluent Client</b> search parameter constant for <b>practitioner</b> 724 * <p> 725 * Description: <b>This Response is for this Practitioner</b><br> 726 * Type: <b>reference</b><br> 727 * Path: <b>AppointmentResponse.actor</b><br> 728 * </p> 729 */ 730 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRACTITIONER); 731 732/** 733 * Constant for fluent queries to be used to add include statements. Specifies 734 * the path value of "<b>AppointmentResponse:practitioner</b>". 735 */ 736 public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("AppointmentResponse:practitioner").toLocked(); 737 738 /** 739 * Search parameter: <b>location</b> 740 * <p> 741 * Description: <b>This Response is for this Location</b><br> 742 * Type: <b>reference</b><br> 743 * Path: <b>AppointmentResponse.actor</b><br> 744 * </p> 745 */ 746 @SearchParamDefinition(name="location", path="AppointmentResponse.actor", description="This Response is for this Location", type="reference" ) 747 public static final String SP_LOCATION = "location"; 748 /** 749 * <b>Fluent Client</b> search parameter constant for <b>location</b> 750 * <p> 751 * Description: <b>This Response is for this Location</b><br> 752 * Type: <b>reference</b><br> 753 * Path: <b>AppointmentResponse.actor</b><br> 754 * </p> 755 */ 756 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION); 757 758/** 759 * Constant for fluent queries to be used to add include statements. Specifies 760 * the path value of "<b>AppointmentResponse:location</b>". 761 */ 762 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("AppointmentResponse:location").toLocked(); 763 764 /** 765 * Search parameter: <b>part-status</b> 766 * <p> 767 * Description: <b>The participants acceptance status for this appointment</b><br> 768 * Type: <b>token</b><br> 769 * Path: <b>AppointmentResponse.participantStatus</b><br> 770 * </p> 771 */ 772 @SearchParamDefinition(name="part-status", path="AppointmentResponse.participantStatus", description="The participants acceptance status for this appointment", type="token" ) 773 public static final String SP_PART_STATUS = "part-status"; 774 /** 775 * <b>Fluent Client</b> search parameter constant for <b>part-status</b> 776 * <p> 777 * Description: <b>The participants acceptance status for this appointment</b><br> 778 * Type: <b>token</b><br> 779 * Path: <b>AppointmentResponse.participantStatus</b><br> 780 * </p> 781 */ 782 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PART_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PART_STATUS); 783 784 /** 785 * Search parameter: <b>actor</b> 786 * <p> 787 * Description: <b>The Person, Location/HealthcareService or Device that this appointment response replies for</b><br> 788 * Type: <b>reference</b><br> 789 * Path: <b>AppointmentResponse.actor</b><br> 790 * </p> 791 */ 792 @SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference" ) 793 public static final String SP_ACTOR = "actor"; 794 /** 795 * <b>Fluent Client</b> search parameter constant for <b>actor</b> 796 * <p> 797 * Description: <b>The Person, Location/HealthcareService or Device that this appointment response replies for</b><br> 798 * Type: <b>reference</b><br> 799 * Path: <b>AppointmentResponse.actor</b><br> 800 * </p> 801 */ 802 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR); 803 804/** 805 * Constant for fluent queries to be used to add include statements. Specifies 806 * the path value of "<b>AppointmentResponse:actor</b>". 807 */ 808 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("AppointmentResponse:actor").toLocked(); 809 810 /** 811 * Search parameter: <b>identifier</b> 812 * <p> 813 * Description: <b>An Identifier in this appointment response</b><br> 814 * Type: <b>token</b><br> 815 * Path: <b>AppointmentResponse.identifier</b><br> 816 * </p> 817 */ 818 @SearchParamDefinition(name="identifier", path="AppointmentResponse.identifier", description="An Identifier in this appointment response", type="token" ) 819 public static final String SP_IDENTIFIER = "identifier"; 820 /** 821 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 822 * <p> 823 * Description: <b>An Identifier in this appointment response</b><br> 824 * Type: <b>token</b><br> 825 * Path: <b>AppointmentResponse.identifier</b><br> 826 * </p> 827 */ 828 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 829 830 /** 831 * Search parameter: <b>appointment</b> 832 * <p> 833 * Description: <b>The appointment that the response is attached to</b><br> 834 * Type: <b>reference</b><br> 835 * Path: <b>AppointmentResponse.appointment</b><br> 836 * </p> 837 */ 838 @SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to", type="reference" ) 839 public static final String SP_APPOINTMENT = "appointment"; 840 /** 841 * <b>Fluent Client</b> search parameter constant for <b>appointment</b> 842 * <p> 843 * Description: <b>The appointment that the response is attached to</b><br> 844 * Type: <b>reference</b><br> 845 * Path: <b>AppointmentResponse.appointment</b><br> 846 * </p> 847 */ 848 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam APPOINTMENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_APPOINTMENT); 849 850/** 851 * Constant for fluent queries to be used to add include statements. Specifies 852 * the path value of "<b>AppointmentResponse:appointment</b>". 853 */ 854 public static final ca.uhn.fhir.model.api.Include INCLUDE_APPOINTMENT = new ca.uhn.fhir.model.api.Include("AppointmentResponse:appointment").toLocked(); 855 856 857} 858