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 * A compartment definition that defines how resources are accessed on a server. 071 */ 072@ResourceDef(name="CompartmentDefinition", profile="http://hl7.org/fhir/StructureDefinition/CompartmentDefinition") 073@ChildOrder(names={"url", "version", "name", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "purpose", "code", "search", "resource"}) 074public class CompartmentDefinition extends MetadataResource { 075 076 public enum CompartmentType { 077 /** 078 * The compartment definition is for the patient compartment. 079 */ 080 PATIENT, 081 /** 082 * The compartment definition is for the encounter compartment. 083 */ 084 ENCOUNTER, 085 /** 086 * The compartment definition is for the related-person compartment. 087 */ 088 RELATEDPERSON, 089 /** 090 * The compartment definition is for the practitioner compartment. 091 */ 092 PRACTITIONER, 093 /** 094 * The compartment definition is for the device compartment. 095 */ 096 DEVICE, 097 /** 098 * added to help the parsers with the generic types 099 */ 100 NULL; 101 public static CompartmentType fromCode(String codeString) throws FHIRException { 102 if (codeString == null || "".equals(codeString)) 103 return null; 104 if ("Patient".equals(codeString)) 105 return PATIENT; 106 if ("Encounter".equals(codeString)) 107 return ENCOUNTER; 108 if ("RelatedPerson".equals(codeString)) 109 return RELATEDPERSON; 110 if ("Practitioner".equals(codeString)) 111 return PRACTITIONER; 112 if ("Device".equals(codeString)) 113 return DEVICE; 114 if (Configuration.isAcceptInvalidEnums()) 115 return null; 116 else 117 throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); 118 } 119 public String toCode() { 120 switch (this) { 121 case PATIENT: return "Patient"; 122 case ENCOUNTER: return "Encounter"; 123 case RELATEDPERSON: return "RelatedPerson"; 124 case PRACTITIONER: return "Practitioner"; 125 case DEVICE: return "Device"; 126 default: return "?"; 127 } 128 } 129 public String getSystem() { 130 switch (this) { 131 case PATIENT: return "http://hl7.org/fhir/compartment-type"; 132 case ENCOUNTER: return "http://hl7.org/fhir/compartment-type"; 133 case RELATEDPERSON: return "http://hl7.org/fhir/compartment-type"; 134 case PRACTITIONER: return "http://hl7.org/fhir/compartment-type"; 135 case DEVICE: return "http://hl7.org/fhir/compartment-type"; 136 default: return "?"; 137 } 138 } 139 public String getDefinition() { 140 switch (this) { 141 case PATIENT: return "The compartment definition is for the patient compartment."; 142 case ENCOUNTER: return "The compartment definition is for the encounter compartment."; 143 case RELATEDPERSON: return "The compartment definition is for the related-person compartment."; 144 case PRACTITIONER: return "The compartment definition is for the practitioner compartment."; 145 case DEVICE: return "The compartment definition is for the device compartment."; 146 default: return "?"; 147 } 148 } 149 public String getDisplay() { 150 switch (this) { 151 case PATIENT: return "Patient"; 152 case ENCOUNTER: return "Encounter"; 153 case RELATEDPERSON: return "RelatedPerson"; 154 case PRACTITIONER: return "Practitioner"; 155 case DEVICE: return "Device"; 156 default: return "?"; 157 } 158 } 159 } 160 161 public static class CompartmentTypeEnumFactory implements EnumFactory<CompartmentType> { 162 public CompartmentType fromCode(String codeString) throws IllegalArgumentException { 163 if (codeString == null || "".equals(codeString)) 164 if (codeString == null || "".equals(codeString)) 165 return null; 166 if ("Patient".equals(codeString)) 167 return CompartmentType.PATIENT; 168 if ("Encounter".equals(codeString)) 169 return CompartmentType.ENCOUNTER; 170 if ("RelatedPerson".equals(codeString)) 171 return CompartmentType.RELATEDPERSON; 172 if ("Practitioner".equals(codeString)) 173 return CompartmentType.PRACTITIONER; 174 if ("Device".equals(codeString)) 175 return CompartmentType.DEVICE; 176 throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'"); 177 } 178 public Enumeration<CompartmentType> fromType(Base code) throws FHIRException { 179 if (code == null) 180 return null; 181 if (code.isEmpty()) 182 return new Enumeration<CompartmentType>(this); 183 String codeString = ((PrimitiveType) code).asStringValue(); 184 if (codeString == null || "".equals(codeString)) 185 return null; 186 if ("Patient".equals(codeString)) 187 return new Enumeration<CompartmentType>(this, CompartmentType.PATIENT); 188 if ("Encounter".equals(codeString)) 189 return new Enumeration<CompartmentType>(this, CompartmentType.ENCOUNTER); 190 if ("RelatedPerson".equals(codeString)) 191 return new Enumeration<CompartmentType>(this, CompartmentType.RELATEDPERSON); 192 if ("Practitioner".equals(codeString)) 193 return new Enumeration<CompartmentType>(this, CompartmentType.PRACTITIONER); 194 if ("Device".equals(codeString)) 195 return new Enumeration<CompartmentType>(this, CompartmentType.DEVICE); 196 throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); 197 } 198 public String toCode(CompartmentType code) { 199 if (code == CompartmentType.PATIENT) 200 return "Patient"; 201 if (code == CompartmentType.ENCOUNTER) 202 return "Encounter"; 203 if (code == CompartmentType.RELATEDPERSON) 204 return "RelatedPerson"; 205 if (code == CompartmentType.PRACTITIONER) 206 return "Practitioner"; 207 if (code == CompartmentType.DEVICE) 208 return "Device"; 209 return "?"; 210 } 211 public String toSystem(CompartmentType code) { 212 return code.getSystem(); 213 } 214 } 215 216 @Block() 217 public static class CompartmentDefinitionResourceComponent extends BackboneElement implements IBaseBackboneElement { 218 /** 219 * The name of a resource supported by the server. 220 */ 221 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 222 @Description(shortDefinition="Name of resource type", formalDefinition="The name of a resource supported by the server." ) 223 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 224 protected CodeType code; 225 226 /** 227 * The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,. 228 */ 229 @Child(name = "param", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 230 @Description(shortDefinition="Search Parameter Name, or chained parameters", formalDefinition="The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,." ) 231 protected List<StringType> param; 232 233 /** 234 * Additional documentation about the resource and compartment. 235 */ 236 @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 237 @Description(shortDefinition="Additional documentation about the resource and compartment", formalDefinition="Additional documentation about the resource and compartment." ) 238 protected StringType documentation; 239 240 private static final long serialVersionUID = 988080897L; 241 242 /** 243 * Constructor 244 */ 245 public CompartmentDefinitionResourceComponent() { 246 super(); 247 } 248 249 /** 250 * Constructor 251 */ 252 public CompartmentDefinitionResourceComponent(CodeType code) { 253 super(); 254 this.code = code; 255 } 256 257 /** 258 * @return {@link #code} (The name of a resource supported by the server.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 259 */ 260 public CodeType getCodeElement() { 261 if (this.code == null) 262 if (Configuration.errorOnAutoCreate()) 263 throw new Error("Attempt to auto-create CompartmentDefinitionResourceComponent.code"); 264 else if (Configuration.doAutoCreate()) 265 this.code = new CodeType(); // bb 266 return this.code; 267 } 268 269 public boolean hasCodeElement() { 270 return this.code != null && !this.code.isEmpty(); 271 } 272 273 public boolean hasCode() { 274 return this.code != null && !this.code.isEmpty(); 275 } 276 277 /** 278 * @param value {@link #code} (The name of a resource supported by the server.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 279 */ 280 public CompartmentDefinitionResourceComponent setCodeElement(CodeType value) { 281 this.code = value; 282 return this; 283 } 284 285 /** 286 * @return The name of a resource supported by the server. 287 */ 288 public String getCode() { 289 return this.code == null ? null : this.code.getValue(); 290 } 291 292 /** 293 * @param value The name of a resource supported by the server. 294 */ 295 public CompartmentDefinitionResourceComponent setCode(String value) { 296 if (this.code == null) 297 this.code = new CodeType(); 298 this.code.setValue(value); 299 return this; 300 } 301 302 /** 303 * @return {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.) 304 */ 305 public List<StringType> getParam() { 306 if (this.param == null) 307 this.param = new ArrayList<StringType>(); 308 return this.param; 309 } 310 311 /** 312 * @return Returns a reference to <code>this</code> for easy method chaining 313 */ 314 public CompartmentDefinitionResourceComponent setParam(List<StringType> theParam) { 315 this.param = theParam; 316 return this; 317 } 318 319 public boolean hasParam() { 320 if (this.param == null) 321 return false; 322 for (StringType item : this.param) 323 if (!item.isEmpty()) 324 return true; 325 return false; 326 } 327 328 /** 329 * @return {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.) 330 */ 331 public StringType addParamElement() {//2 332 StringType t = new StringType(); 333 if (this.param == null) 334 this.param = new ArrayList<StringType>(); 335 this.param.add(t); 336 return t; 337 } 338 339 /** 340 * @param value {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.) 341 */ 342 public CompartmentDefinitionResourceComponent addParam(String value) { //1 343 StringType t = new StringType(); 344 t.setValue(value); 345 if (this.param == null) 346 this.param = new ArrayList<StringType>(); 347 this.param.add(t); 348 return this; 349 } 350 351 /** 352 * @param value {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.) 353 */ 354 public boolean hasParam(String value) { 355 if (this.param == null) 356 return false; 357 for (StringType v : this.param) 358 if (v.getValue().equals(value)) // string 359 return true; 360 return false; 361 } 362 363 /** 364 * @return {@link #documentation} (Additional documentation about the resource and compartment.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 365 */ 366 public StringType getDocumentationElement() { 367 if (this.documentation == null) 368 if (Configuration.errorOnAutoCreate()) 369 throw new Error("Attempt to auto-create CompartmentDefinitionResourceComponent.documentation"); 370 else if (Configuration.doAutoCreate()) 371 this.documentation = new StringType(); // bb 372 return this.documentation; 373 } 374 375 public boolean hasDocumentationElement() { 376 return this.documentation != null && !this.documentation.isEmpty(); 377 } 378 379 public boolean hasDocumentation() { 380 return this.documentation != null && !this.documentation.isEmpty(); 381 } 382 383 /** 384 * @param value {@link #documentation} (Additional documentation about the resource and compartment.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 385 */ 386 public CompartmentDefinitionResourceComponent setDocumentationElement(StringType value) { 387 this.documentation = value; 388 return this; 389 } 390 391 /** 392 * @return Additional documentation about the resource and compartment. 393 */ 394 public String getDocumentation() { 395 return this.documentation == null ? null : this.documentation.getValue(); 396 } 397 398 /** 399 * @param value Additional documentation about the resource and compartment. 400 */ 401 public CompartmentDefinitionResourceComponent setDocumentation(String value) { 402 if (Utilities.noString(value)) 403 this.documentation = null; 404 else { 405 if (this.documentation == null) 406 this.documentation = new StringType(); 407 this.documentation.setValue(value); 408 } 409 return this; 410 } 411 412 protected void listChildren(List<Property> children) { 413 super.listChildren(children); 414 children.add(new Property("code", "code", "The name of a resource supported by the server.", 0, 1, code)); 415 children.add(new Property("param", "string", "The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.", 0, java.lang.Integer.MAX_VALUE, param)); 416 children.add(new Property("documentation", "string", "Additional documentation about the resource and compartment.", 0, 1, documentation)); 417 } 418 419 @Override 420 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 421 switch (_hash) { 422 case 3059181: /*code*/ return new Property("code", "code", "The name of a resource supported by the server.", 0, 1, code); 423 case 106436749: /*param*/ return new Property("param", "string", "The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.", 0, java.lang.Integer.MAX_VALUE, param); 424 case 1587405498: /*documentation*/ return new Property("documentation", "string", "Additional documentation about the resource and compartment.", 0, 1, documentation); 425 default: return super.getNamedProperty(_hash, _name, _checkValid); 426 } 427 428 } 429 430 @Override 431 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 432 switch (hash) { 433 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType 434 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // StringType 435 case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType 436 default: return super.getProperty(hash, name, checkValid); 437 } 438 439 } 440 441 @Override 442 public Base setProperty(int hash, String name, Base value) throws FHIRException { 443 switch (hash) { 444 case 3059181: // code 445 this.code = castToCode(value); // CodeType 446 return value; 447 case 106436749: // param 448 this.getParam().add(castToString(value)); // StringType 449 return value; 450 case 1587405498: // documentation 451 this.documentation = castToString(value); // StringType 452 return value; 453 default: return super.setProperty(hash, name, value); 454 } 455 456 } 457 458 @Override 459 public Base setProperty(String name, Base value) throws FHIRException { 460 if (name.equals("code")) { 461 this.code = castToCode(value); // CodeType 462 } else if (name.equals("param")) { 463 this.getParam().add(castToString(value)); 464 } else if (name.equals("documentation")) { 465 this.documentation = castToString(value); // StringType 466 } else 467 return super.setProperty(name, value); 468 return value; 469 } 470 471 @Override 472 public Base makeProperty(int hash, String name) throws FHIRException { 473 switch (hash) { 474 case 3059181: return getCodeElement(); 475 case 106436749: return addParamElement(); 476 case 1587405498: return getDocumentationElement(); 477 default: return super.makeProperty(hash, name); 478 } 479 480 } 481 482 @Override 483 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 484 switch (hash) { 485 case 3059181: /*code*/ return new String[] {"code"}; 486 case 106436749: /*param*/ return new String[] {"string"}; 487 case 1587405498: /*documentation*/ return new String[] {"string"}; 488 default: return super.getTypesForProperty(hash, name); 489 } 490 491 } 492 493 @Override 494 public Base addChild(String name) throws FHIRException { 495 if (name.equals("code")) { 496 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code"); 497 } 498 else if (name.equals("param")) { 499 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.param"); 500 } 501 else if (name.equals("documentation")) { 502 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.documentation"); 503 } 504 else 505 return super.addChild(name); 506 } 507 508 public CompartmentDefinitionResourceComponent copy() { 509 CompartmentDefinitionResourceComponent dst = new CompartmentDefinitionResourceComponent(); 510 copyValues(dst); 511 return dst; 512 } 513 514 public void copyValues(CompartmentDefinitionResourceComponent dst) { 515 super.copyValues(dst); 516 dst.code = code == null ? null : code.copy(); 517 if (param != null) { 518 dst.param = new ArrayList<StringType>(); 519 for (StringType i : param) 520 dst.param.add(i.copy()); 521 }; 522 dst.documentation = documentation == null ? null : documentation.copy(); 523 } 524 525 @Override 526 public boolean equalsDeep(Base other_) { 527 if (!super.equalsDeep(other_)) 528 return false; 529 if (!(other_ instanceof CompartmentDefinitionResourceComponent)) 530 return false; 531 CompartmentDefinitionResourceComponent o = (CompartmentDefinitionResourceComponent) other_; 532 return compareDeep(code, o.code, true) && compareDeep(param, o.param, true) && compareDeep(documentation, o.documentation, true) 533 ; 534 } 535 536 @Override 537 public boolean equalsShallow(Base other_) { 538 if (!super.equalsShallow(other_)) 539 return false; 540 if (!(other_ instanceof CompartmentDefinitionResourceComponent)) 541 return false; 542 CompartmentDefinitionResourceComponent o = (CompartmentDefinitionResourceComponent) other_; 543 return compareValues(code, o.code, true) && compareValues(param, o.param, true) && compareValues(documentation, o.documentation, true) 544 ; 545 } 546 547 public boolean isEmpty() { 548 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, param, documentation 549 ); 550 } 551 552 public String fhirType() { 553 return "CompartmentDefinition.resource"; 554 555 } 556 557 } 558 559 /** 560 * Explanation of why this compartment definition is needed and why it has been designed as it has. 561 */ 562 @Child(name = "purpose", type = {MarkdownType.class}, order=0, min=0, max=1, modifier=false, summary=false) 563 @Description(shortDefinition="Why this compartment definition is defined", formalDefinition="Explanation of why this compartment definition is needed and why it has been designed as it has." ) 564 protected MarkdownType purpose; 565 566 /** 567 * Which compartment this definition describes. 568 */ 569 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 570 @Description(shortDefinition="Patient | Encounter | RelatedPerson | Practitioner | Device", formalDefinition="Which compartment this definition describes." ) 571 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/compartment-type") 572 protected Enumeration<CompartmentType> code; 573 574 /** 575 * Whether the search syntax is supported,. 576 */ 577 @Child(name = "search", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true) 578 @Description(shortDefinition="Whether the search syntax is supported", formalDefinition="Whether the search syntax is supported,." ) 579 protected BooleanType search; 580 581 /** 582 * Information about how a resource is related to the compartment. 583 */ 584 @Child(name = "resource", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 585 @Description(shortDefinition="How a resource is related to the compartment", formalDefinition="Information about how a resource is related to the compartment." ) 586 protected List<CompartmentDefinitionResourceComponent> resource; 587 588 private static final long serialVersionUID = -1159172945L; 589 590 /** 591 * Constructor 592 */ 593 public CompartmentDefinition() { 594 super(); 595 } 596 597 /** 598 * Constructor 599 */ 600 public CompartmentDefinition(UriType url, StringType name, Enumeration<PublicationStatus> status, Enumeration<CompartmentType> code, BooleanType search) { 601 super(); 602 this.url = url; 603 this.name = name; 604 this.status = status; 605 this.code = code; 606 this.search = search; 607 } 608 609 /** 610 * @return {@link #url} (An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 611 */ 612 public UriType getUrlElement() { 613 if (this.url == null) 614 if (Configuration.errorOnAutoCreate()) 615 throw new Error("Attempt to auto-create CompartmentDefinition.url"); 616 else if (Configuration.doAutoCreate()) 617 this.url = new UriType(); // bb 618 return this.url; 619 } 620 621 public boolean hasUrlElement() { 622 return this.url != null && !this.url.isEmpty(); 623 } 624 625 public boolean hasUrl() { 626 return this.url != null && !this.url.isEmpty(); 627 } 628 629 /** 630 * @param value {@link #url} (An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 631 */ 632 public CompartmentDefinition setUrlElement(UriType value) { 633 this.url = value; 634 return this; 635 } 636 637 /** 638 * @return An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers. 639 */ 640 public String getUrl() { 641 return this.url == null ? null : this.url.getValue(); 642 } 643 644 /** 645 * @param value An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers. 646 */ 647 public CompartmentDefinition setUrl(String value) { 648 if (this.url == null) 649 this.url = new UriType(); 650 this.url.setValue(value); 651 return this; 652 } 653 654 /** 655 * @return {@link #version} (The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 656 */ 657 public StringType getVersionElement() { 658 if (this.version == null) 659 if (Configuration.errorOnAutoCreate()) 660 throw new Error("Attempt to auto-create CompartmentDefinition.version"); 661 else if (Configuration.doAutoCreate()) 662 this.version = new StringType(); // bb 663 return this.version; 664 } 665 666 public boolean hasVersionElement() { 667 return this.version != null && !this.version.isEmpty(); 668 } 669 670 public boolean hasVersion() { 671 return this.version != null && !this.version.isEmpty(); 672 } 673 674 /** 675 * @param value {@link #version} (The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 676 */ 677 public CompartmentDefinition setVersionElement(StringType value) { 678 this.version = value; 679 return this; 680 } 681 682 /** 683 * @return The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 684 */ 685 public String getVersion() { 686 return this.version == null ? null : this.version.getValue(); 687 } 688 689 /** 690 * @param value The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 691 */ 692 public CompartmentDefinition setVersion(String value) { 693 if (Utilities.noString(value)) 694 this.version = null; 695 else { 696 if (this.version == null) 697 this.version = new StringType(); 698 this.version.setValue(value); 699 } 700 return this; 701 } 702 703 /** 704 * @return {@link #name} (A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 705 */ 706 public StringType getNameElement() { 707 if (this.name == null) 708 if (Configuration.errorOnAutoCreate()) 709 throw new Error("Attempt to auto-create CompartmentDefinition.name"); 710 else if (Configuration.doAutoCreate()) 711 this.name = new StringType(); // bb 712 return this.name; 713 } 714 715 public boolean hasNameElement() { 716 return this.name != null && !this.name.isEmpty(); 717 } 718 719 public boolean hasName() { 720 return this.name != null && !this.name.isEmpty(); 721 } 722 723 /** 724 * @param value {@link #name} (A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 725 */ 726 public CompartmentDefinition setNameElement(StringType value) { 727 this.name = value; 728 return this; 729 } 730 731 /** 732 * @return A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation. 733 */ 734 public String getName() { 735 return this.name == null ? null : this.name.getValue(); 736 } 737 738 /** 739 * @param value A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation. 740 */ 741 public CompartmentDefinition setName(String value) { 742 if (this.name == null) 743 this.name = new StringType(); 744 this.name.setValue(value); 745 return this; 746 } 747 748 /** 749 * @return {@link #status} (The status of this compartment definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 750 */ 751 public Enumeration<PublicationStatus> getStatusElement() { 752 if (this.status == null) 753 if (Configuration.errorOnAutoCreate()) 754 throw new Error("Attempt to auto-create CompartmentDefinition.status"); 755 else if (Configuration.doAutoCreate()) 756 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 757 return this.status; 758 } 759 760 public boolean hasStatusElement() { 761 return this.status != null && !this.status.isEmpty(); 762 } 763 764 public boolean hasStatus() { 765 return this.status != null && !this.status.isEmpty(); 766 } 767 768 /** 769 * @param value {@link #status} (The status of this compartment definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 770 */ 771 public CompartmentDefinition setStatusElement(Enumeration<PublicationStatus> value) { 772 this.status = value; 773 return this; 774 } 775 776 /** 777 * @return The status of this compartment definition. Enables tracking the life-cycle of the content. 778 */ 779 public PublicationStatus getStatus() { 780 return this.status == null ? null : this.status.getValue(); 781 } 782 783 /** 784 * @param value The status of this compartment definition. Enables tracking the life-cycle of the content. 785 */ 786 public CompartmentDefinition setStatus(PublicationStatus value) { 787 if (this.status == null) 788 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 789 this.status.setValue(value); 790 return this; 791 } 792 793 /** 794 * @return {@link #experimental} (A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 795 */ 796 public BooleanType getExperimentalElement() { 797 if (this.experimental == null) 798 if (Configuration.errorOnAutoCreate()) 799 throw new Error("Attempt to auto-create CompartmentDefinition.experimental"); 800 else if (Configuration.doAutoCreate()) 801 this.experimental = new BooleanType(); // bb 802 return this.experimental; 803 } 804 805 public boolean hasExperimentalElement() { 806 return this.experimental != null && !this.experimental.isEmpty(); 807 } 808 809 public boolean hasExperimental() { 810 return this.experimental != null && !this.experimental.isEmpty(); 811 } 812 813 /** 814 * @param value {@link #experimental} (A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 815 */ 816 public CompartmentDefinition setExperimentalElement(BooleanType value) { 817 this.experimental = value; 818 return this; 819 } 820 821 /** 822 * @return A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 823 */ 824 public boolean getExperimental() { 825 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 826 } 827 828 /** 829 * @param value A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 830 */ 831 public CompartmentDefinition setExperimental(boolean value) { 832 if (this.experimental == null) 833 this.experimental = new BooleanType(); 834 this.experimental.setValue(value); 835 return this; 836 } 837 838 /** 839 * @return {@link #date} (The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 840 */ 841 public DateTimeType getDateElement() { 842 if (this.date == null) 843 if (Configuration.errorOnAutoCreate()) 844 throw new Error("Attempt to auto-create CompartmentDefinition.date"); 845 else if (Configuration.doAutoCreate()) 846 this.date = new DateTimeType(); // bb 847 return this.date; 848 } 849 850 public boolean hasDateElement() { 851 return this.date != null && !this.date.isEmpty(); 852 } 853 854 public boolean hasDate() { 855 return this.date != null && !this.date.isEmpty(); 856 } 857 858 /** 859 * @param value {@link #date} (The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 860 */ 861 public CompartmentDefinition setDateElement(DateTimeType value) { 862 this.date = value; 863 return this; 864 } 865 866 /** 867 * @return The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes. 868 */ 869 public Date getDate() { 870 return this.date == null ? null : this.date.getValue(); 871 } 872 873 /** 874 * @param value The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes. 875 */ 876 public CompartmentDefinition setDate(Date value) { 877 if (value == null) 878 this.date = null; 879 else { 880 if (this.date == null) 881 this.date = new DateTimeType(); 882 this.date.setValue(value); 883 } 884 return this; 885 } 886 887 /** 888 * @return {@link #publisher} (The name of the organization or individual that published the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 889 */ 890 public StringType getPublisherElement() { 891 if (this.publisher == null) 892 if (Configuration.errorOnAutoCreate()) 893 throw new Error("Attempt to auto-create CompartmentDefinition.publisher"); 894 else if (Configuration.doAutoCreate()) 895 this.publisher = new StringType(); // bb 896 return this.publisher; 897 } 898 899 public boolean hasPublisherElement() { 900 return this.publisher != null && !this.publisher.isEmpty(); 901 } 902 903 public boolean hasPublisher() { 904 return this.publisher != null && !this.publisher.isEmpty(); 905 } 906 907 /** 908 * @param value {@link #publisher} (The name of the organization or individual that published the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 909 */ 910 public CompartmentDefinition setPublisherElement(StringType value) { 911 this.publisher = value; 912 return this; 913 } 914 915 /** 916 * @return The name of the organization or individual that published the compartment definition. 917 */ 918 public String getPublisher() { 919 return this.publisher == null ? null : this.publisher.getValue(); 920 } 921 922 /** 923 * @param value The name of the organization or individual that published the compartment definition. 924 */ 925 public CompartmentDefinition setPublisher(String value) { 926 if (Utilities.noString(value)) 927 this.publisher = null; 928 else { 929 if (this.publisher == null) 930 this.publisher = new StringType(); 931 this.publisher.setValue(value); 932 } 933 return this; 934 } 935 936 /** 937 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 938 */ 939 public List<ContactDetail> getContact() { 940 if (this.contact == null) 941 this.contact = new ArrayList<ContactDetail>(); 942 return this.contact; 943 } 944 945 /** 946 * @return Returns a reference to <code>this</code> for easy method chaining 947 */ 948 public CompartmentDefinition setContact(List<ContactDetail> theContact) { 949 this.contact = theContact; 950 return this; 951 } 952 953 public boolean hasContact() { 954 if (this.contact == null) 955 return false; 956 for (ContactDetail item : this.contact) 957 if (!item.isEmpty()) 958 return true; 959 return false; 960 } 961 962 public ContactDetail addContact() { //3 963 ContactDetail t = new ContactDetail(); 964 if (this.contact == null) 965 this.contact = new ArrayList<ContactDetail>(); 966 this.contact.add(t); 967 return t; 968 } 969 970 public CompartmentDefinition addContact(ContactDetail t) { //3 971 if (t == null) 972 return this; 973 if (this.contact == null) 974 this.contact = new ArrayList<ContactDetail>(); 975 this.contact.add(t); 976 return this; 977 } 978 979 /** 980 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 981 */ 982 public ContactDetail getContactFirstRep() { 983 if (getContact().isEmpty()) { 984 addContact(); 985 } 986 return getContact().get(0); 987 } 988 989 /** 990 * @return {@link #description} (A free text natural language description of the compartment definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 991 */ 992 public MarkdownType getDescriptionElement() { 993 if (this.description == null) 994 if (Configuration.errorOnAutoCreate()) 995 throw new Error("Attempt to auto-create CompartmentDefinition.description"); 996 else if (Configuration.doAutoCreate()) 997 this.description = new MarkdownType(); // bb 998 return this.description; 999 } 1000 1001 public boolean hasDescriptionElement() { 1002 return this.description != null && !this.description.isEmpty(); 1003 } 1004 1005 public boolean hasDescription() { 1006 return this.description != null && !this.description.isEmpty(); 1007 } 1008 1009 /** 1010 * @param value {@link #description} (A free text natural language description of the compartment definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1011 */ 1012 public CompartmentDefinition setDescriptionElement(MarkdownType value) { 1013 this.description = value; 1014 return this; 1015 } 1016 1017 /** 1018 * @return A free text natural language description of the compartment definition from a consumer's perspective. 1019 */ 1020 public String getDescription() { 1021 return this.description == null ? null : this.description.getValue(); 1022 } 1023 1024 /** 1025 * @param value A free text natural language description of the compartment definition from a consumer's perspective. 1026 */ 1027 public CompartmentDefinition setDescription(String value) { 1028 if (value == null) 1029 this.description = null; 1030 else { 1031 if (this.description == null) 1032 this.description = new MarkdownType(); 1033 this.description.setValue(value); 1034 } 1035 return this; 1036 } 1037 1038 /** 1039 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.) 1040 */ 1041 public List<UsageContext> getUseContext() { 1042 if (this.useContext == null) 1043 this.useContext = new ArrayList<UsageContext>(); 1044 return this.useContext; 1045 } 1046 1047 /** 1048 * @return Returns a reference to <code>this</code> for easy method chaining 1049 */ 1050 public CompartmentDefinition setUseContext(List<UsageContext> theUseContext) { 1051 this.useContext = theUseContext; 1052 return this; 1053 } 1054 1055 public boolean hasUseContext() { 1056 if (this.useContext == null) 1057 return false; 1058 for (UsageContext item : this.useContext) 1059 if (!item.isEmpty()) 1060 return true; 1061 return false; 1062 } 1063 1064 public UsageContext addUseContext() { //3 1065 UsageContext t = new UsageContext(); 1066 if (this.useContext == null) 1067 this.useContext = new ArrayList<UsageContext>(); 1068 this.useContext.add(t); 1069 return t; 1070 } 1071 1072 public CompartmentDefinition addUseContext(UsageContext t) { //3 1073 if (t == null) 1074 return this; 1075 if (this.useContext == null) 1076 this.useContext = new ArrayList<UsageContext>(); 1077 this.useContext.add(t); 1078 return this; 1079 } 1080 1081 /** 1082 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 1083 */ 1084 public UsageContext getUseContextFirstRep() { 1085 if (getUseContext().isEmpty()) { 1086 addUseContext(); 1087 } 1088 return getUseContext().get(0); 1089 } 1090 1091 /** 1092 * @return {@link #purpose} (Explanation of why this compartment definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 1093 */ 1094 public MarkdownType getPurposeElement() { 1095 if (this.purpose == null) 1096 if (Configuration.errorOnAutoCreate()) 1097 throw new Error("Attempt to auto-create CompartmentDefinition.purpose"); 1098 else if (Configuration.doAutoCreate()) 1099 this.purpose = new MarkdownType(); // bb 1100 return this.purpose; 1101 } 1102 1103 public boolean hasPurposeElement() { 1104 return this.purpose != null && !this.purpose.isEmpty(); 1105 } 1106 1107 public boolean hasPurpose() { 1108 return this.purpose != null && !this.purpose.isEmpty(); 1109 } 1110 1111 /** 1112 * @param value {@link #purpose} (Explanation of why this compartment definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 1113 */ 1114 public CompartmentDefinition setPurposeElement(MarkdownType value) { 1115 this.purpose = value; 1116 return this; 1117 } 1118 1119 /** 1120 * @return Explanation of why this compartment definition is needed and why it has been designed as it has. 1121 */ 1122 public String getPurpose() { 1123 return this.purpose == null ? null : this.purpose.getValue(); 1124 } 1125 1126 /** 1127 * @param value Explanation of why this compartment definition is needed and why it has been designed as it has. 1128 */ 1129 public CompartmentDefinition setPurpose(String value) { 1130 if (value == null) 1131 this.purpose = null; 1132 else { 1133 if (this.purpose == null) 1134 this.purpose = new MarkdownType(); 1135 this.purpose.setValue(value); 1136 } 1137 return this; 1138 } 1139 1140 /** 1141 * @return {@link #code} (Which compartment this definition describes.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1142 */ 1143 public Enumeration<CompartmentType> getCodeElement() { 1144 if (this.code == null) 1145 if (Configuration.errorOnAutoCreate()) 1146 throw new Error("Attempt to auto-create CompartmentDefinition.code"); 1147 else if (Configuration.doAutoCreate()) 1148 this.code = new Enumeration<CompartmentType>(new CompartmentTypeEnumFactory()); // bb 1149 return this.code; 1150 } 1151 1152 public boolean hasCodeElement() { 1153 return this.code != null && !this.code.isEmpty(); 1154 } 1155 1156 public boolean hasCode() { 1157 return this.code != null && !this.code.isEmpty(); 1158 } 1159 1160 /** 1161 * @param value {@link #code} (Which compartment this definition describes.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1162 */ 1163 public CompartmentDefinition setCodeElement(Enumeration<CompartmentType> value) { 1164 this.code = value; 1165 return this; 1166 } 1167 1168 /** 1169 * @return Which compartment this definition describes. 1170 */ 1171 public CompartmentType getCode() { 1172 return this.code == null ? null : this.code.getValue(); 1173 } 1174 1175 /** 1176 * @param value Which compartment this definition describes. 1177 */ 1178 public CompartmentDefinition setCode(CompartmentType value) { 1179 if (this.code == null) 1180 this.code = new Enumeration<CompartmentType>(new CompartmentTypeEnumFactory()); 1181 this.code.setValue(value); 1182 return this; 1183 } 1184 1185 /** 1186 * @return {@link #search} (Whether the search syntax is supported,.). This is the underlying object with id, value and extensions. The accessor "getSearch" gives direct access to the value 1187 */ 1188 public BooleanType getSearchElement() { 1189 if (this.search == null) 1190 if (Configuration.errorOnAutoCreate()) 1191 throw new Error("Attempt to auto-create CompartmentDefinition.search"); 1192 else if (Configuration.doAutoCreate()) 1193 this.search = new BooleanType(); // bb 1194 return this.search; 1195 } 1196 1197 public boolean hasSearchElement() { 1198 return this.search != null && !this.search.isEmpty(); 1199 } 1200 1201 public boolean hasSearch() { 1202 return this.search != null && !this.search.isEmpty(); 1203 } 1204 1205 /** 1206 * @param value {@link #search} (Whether the search syntax is supported,.). This is the underlying object with id, value and extensions. The accessor "getSearch" gives direct access to the value 1207 */ 1208 public CompartmentDefinition setSearchElement(BooleanType value) { 1209 this.search = value; 1210 return this; 1211 } 1212 1213 /** 1214 * @return Whether the search syntax is supported,. 1215 */ 1216 public boolean getSearch() { 1217 return this.search == null || this.search.isEmpty() ? false : this.search.getValue(); 1218 } 1219 1220 /** 1221 * @param value Whether the search syntax is supported,. 1222 */ 1223 public CompartmentDefinition setSearch(boolean value) { 1224 if (this.search == null) 1225 this.search = new BooleanType(); 1226 this.search.setValue(value); 1227 return this; 1228 } 1229 1230 /** 1231 * @return {@link #resource} (Information about how a resource is related to the compartment.) 1232 */ 1233 public List<CompartmentDefinitionResourceComponent> getResource() { 1234 if (this.resource == null) 1235 this.resource = new ArrayList<CompartmentDefinitionResourceComponent>(); 1236 return this.resource; 1237 } 1238 1239 /** 1240 * @return Returns a reference to <code>this</code> for easy method chaining 1241 */ 1242 public CompartmentDefinition setResource(List<CompartmentDefinitionResourceComponent> theResource) { 1243 this.resource = theResource; 1244 return this; 1245 } 1246 1247 public boolean hasResource() { 1248 if (this.resource == null) 1249 return false; 1250 for (CompartmentDefinitionResourceComponent item : this.resource) 1251 if (!item.isEmpty()) 1252 return true; 1253 return false; 1254 } 1255 1256 public CompartmentDefinitionResourceComponent addResource() { //3 1257 CompartmentDefinitionResourceComponent t = new CompartmentDefinitionResourceComponent(); 1258 if (this.resource == null) 1259 this.resource = new ArrayList<CompartmentDefinitionResourceComponent>(); 1260 this.resource.add(t); 1261 return t; 1262 } 1263 1264 public CompartmentDefinition addResource(CompartmentDefinitionResourceComponent t) { //3 1265 if (t == null) 1266 return this; 1267 if (this.resource == null) 1268 this.resource = new ArrayList<CompartmentDefinitionResourceComponent>(); 1269 this.resource.add(t); 1270 return this; 1271 } 1272 1273 /** 1274 * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist 1275 */ 1276 public CompartmentDefinitionResourceComponent getResourceFirstRep() { 1277 if (getResource().isEmpty()) { 1278 addResource(); 1279 } 1280 return getResource().get(0); 1281 } 1282 1283 protected void listChildren(List<Property> children) { 1284 super.listChildren(children); 1285 children.add(new Property("url", "uri", "An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.", 0, 1, url)); 1286 children.add(new Property("version", "string", "The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version)); 1287 children.add(new Property("name", "string", "A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 1288 children.add(new Property("status", "code", "The status of this compartment definition. Enables tracking the life-cycle of the content.", 0, 1, status)); 1289 children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental)); 1290 children.add(new Property("date", "dateTime", "The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.", 0, 1, date)); 1291 children.add(new Property("publisher", "string", "The name of the organization or individual that published the compartment definition.", 0, 1, publisher)); 1292 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 1293 children.add(new Property("description", "markdown", "A free text natural language description of the compartment definition from a consumer's perspective.", 0, 1, description)); 1294 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 1295 children.add(new Property("purpose", "markdown", "Explanation of why this compartment definition is needed and why it has been designed as it has.", 0, 1, purpose)); 1296 children.add(new Property("code", "code", "Which compartment this definition describes.", 0, 1, code)); 1297 children.add(new Property("search", "boolean", "Whether the search syntax is supported,.", 0, 1, search)); 1298 children.add(new Property("resource", "", "Information about how a resource is related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource)); 1299 } 1300 1301 @Override 1302 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1303 switch (_hash) { 1304 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.", 0, 1, url); 1305 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version); 1306 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 1307 case -892481550: /*status*/ return new Property("status", "code", "The status of this compartment definition. Enables tracking the life-cycle of the content.", 0, 1, status); 1308 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental); 1309 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.", 0, 1, date); 1310 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the compartment definition.", 0, 1, publisher); 1311 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 1312 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the compartment definition from a consumer's perspective.", 0, 1, description); 1313 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 1314 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explanation of why this compartment definition is needed and why it has been designed as it has.", 0, 1, purpose); 1315 case 3059181: /*code*/ return new Property("code", "code", "Which compartment this definition describes.", 0, 1, code); 1316 case -906336856: /*search*/ return new Property("search", "boolean", "Whether the search syntax is supported,.", 0, 1, search); 1317 case -341064690: /*resource*/ return new Property("resource", "", "Information about how a resource is related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource); 1318 default: return super.getNamedProperty(_hash, _name, _checkValid); 1319 } 1320 1321 } 1322 1323 @Override 1324 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1325 switch (hash) { 1326 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1327 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 1328 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1329 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 1330 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 1331 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 1332 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 1333 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 1334 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 1335 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 1336 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 1337 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<CompartmentType> 1338 case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BooleanType 1339 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CompartmentDefinitionResourceComponent 1340 default: return super.getProperty(hash, name, checkValid); 1341 } 1342 1343 } 1344 1345 @Override 1346 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1347 switch (hash) { 1348 case 116079: // url 1349 this.url = castToUri(value); // UriType 1350 return value; 1351 case 351608024: // version 1352 this.version = castToString(value); // StringType 1353 return value; 1354 case 3373707: // name 1355 this.name = castToString(value); // StringType 1356 return value; 1357 case -892481550: // status 1358 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 1359 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 1360 return value; 1361 case -404562712: // experimental 1362 this.experimental = castToBoolean(value); // BooleanType 1363 return value; 1364 case 3076014: // date 1365 this.date = castToDateTime(value); // DateTimeType 1366 return value; 1367 case 1447404028: // publisher 1368 this.publisher = castToString(value); // StringType 1369 return value; 1370 case 951526432: // contact 1371 this.getContact().add(castToContactDetail(value)); // ContactDetail 1372 return value; 1373 case -1724546052: // description 1374 this.description = castToMarkdown(value); // MarkdownType 1375 return value; 1376 case -669707736: // useContext 1377 this.getUseContext().add(castToUsageContext(value)); // UsageContext 1378 return value; 1379 case -220463842: // purpose 1380 this.purpose = castToMarkdown(value); // MarkdownType 1381 return value; 1382 case 3059181: // code 1383 value = new CompartmentTypeEnumFactory().fromType(castToCode(value)); 1384 this.code = (Enumeration) value; // Enumeration<CompartmentType> 1385 return value; 1386 case -906336856: // search 1387 this.search = castToBoolean(value); // BooleanType 1388 return value; 1389 case -341064690: // resource 1390 this.getResource().add((CompartmentDefinitionResourceComponent) value); // CompartmentDefinitionResourceComponent 1391 return value; 1392 default: return super.setProperty(hash, name, value); 1393 } 1394 1395 } 1396 1397 @Override 1398 public Base setProperty(String name, Base value) throws FHIRException { 1399 if (name.equals("url")) { 1400 this.url = castToUri(value); // UriType 1401 } else if (name.equals("version")) { 1402 this.version = castToString(value); // StringType 1403 } else if (name.equals("name")) { 1404 this.name = castToString(value); // StringType 1405 } else if (name.equals("status")) { 1406 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 1407 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 1408 } else if (name.equals("experimental")) { 1409 this.experimental = castToBoolean(value); // BooleanType 1410 } else if (name.equals("date")) { 1411 this.date = castToDateTime(value); // DateTimeType 1412 } else if (name.equals("publisher")) { 1413 this.publisher = castToString(value); // StringType 1414 } else if (name.equals("contact")) { 1415 this.getContact().add(castToContactDetail(value)); 1416 } else if (name.equals("description")) { 1417 this.description = castToMarkdown(value); // MarkdownType 1418 } else if (name.equals("useContext")) { 1419 this.getUseContext().add(castToUsageContext(value)); 1420 } else if (name.equals("purpose")) { 1421 this.purpose = castToMarkdown(value); // MarkdownType 1422 } else if (name.equals("code")) { 1423 value = new CompartmentTypeEnumFactory().fromType(castToCode(value)); 1424 this.code = (Enumeration) value; // Enumeration<CompartmentType> 1425 } else if (name.equals("search")) { 1426 this.search = castToBoolean(value); // BooleanType 1427 } else if (name.equals("resource")) { 1428 this.getResource().add((CompartmentDefinitionResourceComponent) value); 1429 } else 1430 return super.setProperty(name, value); 1431 return value; 1432 } 1433 1434 @Override 1435 public Base makeProperty(int hash, String name) throws FHIRException { 1436 switch (hash) { 1437 case 116079: return getUrlElement(); 1438 case 351608024: return getVersionElement(); 1439 case 3373707: return getNameElement(); 1440 case -892481550: return getStatusElement(); 1441 case -404562712: return getExperimentalElement(); 1442 case 3076014: return getDateElement(); 1443 case 1447404028: return getPublisherElement(); 1444 case 951526432: return addContact(); 1445 case -1724546052: return getDescriptionElement(); 1446 case -669707736: return addUseContext(); 1447 case -220463842: return getPurposeElement(); 1448 case 3059181: return getCodeElement(); 1449 case -906336856: return getSearchElement(); 1450 case -341064690: return addResource(); 1451 default: return super.makeProperty(hash, name); 1452 } 1453 1454 } 1455 1456 @Override 1457 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1458 switch (hash) { 1459 case 116079: /*url*/ return new String[] {"uri"}; 1460 case 351608024: /*version*/ return new String[] {"string"}; 1461 case 3373707: /*name*/ return new String[] {"string"}; 1462 case -892481550: /*status*/ return new String[] {"code"}; 1463 case -404562712: /*experimental*/ return new String[] {"boolean"}; 1464 case 3076014: /*date*/ return new String[] {"dateTime"}; 1465 case 1447404028: /*publisher*/ return new String[] {"string"}; 1466 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 1467 case -1724546052: /*description*/ return new String[] {"markdown"}; 1468 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 1469 case -220463842: /*purpose*/ return new String[] {"markdown"}; 1470 case 3059181: /*code*/ return new String[] {"code"}; 1471 case -906336856: /*search*/ return new String[] {"boolean"}; 1472 case -341064690: /*resource*/ return new String[] {}; 1473 default: return super.getTypesForProperty(hash, name); 1474 } 1475 1476 } 1477 1478 @Override 1479 public Base addChild(String name) throws FHIRException { 1480 if (name.equals("url")) { 1481 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.url"); 1482 } 1483 else if (name.equals("version")) { 1484 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.version"); 1485 } 1486 else if (name.equals("name")) { 1487 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.name"); 1488 } 1489 else if (name.equals("status")) { 1490 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.status"); 1491 } 1492 else if (name.equals("experimental")) { 1493 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.experimental"); 1494 } 1495 else if (name.equals("date")) { 1496 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.date"); 1497 } 1498 else if (name.equals("publisher")) { 1499 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.publisher"); 1500 } 1501 else if (name.equals("contact")) { 1502 return addContact(); 1503 } 1504 else if (name.equals("description")) { 1505 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.description"); 1506 } 1507 else if (name.equals("useContext")) { 1508 return addUseContext(); 1509 } 1510 else if (name.equals("purpose")) { 1511 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.purpose"); 1512 } 1513 else if (name.equals("code")) { 1514 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code"); 1515 } 1516 else if (name.equals("search")) { 1517 throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.search"); 1518 } 1519 else if (name.equals("resource")) { 1520 return addResource(); 1521 } 1522 else 1523 return super.addChild(name); 1524 } 1525 1526 public String fhirType() { 1527 return "CompartmentDefinition"; 1528 1529 } 1530 1531 public CompartmentDefinition copy() { 1532 CompartmentDefinition dst = new CompartmentDefinition(); 1533 copyValues(dst); 1534 return dst; 1535 } 1536 1537 public void copyValues(CompartmentDefinition dst) { 1538 super.copyValues(dst); 1539 dst.url = url == null ? null : url.copy(); 1540 dst.version = version == null ? null : version.copy(); 1541 dst.name = name == null ? null : name.copy(); 1542 dst.status = status == null ? null : status.copy(); 1543 dst.experimental = experimental == null ? null : experimental.copy(); 1544 dst.date = date == null ? null : date.copy(); 1545 dst.publisher = publisher == null ? null : publisher.copy(); 1546 if (contact != null) { 1547 dst.contact = new ArrayList<ContactDetail>(); 1548 for (ContactDetail i : contact) 1549 dst.contact.add(i.copy()); 1550 }; 1551 dst.description = description == null ? null : description.copy(); 1552 if (useContext != null) { 1553 dst.useContext = new ArrayList<UsageContext>(); 1554 for (UsageContext i : useContext) 1555 dst.useContext.add(i.copy()); 1556 }; 1557 dst.purpose = purpose == null ? null : purpose.copy(); 1558 dst.code = code == null ? null : code.copy(); 1559 dst.search = search == null ? null : search.copy(); 1560 if (resource != null) { 1561 dst.resource = new ArrayList<CompartmentDefinitionResourceComponent>(); 1562 for (CompartmentDefinitionResourceComponent i : resource) 1563 dst.resource.add(i.copy()); 1564 }; 1565 } 1566 1567 protected CompartmentDefinition typedCopy() { 1568 return copy(); 1569 } 1570 1571 @Override 1572 public boolean equalsDeep(Base other_) { 1573 if (!super.equalsDeep(other_)) 1574 return false; 1575 if (!(other_ instanceof CompartmentDefinition)) 1576 return false; 1577 CompartmentDefinition o = (CompartmentDefinition) other_; 1578 return compareDeep(purpose, o.purpose, true) && compareDeep(code, o.code, true) && compareDeep(search, o.search, true) 1579 && compareDeep(resource, o.resource, true); 1580 } 1581 1582 @Override 1583 public boolean equalsShallow(Base other_) { 1584 if (!super.equalsShallow(other_)) 1585 return false; 1586 if (!(other_ instanceof CompartmentDefinition)) 1587 return false; 1588 CompartmentDefinition o = (CompartmentDefinition) other_; 1589 return compareValues(purpose, o.purpose, true) && compareValues(code, o.code, true) && compareValues(search, o.search, true) 1590 ; 1591 } 1592 1593 public boolean isEmpty() { 1594 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, code, search, resource 1595 ); 1596 } 1597 1598 @Override 1599 public ResourceType getResourceType() { 1600 return ResourceType.CompartmentDefinition; 1601 } 1602 1603 /** 1604 * Search parameter: <b>date</b> 1605 * <p> 1606 * Description: <b>The compartment definition publication date</b><br> 1607 * Type: <b>date</b><br> 1608 * Path: <b>CompartmentDefinition.date</b><br> 1609 * </p> 1610 */ 1611 @SearchParamDefinition(name="date", path="CompartmentDefinition.date", description="The compartment definition publication date", type="date" ) 1612 public static final String SP_DATE = "date"; 1613 /** 1614 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1615 * <p> 1616 * Description: <b>The compartment definition publication date</b><br> 1617 * Type: <b>date</b><br> 1618 * Path: <b>CompartmentDefinition.date</b><br> 1619 * </p> 1620 */ 1621 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1622 1623 /** 1624 * Search parameter: <b>code</b> 1625 * <p> 1626 * Description: <b>Patient | Encounter | RelatedPerson | Practitioner | Device</b><br> 1627 * Type: <b>token</b><br> 1628 * Path: <b>CompartmentDefinition.code</b><br> 1629 * </p> 1630 */ 1631 @SearchParamDefinition(name="code", path="CompartmentDefinition.code", description="Patient | Encounter | RelatedPerson | Practitioner | Device", type="token" ) 1632 public static final String SP_CODE = "code"; 1633 /** 1634 * <b>Fluent Client</b> search parameter constant for <b>code</b> 1635 * <p> 1636 * Description: <b>Patient | Encounter | RelatedPerson | Practitioner | Device</b><br> 1637 * Type: <b>token</b><br> 1638 * Path: <b>CompartmentDefinition.code</b><br> 1639 * </p> 1640 */ 1641 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 1642 1643 /** 1644 * Search parameter: <b>context-type-value</b> 1645 * <p> 1646 * Description: <b>A use context type and value assigned to the compartment definition</b><br> 1647 * Type: <b>composite</b><br> 1648 * Path: <b></b><br> 1649 * </p> 1650 */ 1651 @SearchParamDefinition(name="context-type-value", path="CompartmentDefinition.useContext", description="A use context type and value assigned to the compartment definition", type="composite", compositeOf={"context-type", "context"} ) 1652 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 1653 /** 1654 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 1655 * <p> 1656 * Description: <b>A use context type and value assigned to the compartment definition</b><br> 1657 * Type: <b>composite</b><br> 1658 * Path: <b></b><br> 1659 * </p> 1660 */ 1661 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE); 1662 1663 /** 1664 * Search parameter: <b>resource</b> 1665 * <p> 1666 * Description: <b>Name of resource type</b><br> 1667 * Type: <b>token</b><br> 1668 * Path: <b>CompartmentDefinition.resource.code</b><br> 1669 * </p> 1670 */ 1671 @SearchParamDefinition(name="resource", path="CompartmentDefinition.resource.code", description="Name of resource type", type="token" ) 1672 public static final String SP_RESOURCE = "resource"; 1673 /** 1674 * <b>Fluent Client</b> search parameter constant for <b>resource</b> 1675 * <p> 1676 * Description: <b>Name of resource type</b><br> 1677 * Type: <b>token</b><br> 1678 * Path: <b>CompartmentDefinition.resource.code</b><br> 1679 * </p> 1680 */ 1681 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE); 1682 1683 /** 1684 * Search parameter: <b>description</b> 1685 * <p> 1686 * Description: <b>The description of the compartment definition</b><br> 1687 * Type: <b>string</b><br> 1688 * Path: <b>CompartmentDefinition.description</b><br> 1689 * </p> 1690 */ 1691 @SearchParamDefinition(name="description", path="CompartmentDefinition.description", description="The description of the compartment definition", type="string" ) 1692 public static final String SP_DESCRIPTION = "description"; 1693 /** 1694 * <b>Fluent Client</b> search parameter constant for <b>description</b> 1695 * <p> 1696 * Description: <b>The description of the compartment definition</b><br> 1697 * Type: <b>string</b><br> 1698 * Path: <b>CompartmentDefinition.description</b><br> 1699 * </p> 1700 */ 1701 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 1702 1703 /** 1704 * Search parameter: <b>context-type</b> 1705 * <p> 1706 * Description: <b>A type of use context assigned to the compartment definition</b><br> 1707 * Type: <b>token</b><br> 1708 * Path: <b>CompartmentDefinition.useContext.code</b><br> 1709 * </p> 1710 */ 1711 @SearchParamDefinition(name="context-type", path="CompartmentDefinition.useContext.code", description="A type of use context assigned to the compartment definition", type="token" ) 1712 public static final String SP_CONTEXT_TYPE = "context-type"; 1713 /** 1714 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 1715 * <p> 1716 * Description: <b>A type of use context assigned to the compartment definition</b><br> 1717 * Type: <b>token</b><br> 1718 * Path: <b>CompartmentDefinition.useContext.code</b><br> 1719 * </p> 1720 */ 1721 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 1722 1723 /** 1724 * Search parameter: <b>version</b> 1725 * <p> 1726 * Description: <b>The business version of the compartment definition</b><br> 1727 * Type: <b>token</b><br> 1728 * Path: <b>CompartmentDefinition.version</b><br> 1729 * </p> 1730 */ 1731 @SearchParamDefinition(name="version", path="CompartmentDefinition.version", description="The business version of the compartment definition", type="token" ) 1732 public static final String SP_VERSION = "version"; 1733 /** 1734 * <b>Fluent Client</b> search parameter constant for <b>version</b> 1735 * <p> 1736 * Description: <b>The business version of the compartment definition</b><br> 1737 * Type: <b>token</b><br> 1738 * Path: <b>CompartmentDefinition.version</b><br> 1739 * </p> 1740 */ 1741 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 1742 1743 /** 1744 * Search parameter: <b>url</b> 1745 * <p> 1746 * Description: <b>The uri that identifies the compartment definition</b><br> 1747 * Type: <b>uri</b><br> 1748 * Path: <b>CompartmentDefinition.url</b><br> 1749 * </p> 1750 */ 1751 @SearchParamDefinition(name="url", path="CompartmentDefinition.url", description="The uri that identifies the compartment definition", type="uri" ) 1752 public static final String SP_URL = "url"; 1753 /** 1754 * <b>Fluent Client</b> search parameter constant for <b>url</b> 1755 * <p> 1756 * Description: <b>The uri that identifies the compartment definition</b><br> 1757 * Type: <b>uri</b><br> 1758 * Path: <b>CompartmentDefinition.url</b><br> 1759 * </p> 1760 */ 1761 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 1762 1763 /** 1764 * Search parameter: <b>context-quantity</b> 1765 * <p> 1766 * Description: <b>A quantity- or range-valued use context assigned to the compartment definition</b><br> 1767 * Type: <b>quantity</b><br> 1768 * Path: <b>CompartmentDefinition.useContext.valueQuantity, CompartmentDefinition.useContext.valueRange</b><br> 1769 * </p> 1770 */ 1771 @SearchParamDefinition(name="context-quantity", path="(CompartmentDefinition.useContext.value as Quantity) | (CompartmentDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the compartment definition", type="quantity" ) 1772 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 1773 /** 1774 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 1775 * <p> 1776 * Description: <b>A quantity- or range-valued use context assigned to the compartment definition</b><br> 1777 * Type: <b>quantity</b><br> 1778 * Path: <b>CompartmentDefinition.useContext.valueQuantity, CompartmentDefinition.useContext.valueRange</b><br> 1779 * </p> 1780 */ 1781 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY); 1782 1783 /** 1784 * Search parameter: <b>name</b> 1785 * <p> 1786 * Description: <b>Computationally friendly name of the compartment definition</b><br> 1787 * Type: <b>string</b><br> 1788 * Path: <b>CompartmentDefinition.name</b><br> 1789 * </p> 1790 */ 1791 @SearchParamDefinition(name="name", path="CompartmentDefinition.name", description="Computationally friendly name of the compartment definition", type="string" ) 1792 public static final String SP_NAME = "name"; 1793 /** 1794 * <b>Fluent Client</b> search parameter constant for <b>name</b> 1795 * <p> 1796 * Description: <b>Computationally friendly name of the compartment definition</b><br> 1797 * Type: <b>string</b><br> 1798 * Path: <b>CompartmentDefinition.name</b><br> 1799 * </p> 1800 */ 1801 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 1802 1803 /** 1804 * Search parameter: <b>context</b> 1805 * <p> 1806 * Description: <b>A use context assigned to the compartment definition</b><br> 1807 * Type: <b>token</b><br> 1808 * Path: <b>CompartmentDefinition.useContext.valueCodeableConcept</b><br> 1809 * </p> 1810 */ 1811 @SearchParamDefinition(name="context", path="(CompartmentDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the compartment definition", type="token" ) 1812 public static final String SP_CONTEXT = "context"; 1813 /** 1814 * <b>Fluent Client</b> search parameter constant for <b>context</b> 1815 * <p> 1816 * Description: <b>A use context assigned to the compartment definition</b><br> 1817 * Type: <b>token</b><br> 1818 * Path: <b>CompartmentDefinition.useContext.valueCodeableConcept</b><br> 1819 * </p> 1820 */ 1821 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 1822 1823 /** 1824 * Search parameter: <b>publisher</b> 1825 * <p> 1826 * Description: <b>Name of the publisher of the compartment definition</b><br> 1827 * Type: <b>string</b><br> 1828 * Path: <b>CompartmentDefinition.publisher</b><br> 1829 * </p> 1830 */ 1831 @SearchParamDefinition(name="publisher", path="CompartmentDefinition.publisher", description="Name of the publisher of the compartment definition", type="string" ) 1832 public static final String SP_PUBLISHER = "publisher"; 1833 /** 1834 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 1835 * <p> 1836 * Description: <b>Name of the publisher of the compartment definition</b><br> 1837 * Type: <b>string</b><br> 1838 * Path: <b>CompartmentDefinition.publisher</b><br> 1839 * </p> 1840 */ 1841 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 1842 1843 /** 1844 * Search parameter: <b>context-type-quantity</b> 1845 * <p> 1846 * Description: <b>A use context type and quantity- or range-based value assigned to the compartment definition</b><br> 1847 * Type: <b>composite</b><br> 1848 * Path: <b></b><br> 1849 * </p> 1850 */ 1851 @SearchParamDefinition(name="context-type-quantity", path="CompartmentDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the compartment definition", type="composite", compositeOf={"context-type", "context-quantity"} ) 1852 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 1853 /** 1854 * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b> 1855 * <p> 1856 * Description: <b>A use context type and quantity- or range-based value assigned to the compartment definition</b><br> 1857 * Type: <b>composite</b><br> 1858 * Path: <b></b><br> 1859 * </p> 1860 */ 1861 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY); 1862 1863 /** 1864 * Search parameter: <b>status</b> 1865 * <p> 1866 * Description: <b>The current status of the compartment definition</b><br> 1867 * Type: <b>token</b><br> 1868 * Path: <b>CompartmentDefinition.status</b><br> 1869 * </p> 1870 */ 1871 @SearchParamDefinition(name="status", path="CompartmentDefinition.status", description="The current status of the compartment definition", type="token" ) 1872 public static final String SP_STATUS = "status"; 1873 /** 1874 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1875 * <p> 1876 * Description: <b>The current status of the compartment definition</b><br> 1877 * Type: <b>token</b><br> 1878 * Path: <b>CompartmentDefinition.status</b><br> 1879 * </p> 1880 */ 1881 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1882 1883 1884} 1885