001package org.hl7.fhir.r5.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r5 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0 053import java.util.ArrayList; 054import java.util.Date; 055import java.util.List; 056import org.hl7.fhir.exceptions.FHIRException; 057import org.hl7.fhir.instance.model.api.ICompositeType; 058 059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 060import org.hl7.fhir.utilities.Utilities; 061import org.hl7.fhir.r5.model.Enumerations.*; 062import ca.uhn.fhir.model.api.annotation.ResourceDef; 063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 064import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 065import ca.uhn.fhir.model.api.annotation.Child; 066import ca.uhn.fhir.model.api.annotation.ChildOrder; 067import ca.uhn.fhir.model.api.annotation.Description; 068import ca.uhn.fhir.model.api.annotation.Block; 069/** 070 * The details of a healthcare service available at a location. 071 */ 072@ResourceDef(name="HealthcareService", profile="http://hl7.org/fhir/StructureDefinition/HealthcareService") 073public class HealthcareService extends DomainResource { 074 075 public enum DaysOfWeek { 076 /** 077 * Monday. 078 */ 079 MON, 080 /** 081 * Tuesday. 082 */ 083 TUE, 084 /** 085 * Wednesday. 086 */ 087 WED, 088 /** 089 * Thursday. 090 */ 091 THU, 092 /** 093 * Friday. 094 */ 095 FRI, 096 /** 097 * Saturday. 098 */ 099 SAT, 100 /** 101 * Sunday. 102 */ 103 SUN, 104 /** 105 * added to help the parsers with the generic types 106 */ 107 NULL; 108 public static DaysOfWeek fromCode(String codeString) throws FHIRException { 109 if (codeString == null || "".equals(codeString)) 110 return null; 111 if ("mon".equals(codeString)) 112 return MON; 113 if ("tue".equals(codeString)) 114 return TUE; 115 if ("wed".equals(codeString)) 116 return WED; 117 if ("thu".equals(codeString)) 118 return THU; 119 if ("fri".equals(codeString)) 120 return FRI; 121 if ("sat".equals(codeString)) 122 return SAT; 123 if ("sun".equals(codeString)) 124 return SUN; 125 if (Configuration.isAcceptInvalidEnums()) 126 return null; 127 else 128 throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); 129 } 130 public String toCode() { 131 switch (this) { 132 case MON: return "mon"; 133 case TUE: return "tue"; 134 case WED: return "wed"; 135 case THU: return "thu"; 136 case FRI: return "fri"; 137 case SAT: return "sat"; 138 case SUN: return "sun"; 139 default: return "?"; 140 } 141 } 142 public String getSystem() { 143 switch (this) { 144 case MON: return "http://hl7.org/fhir/days-of-week"; 145 case TUE: return "http://hl7.org/fhir/days-of-week"; 146 case WED: return "http://hl7.org/fhir/days-of-week"; 147 case THU: return "http://hl7.org/fhir/days-of-week"; 148 case FRI: return "http://hl7.org/fhir/days-of-week"; 149 case SAT: return "http://hl7.org/fhir/days-of-week"; 150 case SUN: return "http://hl7.org/fhir/days-of-week"; 151 default: return "?"; 152 } 153 } 154 public String getDefinition() { 155 switch (this) { 156 case MON: return "Monday."; 157 case TUE: return "Tuesday."; 158 case WED: return "Wednesday."; 159 case THU: return "Thursday."; 160 case FRI: return "Friday."; 161 case SAT: return "Saturday."; 162 case SUN: return "Sunday."; 163 default: return "?"; 164 } 165 } 166 public String getDisplay() { 167 switch (this) { 168 case MON: return "Monday"; 169 case TUE: return "Tuesday"; 170 case WED: return "Wednesday"; 171 case THU: return "Thursday"; 172 case FRI: return "Friday"; 173 case SAT: return "Saturday"; 174 case SUN: return "Sunday"; 175 default: return "?"; 176 } 177 } 178 } 179 180 public static class DaysOfWeekEnumFactory implements EnumFactory<DaysOfWeek> { 181 public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException { 182 if (codeString == null || "".equals(codeString)) 183 if (codeString == null || "".equals(codeString)) 184 return null; 185 if ("mon".equals(codeString)) 186 return DaysOfWeek.MON; 187 if ("tue".equals(codeString)) 188 return DaysOfWeek.TUE; 189 if ("wed".equals(codeString)) 190 return DaysOfWeek.WED; 191 if ("thu".equals(codeString)) 192 return DaysOfWeek.THU; 193 if ("fri".equals(codeString)) 194 return DaysOfWeek.FRI; 195 if ("sat".equals(codeString)) 196 return DaysOfWeek.SAT; 197 if ("sun".equals(codeString)) 198 return DaysOfWeek.SUN; 199 throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'"); 200 } 201 public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException { 202 if (code == null) 203 return null; 204 if (code.isEmpty()) 205 return new Enumeration<DaysOfWeek>(this); 206 String codeString = ((PrimitiveType) code).asStringValue(); 207 if (codeString == null || "".equals(codeString)) 208 return null; 209 if ("mon".equals(codeString)) 210 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.MON); 211 if ("tue".equals(codeString)) 212 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.TUE); 213 if ("wed".equals(codeString)) 214 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.WED); 215 if ("thu".equals(codeString)) 216 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.THU); 217 if ("fri".equals(codeString)) 218 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.FRI); 219 if ("sat".equals(codeString)) 220 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SAT); 221 if ("sun".equals(codeString)) 222 return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SUN); 223 throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'"); 224 } 225 public String toCode(DaysOfWeek code) { 226 if (code == DaysOfWeek.MON) 227 return "mon"; 228 if (code == DaysOfWeek.TUE) 229 return "tue"; 230 if (code == DaysOfWeek.WED) 231 return "wed"; 232 if (code == DaysOfWeek.THU) 233 return "thu"; 234 if (code == DaysOfWeek.FRI) 235 return "fri"; 236 if (code == DaysOfWeek.SAT) 237 return "sat"; 238 if (code == DaysOfWeek.SUN) 239 return "sun"; 240 return "?"; 241 } 242 public String toSystem(DaysOfWeek code) { 243 return code.getSystem(); 244 } 245 } 246 247 @Block() 248 public static class HealthcareServiceEligibilityComponent extends BackboneElement implements IBaseBackboneElement { 249 /** 250 * Coded value for the eligibility. 251 */ 252 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 253 @Description(shortDefinition="Coded value for the eligibility", formalDefinition="Coded value for the eligibility." ) 254 protected CodeableConcept code; 255 256 /** 257 * Describes the eligibility conditions for the service. 258 */ 259 @Child(name = "comment", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 260 @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="Describes the eligibility conditions for the service." ) 261 protected MarkdownType comment; 262 263 private static final long serialVersionUID = 1078065348L; 264 265 /** 266 * Constructor 267 */ 268 public HealthcareServiceEligibilityComponent() { 269 super(); 270 } 271 272 /** 273 * @return {@link #code} (Coded value for the eligibility.) 274 */ 275 public CodeableConcept getCode() { 276 if (this.code == null) 277 if (Configuration.errorOnAutoCreate()) 278 throw new Error("Attempt to auto-create HealthcareServiceEligibilityComponent.code"); 279 else if (Configuration.doAutoCreate()) 280 this.code = new CodeableConcept(); // cc 281 return this.code; 282 } 283 284 public boolean hasCode() { 285 return this.code != null && !this.code.isEmpty(); 286 } 287 288 /** 289 * @param value {@link #code} (Coded value for the eligibility.) 290 */ 291 public HealthcareServiceEligibilityComponent setCode(CodeableConcept value) { 292 this.code = value; 293 return this; 294 } 295 296 /** 297 * @return {@link #comment} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 298 */ 299 public MarkdownType getCommentElement() { 300 if (this.comment == null) 301 if (Configuration.errorOnAutoCreate()) 302 throw new Error("Attempt to auto-create HealthcareServiceEligibilityComponent.comment"); 303 else if (Configuration.doAutoCreate()) 304 this.comment = new MarkdownType(); // bb 305 return this.comment; 306 } 307 308 public boolean hasCommentElement() { 309 return this.comment != null && !this.comment.isEmpty(); 310 } 311 312 public boolean hasComment() { 313 return this.comment != null && !this.comment.isEmpty(); 314 } 315 316 /** 317 * @param value {@link #comment} (Describes the eligibility conditions for the service.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 318 */ 319 public HealthcareServiceEligibilityComponent setCommentElement(MarkdownType value) { 320 this.comment = value; 321 return this; 322 } 323 324 /** 325 * @return Describes the eligibility conditions for the service. 326 */ 327 public String getComment() { 328 return this.comment == null ? null : this.comment.getValue(); 329 } 330 331 /** 332 * @param value Describes the eligibility conditions for the service. 333 */ 334 public HealthcareServiceEligibilityComponent setComment(String value) { 335 if (value == null) 336 this.comment = null; 337 else { 338 if (this.comment == null) 339 this.comment = new MarkdownType(); 340 this.comment.setValue(value); 341 } 342 return this; 343 } 344 345 protected void listChildren(List<Property> children) { 346 super.listChildren(children); 347 children.add(new Property("code", "CodeableConcept", "Coded value for the eligibility.", 0, 1, code)); 348 children.add(new Property("comment", "markdown", "Describes the eligibility conditions for the service.", 0, 1, comment)); 349 } 350 351 @Override 352 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 353 switch (_hash) { 354 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Coded value for the eligibility.", 0, 1, code); 355 case 950398559: /*comment*/ return new Property("comment", "markdown", "Describes the eligibility conditions for the service.", 0, 1, comment); 356 default: return super.getNamedProperty(_hash, _name, _checkValid); 357 } 358 359 } 360 361 @Override 362 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 363 switch (hash) { 364 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 365 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType 366 default: return super.getProperty(hash, name, checkValid); 367 } 368 369 } 370 371 @Override 372 public Base setProperty(int hash, String name, Base value) throws FHIRException { 373 switch (hash) { 374 case 3059181: // code 375 this.code = castToCodeableConcept(value); // CodeableConcept 376 return value; 377 case 950398559: // comment 378 this.comment = castToMarkdown(value); // MarkdownType 379 return value; 380 default: return super.setProperty(hash, name, value); 381 } 382 383 } 384 385 @Override 386 public Base setProperty(String name, Base value) throws FHIRException { 387 if (name.equals("code")) { 388 this.code = castToCodeableConcept(value); // CodeableConcept 389 } else if (name.equals("comment")) { 390 this.comment = castToMarkdown(value); // MarkdownType 391 } else 392 return super.setProperty(name, value); 393 return value; 394 } 395 396 @Override 397 public Base makeProperty(int hash, String name) throws FHIRException { 398 switch (hash) { 399 case 3059181: return getCode(); 400 case 950398559: return getCommentElement(); 401 default: return super.makeProperty(hash, name); 402 } 403 404 } 405 406 @Override 407 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 408 switch (hash) { 409 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 410 case 950398559: /*comment*/ return new String[] {"markdown"}; 411 default: return super.getTypesForProperty(hash, name); 412 } 413 414 } 415 416 @Override 417 public Base addChild(String name) throws FHIRException { 418 if (name.equals("code")) { 419 this.code = new CodeableConcept(); 420 return this.code; 421 } 422 else if (name.equals("comment")) { 423 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.comment"); 424 } 425 else 426 return super.addChild(name); 427 } 428 429 public HealthcareServiceEligibilityComponent copy() { 430 HealthcareServiceEligibilityComponent dst = new HealthcareServiceEligibilityComponent(); 431 copyValues(dst); 432 return dst; 433 } 434 435 public void copyValues(HealthcareServiceEligibilityComponent dst) { 436 super.copyValues(dst); 437 dst.code = code == null ? null : code.copy(); 438 dst.comment = comment == null ? null : comment.copy(); 439 } 440 441 @Override 442 public boolean equalsDeep(Base other_) { 443 if (!super.equalsDeep(other_)) 444 return false; 445 if (!(other_ instanceof HealthcareServiceEligibilityComponent)) 446 return false; 447 HealthcareServiceEligibilityComponent o = (HealthcareServiceEligibilityComponent) other_; 448 return compareDeep(code, o.code, true) && compareDeep(comment, o.comment, true); 449 } 450 451 @Override 452 public boolean equalsShallow(Base other_) { 453 if (!super.equalsShallow(other_)) 454 return false; 455 if (!(other_ instanceof HealthcareServiceEligibilityComponent)) 456 return false; 457 HealthcareServiceEligibilityComponent o = (HealthcareServiceEligibilityComponent) other_; 458 return compareValues(comment, o.comment, true); 459 } 460 461 public boolean isEmpty() { 462 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, comment); 463 } 464 465 public String fhirType() { 466 return "HealthcareService.eligibility"; 467 468 } 469 470 } 471 472 @Block() 473 public static class HealthcareServiceAvailableTimeComponent extends BackboneElement implements IBaseBackboneElement { 474 /** 475 * Indicates which days of the week are available between the start and end Times. 476 */ 477 @Child(name = "daysOfWeek", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 478 @Description(shortDefinition="mon | tue | wed | thu | fri | sat | sun", formalDefinition="Indicates which days of the week are available between the start and end Times." ) 479 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/days-of-week") 480 protected List<Enumeration<DaysOfWeek>> daysOfWeek; 481 482 /** 483 * Is this always available? (hence times are irrelevant) e.g. 24 hour service. 484 */ 485 @Child(name = "allDay", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 486 @Description(shortDefinition="Always available? e.g. 24 hour service", formalDefinition="Is this always available? (hence times are irrelevant) e.g. 24 hour service." ) 487 protected BooleanType allDay; 488 489 /** 490 * The opening time of day. Note: If the AllDay flag is set, then this time is ignored. 491 */ 492 @Child(name = "availableStartTime", type = {TimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 493 @Description(shortDefinition="Opening time of day (ignored if allDay = true)", formalDefinition="The opening time of day. Note: If the AllDay flag is set, then this time is ignored." ) 494 protected TimeType availableStartTime; 495 496 /** 497 * The closing time of day. Note: If the AllDay flag is set, then this time is ignored. 498 */ 499 @Child(name = "availableEndTime", type = {TimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 500 @Description(shortDefinition="Closing time of day (ignored if allDay = true)", formalDefinition="The closing time of day. Note: If the AllDay flag is set, then this time is ignored." ) 501 protected TimeType availableEndTime; 502 503 private static final long serialVersionUID = -2139510127L; 504 505 /** 506 * Constructor 507 */ 508 public HealthcareServiceAvailableTimeComponent() { 509 super(); 510 } 511 512 /** 513 * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 514 */ 515 public List<Enumeration<DaysOfWeek>> getDaysOfWeek() { 516 if (this.daysOfWeek == null) 517 this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 518 return this.daysOfWeek; 519 } 520 521 /** 522 * @return Returns a reference to <code>this</code> for easy method chaining 523 */ 524 public HealthcareServiceAvailableTimeComponent setDaysOfWeek(List<Enumeration<DaysOfWeek>> theDaysOfWeek) { 525 this.daysOfWeek = theDaysOfWeek; 526 return this; 527 } 528 529 public boolean hasDaysOfWeek() { 530 if (this.daysOfWeek == null) 531 return false; 532 for (Enumeration<DaysOfWeek> item : this.daysOfWeek) 533 if (!item.isEmpty()) 534 return true; 535 return false; 536 } 537 538 /** 539 * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 540 */ 541 public Enumeration<DaysOfWeek> addDaysOfWeekElement() {//2 542 Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory()); 543 if (this.daysOfWeek == null) 544 this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 545 this.daysOfWeek.add(t); 546 return t; 547 } 548 549 /** 550 * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 551 */ 552 public HealthcareServiceAvailableTimeComponent addDaysOfWeek(DaysOfWeek value) { //1 553 Enumeration<DaysOfWeek> t = new Enumeration<DaysOfWeek>(new DaysOfWeekEnumFactory()); 554 t.setValue(value); 555 if (this.daysOfWeek == null) 556 this.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 557 this.daysOfWeek.add(t); 558 return this; 559 } 560 561 /** 562 * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) 563 */ 564 public boolean hasDaysOfWeek(DaysOfWeek value) { 565 if (this.daysOfWeek == null) 566 return false; 567 for (Enumeration<DaysOfWeek> v : this.daysOfWeek) 568 if (v.getValue().equals(value)) // code 569 return true; 570 return false; 571 } 572 573 /** 574 * @return {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value 575 */ 576 public BooleanType getAllDayElement() { 577 if (this.allDay == null) 578 if (Configuration.errorOnAutoCreate()) 579 throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.allDay"); 580 else if (Configuration.doAutoCreate()) 581 this.allDay = new BooleanType(); // bb 582 return this.allDay; 583 } 584 585 public boolean hasAllDayElement() { 586 return this.allDay != null && !this.allDay.isEmpty(); 587 } 588 589 public boolean hasAllDay() { 590 return this.allDay != null && !this.allDay.isEmpty(); 591 } 592 593 /** 594 * @param value {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value 595 */ 596 public HealthcareServiceAvailableTimeComponent setAllDayElement(BooleanType value) { 597 this.allDay = value; 598 return this; 599 } 600 601 /** 602 * @return Is this always available? (hence times are irrelevant) e.g. 24 hour service. 603 */ 604 public boolean getAllDay() { 605 return this.allDay == null || this.allDay.isEmpty() ? false : this.allDay.getValue(); 606 } 607 608 /** 609 * @param value Is this always available? (hence times are irrelevant) e.g. 24 hour service. 610 */ 611 public HealthcareServiceAvailableTimeComponent setAllDay(boolean value) { 612 if (this.allDay == null) 613 this.allDay = new BooleanType(); 614 this.allDay.setValue(value); 615 return this; 616 } 617 618 /** 619 * @return {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value 620 */ 621 public TimeType getAvailableStartTimeElement() { 622 if (this.availableStartTime == null) 623 if (Configuration.errorOnAutoCreate()) 624 throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.availableStartTime"); 625 else if (Configuration.doAutoCreate()) 626 this.availableStartTime = new TimeType(); // bb 627 return this.availableStartTime; 628 } 629 630 public boolean hasAvailableStartTimeElement() { 631 return this.availableStartTime != null && !this.availableStartTime.isEmpty(); 632 } 633 634 public boolean hasAvailableStartTime() { 635 return this.availableStartTime != null && !this.availableStartTime.isEmpty(); 636 } 637 638 /** 639 * @param value {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value 640 */ 641 public HealthcareServiceAvailableTimeComponent setAvailableStartTimeElement(TimeType value) { 642 this.availableStartTime = value; 643 return this; 644 } 645 646 /** 647 * @return The opening time of day. Note: If the AllDay flag is set, then this time is ignored. 648 */ 649 public String getAvailableStartTime() { 650 return this.availableStartTime == null ? null : this.availableStartTime.getValue(); 651 } 652 653 /** 654 * @param value The opening time of day. Note: If the AllDay flag is set, then this time is ignored. 655 */ 656 public HealthcareServiceAvailableTimeComponent setAvailableStartTime(String value) { 657 if (value == null) 658 this.availableStartTime = null; 659 else { 660 if (this.availableStartTime == null) 661 this.availableStartTime = new TimeType(); 662 this.availableStartTime.setValue(value); 663 } 664 return this; 665 } 666 667 /** 668 * @return {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value 669 */ 670 public TimeType getAvailableEndTimeElement() { 671 if (this.availableEndTime == null) 672 if (Configuration.errorOnAutoCreate()) 673 throw new Error("Attempt to auto-create HealthcareServiceAvailableTimeComponent.availableEndTime"); 674 else if (Configuration.doAutoCreate()) 675 this.availableEndTime = new TimeType(); // bb 676 return this.availableEndTime; 677 } 678 679 public boolean hasAvailableEndTimeElement() { 680 return this.availableEndTime != null && !this.availableEndTime.isEmpty(); 681 } 682 683 public boolean hasAvailableEndTime() { 684 return this.availableEndTime != null && !this.availableEndTime.isEmpty(); 685 } 686 687 /** 688 * @param value {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value 689 */ 690 public HealthcareServiceAvailableTimeComponent setAvailableEndTimeElement(TimeType value) { 691 this.availableEndTime = value; 692 return this; 693 } 694 695 /** 696 * @return The closing time of day. Note: If the AllDay flag is set, then this time is ignored. 697 */ 698 public String getAvailableEndTime() { 699 return this.availableEndTime == null ? null : this.availableEndTime.getValue(); 700 } 701 702 /** 703 * @param value The closing time of day. Note: If the AllDay flag is set, then this time is ignored. 704 */ 705 public HealthcareServiceAvailableTimeComponent setAvailableEndTime(String value) { 706 if (value == null) 707 this.availableEndTime = null; 708 else { 709 if (this.availableEndTime == null) 710 this.availableEndTime = new TimeType(); 711 this.availableEndTime.setValue(value); 712 } 713 return this; 714 } 715 716 protected void listChildren(List<Property> children) { 717 super.listChildren(children); 718 children.add(new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek)); 719 children.add(new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, 1, allDay)); 720 children.add(new Property("availableStartTime", "time", "The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableStartTime)); 721 children.add(new Property("availableEndTime", "time", "The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableEndTime)); 722 } 723 724 @Override 725 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 726 switch (_hash) { 727 case 68050338: /*daysOfWeek*/ return new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek); 728 case -1414913477: /*allDay*/ return new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, 1, allDay); 729 case -1039453818: /*availableStartTime*/ return new Property("availableStartTime", "time", "The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableStartTime); 730 case 101151551: /*availableEndTime*/ return new Property("availableEndTime", "time", "The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, 1, availableEndTime); 731 default: return super.getNamedProperty(_hash, _name, _checkValid); 732 } 733 734 } 735 736 @Override 737 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 738 switch (hash) { 739 case 68050338: /*daysOfWeek*/ return this.daysOfWeek == null ? new Base[0] : this.daysOfWeek.toArray(new Base[this.daysOfWeek.size()]); // Enumeration<DaysOfWeek> 740 case -1414913477: /*allDay*/ return this.allDay == null ? new Base[0] : new Base[] {this.allDay}; // BooleanType 741 case -1039453818: /*availableStartTime*/ return this.availableStartTime == null ? new Base[0] : new Base[] {this.availableStartTime}; // TimeType 742 case 101151551: /*availableEndTime*/ return this.availableEndTime == null ? new Base[0] : new Base[] {this.availableEndTime}; // TimeType 743 default: return super.getProperty(hash, name, checkValid); 744 } 745 746 } 747 748 @Override 749 public Base setProperty(int hash, String name, Base value) throws FHIRException { 750 switch (hash) { 751 case 68050338: // daysOfWeek 752 value = new DaysOfWeekEnumFactory().fromType(castToCode(value)); 753 this.getDaysOfWeek().add((Enumeration) value); // Enumeration<DaysOfWeek> 754 return value; 755 case -1414913477: // allDay 756 this.allDay = castToBoolean(value); // BooleanType 757 return value; 758 case -1039453818: // availableStartTime 759 this.availableStartTime = castToTime(value); // TimeType 760 return value; 761 case 101151551: // availableEndTime 762 this.availableEndTime = castToTime(value); // TimeType 763 return value; 764 default: return super.setProperty(hash, name, value); 765 } 766 767 } 768 769 @Override 770 public Base setProperty(String name, Base value) throws FHIRException { 771 if (name.equals("daysOfWeek")) { 772 value = new DaysOfWeekEnumFactory().fromType(castToCode(value)); 773 this.getDaysOfWeek().add((Enumeration) value); 774 } else if (name.equals("allDay")) { 775 this.allDay = castToBoolean(value); // BooleanType 776 } else if (name.equals("availableStartTime")) { 777 this.availableStartTime = castToTime(value); // TimeType 778 } else if (name.equals("availableEndTime")) { 779 this.availableEndTime = castToTime(value); // TimeType 780 } else 781 return super.setProperty(name, value); 782 return value; 783 } 784 785 @Override 786 public Base makeProperty(int hash, String name) throws FHIRException { 787 switch (hash) { 788 case 68050338: return addDaysOfWeekElement(); 789 case -1414913477: return getAllDayElement(); 790 case -1039453818: return getAvailableStartTimeElement(); 791 case 101151551: return getAvailableEndTimeElement(); 792 default: return super.makeProperty(hash, name); 793 } 794 795 } 796 797 @Override 798 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 799 switch (hash) { 800 case 68050338: /*daysOfWeek*/ return new String[] {"code"}; 801 case -1414913477: /*allDay*/ return new String[] {"boolean"}; 802 case -1039453818: /*availableStartTime*/ return new String[] {"time"}; 803 case 101151551: /*availableEndTime*/ return new String[] {"time"}; 804 default: return super.getTypesForProperty(hash, name); 805 } 806 807 } 808 809 @Override 810 public Base addChild(String name) throws FHIRException { 811 if (name.equals("daysOfWeek")) { 812 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.daysOfWeek"); 813 } 814 else if (name.equals("allDay")) { 815 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.allDay"); 816 } 817 else if (name.equals("availableStartTime")) { 818 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availableStartTime"); 819 } 820 else if (name.equals("availableEndTime")) { 821 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availableEndTime"); 822 } 823 else 824 return super.addChild(name); 825 } 826 827 public HealthcareServiceAvailableTimeComponent copy() { 828 HealthcareServiceAvailableTimeComponent dst = new HealthcareServiceAvailableTimeComponent(); 829 copyValues(dst); 830 return dst; 831 } 832 833 public void copyValues(HealthcareServiceAvailableTimeComponent dst) { 834 super.copyValues(dst); 835 if (daysOfWeek != null) { 836 dst.daysOfWeek = new ArrayList<Enumeration<DaysOfWeek>>(); 837 for (Enumeration<DaysOfWeek> i : daysOfWeek) 838 dst.daysOfWeek.add(i.copy()); 839 }; 840 dst.allDay = allDay == null ? null : allDay.copy(); 841 dst.availableStartTime = availableStartTime == null ? null : availableStartTime.copy(); 842 dst.availableEndTime = availableEndTime == null ? null : availableEndTime.copy(); 843 } 844 845 @Override 846 public boolean equalsDeep(Base other_) { 847 if (!super.equalsDeep(other_)) 848 return false; 849 if (!(other_ instanceof HealthcareServiceAvailableTimeComponent)) 850 return false; 851 HealthcareServiceAvailableTimeComponent o = (HealthcareServiceAvailableTimeComponent) other_; 852 return compareDeep(daysOfWeek, o.daysOfWeek, true) && compareDeep(allDay, o.allDay, true) && compareDeep(availableStartTime, o.availableStartTime, true) 853 && compareDeep(availableEndTime, o.availableEndTime, true); 854 } 855 856 @Override 857 public boolean equalsShallow(Base other_) { 858 if (!super.equalsShallow(other_)) 859 return false; 860 if (!(other_ instanceof HealthcareServiceAvailableTimeComponent)) 861 return false; 862 HealthcareServiceAvailableTimeComponent o = (HealthcareServiceAvailableTimeComponent) other_; 863 return compareValues(daysOfWeek, o.daysOfWeek, true) && compareValues(allDay, o.allDay, true) && compareValues(availableStartTime, o.availableStartTime, true) 864 && compareValues(availableEndTime, o.availableEndTime, true); 865 } 866 867 public boolean isEmpty() { 868 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(daysOfWeek, allDay, availableStartTime 869 , availableEndTime); 870 } 871 872 public String fhirType() { 873 return "HealthcareService.availableTime"; 874 875 } 876 877 } 878 879 @Block() 880 public static class HealthcareServiceNotAvailableComponent extends BackboneElement implements IBaseBackboneElement { 881 /** 882 * The reason that can be presented to the user as to why this time is not available. 883 */ 884 @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 885 @Description(shortDefinition="Reason presented to the user explaining why time not available", formalDefinition="The reason that can be presented to the user as to why this time is not available." ) 886 protected StringType description; 887 888 /** 889 * Service is not available (seasonally or for a public holiday) from this date. 890 */ 891 @Child(name = "during", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) 892 @Description(shortDefinition="Service not available from this date", formalDefinition="Service is not available (seasonally or for a public holiday) from this date." ) 893 protected Period during; 894 895 private static final long serialVersionUID = 310849929L; 896 897 /** 898 * Constructor 899 */ 900 public HealthcareServiceNotAvailableComponent() { 901 super(); 902 } 903 904 /** 905 * Constructor 906 */ 907 public HealthcareServiceNotAvailableComponent(StringType description) { 908 super(); 909 this.description = description; 910 } 911 912 /** 913 * @return {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 914 */ 915 public StringType getDescriptionElement() { 916 if (this.description == null) 917 if (Configuration.errorOnAutoCreate()) 918 throw new Error("Attempt to auto-create HealthcareServiceNotAvailableComponent.description"); 919 else if (Configuration.doAutoCreate()) 920 this.description = new StringType(); // bb 921 return this.description; 922 } 923 924 public boolean hasDescriptionElement() { 925 return this.description != null && !this.description.isEmpty(); 926 } 927 928 public boolean hasDescription() { 929 return this.description != null && !this.description.isEmpty(); 930 } 931 932 /** 933 * @param value {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 934 */ 935 public HealthcareServiceNotAvailableComponent setDescriptionElement(StringType value) { 936 this.description = value; 937 return this; 938 } 939 940 /** 941 * @return The reason that can be presented to the user as to why this time is not available. 942 */ 943 public String getDescription() { 944 return this.description == null ? null : this.description.getValue(); 945 } 946 947 /** 948 * @param value The reason that can be presented to the user as to why this time is not available. 949 */ 950 public HealthcareServiceNotAvailableComponent setDescription(String value) { 951 if (this.description == null) 952 this.description = new StringType(); 953 this.description.setValue(value); 954 return this; 955 } 956 957 /** 958 * @return {@link #during} (Service is not available (seasonally or for a public holiday) from this date.) 959 */ 960 public Period getDuring() { 961 if (this.during == null) 962 if (Configuration.errorOnAutoCreate()) 963 throw new Error("Attempt to auto-create HealthcareServiceNotAvailableComponent.during"); 964 else if (Configuration.doAutoCreate()) 965 this.during = new Period(); // cc 966 return this.during; 967 } 968 969 public boolean hasDuring() { 970 return this.during != null && !this.during.isEmpty(); 971 } 972 973 /** 974 * @param value {@link #during} (Service is not available (seasonally or for a public holiday) from this date.) 975 */ 976 public HealthcareServiceNotAvailableComponent setDuring(Period value) { 977 this.during = value; 978 return this; 979 } 980 981 protected void listChildren(List<Property> children) { 982 super.listChildren(children); 983 children.add(new Property("description", "string", "The reason that can be presented to the user as to why this time is not available.", 0, 1, description)); 984 children.add(new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, 1, during)); 985 } 986 987 @Override 988 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 989 switch (_hash) { 990 case -1724546052: /*description*/ return new Property("description", "string", "The reason that can be presented to the user as to why this time is not available.", 0, 1, description); 991 case -1320499647: /*during*/ return new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, 1, during); 992 default: return super.getNamedProperty(_hash, _name, _checkValid); 993 } 994 995 } 996 997 @Override 998 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 999 switch (hash) { 1000 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1001 case -1320499647: /*during*/ return this.during == null ? new Base[0] : new Base[] {this.during}; // Period 1002 default: return super.getProperty(hash, name, checkValid); 1003 } 1004 1005 } 1006 1007 @Override 1008 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1009 switch (hash) { 1010 case -1724546052: // description 1011 this.description = castToString(value); // StringType 1012 return value; 1013 case -1320499647: // during 1014 this.during = castToPeriod(value); // Period 1015 return value; 1016 default: return super.setProperty(hash, name, value); 1017 } 1018 1019 } 1020 1021 @Override 1022 public Base setProperty(String name, Base value) throws FHIRException { 1023 if (name.equals("description")) { 1024 this.description = castToString(value); // StringType 1025 } else if (name.equals("during")) { 1026 this.during = castToPeriod(value); // Period 1027 } else 1028 return super.setProperty(name, value); 1029 return value; 1030 } 1031 1032 @Override 1033 public Base makeProperty(int hash, String name) throws FHIRException { 1034 switch (hash) { 1035 case -1724546052: return getDescriptionElement(); 1036 case -1320499647: return getDuring(); 1037 default: return super.makeProperty(hash, name); 1038 } 1039 1040 } 1041 1042 @Override 1043 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1044 switch (hash) { 1045 case -1724546052: /*description*/ return new String[] {"string"}; 1046 case -1320499647: /*during*/ return new String[] {"Period"}; 1047 default: return super.getTypesForProperty(hash, name); 1048 } 1049 1050 } 1051 1052 @Override 1053 public Base addChild(String name) throws FHIRException { 1054 if (name.equals("description")) { 1055 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.description"); 1056 } 1057 else if (name.equals("during")) { 1058 this.during = new Period(); 1059 return this.during; 1060 } 1061 else 1062 return super.addChild(name); 1063 } 1064 1065 public HealthcareServiceNotAvailableComponent copy() { 1066 HealthcareServiceNotAvailableComponent dst = new HealthcareServiceNotAvailableComponent(); 1067 copyValues(dst); 1068 return dst; 1069 } 1070 1071 public void copyValues(HealthcareServiceNotAvailableComponent dst) { 1072 super.copyValues(dst); 1073 dst.description = description == null ? null : description.copy(); 1074 dst.during = during == null ? null : during.copy(); 1075 } 1076 1077 @Override 1078 public boolean equalsDeep(Base other_) { 1079 if (!super.equalsDeep(other_)) 1080 return false; 1081 if (!(other_ instanceof HealthcareServiceNotAvailableComponent)) 1082 return false; 1083 HealthcareServiceNotAvailableComponent o = (HealthcareServiceNotAvailableComponent) other_; 1084 return compareDeep(description, o.description, true) && compareDeep(during, o.during, true); 1085 } 1086 1087 @Override 1088 public boolean equalsShallow(Base other_) { 1089 if (!super.equalsShallow(other_)) 1090 return false; 1091 if (!(other_ instanceof HealthcareServiceNotAvailableComponent)) 1092 return false; 1093 HealthcareServiceNotAvailableComponent o = (HealthcareServiceNotAvailableComponent) other_; 1094 return compareValues(description, o.description, true); 1095 } 1096 1097 public boolean isEmpty() { 1098 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, during); 1099 } 1100 1101 public String fhirType() { 1102 return "HealthcareService.notAvailable"; 1103 1104 } 1105 1106 } 1107 1108 /** 1109 * External identifiers for this item. 1110 */ 1111 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1112 @Description(shortDefinition="External identifiers for this item", formalDefinition="External identifiers for this item." ) 1113 protected List<Identifier> identifier; 1114 1115 /** 1116 * This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this. 1117 */ 1118 @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true) 1119 @Description(shortDefinition="Whether this HealthcareService record is in active use", formalDefinition="This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this." ) 1120 protected BooleanType active; 1121 1122 /** 1123 * The organization that provides this healthcare service. 1124 */ 1125 @Child(name = "providedBy", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=true) 1126 @Description(shortDefinition="Organization that provides this service", formalDefinition="The organization that provides this healthcare service." ) 1127 protected Reference providedBy; 1128 1129 /** 1130 * Identifies the broad category of service being performed or delivered. 1131 */ 1132 @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1133 @Description(shortDefinition="Broad category of service being performed or delivered", formalDefinition="Identifies the broad category of service being performed or delivered." ) 1134 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-category") 1135 protected List<CodeableConcept> category; 1136 1137 /** 1138 * The specific type of service that may be delivered or performed. 1139 */ 1140 @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1141 @Description(shortDefinition="Type of service that may be delivered or performed", formalDefinition="The specific type of service that may be delivered or performed." ) 1142 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-type") 1143 protected List<CodeableConcept> type; 1144 1145 /** 1146 * Collection of specialties handled by the service site. This is more of a medical term. 1147 */ 1148 @Child(name = "specialty", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1149 @Description(shortDefinition="Specialties handled by the HealthcareService", formalDefinition="Collection of specialties handled by the service site. This is more of a medical term." ) 1150 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-practice-codes") 1151 protected List<CodeableConcept> specialty; 1152 1153 /** 1154 * The location(s) where this healthcare service may be provided. 1155 */ 1156 @Child(name = "location", type = {Location.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1157 @Description(shortDefinition="Location(s) where service may be provided", formalDefinition="The location(s) where this healthcare service may be provided." ) 1158 protected List<Reference> location; 1159 1160 /** 1161 * Further description of the service as it would be presented to a consumer while searching. 1162 */ 1163 @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1164 @Description(shortDefinition="Description of service as presented to a consumer while searching", formalDefinition="Further description of the service as it would be presented to a consumer while searching." ) 1165 protected StringType name; 1166 1167 /** 1168 * Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. 1169 */ 1170 @Child(name = "comment", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) 1171 @Description(shortDefinition="Additional description and/or any specific issues not covered elsewhere", formalDefinition="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." ) 1172 protected StringType comment; 1173 1174 /** 1175 * Extra details about the service that can't be placed in the other fields. 1176 */ 1177 @Child(name = "extraDetails", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=false) 1178 @Description(shortDefinition="Extra details about the service that can't be placed in the other fields", formalDefinition="Extra details about the service that can't be placed in the other fields." ) 1179 protected MarkdownType extraDetails; 1180 1181 /** 1182 * If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list. 1183 */ 1184 @Child(name = "photo", type = {Attachment.class}, order=10, min=0, max=1, modifier=false, summary=true) 1185 @Description(shortDefinition="Facilitates quick identification of the service", formalDefinition="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list." ) 1186 protected Attachment photo; 1187 1188 /** 1189 * List of contacts related to this specific healthcare service. 1190 */ 1191 @Child(name = "telecom", type = {ContactPoint.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1192 @Description(shortDefinition="Contacts related to the healthcare service", formalDefinition="List of contacts related to this specific healthcare service." ) 1193 protected List<ContactPoint> telecom; 1194 1195 /** 1196 * The location(s) that this service is available to (not where the service is provided). 1197 */ 1198 @Child(name = "coverageArea", type = {Location.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1199 @Description(shortDefinition="Location(s) service is intended for/available to", formalDefinition="The location(s) that this service is available to (not where the service is provided)." ) 1200 protected List<Reference> coverageArea; 1201 1202 /** 1203 * The code(s) that detail the conditions under which the healthcare service is available/offered. 1204 */ 1205 @Child(name = "serviceProvisionCode", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1206 @Description(shortDefinition="Conditions under which service is available/offered", formalDefinition="The code(s) that detail the conditions under which the healthcare service is available/offered." ) 1207 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-provision-conditions") 1208 protected List<CodeableConcept> serviceProvisionCode; 1209 1210 /** 1211 * Does this service have specific eligibility requirements that need to be met in order to use the service? 1212 */ 1213 @Child(name = "eligibility", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1214 @Description(shortDefinition="Specific eligibility requirements required to use the service", formalDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service?" ) 1215 protected List<HealthcareServiceEligibilityComponent> eligibility; 1216 1217 /** 1218 * Programs that this service is applicable to. 1219 */ 1220 @Child(name = "program", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1221 @Description(shortDefinition="Programs that this service is applicable to", formalDefinition="Programs that this service is applicable to." ) 1222 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/program") 1223 protected List<CodeableConcept> program; 1224 1225 /** 1226 * Collection of characteristics (attributes). 1227 */ 1228 @Child(name = "characteristic", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1229 @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." ) 1230 protected List<CodeableConcept> characteristic; 1231 1232 /** 1233 * Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used. 1234 */ 1235 @Child(name = "communication", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1236 @Description(shortDefinition="The language that this service is offered in", formalDefinition="Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used." ) 1237 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages") 1238 protected List<CodeableConcept> communication; 1239 1240 /** 1241 * Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required. 1242 */ 1243 @Child(name = "referralMethod", type = {CodeableConcept.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1244 @Description(shortDefinition="Ways that the service accepts referrals", formalDefinition="Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required." ) 1245 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-referral-method") 1246 protected List<CodeableConcept> referralMethod; 1247 1248 /** 1249 * Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. 1250 */ 1251 @Child(name = "appointmentRequired", type = {BooleanType.class}, order=19, min=0, max=1, modifier=false, summary=false) 1252 @Description(shortDefinition="If an appointment is required for access to this service", formalDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service." ) 1253 protected BooleanType appointmentRequired; 1254 1255 /** 1256 * A collection of times that the Service Site is available. 1257 */ 1258 @Child(name = "availableTime", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1259 @Description(shortDefinition="Times the Service Site is available", formalDefinition="A collection of times that the Service Site is available." ) 1260 protected List<HealthcareServiceAvailableTimeComponent> availableTime; 1261 1262 /** 1263 * The HealthcareService is not available during this period of time due to the provided reason. 1264 */ 1265 @Child(name = "notAvailable", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1266 @Description(shortDefinition="Not available during this time due to provided reason", formalDefinition="The HealthcareService is not available during this period of time due to the provided reason." ) 1267 protected List<HealthcareServiceNotAvailableComponent> notAvailable; 1268 1269 /** 1270 * A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. 1271 */ 1272 @Child(name = "availabilityExceptions", type = {StringType.class}, order=22, min=0, max=1, modifier=false, summary=false) 1273 @Description(shortDefinition="Description of availability exceptions", formalDefinition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times." ) 1274 protected StringType availabilityExceptions; 1275 1276 /** 1277 * Technical endpoints providing access to services operated for the specific healthcare services defined at this resource. 1278 */ 1279 @Child(name = "endpoint", type = {Endpoint.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1280 @Description(shortDefinition="Technical endpoints providing access to electronic services operated for the healthcare service", formalDefinition="Technical endpoints providing access to services operated for the specific healthcare services defined at this resource." ) 1281 protected List<Reference> endpoint; 1282 1283 private static final long serialVersionUID = 25501899L; 1284 1285 /** 1286 * Constructor 1287 */ 1288 public HealthcareService() { 1289 super(); 1290 } 1291 1292 /** 1293 * @return {@link #identifier} (External identifiers for this item.) 1294 */ 1295 public List<Identifier> getIdentifier() { 1296 if (this.identifier == null) 1297 this.identifier = new ArrayList<Identifier>(); 1298 return this.identifier; 1299 } 1300 1301 /** 1302 * @return Returns a reference to <code>this</code> for easy method chaining 1303 */ 1304 public HealthcareService setIdentifier(List<Identifier> theIdentifier) { 1305 this.identifier = theIdentifier; 1306 return this; 1307 } 1308 1309 public boolean hasIdentifier() { 1310 if (this.identifier == null) 1311 return false; 1312 for (Identifier item : this.identifier) 1313 if (!item.isEmpty()) 1314 return true; 1315 return false; 1316 } 1317 1318 public Identifier addIdentifier() { //3 1319 Identifier t = new Identifier(); 1320 if (this.identifier == null) 1321 this.identifier = new ArrayList<Identifier>(); 1322 this.identifier.add(t); 1323 return t; 1324 } 1325 1326 public HealthcareService addIdentifier(Identifier t) { //3 1327 if (t == null) 1328 return this; 1329 if (this.identifier == null) 1330 this.identifier = new ArrayList<Identifier>(); 1331 this.identifier.add(t); 1332 return this; 1333 } 1334 1335 /** 1336 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1337 */ 1338 public Identifier getIdentifierFirstRep() { 1339 if (getIdentifier().isEmpty()) { 1340 addIdentifier(); 1341 } 1342 return getIdentifier().get(0); 1343 } 1344 1345 /** 1346 * @return {@link #active} (This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value 1347 */ 1348 public BooleanType getActiveElement() { 1349 if (this.active == null) 1350 if (Configuration.errorOnAutoCreate()) 1351 throw new Error("Attempt to auto-create HealthcareService.active"); 1352 else if (Configuration.doAutoCreate()) 1353 this.active = new BooleanType(); // bb 1354 return this.active; 1355 } 1356 1357 public boolean hasActiveElement() { 1358 return this.active != null && !this.active.isEmpty(); 1359 } 1360 1361 public boolean hasActive() { 1362 return this.active != null && !this.active.isEmpty(); 1363 } 1364 1365 /** 1366 * @param value {@link #active} (This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value 1367 */ 1368 public HealthcareService setActiveElement(BooleanType value) { 1369 this.active = value; 1370 return this; 1371 } 1372 1373 /** 1374 * @return This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this. 1375 */ 1376 public boolean getActive() { 1377 return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); 1378 } 1379 1380 /** 1381 * @param value This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this. 1382 */ 1383 public HealthcareService setActive(boolean value) { 1384 if (this.active == null) 1385 this.active = new BooleanType(); 1386 this.active.setValue(value); 1387 return this; 1388 } 1389 1390 /** 1391 * @return {@link #providedBy} (The organization that provides this healthcare service.) 1392 */ 1393 public Reference getProvidedBy() { 1394 if (this.providedBy == null) 1395 if (Configuration.errorOnAutoCreate()) 1396 throw new Error("Attempt to auto-create HealthcareService.providedBy"); 1397 else if (Configuration.doAutoCreate()) 1398 this.providedBy = new Reference(); // cc 1399 return this.providedBy; 1400 } 1401 1402 public boolean hasProvidedBy() { 1403 return this.providedBy != null && !this.providedBy.isEmpty(); 1404 } 1405 1406 /** 1407 * @param value {@link #providedBy} (The organization that provides this healthcare service.) 1408 */ 1409 public HealthcareService setProvidedBy(Reference value) { 1410 this.providedBy = value; 1411 return this; 1412 } 1413 1414 /** 1415 * @return {@link #category} (Identifies the broad category of service being performed or delivered.) 1416 */ 1417 public List<CodeableConcept> getCategory() { 1418 if (this.category == null) 1419 this.category = new ArrayList<CodeableConcept>(); 1420 return this.category; 1421 } 1422 1423 /** 1424 * @return Returns a reference to <code>this</code> for easy method chaining 1425 */ 1426 public HealthcareService setCategory(List<CodeableConcept> theCategory) { 1427 this.category = theCategory; 1428 return this; 1429 } 1430 1431 public boolean hasCategory() { 1432 if (this.category == null) 1433 return false; 1434 for (CodeableConcept item : this.category) 1435 if (!item.isEmpty()) 1436 return true; 1437 return false; 1438 } 1439 1440 public CodeableConcept addCategory() { //3 1441 CodeableConcept t = new CodeableConcept(); 1442 if (this.category == null) 1443 this.category = new ArrayList<CodeableConcept>(); 1444 this.category.add(t); 1445 return t; 1446 } 1447 1448 public HealthcareService addCategory(CodeableConcept t) { //3 1449 if (t == null) 1450 return this; 1451 if (this.category == null) 1452 this.category = new ArrayList<CodeableConcept>(); 1453 this.category.add(t); 1454 return this; 1455 } 1456 1457 /** 1458 * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist 1459 */ 1460 public CodeableConcept getCategoryFirstRep() { 1461 if (getCategory().isEmpty()) { 1462 addCategory(); 1463 } 1464 return getCategory().get(0); 1465 } 1466 1467 /** 1468 * @return {@link #type} (The specific type of service that may be delivered or performed.) 1469 */ 1470 public List<CodeableConcept> getType() { 1471 if (this.type == null) 1472 this.type = new ArrayList<CodeableConcept>(); 1473 return this.type; 1474 } 1475 1476 /** 1477 * @return Returns a reference to <code>this</code> for easy method chaining 1478 */ 1479 public HealthcareService setType(List<CodeableConcept> theType) { 1480 this.type = theType; 1481 return this; 1482 } 1483 1484 public boolean hasType() { 1485 if (this.type == null) 1486 return false; 1487 for (CodeableConcept item : this.type) 1488 if (!item.isEmpty()) 1489 return true; 1490 return false; 1491 } 1492 1493 public CodeableConcept addType() { //3 1494 CodeableConcept t = new CodeableConcept(); 1495 if (this.type == null) 1496 this.type = new ArrayList<CodeableConcept>(); 1497 this.type.add(t); 1498 return t; 1499 } 1500 1501 public HealthcareService addType(CodeableConcept t) { //3 1502 if (t == null) 1503 return this; 1504 if (this.type == null) 1505 this.type = new ArrayList<CodeableConcept>(); 1506 this.type.add(t); 1507 return this; 1508 } 1509 1510 /** 1511 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist 1512 */ 1513 public CodeableConcept getTypeFirstRep() { 1514 if (getType().isEmpty()) { 1515 addType(); 1516 } 1517 return getType().get(0); 1518 } 1519 1520 /** 1521 * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) 1522 */ 1523 public List<CodeableConcept> getSpecialty() { 1524 if (this.specialty == null) 1525 this.specialty = new ArrayList<CodeableConcept>(); 1526 return this.specialty; 1527 } 1528 1529 /** 1530 * @return Returns a reference to <code>this</code> for easy method chaining 1531 */ 1532 public HealthcareService setSpecialty(List<CodeableConcept> theSpecialty) { 1533 this.specialty = theSpecialty; 1534 return this; 1535 } 1536 1537 public boolean hasSpecialty() { 1538 if (this.specialty == null) 1539 return false; 1540 for (CodeableConcept item : this.specialty) 1541 if (!item.isEmpty()) 1542 return true; 1543 return false; 1544 } 1545 1546 public CodeableConcept addSpecialty() { //3 1547 CodeableConcept t = new CodeableConcept(); 1548 if (this.specialty == null) 1549 this.specialty = new ArrayList<CodeableConcept>(); 1550 this.specialty.add(t); 1551 return t; 1552 } 1553 1554 public HealthcareService addSpecialty(CodeableConcept t) { //3 1555 if (t == null) 1556 return this; 1557 if (this.specialty == null) 1558 this.specialty = new ArrayList<CodeableConcept>(); 1559 this.specialty.add(t); 1560 return this; 1561 } 1562 1563 /** 1564 * @return The first repetition of repeating field {@link #specialty}, creating it if it does not already exist 1565 */ 1566 public CodeableConcept getSpecialtyFirstRep() { 1567 if (getSpecialty().isEmpty()) { 1568 addSpecialty(); 1569 } 1570 return getSpecialty().get(0); 1571 } 1572 1573 /** 1574 * @return {@link #location} (The location(s) where this healthcare service may be provided.) 1575 */ 1576 public List<Reference> getLocation() { 1577 if (this.location == null) 1578 this.location = new ArrayList<Reference>(); 1579 return this.location; 1580 } 1581 1582 /** 1583 * @return Returns a reference to <code>this</code> for easy method chaining 1584 */ 1585 public HealthcareService setLocation(List<Reference> theLocation) { 1586 this.location = theLocation; 1587 return this; 1588 } 1589 1590 public boolean hasLocation() { 1591 if (this.location == null) 1592 return false; 1593 for (Reference item : this.location) 1594 if (!item.isEmpty()) 1595 return true; 1596 return false; 1597 } 1598 1599 public Reference addLocation() { //3 1600 Reference t = new Reference(); 1601 if (this.location == null) 1602 this.location = new ArrayList<Reference>(); 1603 this.location.add(t); 1604 return t; 1605 } 1606 1607 public HealthcareService addLocation(Reference t) { //3 1608 if (t == null) 1609 return this; 1610 if (this.location == null) 1611 this.location = new ArrayList<Reference>(); 1612 this.location.add(t); 1613 return this; 1614 } 1615 1616 /** 1617 * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist 1618 */ 1619 public Reference getLocationFirstRep() { 1620 if (getLocation().isEmpty()) { 1621 addLocation(); 1622 } 1623 return getLocation().get(0); 1624 } 1625 1626 /** 1627 * @return {@link #name} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1628 */ 1629 public StringType getNameElement() { 1630 if (this.name == null) 1631 if (Configuration.errorOnAutoCreate()) 1632 throw new Error("Attempt to auto-create HealthcareService.name"); 1633 else if (Configuration.doAutoCreate()) 1634 this.name = new StringType(); // bb 1635 return this.name; 1636 } 1637 1638 public boolean hasNameElement() { 1639 return this.name != null && !this.name.isEmpty(); 1640 } 1641 1642 public boolean hasName() { 1643 return this.name != null && !this.name.isEmpty(); 1644 } 1645 1646 /** 1647 * @param value {@link #name} (Further description of the service as it would be presented to a consumer while searching.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1648 */ 1649 public HealthcareService setNameElement(StringType value) { 1650 this.name = value; 1651 return this; 1652 } 1653 1654 /** 1655 * @return Further description of the service as it would be presented to a consumer while searching. 1656 */ 1657 public String getName() { 1658 return this.name == null ? null : this.name.getValue(); 1659 } 1660 1661 /** 1662 * @param value Further description of the service as it would be presented to a consumer while searching. 1663 */ 1664 public HealthcareService setName(String value) { 1665 if (Utilities.noString(value)) 1666 this.name = null; 1667 else { 1668 if (this.name == null) 1669 this.name = new StringType(); 1670 this.name.setValue(value); 1671 } 1672 return this; 1673 } 1674 1675 /** 1676 * @return {@link #comment} (Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 1677 */ 1678 public StringType getCommentElement() { 1679 if (this.comment == null) 1680 if (Configuration.errorOnAutoCreate()) 1681 throw new Error("Attempt to auto-create HealthcareService.comment"); 1682 else if (Configuration.doAutoCreate()) 1683 this.comment = new StringType(); // bb 1684 return this.comment; 1685 } 1686 1687 public boolean hasCommentElement() { 1688 return this.comment != null && !this.comment.isEmpty(); 1689 } 1690 1691 public boolean hasComment() { 1692 return this.comment != null && !this.comment.isEmpty(); 1693 } 1694 1695 /** 1696 * @param value {@link #comment} (Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 1697 */ 1698 public HealthcareService setCommentElement(StringType value) { 1699 this.comment = value; 1700 return this; 1701 } 1702 1703 /** 1704 * @return Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. 1705 */ 1706 public String getComment() { 1707 return this.comment == null ? null : this.comment.getValue(); 1708 } 1709 1710 /** 1711 * @param value Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. 1712 */ 1713 public HealthcareService setComment(String value) { 1714 if (Utilities.noString(value)) 1715 this.comment = null; 1716 else { 1717 if (this.comment == null) 1718 this.comment = new StringType(); 1719 this.comment.setValue(value); 1720 } 1721 return this; 1722 } 1723 1724 /** 1725 * @return {@link #extraDetails} (Extra details about the service that can't be placed in the other fields.). This is the underlying object with id, value and extensions. The accessor "getExtraDetails" gives direct access to the value 1726 */ 1727 public MarkdownType getExtraDetailsElement() { 1728 if (this.extraDetails == null) 1729 if (Configuration.errorOnAutoCreate()) 1730 throw new Error("Attempt to auto-create HealthcareService.extraDetails"); 1731 else if (Configuration.doAutoCreate()) 1732 this.extraDetails = new MarkdownType(); // bb 1733 return this.extraDetails; 1734 } 1735 1736 public boolean hasExtraDetailsElement() { 1737 return this.extraDetails != null && !this.extraDetails.isEmpty(); 1738 } 1739 1740 public boolean hasExtraDetails() { 1741 return this.extraDetails != null && !this.extraDetails.isEmpty(); 1742 } 1743 1744 /** 1745 * @param value {@link #extraDetails} (Extra details about the service that can't be placed in the other fields.). This is the underlying object with id, value and extensions. The accessor "getExtraDetails" gives direct access to the value 1746 */ 1747 public HealthcareService setExtraDetailsElement(MarkdownType value) { 1748 this.extraDetails = value; 1749 return this; 1750 } 1751 1752 /** 1753 * @return Extra details about the service that can't be placed in the other fields. 1754 */ 1755 public String getExtraDetails() { 1756 return this.extraDetails == null ? null : this.extraDetails.getValue(); 1757 } 1758 1759 /** 1760 * @param value Extra details about the service that can't be placed in the other fields. 1761 */ 1762 public HealthcareService setExtraDetails(String value) { 1763 if (value == null) 1764 this.extraDetails = null; 1765 else { 1766 if (this.extraDetails == null) 1767 this.extraDetails = new MarkdownType(); 1768 this.extraDetails.setValue(value); 1769 } 1770 return this; 1771 } 1772 1773 /** 1774 * @return {@link #photo} (If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.) 1775 */ 1776 public Attachment getPhoto() { 1777 if (this.photo == null) 1778 if (Configuration.errorOnAutoCreate()) 1779 throw new Error("Attempt to auto-create HealthcareService.photo"); 1780 else if (Configuration.doAutoCreate()) 1781 this.photo = new Attachment(); // cc 1782 return this.photo; 1783 } 1784 1785 public boolean hasPhoto() { 1786 return this.photo != null && !this.photo.isEmpty(); 1787 } 1788 1789 /** 1790 * @param value {@link #photo} (If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.) 1791 */ 1792 public HealthcareService setPhoto(Attachment value) { 1793 this.photo = value; 1794 return this; 1795 } 1796 1797 /** 1798 * @return {@link #telecom} (List of contacts related to this specific healthcare service.) 1799 */ 1800 public List<ContactPoint> getTelecom() { 1801 if (this.telecom == null) 1802 this.telecom = new ArrayList<ContactPoint>(); 1803 return this.telecom; 1804 } 1805 1806 /** 1807 * @return Returns a reference to <code>this</code> for easy method chaining 1808 */ 1809 public HealthcareService setTelecom(List<ContactPoint> theTelecom) { 1810 this.telecom = theTelecom; 1811 return this; 1812 } 1813 1814 public boolean hasTelecom() { 1815 if (this.telecom == null) 1816 return false; 1817 for (ContactPoint item : this.telecom) 1818 if (!item.isEmpty()) 1819 return true; 1820 return false; 1821 } 1822 1823 public ContactPoint addTelecom() { //3 1824 ContactPoint t = new ContactPoint(); 1825 if (this.telecom == null) 1826 this.telecom = new ArrayList<ContactPoint>(); 1827 this.telecom.add(t); 1828 return t; 1829 } 1830 1831 public HealthcareService addTelecom(ContactPoint t) { //3 1832 if (t == null) 1833 return this; 1834 if (this.telecom == null) 1835 this.telecom = new ArrayList<ContactPoint>(); 1836 this.telecom.add(t); 1837 return this; 1838 } 1839 1840 /** 1841 * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist 1842 */ 1843 public ContactPoint getTelecomFirstRep() { 1844 if (getTelecom().isEmpty()) { 1845 addTelecom(); 1846 } 1847 return getTelecom().get(0); 1848 } 1849 1850 /** 1851 * @return {@link #coverageArea} (The location(s) that this service is available to (not where the service is provided).) 1852 */ 1853 public List<Reference> getCoverageArea() { 1854 if (this.coverageArea == null) 1855 this.coverageArea = new ArrayList<Reference>(); 1856 return this.coverageArea; 1857 } 1858 1859 /** 1860 * @return Returns a reference to <code>this</code> for easy method chaining 1861 */ 1862 public HealthcareService setCoverageArea(List<Reference> theCoverageArea) { 1863 this.coverageArea = theCoverageArea; 1864 return this; 1865 } 1866 1867 public boolean hasCoverageArea() { 1868 if (this.coverageArea == null) 1869 return false; 1870 for (Reference item : this.coverageArea) 1871 if (!item.isEmpty()) 1872 return true; 1873 return false; 1874 } 1875 1876 public Reference addCoverageArea() { //3 1877 Reference t = new Reference(); 1878 if (this.coverageArea == null) 1879 this.coverageArea = new ArrayList<Reference>(); 1880 this.coverageArea.add(t); 1881 return t; 1882 } 1883 1884 public HealthcareService addCoverageArea(Reference t) { //3 1885 if (t == null) 1886 return this; 1887 if (this.coverageArea == null) 1888 this.coverageArea = new ArrayList<Reference>(); 1889 this.coverageArea.add(t); 1890 return this; 1891 } 1892 1893 /** 1894 * @return The first repetition of repeating field {@link #coverageArea}, creating it if it does not already exist 1895 */ 1896 public Reference getCoverageAreaFirstRep() { 1897 if (getCoverageArea().isEmpty()) { 1898 addCoverageArea(); 1899 } 1900 return getCoverageArea().get(0); 1901 } 1902 1903 /** 1904 * @return {@link #serviceProvisionCode} (The code(s) that detail the conditions under which the healthcare service is available/offered.) 1905 */ 1906 public List<CodeableConcept> getServiceProvisionCode() { 1907 if (this.serviceProvisionCode == null) 1908 this.serviceProvisionCode = new ArrayList<CodeableConcept>(); 1909 return this.serviceProvisionCode; 1910 } 1911 1912 /** 1913 * @return Returns a reference to <code>this</code> for easy method chaining 1914 */ 1915 public HealthcareService setServiceProvisionCode(List<CodeableConcept> theServiceProvisionCode) { 1916 this.serviceProvisionCode = theServiceProvisionCode; 1917 return this; 1918 } 1919 1920 public boolean hasServiceProvisionCode() { 1921 if (this.serviceProvisionCode == null) 1922 return false; 1923 for (CodeableConcept item : this.serviceProvisionCode) 1924 if (!item.isEmpty()) 1925 return true; 1926 return false; 1927 } 1928 1929 public CodeableConcept addServiceProvisionCode() { //3 1930 CodeableConcept t = new CodeableConcept(); 1931 if (this.serviceProvisionCode == null) 1932 this.serviceProvisionCode = new ArrayList<CodeableConcept>(); 1933 this.serviceProvisionCode.add(t); 1934 return t; 1935 } 1936 1937 public HealthcareService addServiceProvisionCode(CodeableConcept t) { //3 1938 if (t == null) 1939 return this; 1940 if (this.serviceProvisionCode == null) 1941 this.serviceProvisionCode = new ArrayList<CodeableConcept>(); 1942 this.serviceProvisionCode.add(t); 1943 return this; 1944 } 1945 1946 /** 1947 * @return The first repetition of repeating field {@link #serviceProvisionCode}, creating it if it does not already exist 1948 */ 1949 public CodeableConcept getServiceProvisionCodeFirstRep() { 1950 if (getServiceProvisionCode().isEmpty()) { 1951 addServiceProvisionCode(); 1952 } 1953 return getServiceProvisionCode().get(0); 1954 } 1955 1956 /** 1957 * @return {@link #eligibility} (Does this service have specific eligibility requirements that need to be met in order to use the service?) 1958 */ 1959 public List<HealthcareServiceEligibilityComponent> getEligibility() { 1960 if (this.eligibility == null) 1961 this.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>(); 1962 return this.eligibility; 1963 } 1964 1965 /** 1966 * @return Returns a reference to <code>this</code> for easy method chaining 1967 */ 1968 public HealthcareService setEligibility(List<HealthcareServiceEligibilityComponent> theEligibility) { 1969 this.eligibility = theEligibility; 1970 return this; 1971 } 1972 1973 public boolean hasEligibility() { 1974 if (this.eligibility == null) 1975 return false; 1976 for (HealthcareServiceEligibilityComponent item : this.eligibility) 1977 if (!item.isEmpty()) 1978 return true; 1979 return false; 1980 } 1981 1982 public HealthcareServiceEligibilityComponent addEligibility() { //3 1983 HealthcareServiceEligibilityComponent t = new HealthcareServiceEligibilityComponent(); 1984 if (this.eligibility == null) 1985 this.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>(); 1986 this.eligibility.add(t); 1987 return t; 1988 } 1989 1990 public HealthcareService addEligibility(HealthcareServiceEligibilityComponent t) { //3 1991 if (t == null) 1992 return this; 1993 if (this.eligibility == null) 1994 this.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>(); 1995 this.eligibility.add(t); 1996 return this; 1997 } 1998 1999 /** 2000 * @return The first repetition of repeating field {@link #eligibility}, creating it if it does not already exist 2001 */ 2002 public HealthcareServiceEligibilityComponent getEligibilityFirstRep() { 2003 if (getEligibility().isEmpty()) { 2004 addEligibility(); 2005 } 2006 return getEligibility().get(0); 2007 } 2008 2009 /** 2010 * @return {@link #program} (Programs that this service is applicable to.) 2011 */ 2012 public List<CodeableConcept> getProgram() { 2013 if (this.program == null) 2014 this.program = new ArrayList<CodeableConcept>(); 2015 return this.program; 2016 } 2017 2018 /** 2019 * @return Returns a reference to <code>this</code> for easy method chaining 2020 */ 2021 public HealthcareService setProgram(List<CodeableConcept> theProgram) { 2022 this.program = theProgram; 2023 return this; 2024 } 2025 2026 public boolean hasProgram() { 2027 if (this.program == null) 2028 return false; 2029 for (CodeableConcept item : this.program) 2030 if (!item.isEmpty()) 2031 return true; 2032 return false; 2033 } 2034 2035 public CodeableConcept addProgram() { //3 2036 CodeableConcept t = new CodeableConcept(); 2037 if (this.program == null) 2038 this.program = new ArrayList<CodeableConcept>(); 2039 this.program.add(t); 2040 return t; 2041 } 2042 2043 public HealthcareService addProgram(CodeableConcept t) { //3 2044 if (t == null) 2045 return this; 2046 if (this.program == null) 2047 this.program = new ArrayList<CodeableConcept>(); 2048 this.program.add(t); 2049 return this; 2050 } 2051 2052 /** 2053 * @return The first repetition of repeating field {@link #program}, creating it if it does not already exist 2054 */ 2055 public CodeableConcept getProgramFirstRep() { 2056 if (getProgram().isEmpty()) { 2057 addProgram(); 2058 } 2059 return getProgram().get(0); 2060 } 2061 2062 /** 2063 * @return {@link #characteristic} (Collection of characteristics (attributes).) 2064 */ 2065 public List<CodeableConcept> getCharacteristic() { 2066 if (this.characteristic == null) 2067 this.characteristic = new ArrayList<CodeableConcept>(); 2068 return this.characteristic; 2069 } 2070 2071 /** 2072 * @return Returns a reference to <code>this</code> for easy method chaining 2073 */ 2074 public HealthcareService setCharacteristic(List<CodeableConcept> theCharacteristic) { 2075 this.characteristic = theCharacteristic; 2076 return this; 2077 } 2078 2079 public boolean hasCharacteristic() { 2080 if (this.characteristic == null) 2081 return false; 2082 for (CodeableConcept item : this.characteristic) 2083 if (!item.isEmpty()) 2084 return true; 2085 return false; 2086 } 2087 2088 public CodeableConcept addCharacteristic() { //3 2089 CodeableConcept t = new CodeableConcept(); 2090 if (this.characteristic == null) 2091 this.characteristic = new ArrayList<CodeableConcept>(); 2092 this.characteristic.add(t); 2093 return t; 2094 } 2095 2096 public HealthcareService addCharacteristic(CodeableConcept t) { //3 2097 if (t == null) 2098 return this; 2099 if (this.characteristic == null) 2100 this.characteristic = new ArrayList<CodeableConcept>(); 2101 this.characteristic.add(t); 2102 return this; 2103 } 2104 2105 /** 2106 * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist 2107 */ 2108 public CodeableConcept getCharacteristicFirstRep() { 2109 if (getCharacteristic().isEmpty()) { 2110 addCharacteristic(); 2111 } 2112 return getCharacteristic().get(0); 2113 } 2114 2115 /** 2116 * @return {@link #communication} (Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.) 2117 */ 2118 public List<CodeableConcept> getCommunication() { 2119 if (this.communication == null) 2120 this.communication = new ArrayList<CodeableConcept>(); 2121 return this.communication; 2122 } 2123 2124 /** 2125 * @return Returns a reference to <code>this</code> for easy method chaining 2126 */ 2127 public HealthcareService setCommunication(List<CodeableConcept> theCommunication) { 2128 this.communication = theCommunication; 2129 return this; 2130 } 2131 2132 public boolean hasCommunication() { 2133 if (this.communication == null) 2134 return false; 2135 for (CodeableConcept item : this.communication) 2136 if (!item.isEmpty()) 2137 return true; 2138 return false; 2139 } 2140 2141 public CodeableConcept addCommunication() { //3 2142 CodeableConcept t = new CodeableConcept(); 2143 if (this.communication == null) 2144 this.communication = new ArrayList<CodeableConcept>(); 2145 this.communication.add(t); 2146 return t; 2147 } 2148 2149 public HealthcareService addCommunication(CodeableConcept t) { //3 2150 if (t == null) 2151 return this; 2152 if (this.communication == null) 2153 this.communication = new ArrayList<CodeableConcept>(); 2154 this.communication.add(t); 2155 return this; 2156 } 2157 2158 /** 2159 * @return The first repetition of repeating field {@link #communication}, creating it if it does not already exist 2160 */ 2161 public CodeableConcept getCommunicationFirstRep() { 2162 if (getCommunication().isEmpty()) { 2163 addCommunication(); 2164 } 2165 return getCommunication().get(0); 2166 } 2167 2168 /** 2169 * @return {@link #referralMethod} (Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.) 2170 */ 2171 public List<CodeableConcept> getReferralMethod() { 2172 if (this.referralMethod == null) 2173 this.referralMethod = new ArrayList<CodeableConcept>(); 2174 return this.referralMethod; 2175 } 2176 2177 /** 2178 * @return Returns a reference to <code>this</code> for easy method chaining 2179 */ 2180 public HealthcareService setReferralMethod(List<CodeableConcept> theReferralMethod) { 2181 this.referralMethod = theReferralMethod; 2182 return this; 2183 } 2184 2185 public boolean hasReferralMethod() { 2186 if (this.referralMethod == null) 2187 return false; 2188 for (CodeableConcept item : this.referralMethod) 2189 if (!item.isEmpty()) 2190 return true; 2191 return false; 2192 } 2193 2194 public CodeableConcept addReferralMethod() { //3 2195 CodeableConcept t = new CodeableConcept(); 2196 if (this.referralMethod == null) 2197 this.referralMethod = new ArrayList<CodeableConcept>(); 2198 this.referralMethod.add(t); 2199 return t; 2200 } 2201 2202 public HealthcareService addReferralMethod(CodeableConcept t) { //3 2203 if (t == null) 2204 return this; 2205 if (this.referralMethod == null) 2206 this.referralMethod = new ArrayList<CodeableConcept>(); 2207 this.referralMethod.add(t); 2208 return this; 2209 } 2210 2211 /** 2212 * @return The first repetition of repeating field {@link #referralMethod}, creating it if it does not already exist 2213 */ 2214 public CodeableConcept getReferralMethodFirstRep() { 2215 if (getReferralMethod().isEmpty()) { 2216 addReferralMethod(); 2217 } 2218 return getReferralMethod().get(0); 2219 } 2220 2221 /** 2222 * @return {@link #appointmentRequired} (Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.). This is the underlying object with id, value and extensions. The accessor "getAppointmentRequired" gives direct access to the value 2223 */ 2224 public BooleanType getAppointmentRequiredElement() { 2225 if (this.appointmentRequired == null) 2226 if (Configuration.errorOnAutoCreate()) 2227 throw new Error("Attempt to auto-create HealthcareService.appointmentRequired"); 2228 else if (Configuration.doAutoCreate()) 2229 this.appointmentRequired = new BooleanType(); // bb 2230 return this.appointmentRequired; 2231 } 2232 2233 public boolean hasAppointmentRequiredElement() { 2234 return this.appointmentRequired != null && !this.appointmentRequired.isEmpty(); 2235 } 2236 2237 public boolean hasAppointmentRequired() { 2238 return this.appointmentRequired != null && !this.appointmentRequired.isEmpty(); 2239 } 2240 2241 /** 2242 * @param value {@link #appointmentRequired} (Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.). This is the underlying object with id, value and extensions. The accessor "getAppointmentRequired" gives direct access to the value 2243 */ 2244 public HealthcareService setAppointmentRequiredElement(BooleanType value) { 2245 this.appointmentRequired = value; 2246 return this; 2247 } 2248 2249 /** 2250 * @return Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. 2251 */ 2252 public boolean getAppointmentRequired() { 2253 return this.appointmentRequired == null || this.appointmentRequired.isEmpty() ? false : this.appointmentRequired.getValue(); 2254 } 2255 2256 /** 2257 * @param value Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. 2258 */ 2259 public HealthcareService setAppointmentRequired(boolean value) { 2260 if (this.appointmentRequired == null) 2261 this.appointmentRequired = new BooleanType(); 2262 this.appointmentRequired.setValue(value); 2263 return this; 2264 } 2265 2266 /** 2267 * @return {@link #availableTime} (A collection of times that the Service Site is available.) 2268 */ 2269 public List<HealthcareServiceAvailableTimeComponent> getAvailableTime() { 2270 if (this.availableTime == null) 2271 this.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>(); 2272 return this.availableTime; 2273 } 2274 2275 /** 2276 * @return Returns a reference to <code>this</code> for easy method chaining 2277 */ 2278 public HealthcareService setAvailableTime(List<HealthcareServiceAvailableTimeComponent> theAvailableTime) { 2279 this.availableTime = theAvailableTime; 2280 return this; 2281 } 2282 2283 public boolean hasAvailableTime() { 2284 if (this.availableTime == null) 2285 return false; 2286 for (HealthcareServiceAvailableTimeComponent item : this.availableTime) 2287 if (!item.isEmpty()) 2288 return true; 2289 return false; 2290 } 2291 2292 public HealthcareServiceAvailableTimeComponent addAvailableTime() { //3 2293 HealthcareServiceAvailableTimeComponent t = new HealthcareServiceAvailableTimeComponent(); 2294 if (this.availableTime == null) 2295 this.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>(); 2296 this.availableTime.add(t); 2297 return t; 2298 } 2299 2300 public HealthcareService addAvailableTime(HealthcareServiceAvailableTimeComponent t) { //3 2301 if (t == null) 2302 return this; 2303 if (this.availableTime == null) 2304 this.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>(); 2305 this.availableTime.add(t); 2306 return this; 2307 } 2308 2309 /** 2310 * @return The first repetition of repeating field {@link #availableTime}, creating it if it does not already exist 2311 */ 2312 public HealthcareServiceAvailableTimeComponent getAvailableTimeFirstRep() { 2313 if (getAvailableTime().isEmpty()) { 2314 addAvailableTime(); 2315 } 2316 return getAvailableTime().get(0); 2317 } 2318 2319 /** 2320 * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.) 2321 */ 2322 public List<HealthcareServiceNotAvailableComponent> getNotAvailable() { 2323 if (this.notAvailable == null) 2324 this.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>(); 2325 return this.notAvailable; 2326 } 2327 2328 /** 2329 * @return Returns a reference to <code>this</code> for easy method chaining 2330 */ 2331 public HealthcareService setNotAvailable(List<HealthcareServiceNotAvailableComponent> theNotAvailable) { 2332 this.notAvailable = theNotAvailable; 2333 return this; 2334 } 2335 2336 public boolean hasNotAvailable() { 2337 if (this.notAvailable == null) 2338 return false; 2339 for (HealthcareServiceNotAvailableComponent item : this.notAvailable) 2340 if (!item.isEmpty()) 2341 return true; 2342 return false; 2343 } 2344 2345 public HealthcareServiceNotAvailableComponent addNotAvailable() { //3 2346 HealthcareServiceNotAvailableComponent t = new HealthcareServiceNotAvailableComponent(); 2347 if (this.notAvailable == null) 2348 this.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>(); 2349 this.notAvailable.add(t); 2350 return t; 2351 } 2352 2353 public HealthcareService addNotAvailable(HealthcareServiceNotAvailableComponent t) { //3 2354 if (t == null) 2355 return this; 2356 if (this.notAvailable == null) 2357 this.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>(); 2358 this.notAvailable.add(t); 2359 return this; 2360 } 2361 2362 /** 2363 * @return The first repetition of repeating field {@link #notAvailable}, creating it if it does not already exist 2364 */ 2365 public HealthcareServiceNotAvailableComponent getNotAvailableFirstRep() { 2366 if (getNotAvailable().isEmpty()) { 2367 addNotAvailable(); 2368 } 2369 return getNotAvailable().get(0); 2370 } 2371 2372 /** 2373 * @return {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value 2374 */ 2375 public StringType getAvailabilityExceptionsElement() { 2376 if (this.availabilityExceptions == null) 2377 if (Configuration.errorOnAutoCreate()) 2378 throw new Error("Attempt to auto-create HealthcareService.availabilityExceptions"); 2379 else if (Configuration.doAutoCreate()) 2380 this.availabilityExceptions = new StringType(); // bb 2381 return this.availabilityExceptions; 2382 } 2383 2384 public boolean hasAvailabilityExceptionsElement() { 2385 return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); 2386 } 2387 2388 public boolean hasAvailabilityExceptions() { 2389 return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); 2390 } 2391 2392 /** 2393 * @param value {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value 2394 */ 2395 public HealthcareService setAvailabilityExceptionsElement(StringType value) { 2396 this.availabilityExceptions = value; 2397 return this; 2398 } 2399 2400 /** 2401 * @return A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. 2402 */ 2403 public String getAvailabilityExceptions() { 2404 return this.availabilityExceptions == null ? null : this.availabilityExceptions.getValue(); 2405 } 2406 2407 /** 2408 * @param value A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. 2409 */ 2410 public HealthcareService setAvailabilityExceptions(String value) { 2411 if (Utilities.noString(value)) 2412 this.availabilityExceptions = null; 2413 else { 2414 if (this.availabilityExceptions == null) 2415 this.availabilityExceptions = new StringType(); 2416 this.availabilityExceptions.setValue(value); 2417 } 2418 return this; 2419 } 2420 2421 /** 2422 * @return {@link #endpoint} (Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.) 2423 */ 2424 public List<Reference> getEndpoint() { 2425 if (this.endpoint == null) 2426 this.endpoint = new ArrayList<Reference>(); 2427 return this.endpoint; 2428 } 2429 2430 /** 2431 * @return Returns a reference to <code>this</code> for easy method chaining 2432 */ 2433 public HealthcareService setEndpoint(List<Reference> theEndpoint) { 2434 this.endpoint = theEndpoint; 2435 return this; 2436 } 2437 2438 public boolean hasEndpoint() { 2439 if (this.endpoint == null) 2440 return false; 2441 for (Reference item : this.endpoint) 2442 if (!item.isEmpty()) 2443 return true; 2444 return false; 2445 } 2446 2447 public Reference addEndpoint() { //3 2448 Reference t = new Reference(); 2449 if (this.endpoint == null) 2450 this.endpoint = new ArrayList<Reference>(); 2451 this.endpoint.add(t); 2452 return t; 2453 } 2454 2455 public HealthcareService addEndpoint(Reference t) { //3 2456 if (t == null) 2457 return this; 2458 if (this.endpoint == null) 2459 this.endpoint = new ArrayList<Reference>(); 2460 this.endpoint.add(t); 2461 return this; 2462 } 2463 2464 /** 2465 * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist 2466 */ 2467 public Reference getEndpointFirstRep() { 2468 if (getEndpoint().isEmpty()) { 2469 addEndpoint(); 2470 } 2471 return getEndpoint().get(0); 2472 } 2473 2474 protected void listChildren(List<Property> children) { 2475 super.listChildren(children); 2476 children.add(new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2477 children.add(new Property("active", "boolean", "This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.", 0, 1, active)); 2478 children.add(new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, 1, providedBy)); 2479 children.add(new Property("category", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, category)); 2480 children.add(new Property("type", "CodeableConcept", "The specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type)); 2481 children.add(new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty)); 2482 children.add(new Property("location", "Reference(Location)", "The location(s) where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location)); 2483 children.add(new Property("name", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, 1, name)); 2484 children.add(new Property("comment", "string", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, 1, comment)); 2485 children.add(new Property("extraDetails", "markdown", "Extra details about the service that can't be placed in the other fields.", 0, 1, extraDetails)); 2486 children.add(new Property("photo", "Attachment", "If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.", 0, 1, photo)); 2487 children.add(new Property("telecom", "ContactPoint", "List of contacts related to this specific healthcare service.", 0, java.lang.Integer.MAX_VALUE, telecom)); 2488 children.add(new Property("coverageArea", "Reference(Location)", "The location(s) that this service is available to (not where the service is provided).", 0, java.lang.Integer.MAX_VALUE, coverageArea)); 2489 children.add(new Property("serviceProvisionCode", "CodeableConcept", "The code(s) that detail the conditions under which the healthcare service is available/offered.", 0, java.lang.Integer.MAX_VALUE, serviceProvisionCode)); 2490 children.add(new Property("eligibility", "", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, java.lang.Integer.MAX_VALUE, eligibility)); 2491 children.add(new Property("program", "CodeableConcept", "Programs that this service is applicable to.", 0, java.lang.Integer.MAX_VALUE, program)); 2492 children.add(new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic)); 2493 children.add(new Property("communication", "CodeableConcept", "Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.", 0, java.lang.Integer.MAX_VALUE, communication)); 2494 children.add(new Property("referralMethod", "CodeableConcept", "Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.", 0, java.lang.Integer.MAX_VALUE, referralMethod)); 2495 children.add(new Property("appointmentRequired", "boolean", "Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.", 0, 1, appointmentRequired)); 2496 children.add(new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime)); 2497 children.add(new Property("notAvailable", "", "The HealthcareService is not available during this period of time due to the provided reason.", 0, java.lang.Integer.MAX_VALUE, notAvailable)); 2498 children.add(new Property("availabilityExceptions", "string", "A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", 0, 1, availabilityExceptions)); 2499 children.add(new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 2500 } 2501 2502 @Override 2503 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2504 switch (_hash) { 2505 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier); 2506 case -1422950650: /*active*/ return new Property("active", "boolean", "This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this.", 0, 1, active); 2507 case 205136282: /*providedBy*/ return new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, 1, providedBy); 2508 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, category); 2509 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type); 2510 case -1694759682: /*specialty*/ return new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty); 2511 case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "The location(s) where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location); 2512 case 3373707: /*name*/ return new Property("name", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, 1, name); 2513 case 950398559: /*comment*/ return new Property("comment", "string", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, 1, comment); 2514 case -1469168622: /*extraDetails*/ return new Property("extraDetails", "markdown", "Extra details about the service that can't be placed in the other fields.", 0, 1, extraDetails); 2515 case 106642994: /*photo*/ return new Property("photo", "Attachment", "If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list.", 0, 1, photo); 2516 case -1429363305: /*telecom*/ return new Property("telecom", "ContactPoint", "List of contacts related to this specific healthcare service.", 0, java.lang.Integer.MAX_VALUE, telecom); 2517 case -1532328299: /*coverageArea*/ return new Property("coverageArea", "Reference(Location)", "The location(s) that this service is available to (not where the service is provided).", 0, java.lang.Integer.MAX_VALUE, coverageArea); 2518 case 1504575405: /*serviceProvisionCode*/ return new Property("serviceProvisionCode", "CodeableConcept", "The code(s) that detail the conditions under which the healthcare service is available/offered.", 0, java.lang.Integer.MAX_VALUE, serviceProvisionCode); 2519 case -930847859: /*eligibility*/ return new Property("eligibility", "", "Does this service have specific eligibility requirements that need to be met in order to use the service?", 0, java.lang.Integer.MAX_VALUE, eligibility); 2520 case -309387644: /*program*/ return new Property("program", "CodeableConcept", "Programs that this service is applicable to.", 0, java.lang.Integer.MAX_VALUE, program); 2521 case 366313883: /*characteristic*/ return new Property("characteristic", "CodeableConcept", "Collection of characteristics (attributes).", 0, java.lang.Integer.MAX_VALUE, characteristic); 2522 case -1035284522: /*communication*/ return new Property("communication", "CodeableConcept", "Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used.", 0, java.lang.Integer.MAX_VALUE, communication); 2523 case -2092740898: /*referralMethod*/ return new Property("referralMethod", "CodeableConcept", "Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.", 0, java.lang.Integer.MAX_VALUE, referralMethod); 2524 case 427220062: /*appointmentRequired*/ return new Property("appointmentRequired", "boolean", "Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.", 0, 1, appointmentRequired); 2525 case 1873069366: /*availableTime*/ return new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime); 2526 case -629572298: /*notAvailable*/ return new Property("notAvailable", "", "The HealthcareService is not available during this period of time due to the provided reason.", 0, java.lang.Integer.MAX_VALUE, notAvailable); 2527 case -1149143617: /*availabilityExceptions*/ return new Property("availabilityExceptions", "string", "A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", 0, 1, availabilityExceptions); 2528 case 1741102485: /*endpoint*/ return new Property("endpoint", "Reference(Endpoint)", "Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.", 0, java.lang.Integer.MAX_VALUE, endpoint); 2529 default: return super.getNamedProperty(_hash, _name, _checkValid); 2530 } 2531 2532 } 2533 2534 @Override 2535 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2536 switch (hash) { 2537 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2538 case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType 2539 case 205136282: /*providedBy*/ return this.providedBy == null ? new Base[0] : new Base[] {this.providedBy}; // Reference 2540 case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept 2541 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 2542 case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : this.specialty.toArray(new Base[this.specialty.size()]); // CodeableConcept 2543 case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // Reference 2544 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2545 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType 2546 case -1469168622: /*extraDetails*/ return this.extraDetails == null ? new Base[0] : new Base[] {this.extraDetails}; // MarkdownType 2547 case 106642994: /*photo*/ return this.photo == null ? new Base[0] : new Base[] {this.photo}; // Attachment 2548 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 2549 case -1532328299: /*coverageArea*/ return this.coverageArea == null ? new Base[0] : this.coverageArea.toArray(new Base[this.coverageArea.size()]); // Reference 2550 case 1504575405: /*serviceProvisionCode*/ return this.serviceProvisionCode == null ? new Base[0] : this.serviceProvisionCode.toArray(new Base[this.serviceProvisionCode.size()]); // CodeableConcept 2551 case -930847859: /*eligibility*/ return this.eligibility == null ? new Base[0] : this.eligibility.toArray(new Base[this.eligibility.size()]); // HealthcareServiceEligibilityComponent 2552 case -309387644: /*program*/ return this.program == null ? new Base[0] : this.program.toArray(new Base[this.program.size()]); // CodeableConcept 2553 case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // CodeableConcept 2554 case -1035284522: /*communication*/ return this.communication == null ? new Base[0] : this.communication.toArray(new Base[this.communication.size()]); // CodeableConcept 2555 case -2092740898: /*referralMethod*/ return this.referralMethod == null ? new Base[0] : this.referralMethod.toArray(new Base[this.referralMethod.size()]); // CodeableConcept 2556 case 427220062: /*appointmentRequired*/ return this.appointmentRequired == null ? new Base[0] : new Base[] {this.appointmentRequired}; // BooleanType 2557 case 1873069366: /*availableTime*/ return this.availableTime == null ? new Base[0] : this.availableTime.toArray(new Base[this.availableTime.size()]); // HealthcareServiceAvailableTimeComponent 2558 case -629572298: /*notAvailable*/ return this.notAvailable == null ? new Base[0] : this.notAvailable.toArray(new Base[this.notAvailable.size()]); // HealthcareServiceNotAvailableComponent 2559 case -1149143617: /*availabilityExceptions*/ return this.availabilityExceptions == null ? new Base[0] : new Base[] {this.availabilityExceptions}; // StringType 2560 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference 2561 default: return super.getProperty(hash, name, checkValid); 2562 } 2563 2564 } 2565 2566 @Override 2567 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2568 switch (hash) { 2569 case -1618432855: // identifier 2570 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2571 return value; 2572 case -1422950650: // active 2573 this.active = castToBoolean(value); // BooleanType 2574 return value; 2575 case 205136282: // providedBy 2576 this.providedBy = castToReference(value); // Reference 2577 return value; 2578 case 50511102: // category 2579 this.getCategory().add(castToCodeableConcept(value)); // CodeableConcept 2580 return value; 2581 case 3575610: // type 2582 this.getType().add(castToCodeableConcept(value)); // CodeableConcept 2583 return value; 2584 case -1694759682: // specialty 2585 this.getSpecialty().add(castToCodeableConcept(value)); // CodeableConcept 2586 return value; 2587 case 1901043637: // location 2588 this.getLocation().add(castToReference(value)); // Reference 2589 return value; 2590 case 3373707: // name 2591 this.name = castToString(value); // StringType 2592 return value; 2593 case 950398559: // comment 2594 this.comment = castToString(value); // StringType 2595 return value; 2596 case -1469168622: // extraDetails 2597 this.extraDetails = castToMarkdown(value); // MarkdownType 2598 return value; 2599 case 106642994: // photo 2600 this.photo = castToAttachment(value); // Attachment 2601 return value; 2602 case -1429363305: // telecom 2603 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 2604 return value; 2605 case -1532328299: // coverageArea 2606 this.getCoverageArea().add(castToReference(value)); // Reference 2607 return value; 2608 case 1504575405: // serviceProvisionCode 2609 this.getServiceProvisionCode().add(castToCodeableConcept(value)); // CodeableConcept 2610 return value; 2611 case -930847859: // eligibility 2612 this.getEligibility().add((HealthcareServiceEligibilityComponent) value); // HealthcareServiceEligibilityComponent 2613 return value; 2614 case -309387644: // program 2615 this.getProgram().add(castToCodeableConcept(value)); // CodeableConcept 2616 return value; 2617 case 366313883: // characteristic 2618 this.getCharacteristic().add(castToCodeableConcept(value)); // CodeableConcept 2619 return value; 2620 case -1035284522: // communication 2621 this.getCommunication().add(castToCodeableConcept(value)); // CodeableConcept 2622 return value; 2623 case -2092740898: // referralMethod 2624 this.getReferralMethod().add(castToCodeableConcept(value)); // CodeableConcept 2625 return value; 2626 case 427220062: // appointmentRequired 2627 this.appointmentRequired = castToBoolean(value); // BooleanType 2628 return value; 2629 case 1873069366: // availableTime 2630 this.getAvailableTime().add((HealthcareServiceAvailableTimeComponent) value); // HealthcareServiceAvailableTimeComponent 2631 return value; 2632 case -629572298: // notAvailable 2633 this.getNotAvailable().add((HealthcareServiceNotAvailableComponent) value); // HealthcareServiceNotAvailableComponent 2634 return value; 2635 case -1149143617: // availabilityExceptions 2636 this.availabilityExceptions = castToString(value); // StringType 2637 return value; 2638 case 1741102485: // endpoint 2639 this.getEndpoint().add(castToReference(value)); // Reference 2640 return value; 2641 default: return super.setProperty(hash, name, value); 2642 } 2643 2644 } 2645 2646 @Override 2647 public Base setProperty(String name, Base value) throws FHIRException { 2648 if (name.equals("identifier")) { 2649 this.getIdentifier().add(castToIdentifier(value)); 2650 } else if (name.equals("active")) { 2651 this.active = castToBoolean(value); // BooleanType 2652 } else if (name.equals("providedBy")) { 2653 this.providedBy = castToReference(value); // Reference 2654 } else if (name.equals("category")) { 2655 this.getCategory().add(castToCodeableConcept(value)); 2656 } else if (name.equals("type")) { 2657 this.getType().add(castToCodeableConcept(value)); 2658 } else if (name.equals("specialty")) { 2659 this.getSpecialty().add(castToCodeableConcept(value)); 2660 } else if (name.equals("location")) { 2661 this.getLocation().add(castToReference(value)); 2662 } else if (name.equals("name")) { 2663 this.name = castToString(value); // StringType 2664 } else if (name.equals("comment")) { 2665 this.comment = castToString(value); // StringType 2666 } else if (name.equals("extraDetails")) { 2667 this.extraDetails = castToMarkdown(value); // MarkdownType 2668 } else if (name.equals("photo")) { 2669 this.photo = castToAttachment(value); // Attachment 2670 } else if (name.equals("telecom")) { 2671 this.getTelecom().add(castToContactPoint(value)); 2672 } else if (name.equals("coverageArea")) { 2673 this.getCoverageArea().add(castToReference(value)); 2674 } else if (name.equals("serviceProvisionCode")) { 2675 this.getServiceProvisionCode().add(castToCodeableConcept(value)); 2676 } else if (name.equals("eligibility")) { 2677 this.getEligibility().add((HealthcareServiceEligibilityComponent) value); 2678 } else if (name.equals("program")) { 2679 this.getProgram().add(castToCodeableConcept(value)); 2680 } else if (name.equals("characteristic")) { 2681 this.getCharacteristic().add(castToCodeableConcept(value)); 2682 } else if (name.equals("communication")) { 2683 this.getCommunication().add(castToCodeableConcept(value)); 2684 } else if (name.equals("referralMethod")) { 2685 this.getReferralMethod().add(castToCodeableConcept(value)); 2686 } else if (name.equals("appointmentRequired")) { 2687 this.appointmentRequired = castToBoolean(value); // BooleanType 2688 } else if (name.equals("availableTime")) { 2689 this.getAvailableTime().add((HealthcareServiceAvailableTimeComponent) value); 2690 } else if (name.equals("notAvailable")) { 2691 this.getNotAvailable().add((HealthcareServiceNotAvailableComponent) value); 2692 } else if (name.equals("availabilityExceptions")) { 2693 this.availabilityExceptions = castToString(value); // StringType 2694 } else if (name.equals("endpoint")) { 2695 this.getEndpoint().add(castToReference(value)); 2696 } else 2697 return super.setProperty(name, value); 2698 return value; 2699 } 2700 2701 @Override 2702 public Base makeProperty(int hash, String name) throws FHIRException { 2703 switch (hash) { 2704 case -1618432855: return addIdentifier(); 2705 case -1422950650: return getActiveElement(); 2706 case 205136282: return getProvidedBy(); 2707 case 50511102: return addCategory(); 2708 case 3575610: return addType(); 2709 case -1694759682: return addSpecialty(); 2710 case 1901043637: return addLocation(); 2711 case 3373707: return getNameElement(); 2712 case 950398559: return getCommentElement(); 2713 case -1469168622: return getExtraDetailsElement(); 2714 case 106642994: return getPhoto(); 2715 case -1429363305: return addTelecom(); 2716 case -1532328299: return addCoverageArea(); 2717 case 1504575405: return addServiceProvisionCode(); 2718 case -930847859: return addEligibility(); 2719 case -309387644: return addProgram(); 2720 case 366313883: return addCharacteristic(); 2721 case -1035284522: return addCommunication(); 2722 case -2092740898: return addReferralMethod(); 2723 case 427220062: return getAppointmentRequiredElement(); 2724 case 1873069366: return addAvailableTime(); 2725 case -629572298: return addNotAvailable(); 2726 case -1149143617: return getAvailabilityExceptionsElement(); 2727 case 1741102485: return addEndpoint(); 2728 default: return super.makeProperty(hash, name); 2729 } 2730 2731 } 2732 2733 @Override 2734 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2735 switch (hash) { 2736 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 2737 case -1422950650: /*active*/ return new String[] {"boolean"}; 2738 case 205136282: /*providedBy*/ return new String[] {"Reference"}; 2739 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 2740 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 2741 case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"}; 2742 case 1901043637: /*location*/ return new String[] {"Reference"}; 2743 case 3373707: /*name*/ return new String[] {"string"}; 2744 case 950398559: /*comment*/ return new String[] {"string"}; 2745 case -1469168622: /*extraDetails*/ return new String[] {"markdown"}; 2746 case 106642994: /*photo*/ return new String[] {"Attachment"}; 2747 case -1429363305: /*telecom*/ return new String[] {"ContactPoint"}; 2748 case -1532328299: /*coverageArea*/ return new String[] {"Reference"}; 2749 case 1504575405: /*serviceProvisionCode*/ return new String[] {"CodeableConcept"}; 2750 case -930847859: /*eligibility*/ return new String[] {}; 2751 case -309387644: /*program*/ return new String[] {"CodeableConcept"}; 2752 case 366313883: /*characteristic*/ return new String[] {"CodeableConcept"}; 2753 case -1035284522: /*communication*/ return new String[] {"CodeableConcept"}; 2754 case -2092740898: /*referralMethod*/ return new String[] {"CodeableConcept"}; 2755 case 427220062: /*appointmentRequired*/ return new String[] {"boolean"}; 2756 case 1873069366: /*availableTime*/ return new String[] {}; 2757 case -629572298: /*notAvailable*/ return new String[] {}; 2758 case -1149143617: /*availabilityExceptions*/ return new String[] {"string"}; 2759 case 1741102485: /*endpoint*/ return new String[] {"Reference"}; 2760 default: return super.getTypesForProperty(hash, name); 2761 } 2762 2763 } 2764 2765 @Override 2766 public Base addChild(String name) throws FHIRException { 2767 if (name.equals("identifier")) { 2768 return addIdentifier(); 2769 } 2770 else if (name.equals("active")) { 2771 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.active"); 2772 } 2773 else if (name.equals("providedBy")) { 2774 this.providedBy = new Reference(); 2775 return this.providedBy; 2776 } 2777 else if (name.equals("category")) { 2778 return addCategory(); 2779 } 2780 else if (name.equals("type")) { 2781 return addType(); 2782 } 2783 else if (name.equals("specialty")) { 2784 return addSpecialty(); 2785 } 2786 else if (name.equals("location")) { 2787 return addLocation(); 2788 } 2789 else if (name.equals("name")) { 2790 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.name"); 2791 } 2792 else if (name.equals("comment")) { 2793 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.comment"); 2794 } 2795 else if (name.equals("extraDetails")) { 2796 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.extraDetails"); 2797 } 2798 else if (name.equals("photo")) { 2799 this.photo = new Attachment(); 2800 return this.photo; 2801 } 2802 else if (name.equals("telecom")) { 2803 return addTelecom(); 2804 } 2805 else if (name.equals("coverageArea")) { 2806 return addCoverageArea(); 2807 } 2808 else if (name.equals("serviceProvisionCode")) { 2809 return addServiceProvisionCode(); 2810 } 2811 else if (name.equals("eligibility")) { 2812 return addEligibility(); 2813 } 2814 else if (name.equals("program")) { 2815 return addProgram(); 2816 } 2817 else if (name.equals("characteristic")) { 2818 return addCharacteristic(); 2819 } 2820 else if (name.equals("communication")) { 2821 return addCommunication(); 2822 } 2823 else if (name.equals("referralMethod")) { 2824 return addReferralMethod(); 2825 } 2826 else if (name.equals("appointmentRequired")) { 2827 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.appointmentRequired"); 2828 } 2829 else if (name.equals("availableTime")) { 2830 return addAvailableTime(); 2831 } 2832 else if (name.equals("notAvailable")) { 2833 return addNotAvailable(); 2834 } 2835 else if (name.equals("availabilityExceptions")) { 2836 throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.availabilityExceptions"); 2837 } 2838 else if (name.equals("endpoint")) { 2839 return addEndpoint(); 2840 } 2841 else 2842 return super.addChild(name); 2843 } 2844 2845 public String fhirType() { 2846 return "HealthcareService"; 2847 2848 } 2849 2850 public HealthcareService copy() { 2851 HealthcareService dst = new HealthcareService(); 2852 copyValues(dst); 2853 return dst; 2854 } 2855 2856 public void copyValues(HealthcareService dst) { 2857 super.copyValues(dst); 2858 if (identifier != null) { 2859 dst.identifier = new ArrayList<Identifier>(); 2860 for (Identifier i : identifier) 2861 dst.identifier.add(i.copy()); 2862 }; 2863 dst.active = active == null ? null : active.copy(); 2864 dst.providedBy = providedBy == null ? null : providedBy.copy(); 2865 if (category != null) { 2866 dst.category = new ArrayList<CodeableConcept>(); 2867 for (CodeableConcept i : category) 2868 dst.category.add(i.copy()); 2869 }; 2870 if (type != null) { 2871 dst.type = new ArrayList<CodeableConcept>(); 2872 for (CodeableConcept i : type) 2873 dst.type.add(i.copy()); 2874 }; 2875 if (specialty != null) { 2876 dst.specialty = new ArrayList<CodeableConcept>(); 2877 for (CodeableConcept i : specialty) 2878 dst.specialty.add(i.copy()); 2879 }; 2880 if (location != null) { 2881 dst.location = new ArrayList<Reference>(); 2882 for (Reference i : location) 2883 dst.location.add(i.copy()); 2884 }; 2885 dst.name = name == null ? null : name.copy(); 2886 dst.comment = comment == null ? null : comment.copy(); 2887 dst.extraDetails = extraDetails == null ? null : extraDetails.copy(); 2888 dst.photo = photo == null ? null : photo.copy(); 2889 if (telecom != null) { 2890 dst.telecom = new ArrayList<ContactPoint>(); 2891 for (ContactPoint i : telecom) 2892 dst.telecom.add(i.copy()); 2893 }; 2894 if (coverageArea != null) { 2895 dst.coverageArea = new ArrayList<Reference>(); 2896 for (Reference i : coverageArea) 2897 dst.coverageArea.add(i.copy()); 2898 }; 2899 if (serviceProvisionCode != null) { 2900 dst.serviceProvisionCode = new ArrayList<CodeableConcept>(); 2901 for (CodeableConcept i : serviceProvisionCode) 2902 dst.serviceProvisionCode.add(i.copy()); 2903 }; 2904 if (eligibility != null) { 2905 dst.eligibility = new ArrayList<HealthcareServiceEligibilityComponent>(); 2906 for (HealthcareServiceEligibilityComponent i : eligibility) 2907 dst.eligibility.add(i.copy()); 2908 }; 2909 if (program != null) { 2910 dst.program = new ArrayList<CodeableConcept>(); 2911 for (CodeableConcept i : program) 2912 dst.program.add(i.copy()); 2913 }; 2914 if (characteristic != null) { 2915 dst.characteristic = new ArrayList<CodeableConcept>(); 2916 for (CodeableConcept i : characteristic) 2917 dst.characteristic.add(i.copy()); 2918 }; 2919 if (communication != null) { 2920 dst.communication = new ArrayList<CodeableConcept>(); 2921 for (CodeableConcept i : communication) 2922 dst.communication.add(i.copy()); 2923 }; 2924 if (referralMethod != null) { 2925 dst.referralMethod = new ArrayList<CodeableConcept>(); 2926 for (CodeableConcept i : referralMethod) 2927 dst.referralMethod.add(i.copy()); 2928 }; 2929 dst.appointmentRequired = appointmentRequired == null ? null : appointmentRequired.copy(); 2930 if (availableTime != null) { 2931 dst.availableTime = new ArrayList<HealthcareServiceAvailableTimeComponent>(); 2932 for (HealthcareServiceAvailableTimeComponent i : availableTime) 2933 dst.availableTime.add(i.copy()); 2934 }; 2935 if (notAvailable != null) { 2936 dst.notAvailable = new ArrayList<HealthcareServiceNotAvailableComponent>(); 2937 for (HealthcareServiceNotAvailableComponent i : notAvailable) 2938 dst.notAvailable.add(i.copy()); 2939 }; 2940 dst.availabilityExceptions = availabilityExceptions == null ? null : availabilityExceptions.copy(); 2941 if (endpoint != null) { 2942 dst.endpoint = new ArrayList<Reference>(); 2943 for (Reference i : endpoint) 2944 dst.endpoint.add(i.copy()); 2945 }; 2946 } 2947 2948 protected HealthcareService typedCopy() { 2949 return copy(); 2950 } 2951 2952 @Override 2953 public boolean equalsDeep(Base other_) { 2954 if (!super.equalsDeep(other_)) 2955 return false; 2956 if (!(other_ instanceof HealthcareService)) 2957 return false; 2958 HealthcareService o = (HealthcareService) other_; 2959 return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(providedBy, o.providedBy, true) 2960 && compareDeep(category, o.category, true) && compareDeep(type, o.type, true) && compareDeep(specialty, o.specialty, true) 2961 && compareDeep(location, o.location, true) && compareDeep(name, o.name, true) && compareDeep(comment, o.comment, true) 2962 && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true) && compareDeep(telecom, o.telecom, true) 2963 && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true) 2964 && compareDeep(eligibility, o.eligibility, true) && compareDeep(program, o.program, true) && compareDeep(characteristic, o.characteristic, true) 2965 && compareDeep(communication, o.communication, true) && compareDeep(referralMethod, o.referralMethod, true) 2966 && compareDeep(appointmentRequired, o.appointmentRequired, true) && compareDeep(availableTime, o.availableTime, true) 2967 && compareDeep(notAvailable, o.notAvailable, true) && compareDeep(availabilityExceptions, o.availabilityExceptions, true) 2968 && compareDeep(endpoint, o.endpoint, true); 2969 } 2970 2971 @Override 2972 public boolean equalsShallow(Base other_) { 2973 if (!super.equalsShallow(other_)) 2974 return false; 2975 if (!(other_ instanceof HealthcareService)) 2976 return false; 2977 HealthcareService o = (HealthcareService) other_; 2978 return compareValues(active, o.active, true) && compareValues(name, o.name, true) && compareValues(comment, o.comment, true) 2979 && compareValues(extraDetails, o.extraDetails, true) && compareValues(appointmentRequired, o.appointmentRequired, true) 2980 && compareValues(availabilityExceptions, o.availabilityExceptions, true); 2981 } 2982 2983 public boolean isEmpty() { 2984 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, providedBy 2985 , category, type, specialty, location, name, comment, extraDetails, photo, telecom 2986 , coverageArea, serviceProvisionCode, eligibility, program, characteristic, communication 2987 , referralMethod, appointmentRequired, availableTime, notAvailable, availabilityExceptions 2988 , endpoint); 2989 } 2990 2991 @Override 2992 public ResourceType getResourceType() { 2993 return ResourceType.HealthcareService; 2994 } 2995 2996 /** 2997 * Search parameter: <b>identifier</b> 2998 * <p> 2999 * Description: <b>External identifiers for this item</b><br> 3000 * Type: <b>token</b><br> 3001 * Path: <b>HealthcareService.identifier</b><br> 3002 * </p> 3003 */ 3004 @SearchParamDefinition(name="identifier", path="HealthcareService.identifier", description="External identifiers for this item", type="token" ) 3005 public static final String SP_IDENTIFIER = "identifier"; 3006 /** 3007 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3008 * <p> 3009 * Description: <b>External identifiers for this item</b><br> 3010 * Type: <b>token</b><br> 3011 * Path: <b>HealthcareService.identifier</b><br> 3012 * </p> 3013 */ 3014 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3015 3016 /** 3017 * Search parameter: <b>specialty</b> 3018 * <p> 3019 * Description: <b>The specialty of the service provided by this healthcare service</b><br> 3020 * Type: <b>token</b><br> 3021 * Path: <b>HealthcareService.specialty</b><br> 3022 * </p> 3023 */ 3024 @SearchParamDefinition(name="specialty", path="HealthcareService.specialty", description="The specialty of the service provided by this healthcare service", type="token" ) 3025 public static final String SP_SPECIALTY = "specialty"; 3026 /** 3027 * <b>Fluent Client</b> search parameter constant for <b>specialty</b> 3028 * <p> 3029 * Description: <b>The specialty of the service provided by this healthcare service</b><br> 3030 * Type: <b>token</b><br> 3031 * Path: <b>HealthcareService.specialty</b><br> 3032 * </p> 3033 */ 3034 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY); 3035 3036 /** 3037 * Search parameter: <b>endpoint</b> 3038 * <p> 3039 * Description: <b>Technical endpoints providing access to electronic services operated for the healthcare service</b><br> 3040 * Type: <b>reference</b><br> 3041 * Path: <b>HealthcareService.endpoint</b><br> 3042 * </p> 3043 */ 3044 @SearchParamDefinition(name="endpoint", path="HealthcareService.endpoint", description="Technical endpoints providing access to electronic services operated for the healthcare service", type="reference", target={Endpoint.class } ) 3045 public static final String SP_ENDPOINT = "endpoint"; 3046 /** 3047 * <b>Fluent Client</b> search parameter constant for <b>endpoint</b> 3048 * <p> 3049 * Description: <b>Technical endpoints providing access to electronic services operated for the healthcare service</b><br> 3050 * Type: <b>reference</b><br> 3051 * Path: <b>HealthcareService.endpoint</b><br> 3052 * </p> 3053 */ 3054 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT); 3055 3056/** 3057 * Constant for fluent queries to be used to add include statements. Specifies 3058 * the path value of "<b>HealthcareService:endpoint</b>". 3059 */ 3060 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("HealthcareService:endpoint").toLocked(); 3061 3062 /** 3063 * Search parameter: <b>service-category</b> 3064 * <p> 3065 * Description: <b>Service Category of the Healthcare Service</b><br> 3066 * Type: <b>token</b><br> 3067 * Path: <b>HealthcareService.category</b><br> 3068 * </p> 3069 */ 3070 @SearchParamDefinition(name="service-category", path="HealthcareService.category", description="Service Category of the Healthcare Service", type="token" ) 3071 public static final String SP_SERVICE_CATEGORY = "service-category"; 3072 /** 3073 * <b>Fluent Client</b> search parameter constant for <b>service-category</b> 3074 * <p> 3075 * Description: <b>Service Category of the Healthcare Service</b><br> 3076 * Type: <b>token</b><br> 3077 * Path: <b>HealthcareService.category</b><br> 3078 * </p> 3079 */ 3080 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_CATEGORY); 3081 3082 /** 3083 * Search parameter: <b>coverage-area</b> 3084 * <p> 3085 * Description: <b>Location(s) service is intended for/available to</b><br> 3086 * Type: <b>reference</b><br> 3087 * Path: <b>HealthcareService.coverageArea</b><br> 3088 * </p> 3089 */ 3090 @SearchParamDefinition(name="coverage-area", path="HealthcareService.coverageArea", description="Location(s) service is intended for/available to", type="reference", target={Location.class } ) 3091 public static final String SP_COVERAGE_AREA = "coverage-area"; 3092 /** 3093 * <b>Fluent Client</b> search parameter constant for <b>coverage-area</b> 3094 * <p> 3095 * Description: <b>Location(s) service is intended for/available to</b><br> 3096 * Type: <b>reference</b><br> 3097 * Path: <b>HealthcareService.coverageArea</b><br> 3098 * </p> 3099 */ 3100 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COVERAGE_AREA = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COVERAGE_AREA); 3101 3102/** 3103 * Constant for fluent queries to be used to add include statements. Specifies 3104 * the path value of "<b>HealthcareService:coverage-area</b>". 3105 */ 3106 public static final ca.uhn.fhir.model.api.Include INCLUDE_COVERAGE_AREA = new ca.uhn.fhir.model.api.Include("HealthcareService:coverage-area").toLocked(); 3107 3108 /** 3109 * Search parameter: <b>service-type</b> 3110 * <p> 3111 * Description: <b>The type of service provided by this healthcare service</b><br> 3112 * Type: <b>token</b><br> 3113 * Path: <b>HealthcareService.type</b><br> 3114 * </p> 3115 */ 3116 @SearchParamDefinition(name="service-type", path="HealthcareService.type", description="The type of service provided by this healthcare service", type="token" ) 3117 public static final String SP_SERVICE_TYPE = "service-type"; 3118 /** 3119 * <b>Fluent Client</b> search parameter constant for <b>service-type</b> 3120 * <p> 3121 * Description: <b>The type of service provided by this healthcare service</b><br> 3122 * Type: <b>token</b><br> 3123 * Path: <b>HealthcareService.type</b><br> 3124 * </p> 3125 */ 3126 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_TYPE); 3127 3128 /** 3129 * Search parameter: <b>organization</b> 3130 * <p> 3131 * Description: <b>The organization that provides this Healthcare Service</b><br> 3132 * Type: <b>reference</b><br> 3133 * Path: <b>HealthcareService.providedBy</b><br> 3134 * </p> 3135 */ 3136 @SearchParamDefinition(name="organization", path="HealthcareService.providedBy", description="The organization that provides this Healthcare Service", type="reference", target={Organization.class } ) 3137 public static final String SP_ORGANIZATION = "organization"; 3138 /** 3139 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 3140 * <p> 3141 * Description: <b>The organization that provides this Healthcare Service</b><br> 3142 * Type: <b>reference</b><br> 3143 * Path: <b>HealthcareService.providedBy</b><br> 3144 * </p> 3145 */ 3146 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 3147 3148/** 3149 * Constant for fluent queries to be used to add include statements. Specifies 3150 * the path value of "<b>HealthcareService:organization</b>". 3151 */ 3152 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("HealthcareService:organization").toLocked(); 3153 3154 /** 3155 * Search parameter: <b>name</b> 3156 * <p> 3157 * Description: <b>A portion of the Healthcare service name</b><br> 3158 * Type: <b>string</b><br> 3159 * Path: <b>HealthcareService.name</b><br> 3160 * </p> 3161 */ 3162 @SearchParamDefinition(name="name", path="HealthcareService.name", description="A portion of the Healthcare service name", type="string" ) 3163 public static final String SP_NAME = "name"; 3164 /** 3165 * <b>Fluent Client</b> search parameter constant for <b>name</b> 3166 * <p> 3167 * Description: <b>A portion of the Healthcare service name</b><br> 3168 * Type: <b>string</b><br> 3169 * Path: <b>HealthcareService.name</b><br> 3170 * </p> 3171 */ 3172 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 3173 3174 /** 3175 * Search parameter: <b>active</b> 3176 * <p> 3177 * Description: <b>The Healthcare Service is currently marked as active</b><br> 3178 * Type: <b>token</b><br> 3179 * Path: <b>HealthcareService.active</b><br> 3180 * </p> 3181 */ 3182 @SearchParamDefinition(name="active", path="HealthcareService.active", description="The Healthcare Service is currently marked as active", type="token" ) 3183 public static final String SP_ACTIVE = "active"; 3184 /** 3185 * <b>Fluent Client</b> search parameter constant for <b>active</b> 3186 * <p> 3187 * Description: <b>The Healthcare Service is currently marked as active</b><br> 3188 * Type: <b>token</b><br> 3189 * Path: <b>HealthcareService.active</b><br> 3190 * </p> 3191 */ 3192 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTIVE); 3193 3194 /** 3195 * Search parameter: <b>location</b> 3196 * <p> 3197 * Description: <b>The location of the Healthcare Service</b><br> 3198 * Type: <b>reference</b><br> 3199 * Path: <b>HealthcareService.location</b><br> 3200 * </p> 3201 */ 3202 @SearchParamDefinition(name="location", path="HealthcareService.location", description="The location of the Healthcare Service", type="reference", target={Location.class } ) 3203 public static final String SP_LOCATION = "location"; 3204 /** 3205 * <b>Fluent Client</b> search parameter constant for <b>location</b> 3206 * <p> 3207 * Description: <b>The location of the Healthcare Service</b><br> 3208 * Type: <b>reference</b><br> 3209 * Path: <b>HealthcareService.location</b><br> 3210 * </p> 3211 */ 3212 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION); 3213 3214/** 3215 * Constant for fluent queries to be used to add include statements. Specifies 3216 * the path value of "<b>HealthcareService:location</b>". 3217 */ 3218 public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("HealthcareService:location").toLocked(); 3219 3220 /** 3221 * Search parameter: <b>program</b> 3222 * <p> 3223 * Description: <b>One of the Programs supported by this HealthcareService</b><br> 3224 * Type: <b>token</b><br> 3225 * Path: <b>HealthcareService.program</b><br> 3226 * </p> 3227 */ 3228 @SearchParamDefinition(name="program", path="HealthcareService.program", description="One of the Programs supported by this HealthcareService", type="token" ) 3229 public static final String SP_PROGRAM = "program"; 3230 /** 3231 * <b>Fluent Client</b> search parameter constant for <b>program</b> 3232 * <p> 3233 * Description: <b>One of the Programs supported by this HealthcareService</b><br> 3234 * Type: <b>token</b><br> 3235 * Path: <b>HealthcareService.program</b><br> 3236 * </p> 3237 */ 3238 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROGRAM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROGRAM); 3239 3240 /** 3241 * Search parameter: <b>characteristic</b> 3242 * <p> 3243 * Description: <b>One of the HealthcareService's characteristics</b><br> 3244 * Type: <b>token</b><br> 3245 * Path: <b>HealthcareService.characteristic</b><br> 3246 * </p> 3247 */ 3248 @SearchParamDefinition(name="characteristic", path="HealthcareService.characteristic", description="One of the HealthcareService's characteristics", type="token" ) 3249 public static final String SP_CHARACTERISTIC = "characteristic"; 3250 /** 3251 * <b>Fluent Client</b> search parameter constant for <b>characteristic</b> 3252 * <p> 3253 * Description: <b>One of the HealthcareService's characteristics</b><br> 3254 * Type: <b>token</b><br> 3255 * Path: <b>HealthcareService.characteristic</b><br> 3256 * </p> 3257 */ 3258 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC); 3259 3260 3261} 3262