001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Tue, Dec 13, 2022 17:53+1100 for FHIR vcurrent 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). 052 */ 053@ResourceDef(name="Appointment", profile="http://hl7.org/fhir/StructureDefinition/Appointment") 054public class Appointment extends DomainResource { 055 056 public enum AppointmentStatus { 057 /** 058 * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet. 059 */ 060 PROPOSED, 061 /** 062 * Some or all of the participant(s) have not finalized their acceptance of the appointment request. 063 */ 064 PENDING, 065 /** 066 * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. 067 */ 068 BOOKED, 069 /** 070 * The patient/patients has/have arrived and is/are waiting to be seen. 071 */ 072 ARRIVED, 073 /** 074 * The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons. 075 */ 076 FULFILLED, 077 /** 078 * The appointment has been cancelled. 079 */ 080 CANCELLED, 081 /** 082 * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). 083 */ 084 NOSHOW, 085 /** 086 * This instance should not have been part of this patient's medical record. 087 */ 088 ENTEREDINERROR, 089 /** 090 * When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present). 091 */ 092 CHECKEDIN, 093 /** 094 * The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated. 095 */ 096 WAITLIST, 097 /** 098 * added to help the parsers with the generic types 099 */ 100 NULL; 101 public static AppointmentStatus fromCode(String codeString) throws FHIRException { 102 if (codeString == null || "".equals(codeString)) 103 return null; 104 if ("proposed".equals(codeString)) 105 return PROPOSED; 106 if ("pending".equals(codeString)) 107 return PENDING; 108 if ("booked".equals(codeString)) 109 return BOOKED; 110 if ("arrived".equals(codeString)) 111 return ARRIVED; 112 if ("fulfilled".equals(codeString)) 113 return FULFILLED; 114 if ("cancelled".equals(codeString)) 115 return CANCELLED; 116 if ("noshow".equals(codeString)) 117 return NOSHOW; 118 if ("entered-in-error".equals(codeString)) 119 return ENTEREDINERROR; 120 if ("checked-in".equals(codeString)) 121 return CHECKEDIN; 122 if ("waitlist".equals(codeString)) 123 return WAITLIST; 124 if (Configuration.isAcceptInvalidEnums()) 125 return null; 126 else 127 throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); 128 } 129 public String toCode() { 130 switch (this) { 131 case PROPOSED: return "proposed"; 132 case PENDING: return "pending"; 133 case BOOKED: return "booked"; 134 case ARRIVED: return "arrived"; 135 case FULFILLED: return "fulfilled"; 136 case CANCELLED: return "cancelled"; 137 case NOSHOW: return "noshow"; 138 case ENTEREDINERROR: return "entered-in-error"; 139 case CHECKEDIN: return "checked-in"; 140 case WAITLIST: return "waitlist"; 141 case NULL: return null; 142 default: return "?"; 143 } 144 } 145 public String getSystem() { 146 switch (this) { 147 case PROPOSED: return "http://hl7.org/fhir/appointmentstatus"; 148 case PENDING: return "http://hl7.org/fhir/appointmentstatus"; 149 case BOOKED: return "http://hl7.org/fhir/appointmentstatus"; 150 case ARRIVED: return "http://hl7.org/fhir/appointmentstatus"; 151 case FULFILLED: return "http://hl7.org/fhir/appointmentstatus"; 152 case CANCELLED: return "http://hl7.org/fhir/appointmentstatus"; 153 case NOSHOW: return "http://hl7.org/fhir/appointmentstatus"; 154 case ENTEREDINERROR: return "http://hl7.org/fhir/appointmentstatus"; 155 case CHECKEDIN: return "http://hl7.org/fhir/appointmentstatus"; 156 case WAITLIST: return "http://hl7.org/fhir/appointmentstatus"; 157 case NULL: return null; 158 default: return "?"; 159 } 160 } 161 public String getDefinition() { 162 switch (this) { 163 case PROPOSED: return "None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet."; 164 case PENDING: return "Some or all of the participant(s) have not finalized their acceptance of the appointment request."; 165 case BOOKED: return "All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified."; 166 case ARRIVED: return "The patient/patients has/have arrived and is/are waiting to be seen."; 167 case FULFILLED: return "The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons."; 168 case CANCELLED: return "The appointment has been cancelled."; 169 case NOSHOW: return "Some or all of the participant(s) have not/did not appear for the appointment (usually the patient)."; 170 case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; 171 case CHECKEDIN: return "When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present)."; 172 case WAITLIST: return "The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated."; 173 case NULL: return null; 174 default: return "?"; 175 } 176 } 177 public String getDisplay() { 178 switch (this) { 179 case PROPOSED: return "Proposed"; 180 case PENDING: return "Pending"; 181 case BOOKED: return "Booked"; 182 case ARRIVED: return "Arrived"; 183 case FULFILLED: return "Fulfilled"; 184 case CANCELLED: return "Cancelled"; 185 case NOSHOW: return "No Show"; 186 case ENTEREDINERROR: return "Entered in error"; 187 case CHECKEDIN: return "Checked In"; 188 case WAITLIST: return "Waitlisted"; 189 case NULL: return null; 190 default: return "?"; 191 } 192 } 193 } 194 195 public static class AppointmentStatusEnumFactory implements EnumFactory<AppointmentStatus> { 196 public AppointmentStatus fromCode(String codeString) throws IllegalArgumentException { 197 if (codeString == null || "".equals(codeString)) 198 if (codeString == null || "".equals(codeString)) 199 return null; 200 if ("proposed".equals(codeString)) 201 return AppointmentStatus.PROPOSED; 202 if ("pending".equals(codeString)) 203 return AppointmentStatus.PENDING; 204 if ("booked".equals(codeString)) 205 return AppointmentStatus.BOOKED; 206 if ("arrived".equals(codeString)) 207 return AppointmentStatus.ARRIVED; 208 if ("fulfilled".equals(codeString)) 209 return AppointmentStatus.FULFILLED; 210 if ("cancelled".equals(codeString)) 211 return AppointmentStatus.CANCELLED; 212 if ("noshow".equals(codeString)) 213 return AppointmentStatus.NOSHOW; 214 if ("entered-in-error".equals(codeString)) 215 return AppointmentStatus.ENTEREDINERROR; 216 if ("checked-in".equals(codeString)) 217 return AppointmentStatus.CHECKEDIN; 218 if ("waitlist".equals(codeString)) 219 return AppointmentStatus.WAITLIST; 220 throw new IllegalArgumentException("Unknown AppointmentStatus code '"+codeString+"'"); 221 } 222 public Enumeration<AppointmentStatus> fromType(PrimitiveType<?> code) throws FHIRException { 223 if (code == null) 224 return null; 225 if (code.isEmpty()) 226 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.NULL, code); 227 String codeString = ((PrimitiveType) code).asStringValue(); 228 if (codeString == null || "".equals(codeString)) 229 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.NULL, code); 230 if ("proposed".equals(codeString)) 231 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.PROPOSED, code); 232 if ("pending".equals(codeString)) 233 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.PENDING, code); 234 if ("booked".equals(codeString)) 235 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.BOOKED, code); 236 if ("arrived".equals(codeString)) 237 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.ARRIVED, code); 238 if ("fulfilled".equals(codeString)) 239 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.FULFILLED, code); 240 if ("cancelled".equals(codeString)) 241 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.CANCELLED, code); 242 if ("noshow".equals(codeString)) 243 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.NOSHOW, code); 244 if ("entered-in-error".equals(codeString)) 245 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.ENTEREDINERROR, code); 246 if ("checked-in".equals(codeString)) 247 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.CHECKEDIN, code); 248 if ("waitlist".equals(codeString)) 249 return new Enumeration<AppointmentStatus>(this, AppointmentStatus.WAITLIST, code); 250 throw new FHIRException("Unknown AppointmentStatus code '"+codeString+"'"); 251 } 252 public String toCode(AppointmentStatus code) { 253 if (code == AppointmentStatus.PROPOSED) 254 return "proposed"; 255 if (code == AppointmentStatus.PENDING) 256 return "pending"; 257 if (code == AppointmentStatus.BOOKED) 258 return "booked"; 259 if (code == AppointmentStatus.ARRIVED) 260 return "arrived"; 261 if (code == AppointmentStatus.FULFILLED) 262 return "fulfilled"; 263 if (code == AppointmentStatus.CANCELLED) 264 return "cancelled"; 265 if (code == AppointmentStatus.NOSHOW) 266 return "noshow"; 267 if (code == AppointmentStatus.ENTEREDINERROR) 268 return "entered-in-error"; 269 if (code == AppointmentStatus.CHECKEDIN) 270 return "checked-in"; 271 if (code == AppointmentStatus.WAITLIST) 272 return "waitlist"; 273 return "?"; 274 } 275 public String toSystem(AppointmentStatus code) { 276 return code.getSystem(); 277 } 278 } 279 280 @Block() 281 public static class AppointmentParticipantComponent extends BackboneElement implements IBaseBackboneElement { 282 /** 283 * Role of participant in the appointment. 284 */ 285 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 286 @Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." ) 287 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-participant-type") 288 protected List<CodeableConcept> type; 289 290 /** 291 * Participation period of the actor. 292 */ 293 @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) 294 @Description(shortDefinition="Participation period of the actor", formalDefinition="Participation period of the actor." ) 295 protected Period period; 296 297 /** 298 * The individual, device, location, or service participating in the appointment. 299 */ 300 @Child(name = "actor", type = {Patient.class, Group.class, Practitioner.class, PractitionerRole.class, CareTeam.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=true) 301 @Description(shortDefinition="The individual, device, location, or service participating in the appointment", formalDefinition="The individual, device, location, or service participating in the appointment." ) 302 protected Reference actor; 303 304 /** 305 * Whether this participant is required to be present at the meeting. If false, the participant is optional. 306 */ 307 @Child(name = "required", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) 308 @Description(shortDefinition="The participant is required to attend (optional when false)", formalDefinition="Whether this participant is required to be present at the meeting. If false, the participant is optional." ) 309 protected BooleanType required; 310 311 /** 312 * Participation status of the actor. 313 */ 314 @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) 315 @Description(shortDefinition="accepted | declined | tentative | needs-action", formalDefinition="Participation status of the actor." ) 316 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participationstatus") 317 protected Enumeration<ParticipationStatus> status; 318 319 private static final long serialVersionUID = 1537536134L; 320 321 /** 322 * Constructor 323 */ 324 public AppointmentParticipantComponent() { 325 super(); 326 } 327 328 /** 329 * Constructor 330 */ 331 public AppointmentParticipantComponent(ParticipationStatus status) { 332 super(); 333 this.setStatus(status); 334 } 335 336 /** 337 * @return {@link #type} (Role of participant in the appointment.) 338 */ 339 public List<CodeableConcept> getType() { 340 if (this.type == null) 341 this.type = new ArrayList<CodeableConcept>(); 342 return this.type; 343 } 344 345 /** 346 * @return Returns a reference to <code>this</code> for easy method chaining 347 */ 348 public AppointmentParticipantComponent setType(List<CodeableConcept> theType) { 349 this.type = theType; 350 return this; 351 } 352 353 public boolean hasType() { 354 if (this.type == null) 355 return false; 356 for (CodeableConcept item : this.type) 357 if (!item.isEmpty()) 358 return true; 359 return false; 360 } 361 362 public CodeableConcept addType() { //3 363 CodeableConcept t = new CodeableConcept(); 364 if (this.type == null) 365 this.type = new ArrayList<CodeableConcept>(); 366 this.type.add(t); 367 return t; 368 } 369 370 public AppointmentParticipantComponent addType(CodeableConcept t) { //3 371 if (t == null) 372 return this; 373 if (this.type == null) 374 this.type = new ArrayList<CodeableConcept>(); 375 this.type.add(t); 376 return this; 377 } 378 379 /** 380 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 381 */ 382 public CodeableConcept getTypeFirstRep() { 383 if (getType().isEmpty()) { 384 addType(); 385 } 386 return getType().get(0); 387 } 388 389 /** 390 * @return {@link #period} (Participation period of the actor.) 391 */ 392 public Period getPeriod() { 393 if (this.period == null) 394 if (Configuration.errorOnAutoCreate()) 395 throw new Error("Attempt to auto-create AppointmentParticipantComponent.period"); 396 else if (Configuration.doAutoCreate()) 397 this.period = new Period(); // cc 398 return this.period; 399 } 400 401 public boolean hasPeriod() { 402 return this.period != null && !this.period.isEmpty(); 403 } 404 405 /** 406 * @param value {@link #period} (Participation period of the actor.) 407 */ 408 public AppointmentParticipantComponent setPeriod(Period value) { 409 this.period = value; 410 return this; 411 } 412 413 /** 414 * @return {@link #actor} (The individual, device, location, or service participating in the appointment.) 415 */ 416 public Reference getActor() { 417 if (this.actor == null) 418 if (Configuration.errorOnAutoCreate()) 419 throw new Error("Attempt to auto-create AppointmentParticipantComponent.actor"); 420 else if (Configuration.doAutoCreate()) 421 this.actor = new Reference(); // cc 422 return this.actor; 423 } 424 425 public boolean hasActor() { 426 return this.actor != null && !this.actor.isEmpty(); 427 } 428 429 /** 430 * @param value {@link #actor} (The individual, device, location, or service participating in the appointment.) 431 */ 432 public AppointmentParticipantComponent setActor(Reference value) { 433 this.actor = value; 434 return this; 435 } 436 437 /** 438 * @return {@link #required} (Whether this participant is required to be present at the meeting. If false, the participant is optional.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value 439 */ 440 public BooleanType getRequiredElement() { 441 if (this.required == null) 442 if (Configuration.errorOnAutoCreate()) 443 throw new Error("Attempt to auto-create AppointmentParticipantComponent.required"); 444 else if (Configuration.doAutoCreate()) 445 this.required = new BooleanType(); // bb 446 return this.required; 447 } 448 449 public boolean hasRequiredElement() { 450 return this.required != null && !this.required.isEmpty(); 451 } 452 453 public boolean hasRequired() { 454 return this.required != null && !this.required.isEmpty(); 455 } 456 457 /** 458 * @param value {@link #required} (Whether this participant is required to be present at the meeting. If false, the participant is optional.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value 459 */ 460 public AppointmentParticipantComponent setRequiredElement(BooleanType value) { 461 this.required = value; 462 return this; 463 } 464 465 /** 466 * @return Whether this participant is required to be present at the meeting. If false, the participant is optional. 467 */ 468 public boolean getRequired() { 469 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 470 } 471 472 /** 473 * @param value Whether this participant is required to be present at the meeting. If false, the participant is optional. 474 */ 475 public AppointmentParticipantComponent setRequired(boolean value) { 476 if (this.required == null) 477 this.required = new BooleanType(); 478 this.required.setValue(value); 479 return this; 480 } 481 482 /** 483 * @return {@link #status} (Participation status of the actor.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 484 */ 485 public Enumeration<ParticipationStatus> getStatusElement() { 486 if (this.status == null) 487 if (Configuration.errorOnAutoCreate()) 488 throw new Error("Attempt to auto-create AppointmentParticipantComponent.status"); 489 else if (Configuration.doAutoCreate()) 490 this.status = new Enumeration<ParticipationStatus>(new ParticipationStatusEnumFactory()); // bb 491 return this.status; 492 } 493 494 public boolean hasStatusElement() { 495 return this.status != null && !this.status.isEmpty(); 496 } 497 498 public boolean hasStatus() { 499 return this.status != null && !this.status.isEmpty(); 500 } 501 502 /** 503 * @param value {@link #status} (Participation status of the actor.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 504 */ 505 public AppointmentParticipantComponent setStatusElement(Enumeration<ParticipationStatus> value) { 506 this.status = value; 507 return this; 508 } 509 510 /** 511 * @return Participation status of the actor. 512 */ 513 public ParticipationStatus getStatus() { 514 return this.status == null ? null : this.status.getValue(); 515 } 516 517 /** 518 * @param value Participation status of the actor. 519 */ 520 public AppointmentParticipantComponent setStatus(ParticipationStatus value) { 521 if (this.status == null) 522 this.status = new Enumeration<ParticipationStatus>(new ParticipationStatusEnumFactory()); 523 this.status.setValue(value); 524 return this; 525 } 526 527 protected void listChildren(List<Property> children) { 528 super.listChildren(children); 529 children.add(new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type)); 530 children.add(new Property("period", "Period", "Participation period of the actor.", 0, 1, period)); 531 children.add(new Property("actor", "Reference(Patient|Group|Practitioner|PractitionerRole|CareTeam|RelatedPerson|Device|HealthcareService|Location)", "The individual, device, location, or service participating in the appointment.", 0, 1, actor)); 532 children.add(new Property("required", "boolean", "Whether this participant is required to be present at the meeting. If false, the participant is optional.", 0, 1, required)); 533 children.add(new Property("status", "code", "Participation status of the actor.", 0, 1, status)); 534 } 535 536 @Override 537 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 538 switch (_hash) { 539 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Role of participant in the appointment.", 0, java.lang.Integer.MAX_VALUE, type); 540 case -991726143: /*period*/ return new Property("period", "Period", "Participation period of the actor.", 0, 1, period); 541 case 92645877: /*actor*/ return new Property("actor", "Reference(Patient|Group|Practitioner|PractitionerRole|CareTeam|RelatedPerson|Device|HealthcareService|Location)", "The individual, device, location, or service participating in the appointment.", 0, 1, actor); 542 case -393139297: /*required*/ return new Property("required", "boolean", "Whether this participant is required to be present at the meeting. If false, the participant is optional.", 0, 1, required); 543 case -892481550: /*status*/ return new Property("status", "code", "Participation status of the actor.", 0, 1, status); 544 default: return super.getNamedProperty(_hash, _name, _checkValid); 545 } 546 547 } 548 549 @Override 550 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 551 switch (hash) { 552 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 553 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 554 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 555 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 556 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ParticipationStatus> 557 default: return super.getProperty(hash, name, checkValid); 558 } 559 560 } 561 562 @Override 563 public Base setProperty(int hash, String name, Base value) throws FHIRException { 564 switch (hash) { 565 case 3575610: // type 566 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 567 return value; 568 case -991726143: // period 569 this.period = TypeConvertor.castToPeriod(value); // Period 570 return value; 571 case 92645877: // actor 572 this.actor = TypeConvertor.castToReference(value); // Reference 573 return value; 574 case -393139297: // required 575 this.required = TypeConvertor.castToBoolean(value); // BooleanType 576 return value; 577 case -892481550: // status 578 value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 579 this.status = (Enumeration) value; // Enumeration<ParticipationStatus> 580 return value; 581 default: return super.setProperty(hash, name, value); 582 } 583 584 } 585 586 @Override 587 public Base setProperty(String name, Base value) throws FHIRException { 588 if (name.equals("type")) { 589 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 590 } else if (name.equals("period")) { 591 this.period = TypeConvertor.castToPeriod(value); // Period 592 } else if (name.equals("actor")) { 593 this.actor = TypeConvertor.castToReference(value); // Reference 594 } else if (name.equals("required")) { 595 this.required = TypeConvertor.castToBoolean(value); // BooleanType 596 } else if (name.equals("status")) { 597 value = new ParticipationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 598 this.status = (Enumeration) value; // Enumeration<ParticipationStatus> 599 } else 600 return super.setProperty(name, value); 601 return value; 602 } 603 604 @Override 605 public Base makeProperty(int hash, String name) throws FHIRException { 606 switch (hash) { 607 case 3575610: return addType(); 608 case -991726143: return getPeriod(); 609 case 92645877: return getActor(); 610 case -393139297: return getRequiredElement(); 611 case -892481550: return getStatusElement(); 612 default: return super.makeProperty(hash, name); 613 } 614 615 } 616 617 @Override 618 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 619 switch (hash) { 620 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 621 case -991726143: /*period*/ return new String[] {"Period"}; 622 case 92645877: /*actor*/ return new String[] {"Reference"}; 623 case -393139297: /*required*/ return new String[] {"boolean"}; 624 case -892481550: /*status*/ return new String[] {"code"}; 625 default: return super.getTypesForProperty(hash, name); 626 } 627 628 } 629 630 @Override 631 public Base addChild(String name) throws FHIRException { 632 if (name.equals("type")) { 633 return addType(); 634 } 635 else if (name.equals("period")) { 636 this.period = new Period(); 637 return this.period; 638 } 639 else if (name.equals("actor")) { 640 this.actor = new Reference(); 641 return this.actor; 642 } 643 else if (name.equals("required")) { 644 throw new FHIRException("Cannot call addChild on a primitive type Appointment.participant.required"); 645 } 646 else if (name.equals("status")) { 647 throw new FHIRException("Cannot call addChild on a primitive type Appointment.participant.status"); 648 } 649 else 650 return super.addChild(name); 651 } 652 653 public AppointmentParticipantComponent copy() { 654 AppointmentParticipantComponent dst = new AppointmentParticipantComponent(); 655 copyValues(dst); 656 return dst; 657 } 658 659 public void copyValues(AppointmentParticipantComponent dst) { 660 super.copyValues(dst); 661 if (type != null) { 662 dst.type = new ArrayList<CodeableConcept>(); 663 for (CodeableConcept i : type) 664 dst.type.add(i.copy()); 665 }; 666 dst.period = period == null ? null : period.copy(); 667 dst.actor = actor == null ? null : actor.copy(); 668 dst.required = required == null ? null : required.copy(); 669 dst.status = status == null ? null : status.copy(); 670 } 671 672 @Override 673 public boolean equalsDeep(Base other_) { 674 if (!super.equalsDeep(other_)) 675 return false; 676 if (!(other_ instanceof AppointmentParticipantComponent)) 677 return false; 678 AppointmentParticipantComponent o = (AppointmentParticipantComponent) other_; 679 return compareDeep(type, o.type, true) && compareDeep(period, o.period, true) && compareDeep(actor, o.actor, true) 680 && compareDeep(required, o.required, true) && compareDeep(status, o.status, true); 681 } 682 683 @Override 684 public boolean equalsShallow(Base other_) { 685 if (!super.equalsShallow(other_)) 686 return false; 687 if (!(other_ instanceof AppointmentParticipantComponent)) 688 return false; 689 AppointmentParticipantComponent o = (AppointmentParticipantComponent) other_; 690 return compareValues(required, o.required, true) && compareValues(status, o.status, true); 691 } 692 693 public boolean isEmpty() { 694 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, period, actor, required 695 , status); 696 } 697 698 public String fhirType() { 699 return "Appointment.participant"; 700 701 } 702 703 } 704 705 @Block() 706 public static class AppointmentRecurrenceTemplateComponent extends BackboneElement implements IBaseBackboneElement { 707 /** 708 * The timezone of the recurring appointment occurrences. 709 */ 710 @Child(name = "timezone", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 711 @Description(shortDefinition="The timezone of the occurrences", formalDefinition="The timezone of the recurring appointment occurrences." ) 712 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/timezones") 713 protected CodeableConcept timezone; 714 715 /** 716 * How often the appointment series should recur. 717 */ 718 @Child(name = "recurrenceType", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 719 @Description(shortDefinition="The frequency of the recurrence", formalDefinition="How often the appointment series should recur." ) 720 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointment-recurrrence-type") 721 protected CodeableConcept recurrenceType; 722 723 /** 724 * Recurring appointments will not occur after this date. 725 */ 726 @Child(name = "lastOccurrenceDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=false) 727 @Description(shortDefinition="The date when the recurrence should end", formalDefinition="Recurring appointments will not occur after this date." ) 728 protected DateType lastOccurrenceDate; 729 730 /** 731 * How many appointments are planned in the recurrence. 732 */ 733 @Child(name = "occurrenceCount", type = {PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) 734 @Description(shortDefinition="The number of planned occurrences", formalDefinition="How many appointments are planned in the recurrence." ) 735 protected PositiveIntType occurrenceCount; 736 737 /** 738 * The list of specific dates that will have appointments generated. 739 */ 740 @Child(name = "occurrenceDate", type = {DateType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 741 @Description(shortDefinition="Specific dates for a recurring set of appointments (no template)", formalDefinition="The list of specific dates that will have appointments generated." ) 742 protected List<DateType> occurrenceDate; 743 744 /** 745 * Information about weekly recurring appointments. 746 */ 747 @Child(name = "weeklyTemplate", type = {}, order=6, min=0, max=1, modifier=false, summary=false) 748 @Description(shortDefinition="Information about weekly recurring appointments", formalDefinition="Information about weekly recurring appointments." ) 749 protected AppointmentRecurrenceTemplateWeeklyTemplateComponent weeklyTemplate; 750 751 /** 752 * Information about monthly recurring appointments. 753 */ 754 @Child(name = "monthlyTemplate", type = {}, order=7, min=0, max=1, modifier=false, summary=false) 755 @Description(shortDefinition="Information about monthly recurring appointments", formalDefinition="Information about monthly recurring appointments." ) 756 protected AppointmentRecurrenceTemplateMonthlyTemplateComponent monthlyTemplate; 757 758 /** 759 * Information about yearly recurring appointments. 760 */ 761 @Child(name = "yearlyTemplate", type = {}, order=8, min=0, max=1, modifier=false, summary=false) 762 @Description(shortDefinition="Information about yearly recurring appointments", formalDefinition="Information about yearly recurring appointments." ) 763 protected AppointmentRecurrenceTemplateYearlyTemplateComponent yearlyTemplate; 764 765 /** 766 * Any dates, such as holidays, that should be excluded from the recurrence. 767 */ 768 @Child(name = "excludingDate", type = {DateType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 769 @Description(shortDefinition="Any dates that should be excluded from the series", formalDefinition="Any dates, such as holidays, that should be excluded from the recurrence." ) 770 protected List<DateType> excludingDate; 771 772 /** 773 * Any dates, such as holidays, that should be excluded from the recurrence. 774 */ 775 @Child(name = "excludingRecurrenceId", type = {PositiveIntType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 776 @Description(shortDefinition="Any recurrence IDs that should be excluded from the recurrence", formalDefinition="Any dates, such as holidays, that should be excluded from the recurrence." ) 777 protected List<PositiveIntType> excludingRecurrenceId; 778 779 private static final long serialVersionUID = -1582999176L; 780 781 /** 782 * Constructor 783 */ 784 public AppointmentRecurrenceTemplateComponent() { 785 super(); 786 } 787 788 /** 789 * Constructor 790 */ 791 public AppointmentRecurrenceTemplateComponent(CodeableConcept recurrenceType) { 792 super(); 793 this.setRecurrenceType(recurrenceType); 794 } 795 796 /** 797 * @return {@link #timezone} (The timezone of the recurring appointment occurrences.) 798 */ 799 public CodeableConcept getTimezone() { 800 if (this.timezone == null) 801 if (Configuration.errorOnAutoCreate()) 802 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.timezone"); 803 else if (Configuration.doAutoCreate()) 804 this.timezone = new CodeableConcept(); // cc 805 return this.timezone; 806 } 807 808 public boolean hasTimezone() { 809 return this.timezone != null && !this.timezone.isEmpty(); 810 } 811 812 /** 813 * @param value {@link #timezone} (The timezone of the recurring appointment occurrences.) 814 */ 815 public AppointmentRecurrenceTemplateComponent setTimezone(CodeableConcept value) { 816 this.timezone = value; 817 return this; 818 } 819 820 /** 821 * @return {@link #recurrenceType} (How often the appointment series should recur.) 822 */ 823 public CodeableConcept getRecurrenceType() { 824 if (this.recurrenceType == null) 825 if (Configuration.errorOnAutoCreate()) 826 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.recurrenceType"); 827 else if (Configuration.doAutoCreate()) 828 this.recurrenceType = new CodeableConcept(); // cc 829 return this.recurrenceType; 830 } 831 832 public boolean hasRecurrenceType() { 833 return this.recurrenceType != null && !this.recurrenceType.isEmpty(); 834 } 835 836 /** 837 * @param value {@link #recurrenceType} (How often the appointment series should recur.) 838 */ 839 public AppointmentRecurrenceTemplateComponent setRecurrenceType(CodeableConcept value) { 840 this.recurrenceType = value; 841 return this; 842 } 843 844 /** 845 * @return {@link #lastOccurrenceDate} (Recurring appointments will not occur after this date.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrenceDate" gives direct access to the value 846 */ 847 public DateType getLastOccurrenceDateElement() { 848 if (this.lastOccurrenceDate == null) 849 if (Configuration.errorOnAutoCreate()) 850 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.lastOccurrenceDate"); 851 else if (Configuration.doAutoCreate()) 852 this.lastOccurrenceDate = new DateType(); // bb 853 return this.lastOccurrenceDate; 854 } 855 856 public boolean hasLastOccurrenceDateElement() { 857 return this.lastOccurrenceDate != null && !this.lastOccurrenceDate.isEmpty(); 858 } 859 860 public boolean hasLastOccurrenceDate() { 861 return this.lastOccurrenceDate != null && !this.lastOccurrenceDate.isEmpty(); 862 } 863 864 /** 865 * @param value {@link #lastOccurrenceDate} (Recurring appointments will not occur after this date.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrenceDate" gives direct access to the value 866 */ 867 public AppointmentRecurrenceTemplateComponent setLastOccurrenceDateElement(DateType value) { 868 this.lastOccurrenceDate = value; 869 return this; 870 } 871 872 /** 873 * @return Recurring appointments will not occur after this date. 874 */ 875 public Date getLastOccurrenceDate() { 876 return this.lastOccurrenceDate == null ? null : this.lastOccurrenceDate.getValue(); 877 } 878 879 /** 880 * @param value Recurring appointments will not occur after this date. 881 */ 882 public AppointmentRecurrenceTemplateComponent setLastOccurrenceDate(Date value) { 883 if (value == null) 884 this.lastOccurrenceDate = null; 885 else { 886 if (this.lastOccurrenceDate == null) 887 this.lastOccurrenceDate = new DateType(); 888 this.lastOccurrenceDate.setValue(value); 889 } 890 return this; 891 } 892 893 /** 894 * @return {@link #occurrenceCount} (How many appointments are planned in the recurrence.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceCount" gives direct access to the value 895 */ 896 public PositiveIntType getOccurrenceCountElement() { 897 if (this.occurrenceCount == null) 898 if (Configuration.errorOnAutoCreate()) 899 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.occurrenceCount"); 900 else if (Configuration.doAutoCreate()) 901 this.occurrenceCount = new PositiveIntType(); // bb 902 return this.occurrenceCount; 903 } 904 905 public boolean hasOccurrenceCountElement() { 906 return this.occurrenceCount != null && !this.occurrenceCount.isEmpty(); 907 } 908 909 public boolean hasOccurrenceCount() { 910 return this.occurrenceCount != null && !this.occurrenceCount.isEmpty(); 911 } 912 913 /** 914 * @param value {@link #occurrenceCount} (How many appointments are planned in the recurrence.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceCount" gives direct access to the value 915 */ 916 public AppointmentRecurrenceTemplateComponent setOccurrenceCountElement(PositiveIntType value) { 917 this.occurrenceCount = value; 918 return this; 919 } 920 921 /** 922 * @return How many appointments are planned in the recurrence. 923 */ 924 public int getOccurrenceCount() { 925 return this.occurrenceCount == null || this.occurrenceCount.isEmpty() ? 0 : this.occurrenceCount.getValue(); 926 } 927 928 /** 929 * @param value How many appointments are planned in the recurrence. 930 */ 931 public AppointmentRecurrenceTemplateComponent setOccurrenceCount(int value) { 932 if (this.occurrenceCount == null) 933 this.occurrenceCount = new PositiveIntType(); 934 this.occurrenceCount.setValue(value); 935 return this; 936 } 937 938 /** 939 * @return {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) 940 */ 941 public List<DateType> getOccurrenceDate() { 942 if (this.occurrenceDate == null) 943 this.occurrenceDate = new ArrayList<DateType>(); 944 return this.occurrenceDate; 945 } 946 947 /** 948 * @return Returns a reference to <code>this</code> for easy method chaining 949 */ 950 public AppointmentRecurrenceTemplateComponent setOccurrenceDate(List<DateType> theOccurrenceDate) { 951 this.occurrenceDate = theOccurrenceDate; 952 return this; 953 } 954 955 public boolean hasOccurrenceDate() { 956 if (this.occurrenceDate == null) 957 return false; 958 for (DateType item : this.occurrenceDate) 959 if (!item.isEmpty()) 960 return true; 961 return false; 962 } 963 964 /** 965 * @return {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) 966 */ 967 public DateType addOccurrenceDateElement() {//2 968 DateType t = new DateType(); 969 if (this.occurrenceDate == null) 970 this.occurrenceDate = new ArrayList<DateType>(); 971 this.occurrenceDate.add(t); 972 return t; 973 } 974 975 /** 976 * @param value {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) 977 */ 978 public AppointmentRecurrenceTemplateComponent addOccurrenceDate(Date value) { //1 979 DateType t = new DateType(); 980 t.setValue(value); 981 if (this.occurrenceDate == null) 982 this.occurrenceDate = new ArrayList<DateType>(); 983 this.occurrenceDate.add(t); 984 return this; 985 } 986 987 /** 988 * @param value {@link #occurrenceDate} (The list of specific dates that will have appointments generated.) 989 */ 990 public boolean hasOccurrenceDate(Date value) { 991 if (this.occurrenceDate == null) 992 return false; 993 for (DateType v : this.occurrenceDate) 994 if (v.getValue().equals(value)) // date 995 return true; 996 return false; 997 } 998 999 /** 1000 * @return {@link #weeklyTemplate} (Information about weekly recurring appointments.) 1001 */ 1002 public AppointmentRecurrenceTemplateWeeklyTemplateComponent getWeeklyTemplate() { 1003 if (this.weeklyTemplate == null) 1004 if (Configuration.errorOnAutoCreate()) 1005 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.weeklyTemplate"); 1006 else if (Configuration.doAutoCreate()) 1007 this.weeklyTemplate = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); // cc 1008 return this.weeklyTemplate; 1009 } 1010 1011 public boolean hasWeeklyTemplate() { 1012 return this.weeklyTemplate != null && !this.weeklyTemplate.isEmpty(); 1013 } 1014 1015 /** 1016 * @param value {@link #weeklyTemplate} (Information about weekly recurring appointments.) 1017 */ 1018 public AppointmentRecurrenceTemplateComponent setWeeklyTemplate(AppointmentRecurrenceTemplateWeeklyTemplateComponent value) { 1019 this.weeklyTemplate = value; 1020 return this; 1021 } 1022 1023 /** 1024 * @return {@link #monthlyTemplate} (Information about monthly recurring appointments.) 1025 */ 1026 public AppointmentRecurrenceTemplateMonthlyTemplateComponent getMonthlyTemplate() { 1027 if (this.monthlyTemplate == null) 1028 if (Configuration.errorOnAutoCreate()) 1029 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.monthlyTemplate"); 1030 else if (Configuration.doAutoCreate()) 1031 this.monthlyTemplate = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); // cc 1032 return this.monthlyTemplate; 1033 } 1034 1035 public boolean hasMonthlyTemplate() { 1036 return this.monthlyTemplate != null && !this.monthlyTemplate.isEmpty(); 1037 } 1038 1039 /** 1040 * @param value {@link #monthlyTemplate} (Information about monthly recurring appointments.) 1041 */ 1042 public AppointmentRecurrenceTemplateComponent setMonthlyTemplate(AppointmentRecurrenceTemplateMonthlyTemplateComponent value) { 1043 this.monthlyTemplate = value; 1044 return this; 1045 } 1046 1047 /** 1048 * @return {@link #yearlyTemplate} (Information about yearly recurring appointments.) 1049 */ 1050 public AppointmentRecurrenceTemplateYearlyTemplateComponent getYearlyTemplate() { 1051 if (this.yearlyTemplate == null) 1052 if (Configuration.errorOnAutoCreate()) 1053 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateComponent.yearlyTemplate"); 1054 else if (Configuration.doAutoCreate()) 1055 this.yearlyTemplate = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); // cc 1056 return this.yearlyTemplate; 1057 } 1058 1059 public boolean hasYearlyTemplate() { 1060 return this.yearlyTemplate != null && !this.yearlyTemplate.isEmpty(); 1061 } 1062 1063 /** 1064 * @param value {@link #yearlyTemplate} (Information about yearly recurring appointments.) 1065 */ 1066 public AppointmentRecurrenceTemplateComponent setYearlyTemplate(AppointmentRecurrenceTemplateYearlyTemplateComponent value) { 1067 this.yearlyTemplate = value; 1068 return this; 1069 } 1070 1071 /** 1072 * @return {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) 1073 */ 1074 public List<DateType> getExcludingDate() { 1075 if (this.excludingDate == null) 1076 this.excludingDate = new ArrayList<DateType>(); 1077 return this.excludingDate; 1078 } 1079 1080 /** 1081 * @return Returns a reference to <code>this</code> for easy method chaining 1082 */ 1083 public AppointmentRecurrenceTemplateComponent setExcludingDate(List<DateType> theExcludingDate) { 1084 this.excludingDate = theExcludingDate; 1085 return this; 1086 } 1087 1088 public boolean hasExcludingDate() { 1089 if (this.excludingDate == null) 1090 return false; 1091 for (DateType item : this.excludingDate) 1092 if (!item.isEmpty()) 1093 return true; 1094 return false; 1095 } 1096 1097 /** 1098 * @return {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) 1099 */ 1100 public DateType addExcludingDateElement() {//2 1101 DateType t = new DateType(); 1102 if (this.excludingDate == null) 1103 this.excludingDate = new ArrayList<DateType>(); 1104 this.excludingDate.add(t); 1105 return t; 1106 } 1107 1108 /** 1109 * @param value {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) 1110 */ 1111 public AppointmentRecurrenceTemplateComponent addExcludingDate(Date value) { //1 1112 DateType t = new DateType(); 1113 t.setValue(value); 1114 if (this.excludingDate == null) 1115 this.excludingDate = new ArrayList<DateType>(); 1116 this.excludingDate.add(t); 1117 return this; 1118 } 1119 1120 /** 1121 * @param value {@link #excludingDate} (Any dates, such as holidays, that should be excluded from the recurrence.) 1122 */ 1123 public boolean hasExcludingDate(Date value) { 1124 if (this.excludingDate == null) 1125 return false; 1126 for (DateType v : this.excludingDate) 1127 if (v.getValue().equals(value)) // date 1128 return true; 1129 return false; 1130 } 1131 1132 /** 1133 * @return {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) 1134 */ 1135 public List<PositiveIntType> getExcludingRecurrenceId() { 1136 if (this.excludingRecurrenceId == null) 1137 this.excludingRecurrenceId = new ArrayList<PositiveIntType>(); 1138 return this.excludingRecurrenceId; 1139 } 1140 1141 /** 1142 * @return Returns a reference to <code>this</code> for easy method chaining 1143 */ 1144 public AppointmentRecurrenceTemplateComponent setExcludingRecurrenceId(List<PositiveIntType> theExcludingRecurrenceId) { 1145 this.excludingRecurrenceId = theExcludingRecurrenceId; 1146 return this; 1147 } 1148 1149 public boolean hasExcludingRecurrenceId() { 1150 if (this.excludingRecurrenceId == null) 1151 return false; 1152 for (PositiveIntType item : this.excludingRecurrenceId) 1153 if (!item.isEmpty()) 1154 return true; 1155 return false; 1156 } 1157 1158 /** 1159 * @return {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) 1160 */ 1161 public PositiveIntType addExcludingRecurrenceIdElement() {//2 1162 PositiveIntType t = new PositiveIntType(); 1163 if (this.excludingRecurrenceId == null) 1164 this.excludingRecurrenceId = new ArrayList<PositiveIntType>(); 1165 this.excludingRecurrenceId.add(t); 1166 return t; 1167 } 1168 1169 /** 1170 * @param value {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) 1171 */ 1172 public AppointmentRecurrenceTemplateComponent addExcludingRecurrenceId(int value) { //1 1173 PositiveIntType t = new PositiveIntType(); 1174 t.setValue(value); 1175 if (this.excludingRecurrenceId == null) 1176 this.excludingRecurrenceId = new ArrayList<PositiveIntType>(); 1177 this.excludingRecurrenceId.add(t); 1178 return this; 1179 } 1180 1181 /** 1182 * @param value {@link #excludingRecurrenceId} (Any dates, such as holidays, that should be excluded from the recurrence.) 1183 */ 1184 public boolean hasExcludingRecurrenceId(int value) { 1185 if (this.excludingRecurrenceId == null) 1186 return false; 1187 for (PositiveIntType v : this.excludingRecurrenceId) 1188 if (v.getValue().equals(value)) // positiveInt 1189 return true; 1190 return false; 1191 } 1192 1193 protected void listChildren(List<Property> children) { 1194 super.listChildren(children); 1195 children.add(new Property("timezone", "CodeableConcept", "The timezone of the recurring appointment occurrences.", 0, 1, timezone)); 1196 children.add(new Property("recurrenceType", "CodeableConcept", "How often the appointment series should recur.", 0, 1, recurrenceType)); 1197 children.add(new Property("lastOccurrenceDate", "date", "Recurring appointments will not occur after this date.", 0, 1, lastOccurrenceDate)); 1198 children.add(new Property("occurrenceCount", "positiveInt", "How many appointments are planned in the recurrence.", 0, 1, occurrenceCount)); 1199 children.add(new Property("occurrenceDate", "date", "The list of specific dates that will have appointments generated.", 0, java.lang.Integer.MAX_VALUE, occurrenceDate)); 1200 children.add(new Property("weeklyTemplate", "", "Information about weekly recurring appointments.", 0, 1, weeklyTemplate)); 1201 children.add(new Property("monthlyTemplate", "", "Information about monthly recurring appointments.", 0, 1, monthlyTemplate)); 1202 children.add(new Property("yearlyTemplate", "", "Information about yearly recurring appointments.", 0, 1, yearlyTemplate)); 1203 children.add(new Property("excludingDate", "date", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingDate)); 1204 children.add(new Property("excludingRecurrenceId", "positiveInt", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingRecurrenceId)); 1205 } 1206 1207 @Override 1208 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1209 switch (_hash) { 1210 case -2076227591: /*timezone*/ return new Property("timezone", "CodeableConcept", "The timezone of the recurring appointment occurrences.", 0, 1, timezone); 1211 case -381221238: /*recurrenceType*/ return new Property("recurrenceType", "CodeableConcept", "How often the appointment series should recur.", 0, 1, recurrenceType); 1212 case -1262346923: /*lastOccurrenceDate*/ return new Property("lastOccurrenceDate", "date", "Recurring appointments will not occur after this date.", 0, 1, lastOccurrenceDate); 1213 case 1834480062: /*occurrenceCount*/ return new Property("occurrenceCount", "positiveInt", "How many appointments are planned in the recurrence.", 0, 1, occurrenceCount); 1214 case 1721761055: /*occurrenceDate*/ return new Property("occurrenceDate", "date", "The list of specific dates that will have appointments generated.", 0, java.lang.Integer.MAX_VALUE, occurrenceDate); 1215 case 887136283: /*weeklyTemplate*/ return new Property("weeklyTemplate", "", "Information about weekly recurring appointments.", 0, 1, weeklyTemplate); 1216 case 2142528423: /*monthlyTemplate*/ return new Property("monthlyTemplate", "", "Information about monthly recurring appointments.", 0, 1, monthlyTemplate); 1217 case -334069468: /*yearlyTemplate*/ return new Property("yearlyTemplate", "", "Information about yearly recurring appointments.", 0, 1, yearlyTemplate); 1218 case 596601957: /*excludingDate*/ return new Property("excludingDate", "date", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingDate); 1219 case -797577694: /*excludingRecurrenceId*/ return new Property("excludingRecurrenceId", "positiveInt", "Any dates, such as holidays, that should be excluded from the recurrence.", 0, java.lang.Integer.MAX_VALUE, excludingRecurrenceId); 1220 default: return super.getNamedProperty(_hash, _name, _checkValid); 1221 } 1222 1223 } 1224 1225 @Override 1226 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1227 switch (hash) { 1228 case -2076227591: /*timezone*/ return this.timezone == null ? new Base[0] : new Base[] {this.timezone}; // CodeableConcept 1229 case -381221238: /*recurrenceType*/ return this.recurrenceType == null ? new Base[0] : new Base[] {this.recurrenceType}; // CodeableConcept 1230 case -1262346923: /*lastOccurrenceDate*/ return this.lastOccurrenceDate == null ? new Base[0] : new Base[] {this.lastOccurrenceDate}; // DateType 1231 case 1834480062: /*occurrenceCount*/ return this.occurrenceCount == null ? new Base[0] : new Base[] {this.occurrenceCount}; // PositiveIntType 1232 case 1721761055: /*occurrenceDate*/ return this.occurrenceDate == null ? new Base[0] : this.occurrenceDate.toArray(new Base[this.occurrenceDate.size()]); // DateType 1233 case 887136283: /*weeklyTemplate*/ return this.weeklyTemplate == null ? new Base[0] : new Base[] {this.weeklyTemplate}; // AppointmentRecurrenceTemplateWeeklyTemplateComponent 1234 case 2142528423: /*monthlyTemplate*/ return this.monthlyTemplate == null ? new Base[0] : new Base[] {this.monthlyTemplate}; // AppointmentRecurrenceTemplateMonthlyTemplateComponent 1235 case -334069468: /*yearlyTemplate*/ return this.yearlyTemplate == null ? new Base[0] : new Base[] {this.yearlyTemplate}; // AppointmentRecurrenceTemplateYearlyTemplateComponent 1236 case 596601957: /*excludingDate*/ return this.excludingDate == null ? new Base[0] : this.excludingDate.toArray(new Base[this.excludingDate.size()]); // DateType 1237 case -797577694: /*excludingRecurrenceId*/ return this.excludingRecurrenceId == null ? new Base[0] : this.excludingRecurrenceId.toArray(new Base[this.excludingRecurrenceId.size()]); // PositiveIntType 1238 default: return super.getProperty(hash, name, checkValid); 1239 } 1240 1241 } 1242 1243 @Override 1244 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1245 switch (hash) { 1246 case -2076227591: // timezone 1247 this.timezone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1248 return value; 1249 case -381221238: // recurrenceType 1250 this.recurrenceType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1251 return value; 1252 case -1262346923: // lastOccurrenceDate 1253 this.lastOccurrenceDate = TypeConvertor.castToDate(value); // DateType 1254 return value; 1255 case 1834480062: // occurrenceCount 1256 this.occurrenceCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1257 return value; 1258 case 1721761055: // occurrenceDate 1259 this.getOccurrenceDate().add(TypeConvertor.castToDate(value)); // DateType 1260 return value; 1261 case 887136283: // weeklyTemplate 1262 this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent 1263 return value; 1264 case 2142528423: // monthlyTemplate 1265 this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent 1266 return value; 1267 case -334069468: // yearlyTemplate 1268 this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent 1269 return value; 1270 case 596601957: // excludingDate 1271 this.getExcludingDate().add(TypeConvertor.castToDate(value)); // DateType 1272 return value; 1273 case -797577694: // excludingRecurrenceId 1274 this.getExcludingRecurrenceId().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType 1275 return value; 1276 default: return super.setProperty(hash, name, value); 1277 } 1278 1279 } 1280 1281 @Override 1282 public Base setProperty(String name, Base value) throws FHIRException { 1283 if (name.equals("timezone")) { 1284 this.timezone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1285 } else if (name.equals("recurrenceType")) { 1286 this.recurrenceType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1287 } else if (name.equals("lastOccurrenceDate")) { 1288 this.lastOccurrenceDate = TypeConvertor.castToDate(value); // DateType 1289 } else if (name.equals("occurrenceCount")) { 1290 this.occurrenceCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1291 } else if (name.equals("occurrenceDate")) { 1292 this.getOccurrenceDate().add(TypeConvertor.castToDate(value)); 1293 } else if (name.equals("weeklyTemplate")) { 1294 this.weeklyTemplate = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) value; // AppointmentRecurrenceTemplateWeeklyTemplateComponent 1295 } else if (name.equals("monthlyTemplate")) { 1296 this.monthlyTemplate = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) value; // AppointmentRecurrenceTemplateMonthlyTemplateComponent 1297 } else if (name.equals("yearlyTemplate")) { 1298 this.yearlyTemplate = (AppointmentRecurrenceTemplateYearlyTemplateComponent) value; // AppointmentRecurrenceTemplateYearlyTemplateComponent 1299 } else if (name.equals("excludingDate")) { 1300 this.getExcludingDate().add(TypeConvertor.castToDate(value)); 1301 } else if (name.equals("excludingRecurrenceId")) { 1302 this.getExcludingRecurrenceId().add(TypeConvertor.castToPositiveInt(value)); 1303 } else 1304 return super.setProperty(name, value); 1305 return value; 1306 } 1307 1308 @Override 1309 public Base makeProperty(int hash, String name) throws FHIRException { 1310 switch (hash) { 1311 case -2076227591: return getTimezone(); 1312 case -381221238: return getRecurrenceType(); 1313 case -1262346923: return getLastOccurrenceDateElement(); 1314 case 1834480062: return getOccurrenceCountElement(); 1315 case 1721761055: return addOccurrenceDateElement(); 1316 case 887136283: return getWeeklyTemplate(); 1317 case 2142528423: return getMonthlyTemplate(); 1318 case -334069468: return getYearlyTemplate(); 1319 case 596601957: return addExcludingDateElement(); 1320 case -797577694: return addExcludingRecurrenceIdElement(); 1321 default: return super.makeProperty(hash, name); 1322 } 1323 1324 } 1325 1326 @Override 1327 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1328 switch (hash) { 1329 case -2076227591: /*timezone*/ return new String[] {"CodeableConcept"}; 1330 case -381221238: /*recurrenceType*/ return new String[] {"CodeableConcept"}; 1331 case -1262346923: /*lastOccurrenceDate*/ return new String[] {"date"}; 1332 case 1834480062: /*occurrenceCount*/ return new String[] {"positiveInt"}; 1333 case 1721761055: /*occurrenceDate*/ return new String[] {"date"}; 1334 case 887136283: /*weeklyTemplate*/ return new String[] {}; 1335 case 2142528423: /*monthlyTemplate*/ return new String[] {}; 1336 case -334069468: /*yearlyTemplate*/ return new String[] {}; 1337 case 596601957: /*excludingDate*/ return new String[] {"date"}; 1338 case -797577694: /*excludingRecurrenceId*/ return new String[] {"positiveInt"}; 1339 default: return super.getTypesForProperty(hash, name); 1340 } 1341 1342 } 1343 1344 @Override 1345 public Base addChild(String name) throws FHIRException { 1346 if (name.equals("timezone")) { 1347 this.timezone = new CodeableConcept(); 1348 return this.timezone; 1349 } 1350 else if (name.equals("recurrenceType")) { 1351 this.recurrenceType = new CodeableConcept(); 1352 return this.recurrenceType; 1353 } 1354 else if (name.equals("lastOccurrenceDate")) { 1355 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.lastOccurrenceDate"); 1356 } 1357 else if (name.equals("occurrenceCount")) { 1358 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.occurrenceCount"); 1359 } 1360 else if (name.equals("occurrenceDate")) { 1361 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.occurrenceDate"); 1362 } 1363 else if (name.equals("weeklyTemplate")) { 1364 this.weeklyTemplate = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); 1365 return this.weeklyTemplate; 1366 } 1367 else if (name.equals("monthlyTemplate")) { 1368 this.monthlyTemplate = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); 1369 return this.monthlyTemplate; 1370 } 1371 else if (name.equals("yearlyTemplate")) { 1372 this.yearlyTemplate = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); 1373 return this.yearlyTemplate; 1374 } 1375 else if (name.equals("excludingDate")) { 1376 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.excludingDate"); 1377 } 1378 else if (name.equals("excludingRecurrenceId")) { 1379 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.excludingRecurrenceId"); 1380 } 1381 else 1382 return super.addChild(name); 1383 } 1384 1385 public AppointmentRecurrenceTemplateComponent copy() { 1386 AppointmentRecurrenceTemplateComponent dst = new AppointmentRecurrenceTemplateComponent(); 1387 copyValues(dst); 1388 return dst; 1389 } 1390 1391 public void copyValues(AppointmentRecurrenceTemplateComponent dst) { 1392 super.copyValues(dst); 1393 dst.timezone = timezone == null ? null : timezone.copy(); 1394 dst.recurrenceType = recurrenceType == null ? null : recurrenceType.copy(); 1395 dst.lastOccurrenceDate = lastOccurrenceDate == null ? null : lastOccurrenceDate.copy(); 1396 dst.occurrenceCount = occurrenceCount == null ? null : occurrenceCount.copy(); 1397 if (occurrenceDate != null) { 1398 dst.occurrenceDate = new ArrayList<DateType>(); 1399 for (DateType i : occurrenceDate) 1400 dst.occurrenceDate.add(i.copy()); 1401 }; 1402 dst.weeklyTemplate = weeklyTemplate == null ? null : weeklyTemplate.copy(); 1403 dst.monthlyTemplate = monthlyTemplate == null ? null : monthlyTemplate.copy(); 1404 dst.yearlyTemplate = yearlyTemplate == null ? null : yearlyTemplate.copy(); 1405 if (excludingDate != null) { 1406 dst.excludingDate = new ArrayList<DateType>(); 1407 for (DateType i : excludingDate) 1408 dst.excludingDate.add(i.copy()); 1409 }; 1410 if (excludingRecurrenceId != null) { 1411 dst.excludingRecurrenceId = new ArrayList<PositiveIntType>(); 1412 for (PositiveIntType i : excludingRecurrenceId) 1413 dst.excludingRecurrenceId.add(i.copy()); 1414 }; 1415 } 1416 1417 @Override 1418 public boolean equalsDeep(Base other_) { 1419 if (!super.equalsDeep(other_)) 1420 return false; 1421 if (!(other_ instanceof AppointmentRecurrenceTemplateComponent)) 1422 return false; 1423 AppointmentRecurrenceTemplateComponent o = (AppointmentRecurrenceTemplateComponent) other_; 1424 return compareDeep(timezone, o.timezone, true) && compareDeep(recurrenceType, o.recurrenceType, true) 1425 && compareDeep(lastOccurrenceDate, o.lastOccurrenceDate, true) && compareDeep(occurrenceCount, o.occurrenceCount, true) 1426 && compareDeep(occurrenceDate, o.occurrenceDate, true) && compareDeep(weeklyTemplate, o.weeklyTemplate, true) 1427 && compareDeep(monthlyTemplate, o.monthlyTemplate, true) && compareDeep(yearlyTemplate, o.yearlyTemplate, true) 1428 && compareDeep(excludingDate, o.excludingDate, true) && compareDeep(excludingRecurrenceId, o.excludingRecurrenceId, true) 1429 ; 1430 } 1431 1432 @Override 1433 public boolean equalsShallow(Base other_) { 1434 if (!super.equalsShallow(other_)) 1435 return false; 1436 if (!(other_ instanceof AppointmentRecurrenceTemplateComponent)) 1437 return false; 1438 AppointmentRecurrenceTemplateComponent o = (AppointmentRecurrenceTemplateComponent) other_; 1439 return compareValues(lastOccurrenceDate, o.lastOccurrenceDate, true) && compareValues(occurrenceCount, o.occurrenceCount, true) 1440 && compareValues(occurrenceDate, o.occurrenceDate, true) && compareValues(excludingDate, o.excludingDate, true) 1441 && compareValues(excludingRecurrenceId, o.excludingRecurrenceId, true); 1442 } 1443 1444 public boolean isEmpty() { 1445 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(timezone, recurrenceType, lastOccurrenceDate 1446 , occurrenceCount, occurrenceDate, weeklyTemplate, monthlyTemplate, yearlyTemplate 1447 , excludingDate, excludingRecurrenceId); 1448 } 1449 1450 public String fhirType() { 1451 return "Appointment.recurrenceTemplate"; 1452 1453 } 1454 1455 } 1456 1457 @Block() 1458 public static class AppointmentRecurrenceTemplateWeeklyTemplateComponent extends BackboneElement implements IBaseBackboneElement { 1459 /** 1460 * Indicates that recurring appointments should occur on Mondays. 1461 */ 1462 @Child(name = "monday", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1463 @Description(shortDefinition="Recurs on Mondays", formalDefinition="Indicates that recurring appointments should occur on Mondays." ) 1464 protected BooleanType monday; 1465 1466 /** 1467 * Indicates that recurring appointments should occur on Tuesdays. 1468 */ 1469 @Child(name = "tuesday", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1470 @Description(shortDefinition="Recurs on Tuesday", formalDefinition="Indicates that recurring appointments should occur on Tuesdays." ) 1471 protected BooleanType tuesday; 1472 1473 /** 1474 * Indicates that recurring appointments should occur on Wednesdays. 1475 */ 1476 @Child(name = "wednesday", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1477 @Description(shortDefinition="Recurs on Wednesday", formalDefinition="Indicates that recurring appointments should occur on Wednesdays." ) 1478 protected BooleanType wednesday; 1479 1480 /** 1481 * Indicates that recurring appointments should occur on Thursdays. 1482 */ 1483 @Child(name = "thursday", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1484 @Description(shortDefinition="Recurs on Thursday", formalDefinition="Indicates that recurring appointments should occur on Thursdays." ) 1485 protected BooleanType thursday; 1486 1487 /** 1488 * Indicates that recurring appointments should occur on Fridays. 1489 */ 1490 @Child(name = "friday", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1491 @Description(shortDefinition="Recurs on Friday", formalDefinition="Indicates that recurring appointments should occur on Fridays." ) 1492 protected BooleanType friday; 1493 1494 /** 1495 * Indicates that recurring appointments should occur on Saturdays. 1496 */ 1497 @Child(name = "saturday", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) 1498 @Description(shortDefinition="Recurs on Saturday", formalDefinition="Indicates that recurring appointments should occur on Saturdays." ) 1499 protected BooleanType saturday; 1500 1501 /** 1502 * Indicates that recurring appointments should occur on Sundays. 1503 */ 1504 @Child(name = "sunday", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) 1505 @Description(shortDefinition="Recurs on Sunday", formalDefinition="Indicates that recurring appointments should occur on Sundays." ) 1506 protected BooleanType sunday; 1507 1508 /** 1509 * The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. 1510 1511e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. 1512 */ 1513 @Child(name = "weekInterval", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false) 1514 @Description(shortDefinition="Recurs every nth week", formalDefinition="The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3." ) 1515 protected PositiveIntType weekInterval; 1516 1517 private static final long serialVersionUID = 588795188L; 1518 1519 /** 1520 * Constructor 1521 */ 1522 public AppointmentRecurrenceTemplateWeeklyTemplateComponent() { 1523 super(); 1524 } 1525 1526 /** 1527 * @return {@link #monday} (Indicates that recurring appointments should occur on Mondays.). This is the underlying object with id, value and extensions. The accessor "getMonday" gives direct access to the value 1528 */ 1529 public BooleanType getMondayElement() { 1530 if (this.monday == null) 1531 if (Configuration.errorOnAutoCreate()) 1532 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.monday"); 1533 else if (Configuration.doAutoCreate()) 1534 this.monday = new BooleanType(); // bb 1535 return this.monday; 1536 } 1537 1538 public boolean hasMondayElement() { 1539 return this.monday != null && !this.monday.isEmpty(); 1540 } 1541 1542 public boolean hasMonday() { 1543 return this.monday != null && !this.monday.isEmpty(); 1544 } 1545 1546 /** 1547 * @param value {@link #monday} (Indicates that recurring appointments should occur on Mondays.). This is the underlying object with id, value and extensions. The accessor "getMonday" gives direct access to the value 1548 */ 1549 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setMondayElement(BooleanType value) { 1550 this.monday = value; 1551 return this; 1552 } 1553 1554 /** 1555 * @return Indicates that recurring appointments should occur on Mondays. 1556 */ 1557 public boolean getMonday() { 1558 return this.monday == null || this.monday.isEmpty() ? false : this.monday.getValue(); 1559 } 1560 1561 /** 1562 * @param value Indicates that recurring appointments should occur on Mondays. 1563 */ 1564 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setMonday(boolean value) { 1565 if (this.monday == null) 1566 this.monday = new BooleanType(); 1567 this.monday.setValue(value); 1568 return this; 1569 } 1570 1571 /** 1572 * @return {@link #tuesday} (Indicates that recurring appointments should occur on Tuesdays.). This is the underlying object with id, value and extensions. The accessor "getTuesday" gives direct access to the value 1573 */ 1574 public BooleanType getTuesdayElement() { 1575 if (this.tuesday == null) 1576 if (Configuration.errorOnAutoCreate()) 1577 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.tuesday"); 1578 else if (Configuration.doAutoCreate()) 1579 this.tuesday = new BooleanType(); // bb 1580 return this.tuesday; 1581 } 1582 1583 public boolean hasTuesdayElement() { 1584 return this.tuesday != null && !this.tuesday.isEmpty(); 1585 } 1586 1587 public boolean hasTuesday() { 1588 return this.tuesday != null && !this.tuesday.isEmpty(); 1589 } 1590 1591 /** 1592 * @param value {@link #tuesday} (Indicates that recurring appointments should occur on Tuesdays.). This is the underlying object with id, value and extensions. The accessor "getTuesday" gives direct access to the value 1593 */ 1594 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setTuesdayElement(BooleanType value) { 1595 this.tuesday = value; 1596 return this; 1597 } 1598 1599 /** 1600 * @return Indicates that recurring appointments should occur on Tuesdays. 1601 */ 1602 public boolean getTuesday() { 1603 return this.tuesday == null || this.tuesday.isEmpty() ? false : this.tuesday.getValue(); 1604 } 1605 1606 /** 1607 * @param value Indicates that recurring appointments should occur on Tuesdays. 1608 */ 1609 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setTuesday(boolean value) { 1610 if (this.tuesday == null) 1611 this.tuesday = new BooleanType(); 1612 this.tuesday.setValue(value); 1613 return this; 1614 } 1615 1616 /** 1617 * @return {@link #wednesday} (Indicates that recurring appointments should occur on Wednesdays.). This is the underlying object with id, value and extensions. The accessor "getWednesday" gives direct access to the value 1618 */ 1619 public BooleanType getWednesdayElement() { 1620 if (this.wednesday == null) 1621 if (Configuration.errorOnAutoCreate()) 1622 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.wednesday"); 1623 else if (Configuration.doAutoCreate()) 1624 this.wednesday = new BooleanType(); // bb 1625 return this.wednesday; 1626 } 1627 1628 public boolean hasWednesdayElement() { 1629 return this.wednesday != null && !this.wednesday.isEmpty(); 1630 } 1631 1632 public boolean hasWednesday() { 1633 return this.wednesday != null && !this.wednesday.isEmpty(); 1634 } 1635 1636 /** 1637 * @param value {@link #wednesday} (Indicates that recurring appointments should occur on Wednesdays.). This is the underlying object with id, value and extensions. The accessor "getWednesday" gives direct access to the value 1638 */ 1639 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWednesdayElement(BooleanType value) { 1640 this.wednesday = value; 1641 return this; 1642 } 1643 1644 /** 1645 * @return Indicates that recurring appointments should occur on Wednesdays. 1646 */ 1647 public boolean getWednesday() { 1648 return this.wednesday == null || this.wednesday.isEmpty() ? false : this.wednesday.getValue(); 1649 } 1650 1651 /** 1652 * @param value Indicates that recurring appointments should occur on Wednesdays. 1653 */ 1654 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWednesday(boolean value) { 1655 if (this.wednesday == null) 1656 this.wednesday = new BooleanType(); 1657 this.wednesday.setValue(value); 1658 return this; 1659 } 1660 1661 /** 1662 * @return {@link #thursday} (Indicates that recurring appointments should occur on Thursdays.). This is the underlying object with id, value and extensions. The accessor "getThursday" gives direct access to the value 1663 */ 1664 public BooleanType getThursdayElement() { 1665 if (this.thursday == null) 1666 if (Configuration.errorOnAutoCreate()) 1667 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.thursday"); 1668 else if (Configuration.doAutoCreate()) 1669 this.thursday = new BooleanType(); // bb 1670 return this.thursday; 1671 } 1672 1673 public boolean hasThursdayElement() { 1674 return this.thursday != null && !this.thursday.isEmpty(); 1675 } 1676 1677 public boolean hasThursday() { 1678 return this.thursday != null && !this.thursday.isEmpty(); 1679 } 1680 1681 /** 1682 * @param value {@link #thursday} (Indicates that recurring appointments should occur on Thursdays.). This is the underlying object with id, value and extensions. The accessor "getThursday" gives direct access to the value 1683 */ 1684 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setThursdayElement(BooleanType value) { 1685 this.thursday = value; 1686 return this; 1687 } 1688 1689 /** 1690 * @return Indicates that recurring appointments should occur on Thursdays. 1691 */ 1692 public boolean getThursday() { 1693 return this.thursday == null || this.thursday.isEmpty() ? false : this.thursday.getValue(); 1694 } 1695 1696 /** 1697 * @param value Indicates that recurring appointments should occur on Thursdays. 1698 */ 1699 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setThursday(boolean value) { 1700 if (this.thursday == null) 1701 this.thursday = new BooleanType(); 1702 this.thursday.setValue(value); 1703 return this; 1704 } 1705 1706 /** 1707 * @return {@link #friday} (Indicates that recurring appointments should occur on Fridays.). This is the underlying object with id, value and extensions. The accessor "getFriday" gives direct access to the value 1708 */ 1709 public BooleanType getFridayElement() { 1710 if (this.friday == null) 1711 if (Configuration.errorOnAutoCreate()) 1712 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.friday"); 1713 else if (Configuration.doAutoCreate()) 1714 this.friday = new BooleanType(); // bb 1715 return this.friday; 1716 } 1717 1718 public boolean hasFridayElement() { 1719 return this.friday != null && !this.friday.isEmpty(); 1720 } 1721 1722 public boolean hasFriday() { 1723 return this.friday != null && !this.friday.isEmpty(); 1724 } 1725 1726 /** 1727 * @param value {@link #friday} (Indicates that recurring appointments should occur on Fridays.). This is the underlying object with id, value and extensions. The accessor "getFriday" gives direct access to the value 1728 */ 1729 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setFridayElement(BooleanType value) { 1730 this.friday = value; 1731 return this; 1732 } 1733 1734 /** 1735 * @return Indicates that recurring appointments should occur on Fridays. 1736 */ 1737 public boolean getFriday() { 1738 return this.friday == null || this.friday.isEmpty() ? false : this.friday.getValue(); 1739 } 1740 1741 /** 1742 * @param value Indicates that recurring appointments should occur on Fridays. 1743 */ 1744 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setFriday(boolean value) { 1745 if (this.friday == null) 1746 this.friday = new BooleanType(); 1747 this.friday.setValue(value); 1748 return this; 1749 } 1750 1751 /** 1752 * @return {@link #saturday} (Indicates that recurring appointments should occur on Saturdays.). This is the underlying object with id, value and extensions. The accessor "getSaturday" gives direct access to the value 1753 */ 1754 public BooleanType getSaturdayElement() { 1755 if (this.saturday == null) 1756 if (Configuration.errorOnAutoCreate()) 1757 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.saturday"); 1758 else if (Configuration.doAutoCreate()) 1759 this.saturday = new BooleanType(); // bb 1760 return this.saturday; 1761 } 1762 1763 public boolean hasSaturdayElement() { 1764 return this.saturday != null && !this.saturday.isEmpty(); 1765 } 1766 1767 public boolean hasSaturday() { 1768 return this.saturday != null && !this.saturday.isEmpty(); 1769 } 1770 1771 /** 1772 * @param value {@link #saturday} (Indicates that recurring appointments should occur on Saturdays.). This is the underlying object with id, value and extensions. The accessor "getSaturday" gives direct access to the value 1773 */ 1774 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSaturdayElement(BooleanType value) { 1775 this.saturday = value; 1776 return this; 1777 } 1778 1779 /** 1780 * @return Indicates that recurring appointments should occur on Saturdays. 1781 */ 1782 public boolean getSaturday() { 1783 return this.saturday == null || this.saturday.isEmpty() ? false : this.saturday.getValue(); 1784 } 1785 1786 /** 1787 * @param value Indicates that recurring appointments should occur on Saturdays. 1788 */ 1789 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSaturday(boolean value) { 1790 if (this.saturday == null) 1791 this.saturday = new BooleanType(); 1792 this.saturday.setValue(value); 1793 return this; 1794 } 1795 1796 /** 1797 * @return {@link #sunday} (Indicates that recurring appointments should occur on Sundays.). This is the underlying object with id, value and extensions. The accessor "getSunday" gives direct access to the value 1798 */ 1799 public BooleanType getSundayElement() { 1800 if (this.sunday == null) 1801 if (Configuration.errorOnAutoCreate()) 1802 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.sunday"); 1803 else if (Configuration.doAutoCreate()) 1804 this.sunday = new BooleanType(); // bb 1805 return this.sunday; 1806 } 1807 1808 public boolean hasSundayElement() { 1809 return this.sunday != null && !this.sunday.isEmpty(); 1810 } 1811 1812 public boolean hasSunday() { 1813 return this.sunday != null && !this.sunday.isEmpty(); 1814 } 1815 1816 /** 1817 * @param value {@link #sunday} (Indicates that recurring appointments should occur on Sundays.). This is the underlying object with id, value and extensions. The accessor "getSunday" gives direct access to the value 1818 */ 1819 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSundayElement(BooleanType value) { 1820 this.sunday = value; 1821 return this; 1822 } 1823 1824 /** 1825 * @return Indicates that recurring appointments should occur on Sundays. 1826 */ 1827 public boolean getSunday() { 1828 return this.sunday == null || this.sunday.isEmpty() ? false : this.sunday.getValue(); 1829 } 1830 1831 /** 1832 * @param value Indicates that recurring appointments should occur on Sundays. 1833 */ 1834 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setSunday(boolean value) { 1835 if (this.sunday == null) 1836 this.sunday = new BooleanType(); 1837 this.sunday.setValue(value); 1838 return this; 1839 } 1840 1841 /** 1842 * @return {@link #weekInterval} (The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. 1843 1844e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.). This is the underlying object with id, value and extensions. The accessor "getWeekInterval" gives direct access to the value 1845 */ 1846 public PositiveIntType getWeekIntervalElement() { 1847 if (this.weekInterval == null) 1848 if (Configuration.errorOnAutoCreate()) 1849 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateWeeklyTemplateComponent.weekInterval"); 1850 else if (Configuration.doAutoCreate()) 1851 this.weekInterval = new PositiveIntType(); // bb 1852 return this.weekInterval; 1853 } 1854 1855 public boolean hasWeekIntervalElement() { 1856 return this.weekInterval != null && !this.weekInterval.isEmpty(); 1857 } 1858 1859 public boolean hasWeekInterval() { 1860 return this.weekInterval != null && !this.weekInterval.isEmpty(); 1861 } 1862 1863 /** 1864 * @param value {@link #weekInterval} (The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. 1865 1866e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.). This is the underlying object with id, value and extensions. The accessor "getWeekInterval" gives direct access to the value 1867 */ 1868 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWeekIntervalElement(PositiveIntType value) { 1869 this.weekInterval = value; 1870 return this; 1871 } 1872 1873 /** 1874 * @return The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. 1875 1876e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. 1877 */ 1878 public int getWeekInterval() { 1879 return this.weekInterval == null || this.weekInterval.isEmpty() ? 0 : this.weekInterval.getValue(); 1880 } 1881 1882 /** 1883 * @param value The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more. 1884 1885e.g. For recurring every second week this interval would be 2, or every third week the interval would be 3. 1886 */ 1887 public AppointmentRecurrenceTemplateWeeklyTemplateComponent setWeekInterval(int value) { 1888 if (this.weekInterval == null) 1889 this.weekInterval = new PositiveIntType(); 1890 this.weekInterval.setValue(value); 1891 return this; 1892 } 1893 1894 protected void listChildren(List<Property> children) { 1895 super.listChildren(children); 1896 children.add(new Property("monday", "boolean", "Indicates that recurring appointments should occur on Mondays.", 0, 1, monday)); 1897 children.add(new Property("tuesday", "boolean", "Indicates that recurring appointments should occur on Tuesdays.", 0, 1, tuesday)); 1898 children.add(new Property("wednesday", "boolean", "Indicates that recurring appointments should occur on Wednesdays.", 0, 1, wednesday)); 1899 children.add(new Property("thursday", "boolean", "Indicates that recurring appointments should occur on Thursdays.", 0, 1, thursday)); 1900 children.add(new Property("friday", "boolean", "Indicates that recurring appointments should occur on Fridays.", 0, 1, friday)); 1901 children.add(new Property("saturday", "boolean", "Indicates that recurring appointments should occur on Saturdays.", 0, 1, saturday)); 1902 children.add(new Property("sunday", "boolean", "Indicates that recurring appointments should occur on Sundays.", 0, 1, sunday)); 1903 children.add(new Property("weekInterval", "positiveInt", "The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.", 0, 1, weekInterval)); 1904 } 1905 1906 @Override 1907 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1908 switch (_hash) { 1909 case -1068502768: /*monday*/ return new Property("monday", "boolean", "Indicates that recurring appointments should occur on Mondays.", 0, 1, monday); 1910 case -977343923: /*tuesday*/ return new Property("tuesday", "boolean", "Indicates that recurring appointments should occur on Tuesdays.", 0, 1, tuesday); 1911 case 1393530710: /*wednesday*/ return new Property("wednesday", "boolean", "Indicates that recurring appointments should occur on Wednesdays.", 0, 1, wednesday); 1912 case 1572055514: /*thursday*/ return new Property("thursday", "boolean", "Indicates that recurring appointments should occur on Thursdays.", 0, 1, thursday); 1913 case -1266285217: /*friday*/ return new Property("friday", "boolean", "Indicates that recurring appointments should occur on Fridays.", 0, 1, friday); 1914 case -2114201671: /*saturday*/ return new Property("saturday", "boolean", "Indicates that recurring appointments should occur on Saturdays.", 0, 1, saturday); 1915 case -891186736: /*sunday*/ return new Property("sunday", "boolean", "Indicates that recurring appointments should occur on Sundays.", 0, 1, sunday); 1916 case -784550695: /*weekInterval*/ return new Property("weekInterval", "positiveInt", "The interval defines if the recurrence is every nth week. The default is every week, so it is expected that this value will be 2 or more.\r\re.g. For recurring every second week this interval would be 2, or every third week the interval would be 3.", 0, 1, weekInterval); 1917 default: return super.getNamedProperty(_hash, _name, _checkValid); 1918 } 1919 1920 } 1921 1922 @Override 1923 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1924 switch (hash) { 1925 case -1068502768: /*monday*/ return this.monday == null ? new Base[0] : new Base[] {this.monday}; // BooleanType 1926 case -977343923: /*tuesday*/ return this.tuesday == null ? new Base[0] : new Base[] {this.tuesday}; // BooleanType 1927 case 1393530710: /*wednesday*/ return this.wednesday == null ? new Base[0] : new Base[] {this.wednesday}; // BooleanType 1928 case 1572055514: /*thursday*/ return this.thursday == null ? new Base[0] : new Base[] {this.thursday}; // BooleanType 1929 case -1266285217: /*friday*/ return this.friday == null ? new Base[0] : new Base[] {this.friday}; // BooleanType 1930 case -2114201671: /*saturday*/ return this.saturday == null ? new Base[0] : new Base[] {this.saturday}; // BooleanType 1931 case -891186736: /*sunday*/ return this.sunday == null ? new Base[0] : new Base[] {this.sunday}; // BooleanType 1932 case -784550695: /*weekInterval*/ return this.weekInterval == null ? new Base[0] : new Base[] {this.weekInterval}; // PositiveIntType 1933 default: return super.getProperty(hash, name, checkValid); 1934 } 1935 1936 } 1937 1938 @Override 1939 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1940 switch (hash) { 1941 case -1068502768: // monday 1942 this.monday = TypeConvertor.castToBoolean(value); // BooleanType 1943 return value; 1944 case -977343923: // tuesday 1945 this.tuesday = TypeConvertor.castToBoolean(value); // BooleanType 1946 return value; 1947 case 1393530710: // wednesday 1948 this.wednesday = TypeConvertor.castToBoolean(value); // BooleanType 1949 return value; 1950 case 1572055514: // thursday 1951 this.thursday = TypeConvertor.castToBoolean(value); // BooleanType 1952 return value; 1953 case -1266285217: // friday 1954 this.friday = TypeConvertor.castToBoolean(value); // BooleanType 1955 return value; 1956 case -2114201671: // saturday 1957 this.saturday = TypeConvertor.castToBoolean(value); // BooleanType 1958 return value; 1959 case -891186736: // sunday 1960 this.sunday = TypeConvertor.castToBoolean(value); // BooleanType 1961 return value; 1962 case -784550695: // weekInterval 1963 this.weekInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1964 return value; 1965 default: return super.setProperty(hash, name, value); 1966 } 1967 1968 } 1969 1970 @Override 1971 public Base setProperty(String name, Base value) throws FHIRException { 1972 if (name.equals("monday")) { 1973 this.monday = TypeConvertor.castToBoolean(value); // BooleanType 1974 } else if (name.equals("tuesday")) { 1975 this.tuesday = TypeConvertor.castToBoolean(value); // BooleanType 1976 } else if (name.equals("wednesday")) { 1977 this.wednesday = TypeConvertor.castToBoolean(value); // BooleanType 1978 } else if (name.equals("thursday")) { 1979 this.thursday = TypeConvertor.castToBoolean(value); // BooleanType 1980 } else if (name.equals("friday")) { 1981 this.friday = TypeConvertor.castToBoolean(value); // BooleanType 1982 } else if (name.equals("saturday")) { 1983 this.saturday = TypeConvertor.castToBoolean(value); // BooleanType 1984 } else if (name.equals("sunday")) { 1985 this.sunday = TypeConvertor.castToBoolean(value); // BooleanType 1986 } else if (name.equals("weekInterval")) { 1987 this.weekInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType 1988 } else 1989 return super.setProperty(name, value); 1990 return value; 1991 } 1992 1993 @Override 1994 public Base makeProperty(int hash, String name) throws FHIRException { 1995 switch (hash) { 1996 case -1068502768: return getMondayElement(); 1997 case -977343923: return getTuesdayElement(); 1998 case 1393530710: return getWednesdayElement(); 1999 case 1572055514: return getThursdayElement(); 2000 case -1266285217: return getFridayElement(); 2001 case -2114201671: return getSaturdayElement(); 2002 case -891186736: return getSundayElement(); 2003 case -784550695: return getWeekIntervalElement(); 2004 default: return super.makeProperty(hash, name); 2005 } 2006 2007 } 2008 2009 @Override 2010 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2011 switch (hash) { 2012 case -1068502768: /*monday*/ return new String[] {"boolean"}; 2013 case -977343923: /*tuesday*/ return new String[] {"boolean"}; 2014 case 1393530710: /*wednesday*/ return new String[] {"boolean"}; 2015 case 1572055514: /*thursday*/ return new String[] {"boolean"}; 2016 case -1266285217: /*friday*/ return new String[] {"boolean"}; 2017 case -2114201671: /*saturday*/ return new String[] {"boolean"}; 2018 case -891186736: /*sunday*/ return new String[] {"boolean"}; 2019 case -784550695: /*weekInterval*/ return new String[] {"positiveInt"}; 2020 default: return super.getTypesForProperty(hash, name); 2021 } 2022 2023 } 2024 2025 @Override 2026 public Base addChild(String name) throws FHIRException { 2027 if (name.equals("monday")) { 2028 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.monday"); 2029 } 2030 else if (name.equals("tuesday")) { 2031 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.tuesday"); 2032 } 2033 else if (name.equals("wednesday")) { 2034 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.wednesday"); 2035 } 2036 else if (name.equals("thursday")) { 2037 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.thursday"); 2038 } 2039 else if (name.equals("friday")) { 2040 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.friday"); 2041 } 2042 else if (name.equals("saturday")) { 2043 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.saturday"); 2044 } 2045 else if (name.equals("sunday")) { 2046 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.sunday"); 2047 } 2048 else if (name.equals("weekInterval")) { 2049 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.weeklyTemplate.weekInterval"); 2050 } 2051 else 2052 return super.addChild(name); 2053 } 2054 2055 public AppointmentRecurrenceTemplateWeeklyTemplateComponent copy() { 2056 AppointmentRecurrenceTemplateWeeklyTemplateComponent dst = new AppointmentRecurrenceTemplateWeeklyTemplateComponent(); 2057 copyValues(dst); 2058 return dst; 2059 } 2060 2061 public void copyValues(AppointmentRecurrenceTemplateWeeklyTemplateComponent dst) { 2062 super.copyValues(dst); 2063 dst.monday = monday == null ? null : monday.copy(); 2064 dst.tuesday = tuesday == null ? null : tuesday.copy(); 2065 dst.wednesday = wednesday == null ? null : wednesday.copy(); 2066 dst.thursday = thursday == null ? null : thursday.copy(); 2067 dst.friday = friday == null ? null : friday.copy(); 2068 dst.saturday = saturday == null ? null : saturday.copy(); 2069 dst.sunday = sunday == null ? null : sunday.copy(); 2070 dst.weekInterval = weekInterval == null ? null : weekInterval.copy(); 2071 } 2072 2073 @Override 2074 public boolean equalsDeep(Base other_) { 2075 if (!super.equalsDeep(other_)) 2076 return false; 2077 if (!(other_ instanceof AppointmentRecurrenceTemplateWeeklyTemplateComponent)) 2078 return false; 2079 AppointmentRecurrenceTemplateWeeklyTemplateComponent o = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) other_; 2080 return compareDeep(monday, o.monday, true) && compareDeep(tuesday, o.tuesday, true) && compareDeep(wednesday, o.wednesday, true) 2081 && compareDeep(thursday, o.thursday, true) && compareDeep(friday, o.friday, true) && compareDeep(saturday, o.saturday, true) 2082 && compareDeep(sunday, o.sunday, true) && compareDeep(weekInterval, o.weekInterval, true); 2083 } 2084 2085 @Override 2086 public boolean equalsShallow(Base other_) { 2087 if (!super.equalsShallow(other_)) 2088 return false; 2089 if (!(other_ instanceof AppointmentRecurrenceTemplateWeeklyTemplateComponent)) 2090 return false; 2091 AppointmentRecurrenceTemplateWeeklyTemplateComponent o = (AppointmentRecurrenceTemplateWeeklyTemplateComponent) other_; 2092 return compareValues(monday, o.monday, true) && compareValues(tuesday, o.tuesday, true) && compareValues(wednesday, o.wednesday, true) 2093 && compareValues(thursday, o.thursday, true) && compareValues(friday, o.friday, true) && compareValues(saturday, o.saturday, true) 2094 && compareValues(sunday, o.sunday, true) && compareValues(weekInterval, o.weekInterval, true); 2095 } 2096 2097 public boolean isEmpty() { 2098 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(monday, tuesday, wednesday 2099 , thursday, friday, saturday, sunday, weekInterval); 2100 } 2101 2102 public String fhirType() { 2103 return "Appointment.recurrenceTemplate.weeklyTemplate"; 2104 2105 } 2106 2107 } 2108 2109 @Block() 2110 public static class AppointmentRecurrenceTemplateMonthlyTemplateComponent extends BackboneElement implements IBaseBackboneElement { 2111 /** 2112 * Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. 2113 */ 2114 @Child(name = "dayOfMonth", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2115 @Description(shortDefinition="Recurs on a specific day of the month", formalDefinition="Indicates that appointments in the series of recurring appointments should occur on a specific day of the month." ) 2116 protected PositiveIntType dayOfMonth; 2117 2118 /** 2119 * Indicates which week within a month the appointments in the series of recurring appointments should occur on. 2120 */ 2121 @Child(name = "nthWeekOfMonth", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) 2122 @Description(shortDefinition="Indicates which week of the month the appointment should occur", formalDefinition="Indicates which week within a month the appointments in the series of recurring appointments should occur on." ) 2123 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/week-of-month") 2124 protected Coding nthWeekOfMonth; 2125 2126 /** 2127 * Indicates which day of the week the recurring appointments should occur each nth week. 2128 */ 2129 @Child(name = "dayOfWeek", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=false) 2130 @Description(shortDefinition="Indicates which day of the week the appointment should occur", formalDefinition="Indicates which day of the week the recurring appointments should occur each nth week." ) 2131 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week") 2132 protected Coding dayOfWeek; 2133 2134 /** 2135 * Indicates that recurring appointments should occur every nth month. 2136 */ 2137 @Child(name = "monthInterval", type = {PositiveIntType.class}, order=4, min=1, max=1, modifier=false, summary=false) 2138 @Description(shortDefinition="Recurs every nth month", formalDefinition="Indicates that recurring appointments should occur every nth month." ) 2139 protected PositiveIntType monthInterval; 2140 2141 private static final long serialVersionUID = -1234046272L; 2142 2143 /** 2144 * Constructor 2145 */ 2146 public AppointmentRecurrenceTemplateMonthlyTemplateComponent() { 2147 super(); 2148 } 2149 2150 /** 2151 * Constructor 2152 */ 2153 public AppointmentRecurrenceTemplateMonthlyTemplateComponent(int monthInterval) { 2154 super(); 2155 this.setMonthInterval(monthInterval); 2156 } 2157 2158 /** 2159 * @return {@link #dayOfMonth} (Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.). This is the underlying object with id, value and extensions. The accessor "getDayOfMonth" gives direct access to the value 2160 */ 2161 public PositiveIntType getDayOfMonthElement() { 2162 if (this.dayOfMonth == null) 2163 if (Configuration.errorOnAutoCreate()) 2164 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.dayOfMonth"); 2165 else if (Configuration.doAutoCreate()) 2166 this.dayOfMonth = new PositiveIntType(); // bb 2167 return this.dayOfMonth; 2168 } 2169 2170 public boolean hasDayOfMonthElement() { 2171 return this.dayOfMonth != null && !this.dayOfMonth.isEmpty(); 2172 } 2173 2174 public boolean hasDayOfMonth() { 2175 return this.dayOfMonth != null && !this.dayOfMonth.isEmpty(); 2176 } 2177 2178 /** 2179 * @param value {@link #dayOfMonth} (Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.). This is the underlying object with id, value and extensions. The accessor "getDayOfMonth" gives direct access to the value 2180 */ 2181 public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfMonthElement(PositiveIntType value) { 2182 this.dayOfMonth = value; 2183 return this; 2184 } 2185 2186 /** 2187 * @return Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. 2188 */ 2189 public int getDayOfMonth() { 2190 return this.dayOfMonth == null || this.dayOfMonth.isEmpty() ? 0 : this.dayOfMonth.getValue(); 2191 } 2192 2193 /** 2194 * @param value Indicates that appointments in the series of recurring appointments should occur on a specific day of the month. 2195 */ 2196 public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfMonth(int value) { 2197 if (this.dayOfMonth == null) 2198 this.dayOfMonth = new PositiveIntType(); 2199 this.dayOfMonth.setValue(value); 2200 return this; 2201 } 2202 2203 /** 2204 * @return {@link #nthWeekOfMonth} (Indicates which week within a month the appointments in the series of recurring appointments should occur on.) 2205 */ 2206 public Coding getNthWeekOfMonth() { 2207 if (this.nthWeekOfMonth == null) 2208 if (Configuration.errorOnAutoCreate()) 2209 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.nthWeekOfMonth"); 2210 else if (Configuration.doAutoCreate()) 2211 this.nthWeekOfMonth = new Coding(); // cc 2212 return this.nthWeekOfMonth; 2213 } 2214 2215 public boolean hasNthWeekOfMonth() { 2216 return this.nthWeekOfMonth != null && !this.nthWeekOfMonth.isEmpty(); 2217 } 2218 2219 /** 2220 * @param value {@link #nthWeekOfMonth} (Indicates which week within a month the appointments in the series of recurring appointments should occur on.) 2221 */ 2222 public AppointmentRecurrenceTemplateMonthlyTemplateComponent setNthWeekOfMonth(Coding value) { 2223 this.nthWeekOfMonth = value; 2224 return this; 2225 } 2226 2227 /** 2228 * @return {@link #dayOfWeek} (Indicates which day of the week the recurring appointments should occur each nth week.) 2229 */ 2230 public Coding getDayOfWeek() { 2231 if (this.dayOfWeek == null) 2232 if (Configuration.errorOnAutoCreate()) 2233 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.dayOfWeek"); 2234 else if (Configuration.doAutoCreate()) 2235 this.dayOfWeek = new Coding(); // cc 2236 return this.dayOfWeek; 2237 } 2238 2239 public boolean hasDayOfWeek() { 2240 return this.dayOfWeek != null && !this.dayOfWeek.isEmpty(); 2241 } 2242 2243 /** 2244 * @param value {@link #dayOfWeek} (Indicates which day of the week the recurring appointments should occur each nth week.) 2245 */ 2246 public AppointmentRecurrenceTemplateMonthlyTemplateComponent setDayOfWeek(Coding value) { 2247 this.dayOfWeek = value; 2248 return this; 2249 } 2250 2251 /** 2252 * @return {@link #monthInterval} (Indicates that recurring appointments should occur every nth month.). This is the underlying object with id, value and extensions. The accessor "getMonthInterval" gives direct access to the value 2253 */ 2254 public PositiveIntType getMonthIntervalElement() { 2255 if (this.monthInterval == null) 2256 if (Configuration.errorOnAutoCreate()) 2257 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateMonthlyTemplateComponent.monthInterval"); 2258 else if (Configuration.doAutoCreate()) 2259 this.monthInterval = new PositiveIntType(); // bb 2260 return this.monthInterval; 2261 } 2262 2263 public boolean hasMonthIntervalElement() { 2264 return this.monthInterval != null && !this.monthInterval.isEmpty(); 2265 } 2266 2267 public boolean hasMonthInterval() { 2268 return this.monthInterval != null && !this.monthInterval.isEmpty(); 2269 } 2270 2271 /** 2272 * @param value {@link #monthInterval} (Indicates that recurring appointments should occur every nth month.). This is the underlying object with id, value and extensions. The accessor "getMonthInterval" gives direct access to the value 2273 */ 2274 public AppointmentRecurrenceTemplateMonthlyTemplateComponent setMonthIntervalElement(PositiveIntType value) { 2275 this.monthInterval = value; 2276 return this; 2277 } 2278 2279 /** 2280 * @return Indicates that recurring appointments should occur every nth month. 2281 */ 2282 public int getMonthInterval() { 2283 return this.monthInterval == null || this.monthInterval.isEmpty() ? 0 : this.monthInterval.getValue(); 2284 } 2285 2286 /** 2287 * @param value Indicates that recurring appointments should occur every nth month. 2288 */ 2289 public AppointmentRecurrenceTemplateMonthlyTemplateComponent setMonthInterval(int value) { 2290 if (this.monthInterval == null) 2291 this.monthInterval = new PositiveIntType(); 2292 this.monthInterval.setValue(value); 2293 return this; 2294 } 2295 2296 protected void listChildren(List<Property> children) { 2297 super.listChildren(children); 2298 children.add(new Property("dayOfMonth", "positiveInt", "Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.", 0, 1, dayOfMonth)); 2299 children.add(new Property("nthWeekOfMonth", "Coding", "Indicates which week within a month the appointments in the series of recurring appointments should occur on.", 0, 1, nthWeekOfMonth)); 2300 children.add(new Property("dayOfWeek", "Coding", "Indicates which day of the week the recurring appointments should occur each nth week.", 0, 1, dayOfWeek)); 2301 children.add(new Property("monthInterval", "positiveInt", "Indicates that recurring appointments should occur every nth month.", 0, 1, monthInterval)); 2302 } 2303 2304 @Override 2305 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2306 switch (_hash) { 2307 case -1181204563: /*dayOfMonth*/ return new Property("dayOfMonth", "positiveInt", "Indicates that appointments in the series of recurring appointments should occur on a specific day of the month.", 0, 1, dayOfMonth); 2308 case 724728723: /*nthWeekOfMonth*/ return new Property("nthWeekOfMonth", "Coding", "Indicates which week within a month the appointments in the series of recurring appointments should occur on.", 0, 1, nthWeekOfMonth); 2309 case -730552025: /*dayOfWeek*/ return new Property("dayOfWeek", "Coding", "Indicates which day of the week the recurring appointments should occur each nth week.", 0, 1, dayOfWeek); 2310 case -251401371: /*monthInterval*/ return new Property("monthInterval", "positiveInt", "Indicates that recurring appointments should occur every nth month.", 0, 1, monthInterval); 2311 default: return super.getNamedProperty(_hash, _name, _checkValid); 2312 } 2313 2314 } 2315 2316 @Override 2317 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2318 switch (hash) { 2319 case -1181204563: /*dayOfMonth*/ return this.dayOfMonth == null ? new Base[0] : new Base[] {this.dayOfMonth}; // PositiveIntType 2320 case 724728723: /*nthWeekOfMonth*/ return this.nthWeekOfMonth == null ? new Base[0] : new Base[] {this.nthWeekOfMonth}; // Coding 2321 case -730552025: /*dayOfWeek*/ return this.dayOfWeek == null ? new Base[0] : new Base[] {this.dayOfWeek}; // Coding 2322 case -251401371: /*monthInterval*/ return this.monthInterval == null ? new Base[0] : new Base[] {this.monthInterval}; // PositiveIntType 2323 default: return super.getProperty(hash, name, checkValid); 2324 } 2325 2326 } 2327 2328 @Override 2329 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2330 switch (hash) { 2331 case -1181204563: // dayOfMonth 2332 this.dayOfMonth = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2333 return value; 2334 case 724728723: // nthWeekOfMonth 2335 this.nthWeekOfMonth = TypeConvertor.castToCoding(value); // Coding 2336 return value; 2337 case -730552025: // dayOfWeek 2338 this.dayOfWeek = TypeConvertor.castToCoding(value); // Coding 2339 return value; 2340 case -251401371: // monthInterval 2341 this.monthInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2342 return value; 2343 default: return super.setProperty(hash, name, value); 2344 } 2345 2346 } 2347 2348 @Override 2349 public Base setProperty(String name, Base value) throws FHIRException { 2350 if (name.equals("dayOfMonth")) { 2351 this.dayOfMonth = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2352 } else if (name.equals("nthWeekOfMonth")) { 2353 this.nthWeekOfMonth = TypeConvertor.castToCoding(value); // Coding 2354 } else if (name.equals("dayOfWeek")) { 2355 this.dayOfWeek = TypeConvertor.castToCoding(value); // Coding 2356 } else if (name.equals("monthInterval")) { 2357 this.monthInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2358 } else 2359 return super.setProperty(name, value); 2360 return value; 2361 } 2362 2363 @Override 2364 public Base makeProperty(int hash, String name) throws FHIRException { 2365 switch (hash) { 2366 case -1181204563: return getDayOfMonthElement(); 2367 case 724728723: return getNthWeekOfMonth(); 2368 case -730552025: return getDayOfWeek(); 2369 case -251401371: return getMonthIntervalElement(); 2370 default: return super.makeProperty(hash, name); 2371 } 2372 2373 } 2374 2375 @Override 2376 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2377 switch (hash) { 2378 case -1181204563: /*dayOfMonth*/ return new String[] {"positiveInt"}; 2379 case 724728723: /*nthWeekOfMonth*/ return new String[] {"Coding"}; 2380 case -730552025: /*dayOfWeek*/ return new String[] {"Coding"}; 2381 case -251401371: /*monthInterval*/ return new String[] {"positiveInt"}; 2382 default: return super.getTypesForProperty(hash, name); 2383 } 2384 2385 } 2386 2387 @Override 2388 public Base addChild(String name) throws FHIRException { 2389 if (name.equals("dayOfMonth")) { 2390 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.monthlyTemplate.dayOfMonth"); 2391 } 2392 else if (name.equals("nthWeekOfMonth")) { 2393 this.nthWeekOfMonth = new Coding(); 2394 return this.nthWeekOfMonth; 2395 } 2396 else if (name.equals("dayOfWeek")) { 2397 this.dayOfWeek = new Coding(); 2398 return this.dayOfWeek; 2399 } 2400 else if (name.equals("monthInterval")) { 2401 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.monthlyTemplate.monthInterval"); 2402 } 2403 else 2404 return super.addChild(name); 2405 } 2406 2407 public AppointmentRecurrenceTemplateMonthlyTemplateComponent copy() { 2408 AppointmentRecurrenceTemplateMonthlyTemplateComponent dst = new AppointmentRecurrenceTemplateMonthlyTemplateComponent(); 2409 copyValues(dst); 2410 return dst; 2411 } 2412 2413 public void copyValues(AppointmentRecurrenceTemplateMonthlyTemplateComponent dst) { 2414 super.copyValues(dst); 2415 dst.dayOfMonth = dayOfMonth == null ? null : dayOfMonth.copy(); 2416 dst.nthWeekOfMonth = nthWeekOfMonth == null ? null : nthWeekOfMonth.copy(); 2417 dst.dayOfWeek = dayOfWeek == null ? null : dayOfWeek.copy(); 2418 dst.monthInterval = monthInterval == null ? null : monthInterval.copy(); 2419 } 2420 2421 @Override 2422 public boolean equalsDeep(Base other_) { 2423 if (!super.equalsDeep(other_)) 2424 return false; 2425 if (!(other_ instanceof AppointmentRecurrenceTemplateMonthlyTemplateComponent)) 2426 return false; 2427 AppointmentRecurrenceTemplateMonthlyTemplateComponent o = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) other_; 2428 return compareDeep(dayOfMonth, o.dayOfMonth, true) && compareDeep(nthWeekOfMonth, o.nthWeekOfMonth, true) 2429 && compareDeep(dayOfWeek, o.dayOfWeek, true) && compareDeep(monthInterval, o.monthInterval, true) 2430 ; 2431 } 2432 2433 @Override 2434 public boolean equalsShallow(Base other_) { 2435 if (!super.equalsShallow(other_)) 2436 return false; 2437 if (!(other_ instanceof AppointmentRecurrenceTemplateMonthlyTemplateComponent)) 2438 return false; 2439 AppointmentRecurrenceTemplateMonthlyTemplateComponent o = (AppointmentRecurrenceTemplateMonthlyTemplateComponent) other_; 2440 return compareValues(dayOfMonth, o.dayOfMonth, true) && compareValues(monthInterval, o.monthInterval, true) 2441 ; 2442 } 2443 2444 public boolean isEmpty() { 2445 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(dayOfMonth, nthWeekOfMonth 2446 , dayOfWeek, monthInterval); 2447 } 2448 2449 public String fhirType() { 2450 return "Appointment.recurrenceTemplate.monthlyTemplate"; 2451 2452 } 2453 2454 } 2455 2456 @Block() 2457 public static class AppointmentRecurrenceTemplateYearlyTemplateComponent extends BackboneElement implements IBaseBackboneElement { 2458 /** 2459 * Appointment recurs every nth year. 2460 */ 2461 @Child(name = "yearInterval", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2462 @Description(shortDefinition="Recurs every nth year", formalDefinition="Appointment recurs every nth year." ) 2463 protected PositiveIntType yearInterval; 2464 2465 private static final long serialVersionUID = -120794476L; 2466 2467 /** 2468 * Constructor 2469 */ 2470 public AppointmentRecurrenceTemplateYearlyTemplateComponent() { 2471 super(); 2472 } 2473 2474 /** 2475 * Constructor 2476 */ 2477 public AppointmentRecurrenceTemplateYearlyTemplateComponent(int yearInterval) { 2478 super(); 2479 this.setYearInterval(yearInterval); 2480 } 2481 2482 /** 2483 * @return {@link #yearInterval} (Appointment recurs every nth year.). This is the underlying object with id, value and extensions. The accessor "getYearInterval" gives direct access to the value 2484 */ 2485 public PositiveIntType getYearIntervalElement() { 2486 if (this.yearInterval == null) 2487 if (Configuration.errorOnAutoCreate()) 2488 throw new Error("Attempt to auto-create AppointmentRecurrenceTemplateYearlyTemplateComponent.yearInterval"); 2489 else if (Configuration.doAutoCreate()) 2490 this.yearInterval = new PositiveIntType(); // bb 2491 return this.yearInterval; 2492 } 2493 2494 public boolean hasYearIntervalElement() { 2495 return this.yearInterval != null && !this.yearInterval.isEmpty(); 2496 } 2497 2498 public boolean hasYearInterval() { 2499 return this.yearInterval != null && !this.yearInterval.isEmpty(); 2500 } 2501 2502 /** 2503 * @param value {@link #yearInterval} (Appointment recurs every nth year.). This is the underlying object with id, value and extensions. The accessor "getYearInterval" gives direct access to the value 2504 */ 2505 public AppointmentRecurrenceTemplateYearlyTemplateComponent setYearIntervalElement(PositiveIntType value) { 2506 this.yearInterval = value; 2507 return this; 2508 } 2509 2510 /** 2511 * @return Appointment recurs every nth year. 2512 */ 2513 public int getYearInterval() { 2514 return this.yearInterval == null || this.yearInterval.isEmpty() ? 0 : this.yearInterval.getValue(); 2515 } 2516 2517 /** 2518 * @param value Appointment recurs every nth year. 2519 */ 2520 public AppointmentRecurrenceTemplateYearlyTemplateComponent setYearInterval(int value) { 2521 if (this.yearInterval == null) 2522 this.yearInterval = new PositiveIntType(); 2523 this.yearInterval.setValue(value); 2524 return this; 2525 } 2526 2527 protected void listChildren(List<Property> children) { 2528 super.listChildren(children); 2529 children.add(new Property("yearInterval", "positiveInt", "Appointment recurs every nth year.", 0, 1, yearInterval)); 2530 } 2531 2532 @Override 2533 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2534 switch (_hash) { 2535 case 492389410: /*yearInterval*/ return new Property("yearInterval", "positiveInt", "Appointment recurs every nth year.", 0, 1, yearInterval); 2536 default: return super.getNamedProperty(_hash, _name, _checkValid); 2537 } 2538 2539 } 2540 2541 @Override 2542 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2543 switch (hash) { 2544 case 492389410: /*yearInterval*/ return this.yearInterval == null ? new Base[0] : new Base[] {this.yearInterval}; // PositiveIntType 2545 default: return super.getProperty(hash, name, checkValid); 2546 } 2547 2548 } 2549 2550 @Override 2551 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2552 switch (hash) { 2553 case 492389410: // yearInterval 2554 this.yearInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2555 return value; 2556 default: return super.setProperty(hash, name, value); 2557 } 2558 2559 } 2560 2561 @Override 2562 public Base setProperty(String name, Base value) throws FHIRException { 2563 if (name.equals("yearInterval")) { 2564 this.yearInterval = TypeConvertor.castToPositiveInt(value); // PositiveIntType 2565 } else 2566 return super.setProperty(name, value); 2567 return value; 2568 } 2569 2570 @Override 2571 public Base makeProperty(int hash, String name) throws FHIRException { 2572 switch (hash) { 2573 case 492389410: return getYearIntervalElement(); 2574 default: return super.makeProperty(hash, name); 2575 } 2576 2577 } 2578 2579 @Override 2580 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2581 switch (hash) { 2582 case 492389410: /*yearInterval*/ return new String[] {"positiveInt"}; 2583 default: return super.getTypesForProperty(hash, name); 2584 } 2585 2586 } 2587 2588 @Override 2589 public Base addChild(String name) throws FHIRException { 2590 if (name.equals("yearInterval")) { 2591 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceTemplate.yearlyTemplate.yearInterval"); 2592 } 2593 else 2594 return super.addChild(name); 2595 } 2596 2597 public AppointmentRecurrenceTemplateYearlyTemplateComponent copy() { 2598 AppointmentRecurrenceTemplateYearlyTemplateComponent dst = new AppointmentRecurrenceTemplateYearlyTemplateComponent(); 2599 copyValues(dst); 2600 return dst; 2601 } 2602 2603 public void copyValues(AppointmentRecurrenceTemplateYearlyTemplateComponent dst) { 2604 super.copyValues(dst); 2605 dst.yearInterval = yearInterval == null ? null : yearInterval.copy(); 2606 } 2607 2608 @Override 2609 public boolean equalsDeep(Base other_) { 2610 if (!super.equalsDeep(other_)) 2611 return false; 2612 if (!(other_ instanceof AppointmentRecurrenceTemplateYearlyTemplateComponent)) 2613 return false; 2614 AppointmentRecurrenceTemplateYearlyTemplateComponent o = (AppointmentRecurrenceTemplateYearlyTemplateComponent) other_; 2615 return compareDeep(yearInterval, o.yearInterval, true); 2616 } 2617 2618 @Override 2619 public boolean equalsShallow(Base other_) { 2620 if (!super.equalsShallow(other_)) 2621 return false; 2622 if (!(other_ instanceof AppointmentRecurrenceTemplateYearlyTemplateComponent)) 2623 return false; 2624 AppointmentRecurrenceTemplateYearlyTemplateComponent o = (AppointmentRecurrenceTemplateYearlyTemplateComponent) other_; 2625 return compareValues(yearInterval, o.yearInterval, true); 2626 } 2627 2628 public boolean isEmpty() { 2629 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(yearInterval); 2630 } 2631 2632 public String fhirType() { 2633 return "Appointment.recurrenceTemplate.yearlyTemplate"; 2634 2635 } 2636 2637 } 2638 2639 /** 2640 * This records identifiers associated with this appointment 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 (e.g. in CDA documents, or in written / printed documentation). 2641 */ 2642 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2643 @Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment 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 (e.g. in CDA documents, or in written / printed documentation)." ) 2644 protected List<Identifier> identifier; 2645 2646 /** 2647 * The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. 2648 */ 2649 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 2650 @Description(shortDefinition="proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist", formalDefinition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status." ) 2651 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointmentstatus") 2652 protected Enumeration<AppointmentStatus> status; 2653 2654 /** 2655 * The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply. 2656 */ 2657 @Child(name = "cancellationReason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 2658 @Description(shortDefinition="The coded reason for the appointment being cancelled", formalDefinition="The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply." ) 2659 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/appointment-cancellation-reason") 2660 protected CodeableConcept cancellationReason; 2661 2662 /** 2663 * Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations. 2664 */ 2665 @Child(name = "class", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2666 @Description(shortDefinition="Classification when becoming an encounter", formalDefinition="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." ) 2667 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/EncounterClass") 2668 protected List<CodeableConcept> class_; 2669 2670 /** 2671 * A broad categorization of the service that is to be performed during this appointment. 2672 */ 2673 @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2674 @Description(shortDefinition="A broad categorization of the service that is to be performed during this appointment", formalDefinition="A broad categorization of the service that is to be performed during this appointment." ) 2675 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-category") 2676 protected List<CodeableConcept> serviceCategory; 2677 2678 /** 2679 * The specific service that is to be performed during this appointment. 2680 */ 2681 @Child(name = "serviceType", type = {CodeableReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2682 @Description(shortDefinition="The specific service that is to be performed during this appointment", formalDefinition="The specific service that is to be performed during this appointment." ) 2683 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-type") 2684 protected List<CodeableReference> serviceType; 2685 2686 /** 2687 * The specialty of a practitioner that would be required to perform the service requested in this appointment. 2688 */ 2689 @Child(name = "specialty", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2690 @Description(shortDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment", formalDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment." ) 2691 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes") 2692 protected List<CodeableConcept> specialty; 2693 2694 /** 2695 * The style of appointment or patient that has been booked in the slot (not service type). 2696 */ 2697 @Child(name = "appointmentType", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) 2698 @Description(shortDefinition="The style of appointment or patient that has been booked in the slot (not service type)", formalDefinition="The style of appointment or patient that has been booked in the slot (not service type)." ) 2699 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0276") 2700 protected CodeableConcept appointmentType; 2701 2702 /** 2703 * The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure. 2704 */ 2705 @Child(name = "reason", type = {CodeableReference.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2706 @Description(shortDefinition="Reason this appointment is scheduled", formalDefinition="The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure." ) 2707 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason") 2708 protected List<CodeableReference> reason; 2709 2710 /** 2711 * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority). 2712 */ 2713 @Child(name = "priority", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false) 2714 @Description(shortDefinition="Used to make informed decisions if needing to re-prioritize", formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)." ) 2715 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActPriority") 2716 protected CodeableConcept priority; 2717 2718 /** 2719 * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. 2720 */ 2721 @Child(name = "description", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 2722 @Description(shortDefinition="Shown on a subject line in a meeting request, or appointment list", formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." ) 2723 protected StringType description; 2724 2725 /** 2726 * Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource). 2727 */ 2728 @Child(name = "replaces", type = {Appointment.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2729 @Description(shortDefinition="Appointment replaced by this Appointment", formalDefinition="Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource)." ) 2730 protected List<Reference> replaces; 2731 2732 /** 2733 * Connection details of a virtual service (e.g. conference call). 2734 */ 2735 @Child(name = "virtualService", type = {VirtualServiceDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2736 @Description(shortDefinition="Connection details of a virtual service (e.g. conference call)", formalDefinition="Connection details of a virtual service (e.g. conference call)." ) 2737 protected List<VirtualServiceDetail> virtualService; 2738 2739 /** 2740 * Additional information to support the appointment provided when making the appointment. 2741 */ 2742 @Child(name = "supportingInformation", type = {Reference.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2743 @Description(shortDefinition="Additional information to support the appointment", formalDefinition="Additional information to support the appointment provided when making the appointment." ) 2744 protected List<Reference> supportingInformation; 2745 2746 /** 2747 * The previous appointment in a series of related appointments. 2748 */ 2749 @Child(name = "previousAppointment", type = {Appointment.class}, order=14, min=0, max=1, modifier=false, summary=false) 2750 @Description(shortDefinition="The previous appointment in a series", formalDefinition="The previous appointment in a series of related appointments." ) 2751 protected Reference previousAppointment; 2752 2753 /** 2754 * The originating appointment in a recurring set of related appointments. 2755 */ 2756 @Child(name = "originatingAppointment", type = {Appointment.class}, order=15, min=0, max=1, modifier=false, summary=false) 2757 @Description(shortDefinition="The originating appointment in a recurring set of appointments", formalDefinition="The originating appointment in a recurring set of related appointments." ) 2758 protected Reference originatingAppointment; 2759 2760 /** 2761 * Date/Time that the appointment is to take place. 2762 */ 2763 @Child(name = "start", type = {InstantType.class}, order=16, min=0, max=1, modifier=false, summary=true) 2764 @Description(shortDefinition="When appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) 2765 protected InstantType start; 2766 2767 /** 2768 * Date/Time that the appointment is to conclude. 2769 */ 2770 @Child(name = "end", type = {InstantType.class}, order=17, min=0, max=1, modifier=false, summary=true) 2771 @Description(shortDefinition="When appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) 2772 protected InstantType end; 2773 2774 /** 2775 * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. 2776 */ 2777 @Child(name = "minutesDuration", type = {PositiveIntType.class}, order=18, min=0, max=1, modifier=false, summary=false) 2778 @Description(shortDefinition="Can be less than start/end (e.g. estimate)", formalDefinition="Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end." ) 2779 protected PositiveIntType minutesDuration; 2780 2781 /** 2782 * The slots from the participants' schedules that will be filled by the appointment. 2783 */ 2784 @Child(name = "slot", type = {Slot.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2785 @Description(shortDefinition="The slots that this appointment is filling", formalDefinition="The slots from the participants' schedules that will be filled by the appointment." ) 2786 protected List<Reference> slot; 2787 2788 /** 2789 * The set of accounts that is expected to be used for billing the activities that result from this Appointment. 2790 */ 2791 @Child(name = "account", type = {Account.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2792 @Description(shortDefinition="The set of accounts that may be used for billing for this Appointment", formalDefinition="The set of accounts that is expected to be used for billing the activities that result from this Appointment." ) 2793 protected List<Reference> account; 2794 2795 /** 2796 * The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment. 2797 */ 2798 @Child(name = "created", type = {DateTimeType.class}, order=21, min=0, max=1, modifier=false, summary=false) 2799 @Description(shortDefinition="The date that this appointment was initially created", formalDefinition="The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment." ) 2800 protected DateTimeType created; 2801 2802 /** 2803 * Additional notes/comments about the appointment. 2804 */ 2805 @Child(name = "note", type = {Annotation.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2806 @Description(shortDefinition="Additional comments", formalDefinition="Additional notes/comments about the appointment." ) 2807 protected List<Annotation> note; 2808 2809 /** 2810 * While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before). 2811 */ 2812 @Child(name = "patientInstruction", type = {CodeableReference.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2813 @Description(shortDefinition="Detailed information and instructions for the patient", formalDefinition="While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before)." ) 2814 protected List<CodeableReference> patientInstruction; 2815 2816 /** 2817 * The request this appointment is allocated to assess (e.g. incoming referral or procedure request). 2818 */ 2819 @Child(name = "basedOn", type = {CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2820 @Description(shortDefinition="The request this appointment is allocated to assess", formalDefinition="The request this appointment is allocated to assess (e.g. incoming referral or procedure request)." ) 2821 protected List<Reference> basedOn; 2822 2823 /** 2824 * The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element. 2825 */ 2826 @Child(name = "subject", type = {Patient.class, Group.class}, order=25, min=0, max=1, modifier=false, summary=true) 2827 @Description(shortDefinition="The patient or group associated with the appointment", formalDefinition="The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element." ) 2828 protected Reference subject; 2829 2830 /** 2831 * List of participants involved in the appointment. 2832 */ 2833 @Child(name = "participant", type = {}, order=26, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2834 @Description(shortDefinition="Participants involved in appointment", formalDefinition="List of participants involved in the appointment." ) 2835 protected List<AppointmentParticipantComponent> participant; 2836 2837 /** 2838 * A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. 2839 2840The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system. 2841 */ 2842 @Child(name = "requestedPeriod", type = {Period.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2843 @Description(shortDefinition="Potential date/time interval(s) requested to allocate the appointment within", formalDefinition="A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system." ) 2844 protected List<Period> requestedPeriod; 2845 2846 /** 2847 * The sequence number that identifies a specific appointment in a recurring pattern. 2848 */ 2849 @Child(name = "recurrenceId", type = {PositiveIntType.class}, order=28, min=0, max=1, modifier=false, summary=false) 2850 @Description(shortDefinition="The sequence number in the recurrence", formalDefinition="The sequence number that identifies a specific appointment in a recurring pattern." ) 2851 protected PositiveIntType recurrenceId; 2852 2853 /** 2854 * This appointment varies from the recurring pattern. 2855 */ 2856 @Child(name = "occurrenceChanged", type = {BooleanType.class}, order=29, min=0, max=1, modifier=false, summary=false) 2857 @Description(shortDefinition="Indicates that this appointment varies from a recurrence pattern", formalDefinition="This appointment varies from the recurring pattern." ) 2858 protected BooleanType occurrenceChanged; 2859 2860 /** 2861 * The details of the recurrence pattern or template that is used to generate recurring appointments. 2862 */ 2863 @Child(name = "recurrenceTemplate", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2864 @Description(shortDefinition="Details of the recurrence pattern/template used to generate occurrences", formalDefinition="The details of the recurrence pattern or template that is used to generate recurring appointments." ) 2865 protected List<AppointmentRecurrenceTemplateComponent> recurrenceTemplate; 2866 2867 private static final long serialVersionUID = 621636241L; 2868 2869 /** 2870 * Constructor 2871 */ 2872 public Appointment() { 2873 super(); 2874 } 2875 2876 /** 2877 * Constructor 2878 */ 2879 public Appointment(AppointmentStatus status, AppointmentParticipantComponent participant) { 2880 super(); 2881 this.setStatus(status); 2882 this.addParticipant(participant); 2883 } 2884 2885 /** 2886 * @return {@link #identifier} (This records identifiers associated with this appointment 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 (e.g. in CDA documents, or in written / printed documentation).) 2887 */ 2888 public List<Identifier> getIdentifier() { 2889 if (this.identifier == null) 2890 this.identifier = new ArrayList<Identifier>(); 2891 return this.identifier; 2892 } 2893 2894 /** 2895 * @return Returns a reference to <code>this</code> for easy method chaining 2896 */ 2897 public Appointment setIdentifier(List<Identifier> theIdentifier) { 2898 this.identifier = theIdentifier; 2899 return this; 2900 } 2901 2902 public boolean hasIdentifier() { 2903 if (this.identifier == null) 2904 return false; 2905 for (Identifier item : this.identifier) 2906 if (!item.isEmpty()) 2907 return true; 2908 return false; 2909 } 2910 2911 public Identifier addIdentifier() { //3 2912 Identifier t = new Identifier(); 2913 if (this.identifier == null) 2914 this.identifier = new ArrayList<Identifier>(); 2915 this.identifier.add(t); 2916 return t; 2917 } 2918 2919 public Appointment addIdentifier(Identifier t) { //3 2920 if (t == null) 2921 return this; 2922 if (this.identifier == null) 2923 this.identifier = new ArrayList<Identifier>(); 2924 this.identifier.add(t); 2925 return this; 2926 } 2927 2928 /** 2929 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 2930 */ 2931 public Identifier getIdentifierFirstRep() { 2932 if (getIdentifier().isEmpty()) { 2933 addIdentifier(); 2934 } 2935 return getIdentifier().get(0); 2936 } 2937 2938 /** 2939 * @return {@link #status} (The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2940 */ 2941 public Enumeration<AppointmentStatus> getStatusElement() { 2942 if (this.status == null) 2943 if (Configuration.errorOnAutoCreate()) 2944 throw new Error("Attempt to auto-create Appointment.status"); 2945 else if (Configuration.doAutoCreate()) 2946 this.status = new Enumeration<AppointmentStatus>(new AppointmentStatusEnumFactory()); // bb 2947 return this.status; 2948 } 2949 2950 public boolean hasStatusElement() { 2951 return this.status != null && !this.status.isEmpty(); 2952 } 2953 2954 public boolean hasStatus() { 2955 return this.status != null && !this.status.isEmpty(); 2956 } 2957 2958 /** 2959 * @param value {@link #status} (The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2960 */ 2961 public Appointment setStatusElement(Enumeration<AppointmentStatus> value) { 2962 this.status = value; 2963 return this; 2964 } 2965 2966 /** 2967 * @return The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. 2968 */ 2969 public AppointmentStatus getStatus() { 2970 return this.status == null ? null : this.status.getValue(); 2971 } 2972 2973 /** 2974 * @param value The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status. 2975 */ 2976 public Appointment setStatus(AppointmentStatus value) { 2977 if (this.status == null) 2978 this.status = new Enumeration<AppointmentStatus>(new AppointmentStatusEnumFactory()); 2979 this.status.setValue(value); 2980 return this; 2981 } 2982 2983 /** 2984 * @return {@link #cancellationReason} (The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.) 2985 */ 2986 public CodeableConcept getCancellationReason() { 2987 if (this.cancellationReason == null) 2988 if (Configuration.errorOnAutoCreate()) 2989 throw new Error("Attempt to auto-create Appointment.cancellationReason"); 2990 else if (Configuration.doAutoCreate()) 2991 this.cancellationReason = new CodeableConcept(); // cc 2992 return this.cancellationReason; 2993 } 2994 2995 public boolean hasCancellationReason() { 2996 return this.cancellationReason != null && !this.cancellationReason.isEmpty(); 2997 } 2998 2999 /** 3000 * @param value {@link #cancellationReason} (The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.) 3001 */ 3002 public Appointment setCancellationReason(CodeableConcept value) { 3003 this.cancellationReason = value; 3004 return this; 3005 } 3006 3007 /** 3008 * @return {@link #class_} (Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.) 3009 */ 3010 public List<CodeableConcept> getClass_() { 3011 if (this.class_ == null) 3012 this.class_ = new ArrayList<CodeableConcept>(); 3013 return this.class_; 3014 } 3015 3016 /** 3017 * @return Returns a reference to <code>this</code> for easy method chaining 3018 */ 3019 public Appointment setClass_(List<CodeableConcept> theClass_) { 3020 this.class_ = theClass_; 3021 return this; 3022 } 3023 3024 public boolean hasClass_() { 3025 if (this.class_ == null) 3026 return false; 3027 for (CodeableConcept item : this.class_) 3028 if (!item.isEmpty()) 3029 return true; 3030 return false; 3031 } 3032 3033 public CodeableConcept addClass_() { //3 3034 CodeableConcept t = new CodeableConcept(); 3035 if (this.class_ == null) 3036 this.class_ = new ArrayList<CodeableConcept>(); 3037 this.class_.add(t); 3038 return t; 3039 } 3040 3041 public Appointment addClass_(CodeableConcept t) { //3 3042 if (t == null) 3043 return this; 3044 if (this.class_ == null) 3045 this.class_ = new ArrayList<CodeableConcept>(); 3046 this.class_.add(t); 3047 return this; 3048 } 3049 3050 /** 3051 * @return The first repetition of repeating field {@link #class_}, creating it if it does not already exist {3} 3052 */ 3053 public CodeableConcept getClass_FirstRep() { 3054 if (getClass_().isEmpty()) { 3055 addClass_(); 3056 } 3057 return getClass_().get(0); 3058 } 3059 3060 /** 3061 * @return {@link #serviceCategory} (A broad categorization of the service that is to be performed during this appointment.) 3062 */ 3063 public List<CodeableConcept> getServiceCategory() { 3064 if (this.serviceCategory == null) 3065 this.serviceCategory = new ArrayList<CodeableConcept>(); 3066 return this.serviceCategory; 3067 } 3068 3069 /** 3070 * @return Returns a reference to <code>this</code> for easy method chaining 3071 */ 3072 public Appointment setServiceCategory(List<CodeableConcept> theServiceCategory) { 3073 this.serviceCategory = theServiceCategory; 3074 return this; 3075 } 3076 3077 public boolean hasServiceCategory() { 3078 if (this.serviceCategory == null) 3079 return false; 3080 for (CodeableConcept item : this.serviceCategory) 3081 if (!item.isEmpty()) 3082 return true; 3083 return false; 3084 } 3085 3086 public CodeableConcept addServiceCategory() { //3 3087 CodeableConcept t = new CodeableConcept(); 3088 if (this.serviceCategory == null) 3089 this.serviceCategory = new ArrayList<CodeableConcept>(); 3090 this.serviceCategory.add(t); 3091 return t; 3092 } 3093 3094 public Appointment addServiceCategory(CodeableConcept t) { //3 3095 if (t == null) 3096 return this; 3097 if (this.serviceCategory == null) 3098 this.serviceCategory = new ArrayList<CodeableConcept>(); 3099 this.serviceCategory.add(t); 3100 return this; 3101 } 3102 3103 /** 3104 * @return The first repetition of repeating field {@link #serviceCategory}, creating it if it does not already exist {3} 3105 */ 3106 public CodeableConcept getServiceCategoryFirstRep() { 3107 if (getServiceCategory().isEmpty()) { 3108 addServiceCategory(); 3109 } 3110 return getServiceCategory().get(0); 3111 } 3112 3113 /** 3114 * @return {@link #serviceType} (The specific service that is to be performed during this appointment.) 3115 */ 3116 public List<CodeableReference> getServiceType() { 3117 if (this.serviceType == null) 3118 this.serviceType = new ArrayList<CodeableReference>(); 3119 return this.serviceType; 3120 } 3121 3122 /** 3123 * @return Returns a reference to <code>this</code> for easy method chaining 3124 */ 3125 public Appointment setServiceType(List<CodeableReference> theServiceType) { 3126 this.serviceType = theServiceType; 3127 return this; 3128 } 3129 3130 public boolean hasServiceType() { 3131 if (this.serviceType == null) 3132 return false; 3133 for (CodeableReference item : this.serviceType) 3134 if (!item.isEmpty()) 3135 return true; 3136 return false; 3137 } 3138 3139 public CodeableReference addServiceType() { //3 3140 CodeableReference t = new CodeableReference(); 3141 if (this.serviceType == null) 3142 this.serviceType = new ArrayList<CodeableReference>(); 3143 this.serviceType.add(t); 3144 return t; 3145 } 3146 3147 public Appointment addServiceType(CodeableReference t) { //3 3148 if (t == null) 3149 return this; 3150 if (this.serviceType == null) 3151 this.serviceType = new ArrayList<CodeableReference>(); 3152 this.serviceType.add(t); 3153 return this; 3154 } 3155 3156 /** 3157 * @return The first repetition of repeating field {@link #serviceType}, creating it if it does not already exist {3} 3158 */ 3159 public CodeableReference getServiceTypeFirstRep() { 3160 if (getServiceType().isEmpty()) { 3161 addServiceType(); 3162 } 3163 return getServiceType().get(0); 3164 } 3165 3166 /** 3167 * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) 3168 */ 3169 public List<CodeableConcept> getSpecialty() { 3170 if (this.specialty == null) 3171 this.specialty = new ArrayList<CodeableConcept>(); 3172 return this.specialty; 3173 } 3174 3175 /** 3176 * @return Returns a reference to <code>this</code> for easy method chaining 3177 */ 3178 public Appointment setSpecialty(List<CodeableConcept> theSpecialty) { 3179 this.specialty = theSpecialty; 3180 return this; 3181 } 3182 3183 public boolean hasSpecialty() { 3184 if (this.specialty == null) 3185 return false; 3186 for (CodeableConcept item : this.specialty) 3187 if (!item.isEmpty()) 3188 return true; 3189 return false; 3190 } 3191 3192 public CodeableConcept addSpecialty() { //3 3193 CodeableConcept t = new CodeableConcept(); 3194 if (this.specialty == null) 3195 this.specialty = new ArrayList<CodeableConcept>(); 3196 this.specialty.add(t); 3197 return t; 3198 } 3199 3200 public Appointment addSpecialty(CodeableConcept t) { //3 3201 if (t == null) 3202 return this; 3203 if (this.specialty == null) 3204 this.specialty = new ArrayList<CodeableConcept>(); 3205 this.specialty.add(t); 3206 return this; 3207 } 3208 3209 /** 3210 * @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist {3} 3211 */ 3212 public CodeableConcept getSpecialtyFirstRep() { 3213 if (getSpecialty().isEmpty()) { 3214 addSpecialty(); 3215 } 3216 return getSpecialty().get(0); 3217 } 3218 3219 /** 3220 * @return {@link #appointmentType} (The style of appointment or patient that has been booked in the slot (not service type).) 3221 */ 3222 public CodeableConcept getAppointmentType() { 3223 if (this.appointmentType == null) 3224 if (Configuration.errorOnAutoCreate()) 3225 throw new Error("Attempt to auto-create Appointment.appointmentType"); 3226 else if (Configuration.doAutoCreate()) 3227 this.appointmentType = new CodeableConcept(); // cc 3228 return this.appointmentType; 3229 } 3230 3231 public boolean hasAppointmentType() { 3232 return this.appointmentType != null && !this.appointmentType.isEmpty(); 3233 } 3234 3235 /** 3236 * @param value {@link #appointmentType} (The style of appointment or patient that has been booked in the slot (not service type).) 3237 */ 3238 public Appointment setAppointmentType(CodeableConcept value) { 3239 this.appointmentType = value; 3240 return this; 3241 } 3242 3243 /** 3244 * @return {@link #reason} (The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.) 3245 */ 3246 public List<CodeableReference> getReason() { 3247 if (this.reason == null) 3248 this.reason = new ArrayList<CodeableReference>(); 3249 return this.reason; 3250 } 3251 3252 /** 3253 * @return Returns a reference to <code>this</code> for easy method chaining 3254 */ 3255 public Appointment setReason(List<CodeableReference> theReason) { 3256 this.reason = theReason; 3257 return this; 3258 } 3259 3260 public boolean hasReason() { 3261 if (this.reason == null) 3262 return false; 3263 for (CodeableReference item : this.reason) 3264 if (!item.isEmpty()) 3265 return true; 3266 return false; 3267 } 3268 3269 public CodeableReference addReason() { //3 3270 CodeableReference t = new CodeableReference(); 3271 if (this.reason == null) 3272 this.reason = new ArrayList<CodeableReference>(); 3273 this.reason.add(t); 3274 return t; 3275 } 3276 3277 public Appointment addReason(CodeableReference t) { //3 3278 if (t == null) 3279 return this; 3280 if (this.reason == null) 3281 this.reason = new ArrayList<CodeableReference>(); 3282 this.reason.add(t); 3283 return this; 3284 } 3285 3286 /** 3287 * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3} 3288 */ 3289 public CodeableReference getReasonFirstRep() { 3290 if (getReason().isEmpty()) { 3291 addReason(); 3292 } 3293 return getReason().get(0); 3294 } 3295 3296 /** 3297 * @return {@link #priority} (The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).) 3298 */ 3299 public CodeableConcept getPriority() { 3300 if (this.priority == null) 3301 if (Configuration.errorOnAutoCreate()) 3302 throw new Error("Attempt to auto-create Appointment.priority"); 3303 else if (Configuration.doAutoCreate()) 3304 this.priority = new CodeableConcept(); // cc 3305 return this.priority; 3306 } 3307 3308 public boolean hasPriority() { 3309 return this.priority != null && !this.priority.isEmpty(); 3310 } 3311 3312 /** 3313 * @param value {@link #priority} (The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).) 3314 */ 3315 public Appointment setPriority(CodeableConcept value) { 3316 this.priority = value; 3317 return this; 3318 } 3319 3320 /** 3321 * @return {@link #description} (The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3322 */ 3323 public StringType getDescriptionElement() { 3324 if (this.description == null) 3325 if (Configuration.errorOnAutoCreate()) 3326 throw new Error("Attempt to auto-create Appointment.description"); 3327 else if (Configuration.doAutoCreate()) 3328 this.description = new StringType(); // bb 3329 return this.description; 3330 } 3331 3332 public boolean hasDescriptionElement() { 3333 return this.description != null && !this.description.isEmpty(); 3334 } 3335 3336 public boolean hasDescription() { 3337 return this.description != null && !this.description.isEmpty(); 3338 } 3339 3340 /** 3341 * @param value {@link #description} (The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3342 */ 3343 public Appointment setDescriptionElement(StringType value) { 3344 this.description = value; 3345 return this; 3346 } 3347 3348 /** 3349 * @return The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. 3350 */ 3351 public String getDescription() { 3352 return this.description == null ? null : this.description.getValue(); 3353 } 3354 3355 /** 3356 * @param value The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. 3357 */ 3358 public Appointment setDescription(String value) { 3359 if (Utilities.noString(value)) 3360 this.description = null; 3361 else { 3362 if (this.description == null) 3363 this.description = new StringType(); 3364 this.description.setValue(value); 3365 } 3366 return this; 3367 } 3368 3369 /** 3370 * @return {@link #replaces} (Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).) 3371 */ 3372 public List<Reference> getReplaces() { 3373 if (this.replaces == null) 3374 this.replaces = new ArrayList<Reference>(); 3375 return this.replaces; 3376 } 3377 3378 /** 3379 * @return Returns a reference to <code>this</code> for easy method chaining 3380 */ 3381 public Appointment setReplaces(List<Reference> theReplaces) { 3382 this.replaces = theReplaces; 3383 return this; 3384 } 3385 3386 public boolean hasReplaces() { 3387 if (this.replaces == null) 3388 return false; 3389 for (Reference item : this.replaces) 3390 if (!item.isEmpty()) 3391 return true; 3392 return false; 3393 } 3394 3395 public Reference addReplaces() { //3 3396 Reference t = new Reference(); 3397 if (this.replaces == null) 3398 this.replaces = new ArrayList<Reference>(); 3399 this.replaces.add(t); 3400 return t; 3401 } 3402 3403 public Appointment addReplaces(Reference t) { //3 3404 if (t == null) 3405 return this; 3406 if (this.replaces == null) 3407 this.replaces = new ArrayList<Reference>(); 3408 this.replaces.add(t); 3409 return this; 3410 } 3411 3412 /** 3413 * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3} 3414 */ 3415 public Reference getReplacesFirstRep() { 3416 if (getReplaces().isEmpty()) { 3417 addReplaces(); 3418 } 3419 return getReplaces().get(0); 3420 } 3421 3422 /** 3423 * @return {@link #virtualService} (Connection details of a virtual service (e.g. conference call).) 3424 */ 3425 public List<VirtualServiceDetail> getVirtualService() { 3426 if (this.virtualService == null) 3427 this.virtualService = new ArrayList<VirtualServiceDetail>(); 3428 return this.virtualService; 3429 } 3430 3431 /** 3432 * @return Returns a reference to <code>this</code> for easy method chaining 3433 */ 3434 public Appointment setVirtualService(List<VirtualServiceDetail> theVirtualService) { 3435 this.virtualService = theVirtualService; 3436 return this; 3437 } 3438 3439 public boolean hasVirtualService() { 3440 if (this.virtualService == null) 3441 return false; 3442 for (VirtualServiceDetail item : this.virtualService) 3443 if (!item.isEmpty()) 3444 return true; 3445 return false; 3446 } 3447 3448 public VirtualServiceDetail addVirtualService() { //3 3449 VirtualServiceDetail t = new VirtualServiceDetail(); 3450 if (this.virtualService == null) 3451 this.virtualService = new ArrayList<VirtualServiceDetail>(); 3452 this.virtualService.add(t); 3453 return t; 3454 } 3455 3456 public Appointment addVirtualService(VirtualServiceDetail t) { //3 3457 if (t == null) 3458 return this; 3459 if (this.virtualService == null) 3460 this.virtualService = new ArrayList<VirtualServiceDetail>(); 3461 this.virtualService.add(t); 3462 return this; 3463 } 3464 3465 /** 3466 * @return The first repetition of repeating field {@link #virtualService}, creating it if it does not already exist {3} 3467 */ 3468 public VirtualServiceDetail getVirtualServiceFirstRep() { 3469 if (getVirtualService().isEmpty()) { 3470 addVirtualService(); 3471 } 3472 return getVirtualService().get(0); 3473 } 3474 3475 /** 3476 * @return {@link #supportingInformation} (Additional information to support the appointment provided when making the appointment.) 3477 */ 3478 public List<Reference> getSupportingInformation() { 3479 if (this.supportingInformation == null) 3480 this.supportingInformation = new ArrayList<Reference>(); 3481 return this.supportingInformation; 3482 } 3483 3484 /** 3485 * @return Returns a reference to <code>this</code> for easy method chaining 3486 */ 3487 public Appointment setSupportingInformation(List<Reference> theSupportingInformation) { 3488 this.supportingInformation = theSupportingInformation; 3489 return this; 3490 } 3491 3492 public boolean hasSupportingInformation() { 3493 if (this.supportingInformation == null) 3494 return false; 3495 for (Reference item : this.supportingInformation) 3496 if (!item.isEmpty()) 3497 return true; 3498 return false; 3499 } 3500 3501 public Reference addSupportingInformation() { //3 3502 Reference t = new Reference(); 3503 if (this.supportingInformation == null) 3504 this.supportingInformation = new ArrayList<Reference>(); 3505 this.supportingInformation.add(t); 3506 return t; 3507 } 3508 3509 public Appointment addSupportingInformation(Reference t) { //3 3510 if (t == null) 3511 return this; 3512 if (this.supportingInformation == null) 3513 this.supportingInformation = new ArrayList<Reference>(); 3514 this.supportingInformation.add(t); 3515 return this; 3516 } 3517 3518 /** 3519 * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3} 3520 */ 3521 public Reference getSupportingInformationFirstRep() { 3522 if (getSupportingInformation().isEmpty()) { 3523 addSupportingInformation(); 3524 } 3525 return getSupportingInformation().get(0); 3526 } 3527 3528 /** 3529 * @return {@link #previousAppointment} (The previous appointment in a series of related appointments.) 3530 */ 3531 public Reference getPreviousAppointment() { 3532 if (this.previousAppointment == null) 3533 if (Configuration.errorOnAutoCreate()) 3534 throw new Error("Attempt to auto-create Appointment.previousAppointment"); 3535 else if (Configuration.doAutoCreate()) 3536 this.previousAppointment = new Reference(); // cc 3537 return this.previousAppointment; 3538 } 3539 3540 public boolean hasPreviousAppointment() { 3541 return this.previousAppointment != null && !this.previousAppointment.isEmpty(); 3542 } 3543 3544 /** 3545 * @param value {@link #previousAppointment} (The previous appointment in a series of related appointments.) 3546 */ 3547 public Appointment setPreviousAppointment(Reference value) { 3548 this.previousAppointment = value; 3549 return this; 3550 } 3551 3552 /** 3553 * @return {@link #originatingAppointment} (The originating appointment in a recurring set of related appointments.) 3554 */ 3555 public Reference getOriginatingAppointment() { 3556 if (this.originatingAppointment == null) 3557 if (Configuration.errorOnAutoCreate()) 3558 throw new Error("Attempt to auto-create Appointment.originatingAppointment"); 3559 else if (Configuration.doAutoCreate()) 3560 this.originatingAppointment = new Reference(); // cc 3561 return this.originatingAppointment; 3562 } 3563 3564 public boolean hasOriginatingAppointment() { 3565 return this.originatingAppointment != null && !this.originatingAppointment.isEmpty(); 3566 } 3567 3568 /** 3569 * @param value {@link #originatingAppointment} (The originating appointment in a recurring set of related appointments.) 3570 */ 3571 public Appointment setOriginatingAppointment(Reference value) { 3572 this.originatingAppointment = value; 3573 return this; 3574 } 3575 3576 /** 3577 * @return {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value 3578 */ 3579 public InstantType getStartElement() { 3580 if (this.start == null) 3581 if (Configuration.errorOnAutoCreate()) 3582 throw new Error("Attempt to auto-create Appointment.start"); 3583 else if (Configuration.doAutoCreate()) 3584 this.start = new InstantType(); // bb 3585 return this.start; 3586 } 3587 3588 public boolean hasStartElement() { 3589 return this.start != null && !this.start.isEmpty(); 3590 } 3591 3592 public boolean hasStart() { 3593 return this.start != null && !this.start.isEmpty(); 3594 } 3595 3596 /** 3597 * @param value {@link #start} (Date/Time that the appointment is to take place.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value 3598 */ 3599 public Appointment setStartElement(InstantType value) { 3600 this.start = value; 3601 return this; 3602 } 3603 3604 /** 3605 * @return Date/Time that the appointment is to take place. 3606 */ 3607 public Date getStart() { 3608 return this.start == null ? null : this.start.getValue(); 3609 } 3610 3611 /** 3612 * @param value Date/Time that the appointment is to take place. 3613 */ 3614 public Appointment setStart(Date value) { 3615 if (value == null) 3616 this.start = null; 3617 else { 3618 if (this.start == null) 3619 this.start = new InstantType(); 3620 this.start.setValue(value); 3621 } 3622 return this; 3623 } 3624 3625 /** 3626 * @return {@link #end} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value 3627 */ 3628 public InstantType getEndElement() { 3629 if (this.end == null) 3630 if (Configuration.errorOnAutoCreate()) 3631 throw new Error("Attempt to auto-create Appointment.end"); 3632 else if (Configuration.doAutoCreate()) 3633 this.end = new InstantType(); // bb 3634 return this.end; 3635 } 3636 3637 public boolean hasEndElement() { 3638 return this.end != null && !this.end.isEmpty(); 3639 } 3640 3641 public boolean hasEnd() { 3642 return this.end != null && !this.end.isEmpty(); 3643 } 3644 3645 /** 3646 * @param value {@link #end} (Date/Time that the appointment is to conclude.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value 3647 */ 3648 public Appointment setEndElement(InstantType value) { 3649 this.end = value; 3650 return this; 3651 } 3652 3653 /** 3654 * @return Date/Time that the appointment is to conclude. 3655 */ 3656 public Date getEnd() { 3657 return this.end == null ? null : this.end.getValue(); 3658 } 3659 3660 /** 3661 * @param value Date/Time that the appointment is to conclude. 3662 */ 3663 public Appointment setEnd(Date value) { 3664 if (value == null) 3665 this.end = null; 3666 else { 3667 if (this.end == null) 3668 this.end = new InstantType(); 3669 this.end.setValue(value); 3670 } 3671 return this; 3672 } 3673 3674 /** 3675 * @return {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value 3676 */ 3677 public PositiveIntType getMinutesDurationElement() { 3678 if (this.minutesDuration == null) 3679 if (Configuration.errorOnAutoCreate()) 3680 throw new Error("Attempt to auto-create Appointment.minutesDuration"); 3681 else if (Configuration.doAutoCreate()) 3682 this.minutesDuration = new PositiveIntType(); // bb 3683 return this.minutesDuration; 3684 } 3685 3686 public boolean hasMinutesDurationElement() { 3687 return this.minutesDuration != null && !this.minutesDuration.isEmpty(); 3688 } 3689 3690 public boolean hasMinutesDuration() { 3691 return this.minutesDuration != null && !this.minutesDuration.isEmpty(); 3692 } 3693 3694 /** 3695 * @param value {@link #minutesDuration} (Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.). This is the underlying object with id, value and extensions. The accessor "getMinutesDuration" gives direct access to the value 3696 */ 3697 public Appointment setMinutesDurationElement(PositiveIntType value) { 3698 this.minutesDuration = value; 3699 return this; 3700 } 3701 3702 /** 3703 * @return Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. 3704 */ 3705 public int getMinutesDuration() { 3706 return this.minutesDuration == null || this.minutesDuration.isEmpty() ? 0 : this.minutesDuration.getValue(); 3707 } 3708 3709 /** 3710 * @param value Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end. 3711 */ 3712 public Appointment setMinutesDuration(int value) { 3713 if (this.minutesDuration == null) 3714 this.minutesDuration = new PositiveIntType(); 3715 this.minutesDuration.setValue(value); 3716 return this; 3717 } 3718 3719 /** 3720 * @return {@link #slot} (The slots from the participants' schedules that will be filled by the appointment.) 3721 */ 3722 public List<Reference> getSlot() { 3723 if (this.slot == null) 3724 this.slot = new ArrayList<Reference>(); 3725 return this.slot; 3726 } 3727 3728 /** 3729 * @return Returns a reference to <code>this</code> for easy method chaining 3730 */ 3731 public Appointment setSlot(List<Reference> theSlot) { 3732 this.slot = theSlot; 3733 return this; 3734 } 3735 3736 public boolean hasSlot() { 3737 if (this.slot == null) 3738 return false; 3739 for (Reference item : this.slot) 3740 if (!item.isEmpty()) 3741 return true; 3742 return false; 3743 } 3744 3745 public Reference addSlot() { //3 3746 Reference t = new Reference(); 3747 if (this.slot == null) 3748 this.slot = new ArrayList<Reference>(); 3749 this.slot.add(t); 3750 return t; 3751 } 3752 3753 public Appointment addSlot(Reference t) { //3 3754 if (t == null) 3755 return this; 3756 if (this.slot == null) 3757 this.slot = new ArrayList<Reference>(); 3758 this.slot.add(t); 3759 return this; 3760 } 3761 3762 /** 3763 * @return The first repetition of repeating field {@link #slot}, creating it if it does not already exist {3} 3764 */ 3765 public Reference getSlotFirstRep() { 3766 if (getSlot().isEmpty()) { 3767 addSlot(); 3768 } 3769 return getSlot().get(0); 3770 } 3771 3772 /** 3773 * @return {@link #account} (The set of accounts that is expected to be used for billing the activities that result from this Appointment.) 3774 */ 3775 public List<Reference> getAccount() { 3776 if (this.account == null) 3777 this.account = new ArrayList<Reference>(); 3778 return this.account; 3779 } 3780 3781 /** 3782 * @return Returns a reference to <code>this</code> for easy method chaining 3783 */ 3784 public Appointment setAccount(List<Reference> theAccount) { 3785 this.account = theAccount; 3786 return this; 3787 } 3788 3789 public boolean hasAccount() { 3790 if (this.account == null) 3791 return false; 3792 for (Reference item : this.account) 3793 if (!item.isEmpty()) 3794 return true; 3795 return false; 3796 } 3797 3798 public Reference addAccount() { //3 3799 Reference t = new Reference(); 3800 if (this.account == null) 3801 this.account = new ArrayList<Reference>(); 3802 this.account.add(t); 3803 return t; 3804 } 3805 3806 public Appointment addAccount(Reference t) { //3 3807 if (t == null) 3808 return this; 3809 if (this.account == null) 3810 this.account = new ArrayList<Reference>(); 3811 this.account.add(t); 3812 return this; 3813 } 3814 3815 /** 3816 * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3} 3817 */ 3818 public Reference getAccountFirstRep() { 3819 if (getAccount().isEmpty()) { 3820 addAccount(); 3821 } 3822 return getAccount().get(0); 3823 } 3824 3825 /** 3826 * @return {@link #created} (The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 3827 */ 3828 public DateTimeType getCreatedElement() { 3829 if (this.created == null) 3830 if (Configuration.errorOnAutoCreate()) 3831 throw new Error("Attempt to auto-create Appointment.created"); 3832 else if (Configuration.doAutoCreate()) 3833 this.created = new DateTimeType(); // bb 3834 return this.created; 3835 } 3836 3837 public boolean hasCreatedElement() { 3838 return this.created != null && !this.created.isEmpty(); 3839 } 3840 3841 public boolean hasCreated() { 3842 return this.created != null && !this.created.isEmpty(); 3843 } 3844 3845 /** 3846 * @param value {@link #created} (The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 3847 */ 3848 public Appointment setCreatedElement(DateTimeType value) { 3849 this.created = value; 3850 return this; 3851 } 3852 3853 /** 3854 * @return The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment. 3855 */ 3856 public Date getCreated() { 3857 return this.created == null ? null : this.created.getValue(); 3858 } 3859 3860 /** 3861 * @param value The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment. 3862 */ 3863 public Appointment setCreated(Date value) { 3864 if (value == null) 3865 this.created = null; 3866 else { 3867 if (this.created == null) 3868 this.created = new DateTimeType(); 3869 this.created.setValue(value); 3870 } 3871 return this; 3872 } 3873 3874 /** 3875 * @return {@link #note} (Additional notes/comments about the appointment.) 3876 */ 3877 public List<Annotation> getNote() { 3878 if (this.note == null) 3879 this.note = new ArrayList<Annotation>(); 3880 return this.note; 3881 } 3882 3883 /** 3884 * @return Returns a reference to <code>this</code> for easy method chaining 3885 */ 3886 public Appointment setNote(List<Annotation> theNote) { 3887 this.note = theNote; 3888 return this; 3889 } 3890 3891 public boolean hasNote() { 3892 if (this.note == null) 3893 return false; 3894 for (Annotation item : this.note) 3895 if (!item.isEmpty()) 3896 return true; 3897 return false; 3898 } 3899 3900 public Annotation addNote() { //3 3901 Annotation t = new Annotation(); 3902 if (this.note == null) 3903 this.note = new ArrayList<Annotation>(); 3904 this.note.add(t); 3905 return t; 3906 } 3907 3908 public Appointment addNote(Annotation t) { //3 3909 if (t == null) 3910 return this; 3911 if (this.note == null) 3912 this.note = new ArrayList<Annotation>(); 3913 this.note.add(t); 3914 return this; 3915 } 3916 3917 /** 3918 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 3919 */ 3920 public Annotation getNoteFirstRep() { 3921 if (getNote().isEmpty()) { 3922 addNote(); 3923 } 3924 return getNote().get(0); 3925 } 3926 3927 /** 3928 * @return {@link #patientInstruction} (While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).) 3929 */ 3930 public List<CodeableReference> getPatientInstruction() { 3931 if (this.patientInstruction == null) 3932 this.patientInstruction = new ArrayList<CodeableReference>(); 3933 return this.patientInstruction; 3934 } 3935 3936 /** 3937 * @return Returns a reference to <code>this</code> for easy method chaining 3938 */ 3939 public Appointment setPatientInstruction(List<CodeableReference> thePatientInstruction) { 3940 this.patientInstruction = thePatientInstruction; 3941 return this; 3942 } 3943 3944 public boolean hasPatientInstruction() { 3945 if (this.patientInstruction == null) 3946 return false; 3947 for (CodeableReference item : this.patientInstruction) 3948 if (!item.isEmpty()) 3949 return true; 3950 return false; 3951 } 3952 3953 public CodeableReference addPatientInstruction() { //3 3954 CodeableReference t = new CodeableReference(); 3955 if (this.patientInstruction == null) 3956 this.patientInstruction = new ArrayList<CodeableReference>(); 3957 this.patientInstruction.add(t); 3958 return t; 3959 } 3960 3961 public Appointment addPatientInstruction(CodeableReference t) { //3 3962 if (t == null) 3963 return this; 3964 if (this.patientInstruction == null) 3965 this.patientInstruction = new ArrayList<CodeableReference>(); 3966 this.patientInstruction.add(t); 3967 return this; 3968 } 3969 3970 /** 3971 * @return The first repetition of repeating field {@link #patientInstruction}, creating it if it does not already exist {3} 3972 */ 3973 public CodeableReference getPatientInstructionFirstRep() { 3974 if (getPatientInstruction().isEmpty()) { 3975 addPatientInstruction(); 3976 } 3977 return getPatientInstruction().get(0); 3978 } 3979 3980 /** 3981 * @return {@link #basedOn} (The request this appointment is allocated to assess (e.g. incoming referral or procedure request).) 3982 */ 3983 public List<Reference> getBasedOn() { 3984 if (this.basedOn == null) 3985 this.basedOn = new ArrayList<Reference>(); 3986 return this.basedOn; 3987 } 3988 3989 /** 3990 * @return Returns a reference to <code>this</code> for easy method chaining 3991 */ 3992 public Appointment setBasedOn(List<Reference> theBasedOn) { 3993 this.basedOn = theBasedOn; 3994 return this; 3995 } 3996 3997 public boolean hasBasedOn() { 3998 if (this.basedOn == null) 3999 return false; 4000 for (Reference item : this.basedOn) 4001 if (!item.isEmpty()) 4002 return true; 4003 return false; 4004 } 4005 4006 public Reference addBasedOn() { //3 4007 Reference t = new Reference(); 4008 if (this.basedOn == null) 4009 this.basedOn = new ArrayList<Reference>(); 4010 this.basedOn.add(t); 4011 return t; 4012 } 4013 4014 public Appointment addBasedOn(Reference t) { //3 4015 if (t == null) 4016 return this; 4017 if (this.basedOn == null) 4018 this.basedOn = new ArrayList<Reference>(); 4019 this.basedOn.add(t); 4020 return this; 4021 } 4022 4023 /** 4024 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} 4025 */ 4026 public Reference getBasedOnFirstRep() { 4027 if (getBasedOn().isEmpty()) { 4028 addBasedOn(); 4029 } 4030 return getBasedOn().get(0); 4031 } 4032 4033 /** 4034 * @return {@link #subject} (The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.) 4035 */ 4036 public Reference getSubject() { 4037 if (this.subject == null) 4038 if (Configuration.errorOnAutoCreate()) 4039 throw new Error("Attempt to auto-create Appointment.subject"); 4040 else if (Configuration.doAutoCreate()) 4041 this.subject = new Reference(); // cc 4042 return this.subject; 4043 } 4044 4045 public boolean hasSubject() { 4046 return this.subject != null && !this.subject.isEmpty(); 4047 } 4048 4049 /** 4050 * @param value {@link #subject} (The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.) 4051 */ 4052 public Appointment setSubject(Reference value) { 4053 this.subject = value; 4054 return this; 4055 } 4056 4057 /** 4058 * @return {@link #participant} (List of participants involved in the appointment.) 4059 */ 4060 public List<AppointmentParticipantComponent> getParticipant() { 4061 if (this.participant == null) 4062 this.participant = new ArrayList<AppointmentParticipantComponent>(); 4063 return this.participant; 4064 } 4065 4066 /** 4067 * @return Returns a reference to <code>this</code> for easy method chaining 4068 */ 4069 public Appointment setParticipant(List<AppointmentParticipantComponent> theParticipant) { 4070 this.participant = theParticipant; 4071 return this; 4072 } 4073 4074 public boolean hasParticipant() { 4075 if (this.participant == null) 4076 return false; 4077 for (AppointmentParticipantComponent item : this.participant) 4078 if (!item.isEmpty()) 4079 return true; 4080 return false; 4081 } 4082 4083 public AppointmentParticipantComponent addParticipant() { //3 4084 AppointmentParticipantComponent t = new AppointmentParticipantComponent(); 4085 if (this.participant == null) 4086 this.participant = new ArrayList<AppointmentParticipantComponent>(); 4087 this.participant.add(t); 4088 return t; 4089 } 4090 4091 public Appointment addParticipant(AppointmentParticipantComponent t) { //3 4092 if (t == null) 4093 return this; 4094 if (this.participant == null) 4095 this.participant = new ArrayList<AppointmentParticipantComponent>(); 4096 this.participant.add(t); 4097 return this; 4098 } 4099 4100 /** 4101 * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3} 4102 */ 4103 public AppointmentParticipantComponent getParticipantFirstRep() { 4104 if (getParticipant().isEmpty()) { 4105 addParticipant(); 4106 } 4107 return getParticipant().get(0); 4108 } 4109 4110 /** 4111 * @return {@link #requestedPeriod} (A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within. 4112 4113The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.) 4114 */ 4115 public List<Period> getRequestedPeriod() { 4116 if (this.requestedPeriod == null) 4117 this.requestedPeriod = new ArrayList<Period>(); 4118 return this.requestedPeriod; 4119 } 4120 4121 /** 4122 * @return Returns a reference to <code>this</code> for easy method chaining 4123 */ 4124 public Appointment setRequestedPeriod(List<Period> theRequestedPeriod) { 4125 this.requestedPeriod = theRequestedPeriod; 4126 return this; 4127 } 4128 4129 public boolean hasRequestedPeriod() { 4130 if (this.requestedPeriod == null) 4131 return false; 4132 for (Period item : this.requestedPeriod) 4133 if (!item.isEmpty()) 4134 return true; 4135 return false; 4136 } 4137 4138 public Period addRequestedPeriod() { //3 4139 Period t = new Period(); 4140 if (this.requestedPeriod == null) 4141 this.requestedPeriod = new ArrayList<Period>(); 4142 this.requestedPeriod.add(t); 4143 return t; 4144 } 4145 4146 public Appointment addRequestedPeriod(Period t) { //3 4147 if (t == null) 4148 return this; 4149 if (this.requestedPeriod == null) 4150 this.requestedPeriod = new ArrayList<Period>(); 4151 this.requestedPeriod.add(t); 4152 return this; 4153 } 4154 4155 /** 4156 * @return The first repetition of repeating field {@link #requestedPeriod}, creating it if it does not already exist {3} 4157 */ 4158 public Period getRequestedPeriodFirstRep() { 4159 if (getRequestedPeriod().isEmpty()) { 4160 addRequestedPeriod(); 4161 } 4162 return getRequestedPeriod().get(0); 4163 } 4164 4165 /** 4166 * @return {@link #recurrenceId} (The sequence number that identifies a specific appointment in a recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getRecurrenceId" gives direct access to the value 4167 */ 4168 public PositiveIntType getRecurrenceIdElement() { 4169 if (this.recurrenceId == null) 4170 if (Configuration.errorOnAutoCreate()) 4171 throw new Error("Attempt to auto-create Appointment.recurrenceId"); 4172 else if (Configuration.doAutoCreate()) 4173 this.recurrenceId = new PositiveIntType(); // bb 4174 return this.recurrenceId; 4175 } 4176 4177 public boolean hasRecurrenceIdElement() { 4178 return this.recurrenceId != null && !this.recurrenceId.isEmpty(); 4179 } 4180 4181 public boolean hasRecurrenceId() { 4182 return this.recurrenceId != null && !this.recurrenceId.isEmpty(); 4183 } 4184 4185 /** 4186 * @param value {@link #recurrenceId} (The sequence number that identifies a specific appointment in a recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getRecurrenceId" gives direct access to the value 4187 */ 4188 public Appointment setRecurrenceIdElement(PositiveIntType value) { 4189 this.recurrenceId = value; 4190 return this; 4191 } 4192 4193 /** 4194 * @return The sequence number that identifies a specific appointment in a recurring pattern. 4195 */ 4196 public int getRecurrenceId() { 4197 return this.recurrenceId == null || this.recurrenceId.isEmpty() ? 0 : this.recurrenceId.getValue(); 4198 } 4199 4200 /** 4201 * @param value The sequence number that identifies a specific appointment in a recurring pattern. 4202 */ 4203 public Appointment setRecurrenceId(int value) { 4204 if (this.recurrenceId == null) 4205 this.recurrenceId = new PositiveIntType(); 4206 this.recurrenceId.setValue(value); 4207 return this; 4208 } 4209 4210 /** 4211 * @return {@link #occurrenceChanged} (This appointment varies from the recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceChanged" gives direct access to the value 4212 */ 4213 public BooleanType getOccurrenceChangedElement() { 4214 if (this.occurrenceChanged == null) 4215 if (Configuration.errorOnAutoCreate()) 4216 throw new Error("Attempt to auto-create Appointment.occurrenceChanged"); 4217 else if (Configuration.doAutoCreate()) 4218 this.occurrenceChanged = new BooleanType(); // bb 4219 return this.occurrenceChanged; 4220 } 4221 4222 public boolean hasOccurrenceChangedElement() { 4223 return this.occurrenceChanged != null && !this.occurrenceChanged.isEmpty(); 4224 } 4225 4226 public boolean hasOccurrenceChanged() { 4227 return this.occurrenceChanged != null && !this.occurrenceChanged.isEmpty(); 4228 } 4229 4230 /** 4231 * @param value {@link #occurrenceChanged} (This appointment varies from the recurring pattern.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceChanged" gives direct access to the value 4232 */ 4233 public Appointment setOccurrenceChangedElement(BooleanType value) { 4234 this.occurrenceChanged = value; 4235 return this; 4236 } 4237 4238 /** 4239 * @return This appointment varies from the recurring pattern. 4240 */ 4241 public boolean getOccurrenceChanged() { 4242 return this.occurrenceChanged == null || this.occurrenceChanged.isEmpty() ? false : this.occurrenceChanged.getValue(); 4243 } 4244 4245 /** 4246 * @param value This appointment varies from the recurring pattern. 4247 */ 4248 public Appointment setOccurrenceChanged(boolean value) { 4249 if (this.occurrenceChanged == null) 4250 this.occurrenceChanged = new BooleanType(); 4251 this.occurrenceChanged.setValue(value); 4252 return this; 4253 } 4254 4255 /** 4256 * @return {@link #recurrenceTemplate} (The details of the recurrence pattern or template that is used to generate recurring appointments.) 4257 */ 4258 public List<AppointmentRecurrenceTemplateComponent> getRecurrenceTemplate() { 4259 if (this.recurrenceTemplate == null) 4260 this.recurrenceTemplate = new ArrayList<AppointmentRecurrenceTemplateComponent>(); 4261 return this.recurrenceTemplate; 4262 } 4263 4264 /** 4265 * @return Returns a reference to <code>this</code> for easy method chaining 4266 */ 4267 public Appointment setRecurrenceTemplate(List<AppointmentRecurrenceTemplateComponent> theRecurrenceTemplate) { 4268 this.recurrenceTemplate = theRecurrenceTemplate; 4269 return this; 4270 } 4271 4272 public boolean hasRecurrenceTemplate() { 4273 if (this.recurrenceTemplate == null) 4274 return false; 4275 for (AppointmentRecurrenceTemplateComponent item : this.recurrenceTemplate) 4276 if (!item.isEmpty()) 4277 return true; 4278 return false; 4279 } 4280 4281 public AppointmentRecurrenceTemplateComponent addRecurrenceTemplate() { //3 4282 AppointmentRecurrenceTemplateComponent t = new AppointmentRecurrenceTemplateComponent(); 4283 if (this.recurrenceTemplate == null) 4284 this.recurrenceTemplate = new ArrayList<AppointmentRecurrenceTemplateComponent>(); 4285 this.recurrenceTemplate.add(t); 4286 return t; 4287 } 4288 4289 public Appointment addRecurrenceTemplate(AppointmentRecurrenceTemplateComponent t) { //3 4290 if (t == null) 4291 return this; 4292 if (this.recurrenceTemplate == null) 4293 this.recurrenceTemplate = new ArrayList<AppointmentRecurrenceTemplateComponent>(); 4294 this.recurrenceTemplate.add(t); 4295 return this; 4296 } 4297 4298 /** 4299 * @return The first repetition of repeating field {@link #recurrenceTemplate}, creating it if it does not already exist {3} 4300 */ 4301 public AppointmentRecurrenceTemplateComponent getRecurrenceTemplateFirstRep() { 4302 if (getRecurrenceTemplate().isEmpty()) { 4303 addRecurrenceTemplate(); 4304 } 4305 return getRecurrenceTemplate().get(0); 4306 } 4307 4308 protected void listChildren(List<Property> children) { 4309 super.listChildren(children); 4310 children.add(new Property("identifier", "Identifier", "This records identifiers associated with this appointment 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 (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); 4311 children.add(new Property("status", "code", "The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.", 0, 1, status)); 4312 children.add(new Property("cancellationReason", "CodeableConcept", "The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", 0, 1, cancellationReason)); 4313 children.add(new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_)); 4314 children.add(new Property("serviceCategory", "CodeableConcept", "A broad categorization of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); 4315 children.add(new Property("serviceType", "CodeableReference(HealthcareService)", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType)); 4316 children.add(new Property("specialty", "CodeableConcept", "The specialty of a practitioner that would be required to perform the service requested in this appointment.", 0, java.lang.Integer.MAX_VALUE, specialty)); 4317 children.add(new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, 1, appointmentType)); 4318 children.add(new Property("reason", "CodeableReference(Condition|Procedure|Observation|ImmunizationRecommendation)", "The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, reason)); 4319 children.add(new Property("priority", "CodeableConcept", "The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).", 0, 1, priority)); 4320 children.add(new Property("description", "string", "The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.", 0, 1, description)); 4321 children.add(new Property("replaces", "Reference(Appointment)", "Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).", 0, java.lang.Integer.MAX_VALUE, replaces)); 4322 children.add(new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService)); 4323 children.add(new Property("supportingInformation", "Reference(Any)", "Additional information to support the appointment provided when making the appointment.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); 4324 children.add(new Property("previousAppointment", "Reference(Appointment)", "The previous appointment in a series of related appointments.", 0, 1, previousAppointment)); 4325 children.add(new Property("originatingAppointment", "Reference(Appointment)", "The originating appointment in a recurring set of related appointments.", 0, 1, originatingAppointment)); 4326 children.add(new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, 1, start)); 4327 children.add(new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, 1, end)); 4328 children.add(new Property("minutesDuration", "positiveInt", "Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", 0, 1, minutesDuration)); 4329 children.add(new Property("slot", "Reference(Slot)", "The slots from the participants' schedules that will be filled by the appointment.", 0, java.lang.Integer.MAX_VALUE, slot)); 4330 children.add(new Property("account", "Reference(Account)", "The set of accounts that is expected to be used for billing the activities that result from this Appointment.", 0, java.lang.Integer.MAX_VALUE, account)); 4331 children.add(new Property("created", "dateTime", "The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.", 0, 1, created)); 4332 children.add(new Property("note", "Annotation", "Additional notes/comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, note)); 4333 children.add(new Property("patientInstruction", "CodeableReference(DocumentReference|Binary|Communication)", "While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", 0, java.lang.Integer.MAX_VALUE, patientInstruction)); 4334 children.add(new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this appointment is allocated to assess (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn)); 4335 children.add(new Property("subject", "Reference(Patient|Group)", "The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.", 0, 1, subject)); 4336 children.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant)); 4337 children.add(new Property("requestedPeriod", "Period", "A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", 0, java.lang.Integer.MAX_VALUE, requestedPeriod)); 4338 children.add(new Property("recurrenceId", "positiveInt", "The sequence number that identifies a specific appointment in a recurring pattern.", 0, 1, recurrenceId)); 4339 children.add(new Property("occurrenceChanged", "boolean", "This appointment varies from the recurring pattern.", 0, 1, occurrenceChanged)); 4340 children.add(new Property("recurrenceTemplate", "", "The details of the recurrence pattern or template that is used to generate recurring appointments.", 0, java.lang.Integer.MAX_VALUE, recurrenceTemplate)); 4341 } 4342 4343 @Override 4344 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4345 switch (_hash) { 4346 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "This records identifiers associated with this appointment 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 (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier); 4347 case -892481550: /*status*/ return new Property("status", "code", "The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.", 0, 1, status); 4348 case 2135095591: /*cancellationReason*/ return new Property("cancellationReason", "CodeableConcept", "The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply.", 0, 1, cancellationReason); 4349 case 94742904: /*class*/ return new Property("class", "CodeableConcept", "Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations.", 0, java.lang.Integer.MAX_VALUE, class_); 4350 case 1281188563: /*serviceCategory*/ return new Property("serviceCategory", "CodeableConcept", "A broad categorization of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory); 4351 case -1928370289: /*serviceType*/ return new Property("serviceType", "CodeableReference(HealthcareService)", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType); 4352 case -1694759682: /*specialty*/ return new Property("specialty", "CodeableConcept", "The specialty of a practitioner that would be required to perform the service requested in this appointment.", 0, java.lang.Integer.MAX_VALUE, specialty); 4353 case -1596426375: /*appointmentType*/ return new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, 1, appointmentType); 4354 case -934964668: /*reason*/ return new Property("reason", "CodeableReference(Condition|Procedure|Observation|ImmunizationRecommendation)", "The reason that this appointment is being scheduled. This is more clinical than administrative. This can be coded, or as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.", 0, java.lang.Integer.MAX_VALUE, reason); 4355 case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).", 0, 1, priority); 4356 case -1724546052: /*description*/ return new Property("description", "string", "The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.", 0, 1, description); 4357 case -430332865: /*replaces*/ return new Property("replaces", "Reference(Appointment)", "Appointment replaced by this Appointment in cases where there is a cancellation, the details of the cancellation can be found in the cancellationReason property (on the referenced resource).", 0, java.lang.Integer.MAX_VALUE, replaces); 4358 case 1420774698: /*virtualService*/ return new Property("virtualService", "VirtualServiceDetail", "Connection details of a virtual service (e.g. conference call).", 0, java.lang.Integer.MAX_VALUE, virtualService); 4359 case -1248768647: /*supportingInformation*/ return new Property("supportingInformation", "Reference(Any)", "Additional information to support the appointment provided when making the appointment.", 0, java.lang.Integer.MAX_VALUE, supportingInformation); 4360 case -1676044248: /*previousAppointment*/ return new Property("previousAppointment", "Reference(Appointment)", "The previous appointment in a series of related appointments.", 0, 1, previousAppointment); 4361 case 1841882230: /*originatingAppointment*/ return new Property("originatingAppointment", "Reference(Appointment)", "The originating appointment in a recurring set of related appointments.", 0, 1, originatingAppointment); 4362 case 109757538: /*start*/ return new Property("start", "instant", "Date/Time that the appointment is to take place.", 0, 1, start); 4363 case 100571: /*end*/ return new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, 1, end); 4364 case -413630573: /*minutesDuration*/ return new Property("minutesDuration", "positiveInt", "Number of minutes that the appointment is to take. This can be less than the duration between the start and end times. For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work. Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.", 0, 1, minutesDuration); 4365 case 3533310: /*slot*/ return new Property("slot", "Reference(Slot)", "The slots from the participants' schedules that will be filled by the appointment.", 0, java.lang.Integer.MAX_VALUE, slot); 4366 case -1177318867: /*account*/ return new Property("account", "Reference(Account)", "The set of accounts that is expected to be used for billing the activities that result from this Appointment.", 0, java.lang.Integer.MAX_VALUE, account); 4367 case 1028554472: /*created*/ return new Property("created", "dateTime", "The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.", 0, 1, created); 4368 case 3387378: /*note*/ return new Property("note", "Annotation", "Additional notes/comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, note); 4369 case 737543241: /*patientInstruction*/ return new Property("patientInstruction", "CodeableReference(DocumentReference|Binary|Communication)", "While Appointment.note contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).", 0, java.lang.Integer.MAX_VALUE, patientInstruction); 4370 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|DeviceRequest|MedicationRequest|ServiceRequest)", "The request this appointment is allocated to assess (e.g. incoming referral or procedure request).", 0, java.lang.Integer.MAX_VALUE, basedOn); 4371 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The patient or group associated with the appointment, if they are to be present (usually) then they should also be included in the participant backbone element.", 0, 1, subject); 4372 case 767422259: /*participant*/ return new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant); 4373 case -897241393: /*requestedPeriod*/ return new Property("requestedPeriod", "Period", "A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.\n\nThe duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system.", 0, java.lang.Integer.MAX_VALUE, requestedPeriod); 4374 case -362407829: /*recurrenceId*/ return new Property("recurrenceId", "positiveInt", "The sequence number that identifies a specific appointment in a recurring pattern.", 0, 1, recurrenceId); 4375 case 1779864483: /*occurrenceChanged*/ return new Property("occurrenceChanged", "boolean", "This appointment varies from the recurring pattern.", 0, 1, occurrenceChanged); 4376 case 597629898: /*recurrenceTemplate*/ return new Property("recurrenceTemplate", "", "The details of the recurrence pattern or template that is used to generate recurring appointments.", 0, java.lang.Integer.MAX_VALUE, recurrenceTemplate); 4377 default: return super.getNamedProperty(_hash, _name, _checkValid); 4378 } 4379 4380 } 4381 4382 @Override 4383 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4384 switch (hash) { 4385 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4386 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<AppointmentStatus> 4387 case 2135095591: /*cancellationReason*/ return this.cancellationReason == null ? new Base[0] : new Base[] {this.cancellationReason}; // CodeableConcept 4388 case 94742904: /*class*/ return this.class_ == null ? new Base[0] : this.class_.toArray(new Base[this.class_.size()]); // CodeableConcept 4389 case 1281188563: /*serviceCategory*/ return this.serviceCategory == null ? new Base[0] : this.serviceCategory.toArray(new Base[this.serviceCategory.size()]); // CodeableConcept 4390 case -1928370289: /*serviceType*/ return this.serviceType == null ? new Base[0] : this.serviceType.toArray(new Base[this.serviceType.size()]); // CodeableReference 4391 case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept 4392 case -1596426375: /*appointmentType*/ return this.appointmentType == null ? new Base[0] : new Base[] {this.appointmentType}; // CodeableConcept 4393 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference 4394 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept 4395 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 4396 case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference 4397 case 1420774698: /*virtualService*/ return this.virtualService == null ? new Base[0] : this.virtualService.toArray(new Base[this.virtualService.size()]); // VirtualServiceDetail 4398 case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference 4399 case -1676044248: /*previousAppointment*/ return this.previousAppointment == null ? new Base[0] : new Base[] {this.previousAppointment}; // Reference 4400 case 1841882230: /*originatingAppointment*/ return this.originatingAppointment == null ? new Base[0] : new Base[] {this.originatingAppointment}; // Reference 4401 case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // InstantType 4402 case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType 4403 case -413630573: /*minutesDuration*/ return this.minutesDuration == null ? new Base[0] : new Base[] {this.minutesDuration}; // PositiveIntType 4404 case 3533310: /*slot*/ return this.slot == null ? new Base[0] : this.slot.toArray(new Base[this.slot.size()]); // Reference 4405 case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference 4406 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 4407 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 4408 case 737543241: /*patientInstruction*/ return this.patientInstruction == null ? new Base[0] : this.patientInstruction.toArray(new Base[this.patientInstruction.size()]); // CodeableReference 4409 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 4410 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 4411 case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // AppointmentParticipantComponent 4412 case -897241393: /*requestedPeriod*/ return this.requestedPeriod == null ? new Base[0] : this.requestedPeriod.toArray(new Base[this.requestedPeriod.size()]); // Period 4413 case -362407829: /*recurrenceId*/ return this.recurrenceId == null ? new Base[0] : new Base[] {this.recurrenceId}; // PositiveIntType 4414 case 1779864483: /*occurrenceChanged*/ return this.occurrenceChanged == null ? new Base[0] : new Base[] {this.occurrenceChanged}; // BooleanType 4415 case 597629898: /*recurrenceTemplate*/ return this.recurrenceTemplate == null ? new Base[0] : this.recurrenceTemplate.toArray(new Base[this.recurrenceTemplate.size()]); // AppointmentRecurrenceTemplateComponent 4416 default: return super.getProperty(hash, name, checkValid); 4417 } 4418 4419 } 4420 4421 @Override 4422 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4423 switch (hash) { 4424 case -1618432855: // identifier 4425 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 4426 return value; 4427 case -892481550: // status 4428 value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 4429 this.status = (Enumeration) value; // Enumeration<AppointmentStatus> 4430 return value; 4431 case 2135095591: // cancellationReason 4432 this.cancellationReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4433 return value; 4434 case 94742904: // class 4435 this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4436 return value; 4437 case 1281188563: // serviceCategory 4438 this.getServiceCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4439 return value; 4440 case -1928370289: // serviceType 4441 this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 4442 return value; 4443 case -1694759682: // specialty 4444 this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4445 return value; 4446 case -1596426375: // appointmentType 4447 this.appointmentType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4448 return value; 4449 case -934964668: // reason 4450 this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 4451 return value; 4452 case -1165461084: // priority 4453 this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4454 return value; 4455 case -1724546052: // description 4456 this.description = TypeConvertor.castToString(value); // StringType 4457 return value; 4458 case -430332865: // replaces 4459 this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference 4460 return value; 4461 case 1420774698: // virtualService 4462 this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); // VirtualServiceDetail 4463 return value; 4464 case -1248768647: // supportingInformation 4465 this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference 4466 return value; 4467 case -1676044248: // previousAppointment 4468 this.previousAppointment = TypeConvertor.castToReference(value); // Reference 4469 return value; 4470 case 1841882230: // originatingAppointment 4471 this.originatingAppointment = TypeConvertor.castToReference(value); // Reference 4472 return value; 4473 case 109757538: // start 4474 this.start = TypeConvertor.castToInstant(value); // InstantType 4475 return value; 4476 case 100571: // end 4477 this.end = TypeConvertor.castToInstant(value); // InstantType 4478 return value; 4479 case -413630573: // minutesDuration 4480 this.minutesDuration = TypeConvertor.castToPositiveInt(value); // PositiveIntType 4481 return value; 4482 case 3533310: // slot 4483 this.getSlot().add(TypeConvertor.castToReference(value)); // Reference 4484 return value; 4485 case -1177318867: // account 4486 this.getAccount().add(TypeConvertor.castToReference(value)); // Reference 4487 return value; 4488 case 1028554472: // created 4489 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 4490 return value; 4491 case 3387378: // note 4492 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 4493 return value; 4494 case 737543241: // patientInstruction 4495 this.getPatientInstruction().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 4496 return value; 4497 case -332612366: // basedOn 4498 this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference 4499 return value; 4500 case -1867885268: // subject 4501 this.subject = TypeConvertor.castToReference(value); // Reference 4502 return value; 4503 case 767422259: // participant 4504 this.getParticipant().add((AppointmentParticipantComponent) value); // AppointmentParticipantComponent 4505 return value; 4506 case -897241393: // requestedPeriod 4507 this.getRequestedPeriod().add(TypeConvertor.castToPeriod(value)); // Period 4508 return value; 4509 case -362407829: // recurrenceId 4510 this.recurrenceId = TypeConvertor.castToPositiveInt(value); // PositiveIntType 4511 return value; 4512 case 1779864483: // occurrenceChanged 4513 this.occurrenceChanged = TypeConvertor.castToBoolean(value); // BooleanType 4514 return value; 4515 case 597629898: // recurrenceTemplate 4516 this.getRecurrenceTemplate().add((AppointmentRecurrenceTemplateComponent) value); // AppointmentRecurrenceTemplateComponent 4517 return value; 4518 default: return super.setProperty(hash, name, value); 4519 } 4520 4521 } 4522 4523 @Override 4524 public Base setProperty(String name, Base value) throws FHIRException { 4525 if (name.equals("identifier")) { 4526 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 4527 } else if (name.equals("status")) { 4528 value = new AppointmentStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 4529 this.status = (Enumeration) value; // Enumeration<AppointmentStatus> 4530 } else if (name.equals("cancellationReason")) { 4531 this.cancellationReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4532 } else if (name.equals("class")) { 4533 this.getClass_().add(TypeConvertor.castToCodeableConcept(value)); 4534 } else if (name.equals("serviceCategory")) { 4535 this.getServiceCategory().add(TypeConvertor.castToCodeableConcept(value)); 4536 } else if (name.equals("serviceType")) { 4537 this.getServiceType().add(TypeConvertor.castToCodeableReference(value)); 4538 } else if (name.equals("specialty")) { 4539 this.getSpecialty().add(TypeConvertor.castToCodeableConcept(value)); 4540 } else if (name.equals("appointmentType")) { 4541 this.appointmentType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4542 } else if (name.equals("reason")) { 4543 this.getReason().add(TypeConvertor.castToCodeableReference(value)); 4544 } else if (name.equals("priority")) { 4545 this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4546 } else if (name.equals("description")) { 4547 this.description = TypeConvertor.castToString(value); // StringType 4548 } else if (name.equals("replaces")) { 4549 this.getReplaces().add(TypeConvertor.castToReference(value)); 4550 } else if (name.equals("virtualService")) { 4551 this.getVirtualService().add(TypeConvertor.castToVirtualServiceDetail(value)); 4552 } else if (name.equals("supportingInformation")) { 4553 this.getSupportingInformation().add(TypeConvertor.castToReference(value)); 4554 } else if (name.equals("previousAppointment")) { 4555 this.previousAppointment = TypeConvertor.castToReference(value); // Reference 4556 } else if (name.equals("originatingAppointment")) { 4557 this.originatingAppointment = TypeConvertor.castToReference(value); // Reference 4558 } else if (name.equals("start")) { 4559 this.start = TypeConvertor.castToInstant(value); // InstantType 4560 } else if (name.equals("end")) { 4561 this.end = TypeConvertor.castToInstant(value); // InstantType 4562 } else if (name.equals("minutesDuration")) { 4563 this.minutesDuration = TypeConvertor.castToPositiveInt(value); // PositiveIntType 4564 } else if (name.equals("slot")) { 4565 this.getSlot().add(TypeConvertor.castToReference(value)); 4566 } else if (name.equals("account")) { 4567 this.getAccount().add(TypeConvertor.castToReference(value)); 4568 } else if (name.equals("created")) { 4569 this.created = TypeConvertor.castToDateTime(value); // DateTimeType 4570 } else if (name.equals("note")) { 4571 this.getNote().add(TypeConvertor.castToAnnotation(value)); 4572 } else if (name.equals("patientInstruction")) { 4573 this.getPatientInstruction().add(TypeConvertor.castToCodeableReference(value)); 4574 } else if (name.equals("basedOn")) { 4575 this.getBasedOn().add(TypeConvertor.castToReference(value)); 4576 } else if (name.equals("subject")) { 4577 this.subject = TypeConvertor.castToReference(value); // Reference 4578 } else if (name.equals("participant")) { 4579 this.getParticipant().add((AppointmentParticipantComponent) value); 4580 } else if (name.equals("requestedPeriod")) { 4581 this.getRequestedPeriod().add(TypeConvertor.castToPeriod(value)); 4582 } else if (name.equals("recurrenceId")) { 4583 this.recurrenceId = TypeConvertor.castToPositiveInt(value); // PositiveIntType 4584 } else if (name.equals("occurrenceChanged")) { 4585 this.occurrenceChanged = TypeConvertor.castToBoolean(value); // BooleanType 4586 } else if (name.equals("recurrenceTemplate")) { 4587 this.getRecurrenceTemplate().add((AppointmentRecurrenceTemplateComponent) value); 4588 } else 4589 return super.setProperty(name, value); 4590 return value; 4591 } 4592 4593 @Override 4594 public Base makeProperty(int hash, String name) throws FHIRException { 4595 switch (hash) { 4596 case -1618432855: return addIdentifier(); 4597 case -892481550: return getStatusElement(); 4598 case 2135095591: return getCancellationReason(); 4599 case 94742904: return addClass_(); 4600 case 1281188563: return addServiceCategory(); 4601 case -1928370289: return addServiceType(); 4602 case -1694759682: return addSpecialty(); 4603 case -1596426375: return getAppointmentType(); 4604 case -934964668: return addReason(); 4605 case -1165461084: return getPriority(); 4606 case -1724546052: return getDescriptionElement(); 4607 case -430332865: return addReplaces(); 4608 case 1420774698: return addVirtualService(); 4609 case -1248768647: return addSupportingInformation(); 4610 case -1676044248: return getPreviousAppointment(); 4611 case 1841882230: return getOriginatingAppointment(); 4612 case 109757538: return getStartElement(); 4613 case 100571: return getEndElement(); 4614 case -413630573: return getMinutesDurationElement(); 4615 case 3533310: return addSlot(); 4616 case -1177318867: return addAccount(); 4617 case 1028554472: return getCreatedElement(); 4618 case 3387378: return addNote(); 4619 case 737543241: return addPatientInstruction(); 4620 case -332612366: return addBasedOn(); 4621 case -1867885268: return getSubject(); 4622 case 767422259: return addParticipant(); 4623 case -897241393: return addRequestedPeriod(); 4624 case -362407829: return getRecurrenceIdElement(); 4625 case 1779864483: return getOccurrenceChangedElement(); 4626 case 597629898: return addRecurrenceTemplate(); 4627 default: return super.makeProperty(hash, name); 4628 } 4629 4630 } 4631 4632 @Override 4633 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4634 switch (hash) { 4635 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 4636 case -892481550: /*status*/ return new String[] {"code"}; 4637 case 2135095591: /*cancellationReason*/ return new String[] {"CodeableConcept"}; 4638 case 94742904: /*class*/ return new String[] {"CodeableConcept"}; 4639 case 1281188563: /*serviceCategory*/ return new String[] {"CodeableConcept"}; 4640 case -1928370289: /*serviceType*/ return new String[] {"CodeableReference"}; 4641 case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"}; 4642 case -1596426375: /*appointmentType*/ return new String[] {"CodeableConcept"}; 4643 case -934964668: /*reason*/ return new String[] {"CodeableReference"}; 4644 case -1165461084: /*priority*/ return new String[] {"CodeableConcept"}; 4645 case -1724546052: /*description*/ return new String[] {"string"}; 4646 case -430332865: /*replaces*/ return new String[] {"Reference"}; 4647 case 1420774698: /*virtualService*/ return new String[] {"VirtualServiceDetail"}; 4648 case -1248768647: /*supportingInformation*/ return new String[] {"Reference"}; 4649 case -1676044248: /*previousAppointment*/ return new String[] {"Reference"}; 4650 case 1841882230: /*originatingAppointment*/ return new String[] {"Reference"}; 4651 case 109757538: /*start*/ return new String[] {"instant"}; 4652 case 100571: /*end*/ return new String[] {"instant"}; 4653 case -413630573: /*minutesDuration*/ return new String[] {"positiveInt"}; 4654 case 3533310: /*slot*/ return new String[] {"Reference"}; 4655 case -1177318867: /*account*/ return new String[] {"Reference"}; 4656 case 1028554472: /*created*/ return new String[] {"dateTime"}; 4657 case 3387378: /*note*/ return new String[] {"Annotation"}; 4658 case 737543241: /*patientInstruction*/ return new String[] {"CodeableReference"}; 4659 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 4660 case -1867885268: /*subject*/ return new String[] {"Reference"}; 4661 case 767422259: /*participant*/ return new String[] {}; 4662 case -897241393: /*requestedPeriod*/ return new String[] {"Period"}; 4663 case -362407829: /*recurrenceId*/ return new String[] {"positiveInt"}; 4664 case 1779864483: /*occurrenceChanged*/ return new String[] {"boolean"}; 4665 case 597629898: /*recurrenceTemplate*/ return new String[] {}; 4666 default: return super.getTypesForProperty(hash, name); 4667 } 4668 4669 } 4670 4671 @Override 4672 public Base addChild(String name) throws FHIRException { 4673 if (name.equals("identifier")) { 4674 return addIdentifier(); 4675 } 4676 else if (name.equals("status")) { 4677 throw new FHIRException("Cannot call addChild on a primitive type Appointment.status"); 4678 } 4679 else if (name.equals("cancellationReason")) { 4680 this.cancellationReason = new CodeableConcept(); 4681 return this.cancellationReason; 4682 } 4683 else if (name.equals("class")) { 4684 return addClass_(); 4685 } 4686 else if (name.equals("serviceCategory")) { 4687 return addServiceCategory(); 4688 } 4689 else if (name.equals("serviceType")) { 4690 return addServiceType(); 4691 } 4692 else if (name.equals("specialty")) { 4693 return addSpecialty(); 4694 } 4695 else if (name.equals("appointmentType")) { 4696 this.appointmentType = new CodeableConcept(); 4697 return this.appointmentType; 4698 } 4699 else if (name.equals("reason")) { 4700 return addReason(); 4701 } 4702 else if (name.equals("priority")) { 4703 this.priority = new CodeableConcept(); 4704 return this.priority; 4705 } 4706 else if (name.equals("description")) { 4707 throw new FHIRException("Cannot call addChild on a primitive type Appointment.description"); 4708 } 4709 else if (name.equals("replaces")) { 4710 return addReplaces(); 4711 } 4712 else if (name.equals("virtualService")) { 4713 return addVirtualService(); 4714 } 4715 else if (name.equals("supportingInformation")) { 4716 return addSupportingInformation(); 4717 } 4718 else if (name.equals("previousAppointment")) { 4719 this.previousAppointment = new Reference(); 4720 return this.previousAppointment; 4721 } 4722 else if (name.equals("originatingAppointment")) { 4723 this.originatingAppointment = new Reference(); 4724 return this.originatingAppointment; 4725 } 4726 else if (name.equals("start")) { 4727 throw new FHIRException("Cannot call addChild on a primitive type Appointment.start"); 4728 } 4729 else if (name.equals("end")) { 4730 throw new FHIRException("Cannot call addChild on a primitive type Appointment.end"); 4731 } 4732 else if (name.equals("minutesDuration")) { 4733 throw new FHIRException("Cannot call addChild on a primitive type Appointment.minutesDuration"); 4734 } 4735 else if (name.equals("slot")) { 4736 return addSlot(); 4737 } 4738 else if (name.equals("account")) { 4739 return addAccount(); 4740 } 4741 else if (name.equals("created")) { 4742 throw new FHIRException("Cannot call addChild on a primitive type Appointment.created"); 4743 } 4744 else if (name.equals("note")) { 4745 return addNote(); 4746 } 4747 else if (name.equals("patientInstruction")) { 4748 return addPatientInstruction(); 4749 } 4750 else if (name.equals("basedOn")) { 4751 return addBasedOn(); 4752 } 4753 else if (name.equals("subject")) { 4754 this.subject = new Reference(); 4755 return this.subject; 4756 } 4757 else if (name.equals("participant")) { 4758 return addParticipant(); 4759 } 4760 else if (name.equals("requestedPeriod")) { 4761 return addRequestedPeriod(); 4762 } 4763 else if (name.equals("recurrenceId")) { 4764 throw new FHIRException("Cannot call addChild on a primitive type Appointment.recurrenceId"); 4765 } 4766 else if (name.equals("occurrenceChanged")) { 4767 throw new FHIRException("Cannot call addChild on a primitive type Appointment.occurrenceChanged"); 4768 } 4769 else if (name.equals("recurrenceTemplate")) { 4770 return addRecurrenceTemplate(); 4771 } 4772 else 4773 return super.addChild(name); 4774 } 4775 4776 public String fhirType() { 4777 return "Appointment"; 4778 4779 } 4780 4781 public Appointment copy() { 4782 Appointment dst = new Appointment(); 4783 copyValues(dst); 4784 return dst; 4785 } 4786 4787 public void copyValues(Appointment dst) { 4788 super.copyValues(dst); 4789 if (identifier != null) { 4790 dst.identifier = new ArrayList<Identifier>(); 4791 for (Identifier i : identifier) 4792 dst.identifier.add(i.copy()); 4793 }; 4794 dst.status = status == null ? null : status.copy(); 4795 dst.cancellationReason = cancellationReason == null ? null : cancellationReason.copy(); 4796 if (class_ != null) { 4797 dst.class_ = new ArrayList<CodeableConcept>(); 4798 for (CodeableConcept i : class_) 4799 dst.class_.add(i.copy()); 4800 }; 4801 if (serviceCategory != null) { 4802 dst.serviceCategory = new ArrayList<CodeableConcept>(); 4803 for (CodeableConcept i : serviceCategory) 4804 dst.serviceCategory.add(i.copy()); 4805 }; 4806 if (serviceType != null) { 4807 dst.serviceType = new ArrayList<CodeableReference>(); 4808 for (CodeableReference i : serviceType) 4809 dst.serviceType.add(i.copy()); 4810 }; 4811 if (specialty != null) { 4812 dst.specialty = new ArrayList<CodeableConcept>(); 4813 for (CodeableConcept i : specialty) 4814 dst.specialty.add(i.copy()); 4815 }; 4816 dst.appointmentType = appointmentType == null ? null : appointmentType.copy(); 4817 if (reason != null) { 4818 dst.reason = new ArrayList<CodeableReference>(); 4819 for (CodeableReference i : reason) 4820 dst.reason.add(i.copy()); 4821 }; 4822 dst.priority = priority == null ? null : priority.copy(); 4823 dst.description = description == null ? null : description.copy(); 4824 if (replaces != null) { 4825 dst.replaces = new ArrayList<Reference>(); 4826 for (Reference i : replaces) 4827 dst.replaces.add(i.copy()); 4828 }; 4829 if (virtualService != null) { 4830 dst.virtualService = new ArrayList<VirtualServiceDetail>(); 4831 for (VirtualServiceDetail i : virtualService) 4832 dst.virtualService.add(i.copy()); 4833 }; 4834 if (supportingInformation != null) { 4835 dst.supportingInformation = new ArrayList<Reference>(); 4836 for (Reference i : supportingInformation) 4837 dst.supportingInformation.add(i.copy()); 4838 }; 4839 dst.previousAppointment = previousAppointment == null ? null : previousAppointment.copy(); 4840 dst.originatingAppointment = originatingAppointment == null ? null : originatingAppointment.copy(); 4841 dst.start = start == null ? null : start.copy(); 4842 dst.end = end == null ? null : end.copy(); 4843 dst.minutesDuration = minutesDuration == null ? null : minutesDuration.copy(); 4844 if (slot != null) { 4845 dst.slot = new ArrayList<Reference>(); 4846 for (Reference i : slot) 4847 dst.slot.add(i.copy()); 4848 }; 4849 if (account != null) { 4850 dst.account = new ArrayList<Reference>(); 4851 for (Reference i : account) 4852 dst.account.add(i.copy()); 4853 }; 4854 dst.created = created == null ? null : created.copy(); 4855 if (note != null) { 4856 dst.note = new ArrayList<Annotation>(); 4857 for (Annotation i : note) 4858 dst.note.add(i.copy()); 4859 }; 4860 if (patientInstruction != null) { 4861 dst.patientInstruction = new ArrayList<CodeableReference>(); 4862 for (CodeableReference i : patientInstruction) 4863 dst.patientInstruction.add(i.copy()); 4864 }; 4865 if (basedOn != null) { 4866 dst.basedOn = new ArrayList<Reference>(); 4867 for (Reference i : basedOn) 4868 dst.basedOn.add(i.copy()); 4869 }; 4870 dst.subject = subject == null ? null : subject.copy(); 4871 if (participant != null) { 4872 dst.participant = new ArrayList<AppointmentParticipantComponent>(); 4873 for (AppointmentParticipantComponent i : participant) 4874 dst.participant.add(i.copy()); 4875 }; 4876 if (requestedPeriod != null) { 4877 dst.requestedPeriod = new ArrayList<Period>(); 4878 for (Period i : requestedPeriod) 4879 dst.requestedPeriod.add(i.copy()); 4880 }; 4881 dst.recurrenceId = recurrenceId == null ? null : recurrenceId.copy(); 4882 dst.occurrenceChanged = occurrenceChanged == null ? null : occurrenceChanged.copy(); 4883 if (recurrenceTemplate != null) { 4884 dst.recurrenceTemplate = new ArrayList<AppointmentRecurrenceTemplateComponent>(); 4885 for (AppointmentRecurrenceTemplateComponent i : recurrenceTemplate) 4886 dst.recurrenceTemplate.add(i.copy()); 4887 }; 4888 } 4889 4890 protected Appointment typedCopy() { 4891 return copy(); 4892 } 4893 4894 @Override 4895 public boolean equalsDeep(Base other_) { 4896 if (!super.equalsDeep(other_)) 4897 return false; 4898 if (!(other_ instanceof Appointment)) 4899 return false; 4900 Appointment o = (Appointment) other_; 4901 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(cancellationReason, o.cancellationReason, true) 4902 && compareDeep(class_, o.class_, true) && compareDeep(serviceCategory, o.serviceCategory, true) 4903 && compareDeep(serviceType, o.serviceType, true) && compareDeep(specialty, o.specialty, true) && compareDeep(appointmentType, o.appointmentType, true) 4904 && compareDeep(reason, o.reason, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true) 4905 && compareDeep(replaces, o.replaces, true) && compareDeep(virtualService, o.virtualService, true) 4906 && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(previousAppointment, o.previousAppointment, true) 4907 && compareDeep(originatingAppointment, o.originatingAppointment, true) && compareDeep(start, o.start, true) 4908 && compareDeep(end, o.end, true) && compareDeep(minutesDuration, o.minutesDuration, true) && compareDeep(slot, o.slot, true) 4909 && compareDeep(account, o.account, true) && compareDeep(created, o.created, true) && compareDeep(note, o.note, true) 4910 && compareDeep(patientInstruction, o.patientInstruction, true) && compareDeep(basedOn, o.basedOn, true) 4911 && compareDeep(subject, o.subject, true) && compareDeep(participant, o.participant, true) && compareDeep(requestedPeriod, o.requestedPeriod, true) 4912 && compareDeep(recurrenceId, o.recurrenceId, true) && compareDeep(occurrenceChanged, o.occurrenceChanged, true) 4913 && compareDeep(recurrenceTemplate, o.recurrenceTemplate, true); 4914 } 4915 4916 @Override 4917 public boolean equalsShallow(Base other_) { 4918 if (!super.equalsShallow(other_)) 4919 return false; 4920 if (!(other_ instanceof Appointment)) 4921 return false; 4922 Appointment o = (Appointment) other_; 4923 return compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(start, o.start, true) 4924 && compareValues(end, o.end, true) && compareValues(minutesDuration, o.minutesDuration, true) && compareValues(created, o.created, true) 4925 && compareValues(recurrenceId, o.recurrenceId, true) && compareValues(occurrenceChanged, o.occurrenceChanged, true) 4926 ; 4927 } 4928 4929 public boolean isEmpty() { 4930 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, cancellationReason 4931 , class_, serviceCategory, serviceType, specialty, appointmentType, reason, priority 4932 , description, replaces, virtualService, supportingInformation, previousAppointment 4933 , originatingAppointment, start, end, minutesDuration, slot, account, created 4934 , note, patientInstruction, basedOn, subject, participant, requestedPeriod, recurrenceId 4935 , occurrenceChanged, recurrenceTemplate); 4936 } 4937 4938 @Override 4939 public ResourceType getResourceType() { 4940 return ResourceType.Appointment; 4941 } 4942 4943 /** 4944 * Search parameter: <b>actor</b> 4945 * <p> 4946 * Description: <b>Any one of the individuals participating in the appointment</b><br> 4947 * Type: <b>reference</b><br> 4948 * Path: <b>Appointment.participant.actor</b><br> 4949 * </p> 4950 */ 4951 @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, Group.class, HealthcareService.class, Location.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 4952 public static final String SP_ACTOR = "actor"; 4953 /** 4954 * <b>Fluent Client</b> search parameter constant for <b>actor</b> 4955 * <p> 4956 * Description: <b>Any one of the individuals participating in the appointment</b><br> 4957 * Type: <b>reference</b><br> 4958 * Path: <b>Appointment.participant.actor</b><br> 4959 * </p> 4960 */ 4961 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACTOR); 4962 4963/** 4964 * Constant for fluent queries to be used to add include statements. Specifies 4965 * the path value of "<b>Appointment:actor</b>". 4966 */ 4967 public static final ca.uhn.fhir.model.api.Include INCLUDE_ACTOR = new ca.uhn.fhir.model.api.Include("Appointment:actor").toLocked(); 4968 4969 /** 4970 * Search parameter: <b>appointment-type</b> 4971 * <p> 4972 * Description: <b>The style of appointment or patient that has been booked in the slot (not service type)</b><br> 4973 * Type: <b>token</b><br> 4974 * Path: <b>Appointment.appointmentType</b><br> 4975 * </p> 4976 */ 4977 @SearchParamDefinition(name="appointment-type", path="Appointment.appointmentType", description="The style of appointment or patient that has been booked in the slot (not service type)", type="token" ) 4978 public static final String SP_APPOINTMENT_TYPE = "appointment-type"; 4979 /** 4980 * <b>Fluent Client</b> search parameter constant for <b>appointment-type</b> 4981 * <p> 4982 * Description: <b>The style of appointment or patient that has been booked in the slot (not service type)</b><br> 4983 * Type: <b>token</b><br> 4984 * Path: <b>Appointment.appointmentType</b><br> 4985 * </p> 4986 */ 4987 public static final ca.uhn.fhir.rest.gclient.TokenClientParam APPOINTMENT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_APPOINTMENT_TYPE); 4988 4989 /** 4990 * Search parameter: <b>based-on</b> 4991 * <p> 4992 * Description: <b>The service request this appointment is allocated to assess</b><br> 4993 * Type: <b>reference</b><br> 4994 * Path: <b>Appointment.basedOn</b><br> 4995 * </p> 4996 */ 4997 @SearchParamDefinition(name="based-on", path="Appointment.basedOn", description="The service request this appointment is allocated to assess", type="reference", target={CarePlan.class, DeviceRequest.class, MedicationRequest.class, ServiceRequest.class } ) 4998 public static final String SP_BASED_ON = "based-on"; 4999 /** 5000 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 5001 * <p> 5002 * Description: <b>The service request this appointment is allocated to assess</b><br> 5003 * Type: <b>reference</b><br> 5004 * Path: <b>Appointment.basedOn</b><br> 5005 * </p> 5006 */ 5007 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 5008 5009/** 5010 * Constant for fluent queries to be used to add include statements. Specifies 5011 * the path value of "<b>Appointment:based-on</b>". 5012 */ 5013 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Appointment:based-on").toLocked(); 5014 5015 /** 5016 * Search parameter: <b>date</b> 5017 * <p> 5018 * Description: <b>Appointment date/time.</b><br> 5019 * Type: <b>date</b><br> 5020 * Path: <b>(start | requestedPeriod.start).first()</b><br> 5021 * </p> 5022 */ 5023 @SearchParamDefinition(name="date", path="(start | requestedPeriod.start).first()", description="Appointment date/time.", type="date" ) 5024 public static final String SP_DATE = "date"; 5025 /** 5026 * <b>Fluent Client</b> search parameter constant for <b>date</b> 5027 * <p> 5028 * Description: <b>Appointment date/time.</b><br> 5029 * Type: <b>date</b><br> 5030 * Path: <b>(start | requestedPeriod.start).first()</b><br> 5031 * </p> 5032 */ 5033 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 5034 5035 /** 5036 * Search parameter: <b>group</b> 5037 * <p> 5038 * Description: <b>One of the individuals of the appointment is this patient</b><br> 5039 * Type: <b>reference</b><br> 5040 * Path: <b>Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)</b><br> 5041 * </p> 5042 */ 5043 @SearchParamDefinition(name="group", path="Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)", description="One of the individuals of the appointment is this patient", type="reference", target={Group.class } ) 5044 public static final String SP_GROUP = "group"; 5045 /** 5046 * <b>Fluent Client</b> search parameter constant for <b>group</b> 5047 * <p> 5048 * Description: <b>One of the individuals of the appointment is this patient</b><br> 5049 * Type: <b>reference</b><br> 5050 * Path: <b>Appointment.participant.actor.where(resolve() is Group) | Appointment.subject.where(resolve() is Group)</b><br> 5051 * </p> 5052 */ 5053 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam GROUP = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_GROUP); 5054 5055/** 5056 * Constant for fluent queries to be used to add include statements. Specifies 5057 * the path value of "<b>Appointment:group</b>". 5058 */ 5059 public static final ca.uhn.fhir.model.api.Include INCLUDE_GROUP = new ca.uhn.fhir.model.api.Include("Appointment:group").toLocked(); 5060 5061 /** 5062 * Search parameter: <b>identifier</b> 5063 * <p> 5064 * Description: <b>An Identifier of the Appointment</b><br> 5065 * Type: <b>token</b><br> 5066 * Path: <b>Appointment.identifier</b><br> 5067 * </p> 5068 */ 5069 @SearchParamDefinition(name="identifier", path="Appointment.identifier", description="An Identifier of the Appointment", type="token" ) 5070 public static final String SP_IDENTIFIER = "identifier"; 5071 /** 5072 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5073 * <p> 5074 * Description: <b>An Identifier of the Appointment</b><br> 5075 * Type: <b>token</b><br> 5076 * Path: <b>Appointment.identifier</b><br> 5077 * </p> 5078 */ 5079 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 5080 5081 /** 5082 * Search parameter: <b>location</b> 5083 * <p> 5084 * Description: <b>This location is listed in the participants of the appointment</b><br> 5085 * Type: <b>reference</b><br> 5086 * Path: <b>Appointment.participant.actor.where(resolve() is Location)</b><br> 5087 * </p> 5088 */ 5089 @SearchParamDefinition(name="location", path="Appointment.participant.actor.where(resolve() is Location)", description="This location is listed in the participants of the appointment", type="reference", target={Location.class } ) 5090 public static final String SP_LOCATION = "location"; 5091 /** 5092 * <b>Fluent Client</b> search parameter constant for <b>location</b> 5093 * <p> 5094 * Description: <b>This location is listed in the participants of the appointment</b><br> 5095 * Type: <b>reference</b><br> 5096 * Path: <b>Appointment.participant.actor.where(resolve() is Location)</b><br> 5097 * </p> 5098 */ 5099 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION); 5100 5101/** 5102 * Constant for fluent queries to be used to add include statements. Specifies 5103 * the path value of "<b>Appointment:location</b>". 5104 */ 5105 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Appointment:location").toLocked(); 5106 5107 /** 5108 * Search parameter: <b>part-status</b> 5109 * <p> 5110 * Description: <b>The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.</b><br> 5111 * Type: <b>token</b><br> 5112 * Path: <b>Appointment.participant.status</b><br> 5113 * </p> 5114 */ 5115 @SearchParamDefinition(name="part-status", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.", type="token" ) 5116 public static final String SP_PART_STATUS = "part-status"; 5117 /** 5118 * <b>Fluent Client</b> search parameter constant for <b>part-status</b> 5119 * <p> 5120 * Description: <b>The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests.</b><br> 5121 * Type: <b>token</b><br> 5122 * Path: <b>Appointment.participant.status</b><br> 5123 * </p> 5124 */ 5125 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PART_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PART_STATUS); 5126 5127 /** 5128 * Search parameter: <b>patient</b> 5129 * <p> 5130 * Description: <b>One of the individuals of the appointment is this patient</b><br> 5131 * Type: <b>reference</b><br> 5132 * Path: <b>Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient)</b><br> 5133 * </p> 5134 */ 5135 @SearchParamDefinition(name="patient", path="Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient)", description="One of the individuals of the appointment is this patient", type="reference", target={Patient.class } ) 5136 public static final String SP_PATIENT = "patient"; 5137 /** 5138 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 5139 * <p> 5140 * Description: <b>One of the individuals of the appointment is this patient</b><br> 5141 * Type: <b>reference</b><br> 5142 * Path: <b>Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient)</b><br> 5143 * </p> 5144 */ 5145 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 5146 5147/** 5148 * Constant for fluent queries to be used to add include statements. Specifies 5149 * the path value of "<b>Appointment:patient</b>". 5150 */ 5151 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Appointment:patient").toLocked(); 5152 5153 /** 5154 * Search parameter: <b>practitioner</b> 5155 * <p> 5156 * Description: <b>One of the individuals of the appointment is this practitioner</b><br> 5157 * Type: <b>reference</b><br> 5158 * Path: <b>Appointment.participant.actor.where(resolve() is Practitioner)</b><br> 5159 * </p> 5160 */ 5161 @SearchParamDefinition(name="practitioner", path="Appointment.participant.actor.where(resolve() is Practitioner)", description="One of the individuals of the appointment is this practitioner", type="reference", target={Practitioner.class } ) 5162 public static final String SP_PRACTITIONER = "practitioner"; 5163 /** 5164 * <b>Fluent Client</b> search parameter constant for <b>practitioner</b> 5165 * <p> 5166 * Description: <b>One of the individuals of the appointment is this practitioner</b><br> 5167 * Type: <b>reference</b><br> 5168 * Path: <b>Appointment.participant.actor.where(resolve() is Practitioner)</b><br> 5169 * </p> 5170 */ 5171 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRACTITIONER); 5172 5173/** 5174 * Constant for fluent queries to be used to add include statements. Specifies 5175 * the path value of "<b>Appointment:practitioner</b>". 5176 */ 5177 public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("Appointment:practitioner").toLocked(); 5178 5179 /** 5180 * Search parameter: <b>reason-code</b> 5181 * <p> 5182 * Description: <b>Reference to a concept (by class)</b><br> 5183 * Type: <b>token</b><br> 5184 * Path: <b>Appointment.reason.concept</b><br> 5185 * </p> 5186 */ 5187 @SearchParamDefinition(name="reason-code", path="Appointment.reason.concept", description="Reference to a concept (by class)", type="token" ) 5188 public static final String SP_REASON_CODE = "reason-code"; 5189 /** 5190 * <b>Fluent Client</b> search parameter constant for <b>reason-code</b> 5191 * <p> 5192 * Description: <b>Reference to a concept (by class)</b><br> 5193 * Type: <b>token</b><br> 5194 * Path: <b>Appointment.reason.concept</b><br> 5195 * </p> 5196 */ 5197 public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE); 5198 5199 /** 5200 * Search parameter: <b>reason-reference</b> 5201 * <p> 5202 * Description: <b>Reference to a resource (by instance)</b><br> 5203 * Type: <b>reference</b><br> 5204 * Path: <b>Appointment.reason.reference</b><br> 5205 * </p> 5206 */ 5207 @SearchParamDefinition(name="reason-reference", path="Appointment.reason.reference", description="Reference to a resource (by instance)", type="reference" ) 5208 public static final String SP_REASON_REFERENCE = "reason-reference"; 5209 /** 5210 * <b>Fluent Client</b> search parameter constant for <b>reason-reference</b> 5211 * <p> 5212 * Description: <b>Reference to a resource (by instance)</b><br> 5213 * Type: <b>reference</b><br> 5214 * Path: <b>Appointment.reason.reference</b><br> 5215 * </p> 5216 */ 5217 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE); 5218 5219/** 5220 * Constant for fluent queries to be used to add include statements. Specifies 5221 * the path value of "<b>Appointment:reason-reference</b>". 5222 */ 5223 public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("Appointment:reason-reference").toLocked(); 5224 5225 /** 5226 * Search parameter: <b>requested-period</b> 5227 * <p> 5228 * Description: <b>During what period was the Appointment requested to take place</b><br> 5229 * Type: <b>date</b><br> 5230 * Path: <b>requestedPeriod</b><br> 5231 * </p> 5232 */ 5233 @SearchParamDefinition(name="requested-period", path="requestedPeriod", description="During what period was the Appointment requested to take place", type="date" ) 5234 public static final String SP_REQUESTED_PERIOD = "requested-period"; 5235 /** 5236 * <b>Fluent Client</b> search parameter constant for <b>requested-period</b> 5237 * <p> 5238 * Description: <b>During what period was the Appointment requested to take place</b><br> 5239 * Type: <b>date</b><br> 5240 * Path: <b>requestedPeriod</b><br> 5241 * </p> 5242 */ 5243 public static final ca.uhn.fhir.rest.gclient.DateClientParam REQUESTED_PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_REQUESTED_PERIOD); 5244 5245 /** 5246 * Search parameter: <b>service-category</b> 5247 * <p> 5248 * Description: <b>A broad categorization of the service that is to be performed during this appointment</b><br> 5249 * Type: <b>token</b><br> 5250 * Path: <b>Appointment.serviceCategory</b><br> 5251 * </p> 5252 */ 5253 @SearchParamDefinition(name="service-category", path="Appointment.serviceCategory", description="A broad categorization of the service that is to be performed during this appointment", type="token" ) 5254 public static final String SP_SERVICE_CATEGORY = "service-category"; 5255 /** 5256 * <b>Fluent Client</b> search parameter constant for <b>service-category</b> 5257 * <p> 5258 * Description: <b>A broad categorization of the service that is to be performed during this appointment</b><br> 5259 * Type: <b>token</b><br> 5260 * Path: <b>Appointment.serviceCategory</b><br> 5261 * </p> 5262 */ 5263 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_CATEGORY); 5264 5265 /** 5266 * Search parameter: <b>service-type-reference</b> 5267 * <p> 5268 * Description: <b>The specific service (by HealthcareService) that is to be performed during this appointment</b><br> 5269 * Type: <b>reference</b><br> 5270 * Path: <b>Appointment.serviceType.reference</b><br> 5271 * </p> 5272 */ 5273 @SearchParamDefinition(name="service-type-reference", path="Appointment.serviceType.reference", description="The specific service (by HealthcareService) that is to be performed during this appointment", type="reference" ) 5274 public static final String SP_SERVICE_TYPE_REFERENCE = "service-type-reference"; 5275 /** 5276 * <b>Fluent Client</b> search parameter constant for <b>service-type-reference</b> 5277 * <p> 5278 * Description: <b>The specific service (by HealthcareService) that is to be performed during this appointment</b><br> 5279 * Type: <b>reference</b><br> 5280 * Path: <b>Appointment.serviceType.reference</b><br> 5281 * </p> 5282 */ 5283 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SERVICE_TYPE_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SERVICE_TYPE_REFERENCE); 5284 5285/** 5286 * Constant for fluent queries to be used to add include statements. Specifies 5287 * the path value of "<b>Appointment:service-type-reference</b>". 5288 */ 5289 public static final ca.uhn.fhir.model.api.Include INCLUDE_SERVICE_TYPE_REFERENCE = new ca.uhn.fhir.model.api.Include("Appointment:service-type-reference").toLocked(); 5290 5291 /** 5292 * Search parameter: <b>service-type</b> 5293 * <p> 5294 * Description: <b>The specific service (by coding) that is to be performed during this appointment</b><br> 5295 * Type: <b>token</b><br> 5296 * Path: <b>Appointment.serviceType.concept</b><br> 5297 * </p> 5298 */ 5299 @SearchParamDefinition(name="service-type", path="Appointment.serviceType.concept", description="The specific service (by coding) that is to be performed during this appointment", type="token" ) 5300 public static final String SP_SERVICE_TYPE = "service-type"; 5301 /** 5302 * <b>Fluent Client</b> search parameter constant for <b>service-type</b> 5303 * <p> 5304 * Description: <b>The specific service (by coding) that is to be performed during this appointment</b><br> 5305 * Type: <b>token</b><br> 5306 * Path: <b>Appointment.serviceType.concept</b><br> 5307 * </p> 5308 */ 5309 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_TYPE); 5310 5311 /** 5312 * Search parameter: <b>slot</b> 5313 * <p> 5314 * Description: <b>The slots that this appointment is filling</b><br> 5315 * Type: <b>reference</b><br> 5316 * Path: <b>Appointment.slot</b><br> 5317 * </p> 5318 */ 5319 @SearchParamDefinition(name="slot", path="Appointment.slot", description="The slots that this appointment is filling", type="reference", target={Slot.class } ) 5320 public static final String SP_SLOT = "slot"; 5321 /** 5322 * <b>Fluent Client</b> search parameter constant for <b>slot</b> 5323 * <p> 5324 * Description: <b>The slots that this appointment is filling</b><br> 5325 * Type: <b>reference</b><br> 5326 * Path: <b>Appointment.slot</b><br> 5327 * </p> 5328 */ 5329 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SLOT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SLOT); 5330 5331/** 5332 * Constant for fluent queries to be used to add include statements. Specifies 5333 * the path value of "<b>Appointment:slot</b>". 5334 */ 5335 public static final ca.uhn.fhir.model.api.Include INCLUDE_SLOT = new ca.uhn.fhir.model.api.Include("Appointment:slot").toLocked(); 5336 5337 /** 5338 * Search parameter: <b>specialty</b> 5339 * <p> 5340 * Description: <b>The specialty of a practitioner that would be required to perform the service requested in this appointment</b><br> 5341 * Type: <b>token</b><br> 5342 * Path: <b>Appointment.specialty</b><br> 5343 * </p> 5344 */ 5345 @SearchParamDefinition(name="specialty", path="Appointment.specialty", description="The specialty of a practitioner that would be required to perform the service requested in this appointment", type="token" ) 5346 public static final String SP_SPECIALTY = "specialty"; 5347 /** 5348 * <b>Fluent Client</b> search parameter constant for <b>specialty</b> 5349 * <p> 5350 * Description: <b>The specialty of a practitioner that would be required to perform the service requested in this appointment</b><br> 5351 * Type: <b>token</b><br> 5352 * Path: <b>Appointment.specialty</b><br> 5353 * </p> 5354 */ 5355 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY); 5356 5357 /** 5358 * Search parameter: <b>status</b> 5359 * <p> 5360 * Description: <b>The overall status of the appointment</b><br> 5361 * Type: <b>token</b><br> 5362 * Path: <b>Appointment.status</b><br> 5363 * </p> 5364 */ 5365 @SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment", type="token" ) 5366 public static final String SP_STATUS = "status"; 5367 /** 5368 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5369 * <p> 5370 * Description: <b>The overall status of the appointment</b><br> 5371 * Type: <b>token</b><br> 5372 * Path: <b>Appointment.status</b><br> 5373 * </p> 5374 */ 5375 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 5376 5377 /** 5378 * Search parameter: <b>subject</b> 5379 * <p> 5380 * Description: <b>One of the individuals of the appointment is this patient</b><br> 5381 * Type: <b>reference</b><br> 5382 * Path: <b>Appointment.subject</b><br> 5383 * </p> 5384 */ 5385 @SearchParamDefinition(name="subject", path="Appointment.subject", description="One of the individuals of the appointment is this patient", type="reference", target={Group.class, Patient.class } ) 5386 public static final String SP_SUBJECT = "subject"; 5387 /** 5388 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 5389 * <p> 5390 * Description: <b>One of the individuals of the appointment is this patient</b><br> 5391 * Type: <b>reference</b><br> 5392 * Path: <b>Appointment.subject</b><br> 5393 * </p> 5394 */ 5395 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 5396 5397/** 5398 * Constant for fluent queries to be used to add include statements. Specifies 5399 * the path value of "<b>Appointment:subject</b>". 5400 */ 5401 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Appointment:subject").toLocked(); 5402 5403 /** 5404 * Search parameter: <b>supporting-info</b> 5405 * <p> 5406 * Description: <b>Additional information to support the appointment</b><br> 5407 * Type: <b>reference</b><br> 5408 * Path: <b>Appointment.supportingInformation</b><br> 5409 * </p> 5410 */ 5411 @SearchParamDefinition(name="supporting-info", path="Appointment.supportingInformation", description="Additional information to support the appointment", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } ) 5412 public static final String SP_SUPPORTING_INFO = "supporting-info"; 5413 /** 5414 * <b>Fluent Client</b> search parameter constant for <b>supporting-info</b> 5415 * <p> 5416 * Description: <b>Additional information to support the appointment</b><br> 5417 * Type: <b>reference</b><br> 5418 * Path: <b>Appointment.supportingInformation</b><br> 5419 * </p> 5420 */ 5421 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPORTING_INFO = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPORTING_INFO); 5422 5423/** 5424 * Constant for fluent queries to be used to add include statements. Specifies 5425 * the path value of "<b>Appointment:supporting-info</b>". 5426 */ 5427 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPORTING_INFO = new ca.uhn.fhir.model.api.Include("Appointment:supporting-info").toLocked(); 5428 5429 5430}