001package org.hl7.fhir.dstu2.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.dstu2 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/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057 058import org.hl7.fhir.dstu2.model.Enumerations.ConformanceResourceStatus; 059import org.hl7.fhir.dstu2.model.Enumerations.ConformanceResourceStatusEnumFactory; 060import org.hl7.fhir.dstu2.model.Enumerations.SearchParamType; 061import org.hl7.fhir.dstu2.model.Enumerations.SearchParamTypeEnumFactory; 062import ca.uhn.fhir.model.api.annotation.Block; 063import ca.uhn.fhir.model.api.annotation.Child; 064import ca.uhn.fhir.model.api.annotation.Description; 065import ca.uhn.fhir.model.api.annotation.ResourceDef; 066import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 067import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 068import org.hl7.fhir.instance.model.api.IBaseConformance; 069import org.hl7.fhir.exceptions.FHIRException; 070import org.hl7.fhir.utilities.Utilities; 071/** 072 * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. 073 */ 074@ResourceDef(name="Conformance", profile="http://hl7.org/fhir/Profile/Conformance") 075public class Conformance extends DomainResource implements IBaseConformance { 076 077 public enum ConformanceStatementKind { 078 /** 079 * The Conformance instance represents the present capabilities of a specific system instance. This is the kind returned by OPTIONS for a FHIR server end-point. 080 */ 081 INSTANCE, 082 /** 083 * The Conformance instance represents the capabilities of a system or piece of software, independent of a particular installation. 084 */ 085 CAPABILITY, 086 /** 087 * The Conformance instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'. 088 */ 089 REQUIREMENTS, 090 /** 091 * added to help the parsers 092 */ 093 NULL; 094 public static ConformanceStatementKind fromCode(String codeString) throws FHIRException { 095 if (codeString == null || "".equals(codeString)) 096 return null; 097 if ("instance".equals(codeString)) 098 return INSTANCE; 099 if ("capability".equals(codeString)) 100 return CAPABILITY; 101 if ("requirements".equals(codeString)) 102 return REQUIREMENTS; 103 throw new FHIRException("Unknown ConformanceStatementKind code '"+codeString+"'"); 104 } 105 public String toCode() { 106 switch (this) { 107 case INSTANCE: return "instance"; 108 case CAPABILITY: return "capability"; 109 case REQUIREMENTS: return "requirements"; 110 default: return "?"; 111 } 112 } 113 public String getSystem() { 114 switch (this) { 115 case INSTANCE: return "http://hl7.org/fhir/conformance-statement-kind"; 116 case CAPABILITY: return "http://hl7.org/fhir/conformance-statement-kind"; 117 case REQUIREMENTS: return "http://hl7.org/fhir/conformance-statement-kind"; 118 default: return "?"; 119 } 120 } 121 public String getDefinition() { 122 switch (this) { 123 case INSTANCE: return "The Conformance instance represents the present capabilities of a specific system instance. This is the kind returned by OPTIONS for a FHIR server end-point."; 124 case CAPABILITY: return "The Conformance instance represents the capabilities of a system or piece of software, independent of a particular installation."; 125 case REQUIREMENTS: return "The Conformance instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'."; 126 default: return "?"; 127 } 128 } 129 public String getDisplay() { 130 switch (this) { 131 case INSTANCE: return "Instance"; 132 case CAPABILITY: return "Capability"; 133 case REQUIREMENTS: return "Requirements"; 134 default: return "?"; 135 } 136 } 137 } 138 139 public static class ConformanceStatementKindEnumFactory implements EnumFactory<ConformanceStatementKind> { 140 public ConformanceStatementKind fromCode(String codeString) throws IllegalArgumentException { 141 if (codeString == null || "".equals(codeString)) 142 if (codeString == null || "".equals(codeString)) 143 return null; 144 if ("instance".equals(codeString)) 145 return ConformanceStatementKind.INSTANCE; 146 if ("capability".equals(codeString)) 147 return ConformanceStatementKind.CAPABILITY; 148 if ("requirements".equals(codeString)) 149 return ConformanceStatementKind.REQUIREMENTS; 150 throw new IllegalArgumentException("Unknown ConformanceStatementKind code '"+codeString+"'"); 151 } 152 public Enumeration<ConformanceStatementKind> fromType(Base code) throws FHIRException { 153 if (code == null || code.isEmpty()) 154 return null; 155 String codeString = ((PrimitiveType) code).asStringValue(); 156 if (codeString == null || "".equals(codeString)) 157 return null; 158 if ("instance".equals(codeString)) 159 return new Enumeration<ConformanceStatementKind>(this, ConformanceStatementKind.INSTANCE); 160 if ("capability".equals(codeString)) 161 return new Enumeration<ConformanceStatementKind>(this, ConformanceStatementKind.CAPABILITY); 162 if ("requirements".equals(codeString)) 163 return new Enumeration<ConformanceStatementKind>(this, ConformanceStatementKind.REQUIREMENTS); 164 throw new FHIRException("Unknown ConformanceStatementKind code '"+codeString+"'"); 165 } 166 public String toCode(ConformanceStatementKind code) { 167 if (code == ConformanceStatementKind.INSTANCE) 168 return "instance"; 169 if (code == ConformanceStatementKind.CAPABILITY) 170 return "capability"; 171 if (code == ConformanceStatementKind.REQUIREMENTS) 172 return "requirements"; 173 return "?"; 174 } 175 } 176 177 public enum UnknownContentCode { 178 /** 179 * The application does not accept either unknown elements or extensions. 180 */ 181 NO, 182 /** 183 * The application accepts unknown extensions, but not unknown elements. 184 */ 185 EXTENSIONS, 186 /** 187 * The application accepts unknown elements, but not unknown extensions. 188 */ 189 ELEMENTS, 190 /** 191 * The application accepts unknown elements and extensions. 192 */ 193 BOTH, 194 /** 195 * added to help the parsers 196 */ 197 NULL; 198 public static UnknownContentCode fromCode(String codeString) throws FHIRException { 199 if (codeString == null || "".equals(codeString)) 200 return null; 201 if ("no".equals(codeString)) 202 return NO; 203 if ("extensions".equals(codeString)) 204 return EXTENSIONS; 205 if ("elements".equals(codeString)) 206 return ELEMENTS; 207 if ("both".equals(codeString)) 208 return BOTH; 209 throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'"); 210 } 211 public String toCode() { 212 switch (this) { 213 case NO: return "no"; 214 case EXTENSIONS: return "extensions"; 215 case ELEMENTS: return "elements"; 216 case BOTH: return "both"; 217 default: return "?"; 218 } 219 } 220 public String getSystem() { 221 switch (this) { 222 case NO: return "http://hl7.org/fhir/unknown-content-code"; 223 case EXTENSIONS: return "http://hl7.org/fhir/unknown-content-code"; 224 case ELEMENTS: return "http://hl7.org/fhir/unknown-content-code"; 225 case BOTH: return "http://hl7.org/fhir/unknown-content-code"; 226 default: return "?"; 227 } 228 } 229 public String getDefinition() { 230 switch (this) { 231 case NO: return "The application does not accept either unknown elements or extensions."; 232 case EXTENSIONS: return "The application accepts unknown extensions, but not unknown elements."; 233 case ELEMENTS: return "The application accepts unknown elements, but not unknown extensions."; 234 case BOTH: return "The application accepts unknown elements and extensions."; 235 default: return "?"; 236 } 237 } 238 public String getDisplay() { 239 switch (this) { 240 case NO: return "Neither Elements or Extensions"; 241 case EXTENSIONS: return "Unknown Extensions"; 242 case ELEMENTS: return "Unknown Elements"; 243 case BOTH: return "Unknown Elements and Extensions"; 244 default: return "?"; 245 } 246 } 247 } 248 249 public static class UnknownContentCodeEnumFactory implements EnumFactory<UnknownContentCode> { 250 public UnknownContentCode fromCode(String codeString) throws IllegalArgumentException { 251 if (codeString == null || "".equals(codeString)) 252 if (codeString == null || "".equals(codeString)) 253 return null; 254 if ("no".equals(codeString)) 255 return UnknownContentCode.NO; 256 if ("extensions".equals(codeString)) 257 return UnknownContentCode.EXTENSIONS; 258 if ("elements".equals(codeString)) 259 return UnknownContentCode.ELEMENTS; 260 if ("both".equals(codeString)) 261 return UnknownContentCode.BOTH; 262 throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'"); 263 } 264 public Enumeration<UnknownContentCode> fromType(Base code) throws FHIRException { 265 if (code == null || code.isEmpty()) 266 return null; 267 String codeString = ((PrimitiveType) code).asStringValue(); 268 if (codeString == null || "".equals(codeString)) 269 return null; 270 if ("no".equals(codeString)) 271 return new Enumeration<UnknownContentCode>(this, UnknownContentCode.NO); 272 if ("extensions".equals(codeString)) 273 return new Enumeration<UnknownContentCode>(this, UnknownContentCode.EXTENSIONS); 274 if ("elements".equals(codeString)) 275 return new Enumeration<UnknownContentCode>(this, UnknownContentCode.ELEMENTS); 276 if ("both".equals(codeString)) 277 return new Enumeration<UnknownContentCode>(this, UnknownContentCode.BOTH); 278 throw new FHIRException("Unknown UnknownContentCode code '"+codeString+"'"); 279 } 280 public String toCode(UnknownContentCode code) { 281 if (code == UnknownContentCode.NO) 282 return "no"; 283 if (code == UnknownContentCode.EXTENSIONS) 284 return "extensions"; 285 if (code == UnknownContentCode.ELEMENTS) 286 return "elements"; 287 if (code == UnknownContentCode.BOTH) 288 return "both"; 289 return "?"; 290 } 291 } 292 293 public enum RestfulConformanceMode { 294 /** 295 * The application acts as a client for this resource. 296 */ 297 CLIENT, 298 /** 299 * The application acts as a server for this resource. 300 */ 301 SERVER, 302 /** 303 * added to help the parsers 304 */ 305 NULL; 306 public static RestfulConformanceMode fromCode(String codeString) throws FHIRException { 307 if (codeString == null || "".equals(codeString)) 308 return null; 309 if ("client".equals(codeString)) 310 return CLIENT; 311 if ("server".equals(codeString)) 312 return SERVER; 313 throw new FHIRException("Unknown RestfulConformanceMode code '"+codeString+"'"); 314 } 315 public String toCode() { 316 switch (this) { 317 case CLIENT: return "client"; 318 case SERVER: return "server"; 319 default: return "?"; 320 } 321 } 322 public String getSystem() { 323 switch (this) { 324 case CLIENT: return "http://hl7.org/fhir/restful-conformance-mode"; 325 case SERVER: return "http://hl7.org/fhir/restful-conformance-mode"; 326 default: return "?"; 327 } 328 } 329 public String getDefinition() { 330 switch (this) { 331 case CLIENT: return "The application acts as a client for this resource."; 332 case SERVER: return "The application acts as a server for this resource."; 333 default: return "?"; 334 } 335 } 336 public String getDisplay() { 337 switch (this) { 338 case CLIENT: return "Client"; 339 case SERVER: return "Server"; 340 default: return "?"; 341 } 342 } 343 } 344 345 public static class RestfulConformanceModeEnumFactory implements EnumFactory<RestfulConformanceMode> { 346 public RestfulConformanceMode fromCode(String codeString) throws IllegalArgumentException { 347 if (codeString == null || "".equals(codeString)) 348 if (codeString == null || "".equals(codeString)) 349 return null; 350 if ("client".equals(codeString)) 351 return RestfulConformanceMode.CLIENT; 352 if ("server".equals(codeString)) 353 return RestfulConformanceMode.SERVER; 354 throw new IllegalArgumentException("Unknown RestfulConformanceMode code '"+codeString+"'"); 355 } 356 public Enumeration<RestfulConformanceMode> fromType(Base code) throws FHIRException { 357 if (code == null || code.isEmpty()) 358 return null; 359 String codeString = ((PrimitiveType) code).asStringValue(); 360 if (codeString == null || "".equals(codeString)) 361 return null; 362 if ("client".equals(codeString)) 363 return new Enumeration<RestfulConformanceMode>(this, RestfulConformanceMode.CLIENT); 364 if ("server".equals(codeString)) 365 return new Enumeration<RestfulConformanceMode>(this, RestfulConformanceMode.SERVER); 366 throw new FHIRException("Unknown RestfulConformanceMode code '"+codeString+"'"); 367 } 368 public String toCode(RestfulConformanceMode code) { 369 if (code == RestfulConformanceMode.CLIENT) 370 return "client"; 371 if (code == RestfulConformanceMode.SERVER) 372 return "server"; 373 return "?"; 374 } 375 } 376 377 public enum TypeRestfulInteraction { 378 /** 379 * null 380 */ 381 READ, 382 /** 383 * null 384 */ 385 VREAD, 386 /** 387 * null 388 */ 389 UPDATE, 390 /** 391 * null 392 */ 393 DELETE, 394 /** 395 * null 396 */ 397 HISTORYINSTANCE, 398 /** 399 * null 400 */ 401 VALIDATE, 402 /** 403 * null 404 */ 405 HISTORYTYPE, 406 /** 407 * null 408 */ 409 CREATE, 410 /** 411 * null 412 */ 413 SEARCHTYPE, 414 /** 415 * added to help the parsers 416 */ 417 NULL; 418 public static TypeRestfulInteraction fromCode(String codeString) throws FHIRException { 419 if (codeString == null || "".equals(codeString)) 420 return null; 421 if ("read".equals(codeString)) 422 return READ; 423 if ("vread".equals(codeString)) 424 return VREAD; 425 if ("update".equals(codeString)) 426 return UPDATE; 427 if ("delete".equals(codeString)) 428 return DELETE; 429 if ("history-instance".equals(codeString)) 430 return HISTORYINSTANCE; 431 if ("validate".equals(codeString)) 432 return VALIDATE; 433 if ("history-type".equals(codeString)) 434 return HISTORYTYPE; 435 if ("create".equals(codeString)) 436 return CREATE; 437 if ("search-type".equals(codeString)) 438 return SEARCHTYPE; 439 throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'"); 440 } 441 public String toCode() { 442 switch (this) { 443 case READ: return "read"; 444 case VREAD: return "vread"; 445 case UPDATE: return "update"; 446 case DELETE: return "delete"; 447 case HISTORYINSTANCE: return "history-instance"; 448 case VALIDATE: return "validate"; 449 case HISTORYTYPE: return "history-type"; 450 case CREATE: return "create"; 451 case SEARCHTYPE: return "search-type"; 452 default: return "?"; 453 } 454 } 455 public String getSystem() { 456 switch (this) { 457 case READ: return "http://hl7.org/fhir/restful-interaction"; 458 case VREAD: return "http://hl7.org/fhir/restful-interaction"; 459 case UPDATE: return "http://hl7.org/fhir/restful-interaction"; 460 case DELETE: return "http://hl7.org/fhir/restful-interaction"; 461 case HISTORYINSTANCE: return "http://hl7.org/fhir/restful-interaction"; 462 case VALIDATE: return "http://hl7.org/fhir/restful-interaction"; 463 case HISTORYTYPE: return "http://hl7.org/fhir/restful-interaction"; 464 case CREATE: return "http://hl7.org/fhir/restful-interaction"; 465 case SEARCHTYPE: return "http://hl7.org/fhir/restful-interaction"; 466 default: return "?"; 467 } 468 } 469 public String getDefinition() { 470 switch (this) { 471 case READ: return ""; 472 case VREAD: return ""; 473 case UPDATE: return ""; 474 case DELETE: return ""; 475 case HISTORYINSTANCE: return ""; 476 case VALIDATE: return ""; 477 case HISTORYTYPE: return ""; 478 case CREATE: return ""; 479 case SEARCHTYPE: return ""; 480 default: return "?"; 481 } 482 } 483 public String getDisplay() { 484 switch (this) { 485 case READ: return "read"; 486 case VREAD: return "vread"; 487 case UPDATE: return "update"; 488 case DELETE: return "delete"; 489 case HISTORYINSTANCE: return "history-instance"; 490 case VALIDATE: return "validate"; 491 case HISTORYTYPE: return "history-type"; 492 case CREATE: return "create"; 493 case SEARCHTYPE: return "search-type"; 494 default: return "?"; 495 } 496 } 497 } 498 499 public static class TypeRestfulInteractionEnumFactory implements EnumFactory<TypeRestfulInteraction> { 500 public TypeRestfulInteraction fromCode(String codeString) throws IllegalArgumentException { 501 if (codeString == null || "".equals(codeString)) 502 if (codeString == null || "".equals(codeString)) 503 return null; 504 if ("read".equals(codeString)) 505 return TypeRestfulInteraction.READ; 506 if ("vread".equals(codeString)) 507 return TypeRestfulInteraction.VREAD; 508 if ("update".equals(codeString)) 509 return TypeRestfulInteraction.UPDATE; 510 if ("delete".equals(codeString)) 511 return TypeRestfulInteraction.DELETE; 512 if ("history-instance".equals(codeString)) 513 return TypeRestfulInteraction.HISTORYINSTANCE; 514 if ("validate".equals(codeString)) 515 return TypeRestfulInteraction.VALIDATE; 516 if ("history-type".equals(codeString)) 517 return TypeRestfulInteraction.HISTORYTYPE; 518 if ("create".equals(codeString)) 519 return TypeRestfulInteraction.CREATE; 520 if ("search-type".equals(codeString)) 521 return TypeRestfulInteraction.SEARCHTYPE; 522 throw new IllegalArgumentException("Unknown TypeRestfulInteraction code '"+codeString+"'"); 523 } 524 public Enumeration<TypeRestfulInteraction> fromType(Base code) throws FHIRException { 525 if (code == null || code.isEmpty()) 526 return null; 527 String codeString = ((PrimitiveType) code).asStringValue(); 528 if (codeString == null || "".equals(codeString)) 529 return null; 530 if ("read".equals(codeString)) 531 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.READ); 532 if ("vread".equals(codeString)) 533 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.VREAD); 534 if ("update".equals(codeString)) 535 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.UPDATE); 536 if ("delete".equals(codeString)) 537 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.DELETE); 538 if ("history-instance".equals(codeString)) 539 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.HISTORYINSTANCE); 540 if ("validate".equals(codeString)) 541 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.VALIDATE); 542 if ("history-type".equals(codeString)) 543 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.HISTORYTYPE); 544 if ("create".equals(codeString)) 545 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.CREATE); 546 if ("search-type".equals(codeString)) 547 return new Enumeration<TypeRestfulInteraction>(this, TypeRestfulInteraction.SEARCHTYPE); 548 throw new FHIRException("Unknown TypeRestfulInteraction code '"+codeString+"'"); 549 } 550 public String toCode(TypeRestfulInteraction code) { 551 if (code == TypeRestfulInteraction.READ) 552 return "read"; 553 if (code == TypeRestfulInteraction.VREAD) 554 return "vread"; 555 if (code == TypeRestfulInteraction.UPDATE) 556 return "update"; 557 if (code == TypeRestfulInteraction.DELETE) 558 return "delete"; 559 if (code == TypeRestfulInteraction.HISTORYINSTANCE) 560 return "history-instance"; 561 if (code == TypeRestfulInteraction.VALIDATE) 562 return "validate"; 563 if (code == TypeRestfulInteraction.HISTORYTYPE) 564 return "history-type"; 565 if (code == TypeRestfulInteraction.CREATE) 566 return "create"; 567 if (code == TypeRestfulInteraction.SEARCHTYPE) 568 return "search-type"; 569 return "?"; 570 } 571 } 572 573 public enum ResourceVersionPolicy { 574 /** 575 * VersionId meta-property is not supported (server) or used (client). 576 */ 577 NOVERSION, 578 /** 579 * VersionId meta-property is supported (server) or used (client). 580 */ 581 VERSIONED, 582 /** 583 * VersionId is must be correct for updates (server) or will be specified (If-match header) for updates (client). 584 */ 585 VERSIONEDUPDATE, 586 /** 587 * added to help the parsers 588 */ 589 NULL; 590 public static ResourceVersionPolicy fromCode(String codeString) throws FHIRException { 591 if (codeString == null || "".equals(codeString)) 592 return null; 593 if ("no-version".equals(codeString)) 594 return NOVERSION; 595 if ("versioned".equals(codeString)) 596 return VERSIONED; 597 if ("versioned-update".equals(codeString)) 598 return VERSIONEDUPDATE; 599 throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'"); 600 } 601 public String toCode() { 602 switch (this) { 603 case NOVERSION: return "no-version"; 604 case VERSIONED: return "versioned"; 605 case VERSIONEDUPDATE: return "versioned-update"; 606 default: return "?"; 607 } 608 } 609 public String getSystem() { 610 switch (this) { 611 case NOVERSION: return "http://hl7.org/fhir/versioning-policy"; 612 case VERSIONED: return "http://hl7.org/fhir/versioning-policy"; 613 case VERSIONEDUPDATE: return "http://hl7.org/fhir/versioning-policy"; 614 default: return "?"; 615 } 616 } 617 public String getDefinition() { 618 switch (this) { 619 case NOVERSION: return "VersionId meta-property is not supported (server) or used (client)."; 620 case VERSIONED: return "VersionId meta-property is supported (server) or used (client)."; 621 case VERSIONEDUPDATE: return "VersionId is must be correct for updates (server) or will be specified (If-match header) for updates (client)."; 622 default: return "?"; 623 } 624 } 625 public String getDisplay() { 626 switch (this) { 627 case NOVERSION: return "No VersionId Support"; 628 case VERSIONED: return "Versioned"; 629 case VERSIONEDUPDATE: return "VersionId tracked fully"; 630 default: return "?"; 631 } 632 } 633 } 634 635 public static class ResourceVersionPolicyEnumFactory implements EnumFactory<ResourceVersionPolicy> { 636 public ResourceVersionPolicy fromCode(String codeString) throws IllegalArgumentException { 637 if (codeString == null || "".equals(codeString)) 638 if (codeString == null || "".equals(codeString)) 639 return null; 640 if ("no-version".equals(codeString)) 641 return ResourceVersionPolicy.NOVERSION; 642 if ("versioned".equals(codeString)) 643 return ResourceVersionPolicy.VERSIONED; 644 if ("versioned-update".equals(codeString)) 645 return ResourceVersionPolicy.VERSIONEDUPDATE; 646 throw new IllegalArgumentException("Unknown ResourceVersionPolicy code '"+codeString+"'"); 647 } 648 public Enumeration<ResourceVersionPolicy> fromType(Base code) throws FHIRException { 649 if (code == null || code.isEmpty()) 650 return null; 651 String codeString = ((PrimitiveType) code).asStringValue(); 652 if (codeString == null || "".equals(codeString)) 653 return null; 654 if ("no-version".equals(codeString)) 655 return new Enumeration<ResourceVersionPolicy>(this, ResourceVersionPolicy.NOVERSION); 656 if ("versioned".equals(codeString)) 657 return new Enumeration<ResourceVersionPolicy>(this, ResourceVersionPolicy.VERSIONED); 658 if ("versioned-update".equals(codeString)) 659 return new Enumeration<ResourceVersionPolicy>(this, ResourceVersionPolicy.VERSIONEDUPDATE); 660 throw new FHIRException("Unknown ResourceVersionPolicy code '"+codeString+"'"); 661 } 662 public String toCode(ResourceVersionPolicy code) { 663 if (code == ResourceVersionPolicy.NOVERSION) 664 return "no-version"; 665 if (code == ResourceVersionPolicy.VERSIONED) 666 return "versioned"; 667 if (code == ResourceVersionPolicy.VERSIONEDUPDATE) 668 return "versioned-update"; 669 return "?"; 670 } 671 } 672 673 public enum ConditionalDeleteStatus { 674 /** 675 * No support for conditional deletes. 676 */ 677 NOTSUPPORTED, 678 /** 679 * Conditional deletes are supported, but only single resources at a time. 680 */ 681 SINGLE, 682 /** 683 * Conditional deletes are supported, and multiple resources can be deleted in a single interaction. 684 */ 685 MULTIPLE, 686 /** 687 * added to help the parsers 688 */ 689 NULL; 690 public static ConditionalDeleteStatus fromCode(String codeString) throws FHIRException { 691 if (codeString == null || "".equals(codeString)) 692 return null; 693 if ("not-supported".equals(codeString)) 694 return NOTSUPPORTED; 695 if ("single".equals(codeString)) 696 return SINGLE; 697 if ("multiple".equals(codeString)) 698 return MULTIPLE; 699 throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); 700 } 701 public String toCode() { 702 switch (this) { 703 case NOTSUPPORTED: return "not-supported"; 704 case SINGLE: return "single"; 705 case MULTIPLE: return "multiple"; 706 default: return "?"; 707 } 708 } 709 public String getSystem() { 710 switch (this) { 711 case NOTSUPPORTED: return "http://hl7.org/fhir/conditional-delete-status"; 712 case SINGLE: return "http://hl7.org/fhir/conditional-delete-status"; 713 case MULTIPLE: return "http://hl7.org/fhir/conditional-delete-status"; 714 default: return "?"; 715 } 716 } 717 public String getDefinition() { 718 switch (this) { 719 case NOTSUPPORTED: return "No support for conditional deletes."; 720 case SINGLE: return "Conditional deletes are supported, but only single resources at a time."; 721 case MULTIPLE: return "Conditional deletes are supported, and multiple resources can be deleted in a single interaction."; 722 default: return "?"; 723 } 724 } 725 public String getDisplay() { 726 switch (this) { 727 case NOTSUPPORTED: return "Not Supported"; 728 case SINGLE: return "Single Deletes Supported"; 729 case MULTIPLE: return "Multiple Deletes Supported"; 730 default: return "?"; 731 } 732 } 733 } 734 735 public static class ConditionalDeleteStatusEnumFactory implements EnumFactory<ConditionalDeleteStatus> { 736 public ConditionalDeleteStatus fromCode(String codeString) throws IllegalArgumentException { 737 if (codeString == null || "".equals(codeString)) 738 if (codeString == null || "".equals(codeString)) 739 return null; 740 if ("not-supported".equals(codeString)) 741 return ConditionalDeleteStatus.NOTSUPPORTED; 742 if ("single".equals(codeString)) 743 return ConditionalDeleteStatus.SINGLE; 744 if ("multiple".equals(codeString)) 745 return ConditionalDeleteStatus.MULTIPLE; 746 throw new IllegalArgumentException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); 747 } 748 public Enumeration<ConditionalDeleteStatus> fromType(Base code) throws FHIRException { 749 if (code == null || code.isEmpty()) 750 return null; 751 String codeString = ((PrimitiveType) code).asStringValue(); 752 if (codeString == null || "".equals(codeString)) 753 return null; 754 if ("not-supported".equals(codeString)) 755 return new Enumeration<ConditionalDeleteStatus>(this, ConditionalDeleteStatus.NOTSUPPORTED); 756 if ("single".equals(codeString)) 757 return new Enumeration<ConditionalDeleteStatus>(this, ConditionalDeleteStatus.SINGLE); 758 if ("multiple".equals(codeString)) 759 return new Enumeration<ConditionalDeleteStatus>(this, ConditionalDeleteStatus.MULTIPLE); 760 throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); 761 } 762 public String toCode(ConditionalDeleteStatus code) { 763 if (code == ConditionalDeleteStatus.NOTSUPPORTED) 764 return "not-supported"; 765 if (code == ConditionalDeleteStatus.SINGLE) 766 return "single"; 767 if (code == ConditionalDeleteStatus.MULTIPLE) 768 return "multiple"; 769 return "?"; 770 } 771 } 772 773 public enum SearchModifierCode { 774 /** 775 * The search parameter returns resources that have a value or not. 776 */ 777 MISSING, 778 /** 779 * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). 780 */ 781 EXACT, 782 /** 783 * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. 784 */ 785 CONTAINS, 786 /** 787 * The search parameter returns resources that do not contain a match . 788 */ 789 NOT, 790 /** 791 * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. 792 */ 793 TEXT, 794 /** 795 * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. 796 */ 797 IN, 798 /** 799 * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. 800 */ 801 NOTIN, 802 /** 803 * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). 804 */ 805 BELOW, 806 /** 807 * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). 808 */ 809 ABOVE, 810 /** 811 * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). 812 */ 813 TYPE, 814 /** 815 * added to help the parsers 816 */ 817 NULL; 818 public static SearchModifierCode fromCode(String codeString) throws FHIRException { 819 if (codeString == null || "".equals(codeString)) 820 return null; 821 if ("missing".equals(codeString)) 822 return MISSING; 823 if ("exact".equals(codeString)) 824 return EXACT; 825 if ("contains".equals(codeString)) 826 return CONTAINS; 827 if ("not".equals(codeString)) 828 return NOT; 829 if ("text".equals(codeString)) 830 return TEXT; 831 if ("in".equals(codeString)) 832 return IN; 833 if ("not-in".equals(codeString)) 834 return NOTIN; 835 if ("below".equals(codeString)) 836 return BELOW; 837 if ("above".equals(codeString)) 838 return ABOVE; 839 if ("type".equals(codeString)) 840 return TYPE; 841 throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); 842 } 843 public String toCode() { 844 switch (this) { 845 case MISSING: return "missing"; 846 case EXACT: return "exact"; 847 case CONTAINS: return "contains"; 848 case NOT: return "not"; 849 case TEXT: return "text"; 850 case IN: return "in"; 851 case NOTIN: return "not-in"; 852 case BELOW: return "below"; 853 case ABOVE: return "above"; 854 case TYPE: return "type"; 855 default: return "?"; 856 } 857 } 858 public String getSystem() { 859 switch (this) { 860 case MISSING: return "http://hl7.org/fhir/search-modifier-code"; 861 case EXACT: return "http://hl7.org/fhir/search-modifier-code"; 862 case CONTAINS: return "http://hl7.org/fhir/search-modifier-code"; 863 case NOT: return "http://hl7.org/fhir/search-modifier-code"; 864 case TEXT: return "http://hl7.org/fhir/search-modifier-code"; 865 case IN: return "http://hl7.org/fhir/search-modifier-code"; 866 case NOTIN: return "http://hl7.org/fhir/search-modifier-code"; 867 case BELOW: return "http://hl7.org/fhir/search-modifier-code"; 868 case ABOVE: return "http://hl7.org/fhir/search-modifier-code"; 869 case TYPE: return "http://hl7.org/fhir/search-modifier-code"; 870 default: return "?"; 871 } 872 } 873 public String getDefinition() { 874 switch (this) { 875 case MISSING: return "The search parameter returns resources that have a value or not."; 876 case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents)."; 877 case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched."; 878 case NOT: return "The search parameter returns resources that do not contain a match ."; 879 case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text."; 880 case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set."; 881 case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set."; 882 case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships)."; 883 case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships)."; 884 case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.)."; 885 default: return "?"; 886 } 887 } 888 public String getDisplay() { 889 switch (this) { 890 case MISSING: return "Missing"; 891 case EXACT: return "Exact"; 892 case CONTAINS: return "Contains"; 893 case NOT: return "Not"; 894 case TEXT: return "Text"; 895 case IN: return "In"; 896 case NOTIN: return "Not In"; 897 case BELOW: return "Below"; 898 case ABOVE: return "Above"; 899 case TYPE: return "Type"; 900 default: return "?"; 901 } 902 } 903 } 904 905 public static class SearchModifierCodeEnumFactory implements EnumFactory<SearchModifierCode> { 906 public SearchModifierCode fromCode(String codeString) throws IllegalArgumentException { 907 if (codeString == null || "".equals(codeString)) 908 if (codeString == null || "".equals(codeString)) 909 return null; 910 if ("missing".equals(codeString)) 911 return SearchModifierCode.MISSING; 912 if ("exact".equals(codeString)) 913 return SearchModifierCode.EXACT; 914 if ("contains".equals(codeString)) 915 return SearchModifierCode.CONTAINS; 916 if ("not".equals(codeString)) 917 return SearchModifierCode.NOT; 918 if ("text".equals(codeString)) 919 return SearchModifierCode.TEXT; 920 if ("in".equals(codeString)) 921 return SearchModifierCode.IN; 922 if ("not-in".equals(codeString)) 923 return SearchModifierCode.NOTIN; 924 if ("below".equals(codeString)) 925 return SearchModifierCode.BELOW; 926 if ("above".equals(codeString)) 927 return SearchModifierCode.ABOVE; 928 if ("type".equals(codeString)) 929 return SearchModifierCode.TYPE; 930 throw new IllegalArgumentException("Unknown SearchModifierCode code '"+codeString+"'"); 931 } 932 public Enumeration<SearchModifierCode> fromType(Base code) throws FHIRException { 933 if (code == null || code.isEmpty()) 934 return null; 935 String codeString = ((PrimitiveType) code).asStringValue(); 936 if (codeString == null || "".equals(codeString)) 937 return null; 938 if ("missing".equals(codeString)) 939 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.MISSING); 940 if ("exact".equals(codeString)) 941 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.EXACT); 942 if ("contains".equals(codeString)) 943 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.CONTAINS); 944 if ("not".equals(codeString)) 945 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.NOT); 946 if ("text".equals(codeString)) 947 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.TEXT); 948 if ("in".equals(codeString)) 949 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.IN); 950 if ("not-in".equals(codeString)) 951 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.NOTIN); 952 if ("below".equals(codeString)) 953 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.BELOW); 954 if ("above".equals(codeString)) 955 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.ABOVE); 956 if ("type".equals(codeString)) 957 return new Enumeration<SearchModifierCode>(this, SearchModifierCode.TYPE); 958 throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); 959 } 960 public String toCode(SearchModifierCode code) { 961 if (code == SearchModifierCode.MISSING) 962 return "missing"; 963 if (code == SearchModifierCode.EXACT) 964 return "exact"; 965 if (code == SearchModifierCode.CONTAINS) 966 return "contains"; 967 if (code == SearchModifierCode.NOT) 968 return "not"; 969 if (code == SearchModifierCode.TEXT) 970 return "text"; 971 if (code == SearchModifierCode.IN) 972 return "in"; 973 if (code == SearchModifierCode.NOTIN) 974 return "not-in"; 975 if (code == SearchModifierCode.BELOW) 976 return "below"; 977 if (code == SearchModifierCode.ABOVE) 978 return "above"; 979 if (code == SearchModifierCode.TYPE) 980 return "type"; 981 return "?"; 982 } 983 } 984 985 public enum SystemRestfulInteraction { 986 /** 987 * null 988 */ 989 TRANSACTION, 990 /** 991 * null 992 */ 993 SEARCHSYSTEM, 994 /** 995 * null 996 */ 997 HISTORYSYSTEM, 998 /** 999 * added to help the parsers 1000 */ 1001 NULL; 1002 public static SystemRestfulInteraction fromCode(String codeString) throws FHIRException { 1003 if (codeString == null || "".equals(codeString)) 1004 return null; 1005 if ("transaction".equals(codeString)) 1006 return TRANSACTION; 1007 if ("search-system".equals(codeString)) 1008 return SEARCHSYSTEM; 1009 if ("history-system".equals(codeString)) 1010 return HISTORYSYSTEM; 1011 throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'"); 1012 } 1013 public String toCode() { 1014 switch (this) { 1015 case TRANSACTION: return "transaction"; 1016 case SEARCHSYSTEM: return "search-system"; 1017 case HISTORYSYSTEM: return "history-system"; 1018 default: return "?"; 1019 } 1020 } 1021 public String getSystem() { 1022 switch (this) { 1023 case TRANSACTION: return "http://hl7.org/fhir/restful-interaction"; 1024 case SEARCHSYSTEM: return "http://hl7.org/fhir/restful-interaction"; 1025 case HISTORYSYSTEM: return "http://hl7.org/fhir/restful-interaction"; 1026 default: return "?"; 1027 } 1028 } 1029 public String getDefinition() { 1030 switch (this) { 1031 case TRANSACTION: return ""; 1032 case SEARCHSYSTEM: return ""; 1033 case HISTORYSYSTEM: return ""; 1034 default: return "?"; 1035 } 1036 } 1037 public String getDisplay() { 1038 switch (this) { 1039 case TRANSACTION: return "transaction"; 1040 case SEARCHSYSTEM: return "search-system"; 1041 case HISTORYSYSTEM: return "history-system"; 1042 default: return "?"; 1043 } 1044 } 1045 } 1046 1047 public static class SystemRestfulInteractionEnumFactory implements EnumFactory<SystemRestfulInteraction> { 1048 public SystemRestfulInteraction fromCode(String codeString) throws IllegalArgumentException { 1049 if (codeString == null || "".equals(codeString)) 1050 if (codeString == null || "".equals(codeString)) 1051 return null; 1052 if ("transaction".equals(codeString)) 1053 return SystemRestfulInteraction.TRANSACTION; 1054 if ("search-system".equals(codeString)) 1055 return SystemRestfulInteraction.SEARCHSYSTEM; 1056 if ("history-system".equals(codeString)) 1057 return SystemRestfulInteraction.HISTORYSYSTEM; 1058 throw new IllegalArgumentException("Unknown SystemRestfulInteraction code '"+codeString+"'"); 1059 } 1060 public Enumeration<SystemRestfulInteraction> fromType(Base code) throws FHIRException { 1061 if (code == null || code.isEmpty()) 1062 return null; 1063 String codeString = ((PrimitiveType) code).asStringValue(); 1064 if (codeString == null || "".equals(codeString)) 1065 return null; 1066 if ("transaction".equals(codeString)) 1067 return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.TRANSACTION); 1068 if ("search-system".equals(codeString)) 1069 return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.SEARCHSYSTEM); 1070 if ("history-system".equals(codeString)) 1071 return new Enumeration<SystemRestfulInteraction>(this, SystemRestfulInteraction.HISTORYSYSTEM); 1072 throw new FHIRException("Unknown SystemRestfulInteraction code '"+codeString+"'"); 1073 } 1074 public String toCode(SystemRestfulInteraction code) { 1075 if (code == SystemRestfulInteraction.TRANSACTION) 1076 return "transaction"; 1077 if (code == SystemRestfulInteraction.SEARCHSYSTEM) 1078 return "search-system"; 1079 if (code == SystemRestfulInteraction.HISTORYSYSTEM) 1080 return "history-system"; 1081 return "?"; 1082 } 1083 } 1084 1085 public enum TransactionMode { 1086 /** 1087 * Neither batch or transaction is supported. 1088 */ 1089 NOTSUPPORTED, 1090 /** 1091 * Batches are supported. 1092 */ 1093 BATCH, 1094 /** 1095 * Transactions are supported. 1096 */ 1097 TRANSACTION, 1098 /** 1099 * Both batches and transactions are supported. 1100 */ 1101 BOTH, 1102 /** 1103 * added to help the parsers 1104 */ 1105 NULL; 1106 public static TransactionMode fromCode(String codeString) throws FHIRException { 1107 if (codeString == null || "".equals(codeString)) 1108 return null; 1109 if ("not-supported".equals(codeString)) 1110 return NOTSUPPORTED; 1111 if ("batch".equals(codeString)) 1112 return BATCH; 1113 if ("transaction".equals(codeString)) 1114 return TRANSACTION; 1115 if ("both".equals(codeString)) 1116 return BOTH; 1117 throw new FHIRException("Unknown TransactionMode code '"+codeString+"'"); 1118 } 1119 public String toCode() { 1120 switch (this) { 1121 case NOTSUPPORTED: return "not-supported"; 1122 case BATCH: return "batch"; 1123 case TRANSACTION: return "transaction"; 1124 case BOTH: return "both"; 1125 default: return "?"; 1126 } 1127 } 1128 public String getSystem() { 1129 switch (this) { 1130 case NOTSUPPORTED: return "http://hl7.org/fhir/transaction-mode"; 1131 case BATCH: return "http://hl7.org/fhir/transaction-mode"; 1132 case TRANSACTION: return "http://hl7.org/fhir/transaction-mode"; 1133 case BOTH: return "http://hl7.org/fhir/transaction-mode"; 1134 default: return "?"; 1135 } 1136 } 1137 public String getDefinition() { 1138 switch (this) { 1139 case NOTSUPPORTED: return "Neither batch or transaction is supported."; 1140 case BATCH: return "Batches are supported."; 1141 case TRANSACTION: return "Transactions are supported."; 1142 case BOTH: return "Both batches and transactions are supported."; 1143 default: return "?"; 1144 } 1145 } 1146 public String getDisplay() { 1147 switch (this) { 1148 case NOTSUPPORTED: return "None"; 1149 case BATCH: return "Batches supported"; 1150 case TRANSACTION: return "Transactions Supported"; 1151 case BOTH: return "Batches & Transactions"; 1152 default: return "?"; 1153 } 1154 } 1155 } 1156 1157 public static class TransactionModeEnumFactory implements EnumFactory<TransactionMode> { 1158 public TransactionMode fromCode(String codeString) throws IllegalArgumentException { 1159 if (codeString == null || "".equals(codeString)) 1160 if (codeString == null || "".equals(codeString)) 1161 return null; 1162 if ("not-supported".equals(codeString)) 1163 return TransactionMode.NOTSUPPORTED; 1164 if ("batch".equals(codeString)) 1165 return TransactionMode.BATCH; 1166 if ("transaction".equals(codeString)) 1167 return TransactionMode.TRANSACTION; 1168 if ("both".equals(codeString)) 1169 return TransactionMode.BOTH; 1170 throw new IllegalArgumentException("Unknown TransactionMode code '"+codeString+"'"); 1171 } 1172 public Enumeration<TransactionMode> fromType(Base code) throws FHIRException { 1173 if (code == null || code.isEmpty()) 1174 return null; 1175 String codeString = ((PrimitiveType) code).asStringValue(); 1176 if (codeString == null || "".equals(codeString)) 1177 return null; 1178 if ("not-supported".equals(codeString)) 1179 return new Enumeration<TransactionMode>(this, TransactionMode.NOTSUPPORTED); 1180 if ("batch".equals(codeString)) 1181 return new Enumeration<TransactionMode>(this, TransactionMode.BATCH); 1182 if ("transaction".equals(codeString)) 1183 return new Enumeration<TransactionMode>(this, TransactionMode.TRANSACTION); 1184 if ("both".equals(codeString)) 1185 return new Enumeration<TransactionMode>(this, TransactionMode.BOTH); 1186 throw new FHIRException("Unknown TransactionMode code '"+codeString+"'"); 1187 } 1188 public String toCode(TransactionMode code) { 1189 if (code == TransactionMode.NOTSUPPORTED) 1190 return "not-supported"; 1191 if (code == TransactionMode.BATCH) 1192 return "batch"; 1193 if (code == TransactionMode.TRANSACTION) 1194 return "transaction"; 1195 if (code == TransactionMode.BOTH) 1196 return "both"; 1197 return "?"; 1198 } 1199 } 1200 1201 public enum MessageSignificanceCategory { 1202 /** 1203 * The message represents/requests a change that should not be processed more than once; e.g. Making a booking for an appointment. 1204 */ 1205 CONSEQUENCE, 1206 /** 1207 * The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful. 1208 */ 1209 CURRENCY, 1210 /** 1211 * The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications. 1212 */ 1213 NOTIFICATION, 1214 /** 1215 * added to help the parsers 1216 */ 1217 NULL; 1218 public static MessageSignificanceCategory fromCode(String codeString) throws FHIRException { 1219 if (codeString == null || "".equals(codeString)) 1220 return null; 1221 if ("Consequence".equals(codeString)) 1222 return CONSEQUENCE; 1223 if ("Currency".equals(codeString)) 1224 return CURRENCY; 1225 if ("Notification".equals(codeString)) 1226 return NOTIFICATION; 1227 throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); 1228 } 1229 public String toCode() { 1230 switch (this) { 1231 case CONSEQUENCE: return "Consequence"; 1232 case CURRENCY: return "Currency"; 1233 case NOTIFICATION: return "Notification"; 1234 default: return "?"; 1235 } 1236 } 1237 public String getSystem() { 1238 switch (this) { 1239 case CONSEQUENCE: return "http://hl7.org/fhir/message-significance-category"; 1240 case CURRENCY: return "http://hl7.org/fhir/message-significance-category"; 1241 case NOTIFICATION: return "http://hl7.org/fhir/message-significance-category"; 1242 default: return "?"; 1243 } 1244 } 1245 public String getDefinition() { 1246 switch (this) { 1247 case CONSEQUENCE: return "The message represents/requests a change that should not be processed more than once; e.g. Making a booking for an appointment."; 1248 case CURRENCY: return "The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful."; 1249 case NOTIFICATION: return "The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications."; 1250 default: return "?"; 1251 } 1252 } 1253 public String getDisplay() { 1254 switch (this) { 1255 case CONSEQUENCE: return "Consequence"; 1256 case CURRENCY: return "Currency"; 1257 case NOTIFICATION: return "Notification"; 1258 default: return "?"; 1259 } 1260 } 1261 } 1262 1263 public static class MessageSignificanceCategoryEnumFactory implements EnumFactory<MessageSignificanceCategory> { 1264 public MessageSignificanceCategory fromCode(String codeString) throws IllegalArgumentException { 1265 if (codeString == null || "".equals(codeString)) 1266 if (codeString == null || "".equals(codeString)) 1267 return null; 1268 if ("Consequence".equals(codeString)) 1269 return MessageSignificanceCategory.CONSEQUENCE; 1270 if ("Currency".equals(codeString)) 1271 return MessageSignificanceCategory.CURRENCY; 1272 if ("Notification".equals(codeString)) 1273 return MessageSignificanceCategory.NOTIFICATION; 1274 throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'"); 1275 } 1276 public Enumeration<MessageSignificanceCategory> fromType(Base code) throws FHIRException { 1277 if (code == null || code.isEmpty()) 1278 return null; 1279 String codeString = ((PrimitiveType) code).asStringValue(); 1280 if (codeString == null || "".equals(codeString)) 1281 return null; 1282 if ("Consequence".equals(codeString)) 1283 return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.CONSEQUENCE); 1284 if ("Currency".equals(codeString)) 1285 return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.CURRENCY); 1286 if ("Notification".equals(codeString)) 1287 return new Enumeration<MessageSignificanceCategory>(this, MessageSignificanceCategory.NOTIFICATION); 1288 throw new FHIRException("Unknown MessageSignificanceCategory code '"+codeString+"'"); 1289 } 1290 public String toCode(MessageSignificanceCategory code) { 1291 if (code == MessageSignificanceCategory.CONSEQUENCE) 1292 return "Consequence"; 1293 if (code == MessageSignificanceCategory.CURRENCY) 1294 return "Currency"; 1295 if (code == MessageSignificanceCategory.NOTIFICATION) 1296 return "Notification"; 1297 return "?"; 1298 } 1299 } 1300 1301 public enum ConformanceEventMode { 1302 /** 1303 * The application sends requests and receives responses. 1304 */ 1305 SENDER, 1306 /** 1307 * The application receives requests and sends responses. 1308 */ 1309 RECEIVER, 1310 /** 1311 * added to help the parsers 1312 */ 1313 NULL; 1314 public static ConformanceEventMode fromCode(String codeString) throws FHIRException { 1315 if (codeString == null || "".equals(codeString)) 1316 return null; 1317 if ("sender".equals(codeString)) 1318 return SENDER; 1319 if ("receiver".equals(codeString)) 1320 return RECEIVER; 1321 throw new FHIRException("Unknown ConformanceEventMode code '"+codeString+"'"); 1322 } 1323 public String toCode() { 1324 switch (this) { 1325 case SENDER: return "sender"; 1326 case RECEIVER: return "receiver"; 1327 default: return "?"; 1328 } 1329 } 1330 public String getSystem() { 1331 switch (this) { 1332 case SENDER: return "http://hl7.org/fhir/message-conformance-event-mode"; 1333 case RECEIVER: return "http://hl7.org/fhir/message-conformance-event-mode"; 1334 default: return "?"; 1335 } 1336 } 1337 public String getDefinition() { 1338 switch (this) { 1339 case SENDER: return "The application sends requests and receives responses."; 1340 case RECEIVER: return "The application receives requests and sends responses."; 1341 default: return "?"; 1342 } 1343 } 1344 public String getDisplay() { 1345 switch (this) { 1346 case SENDER: return "Sender"; 1347 case RECEIVER: return "Receiver"; 1348 default: return "?"; 1349 } 1350 } 1351 } 1352 1353 public static class ConformanceEventModeEnumFactory implements EnumFactory<ConformanceEventMode> { 1354 public ConformanceEventMode fromCode(String codeString) throws IllegalArgumentException { 1355 if (codeString == null || "".equals(codeString)) 1356 if (codeString == null || "".equals(codeString)) 1357 return null; 1358 if ("sender".equals(codeString)) 1359 return ConformanceEventMode.SENDER; 1360 if ("receiver".equals(codeString)) 1361 return ConformanceEventMode.RECEIVER; 1362 throw new IllegalArgumentException("Unknown ConformanceEventMode code '"+codeString+"'"); 1363 } 1364 public Enumeration<ConformanceEventMode> fromType(Base code) throws FHIRException { 1365 if (code == null || code.isEmpty()) 1366 return null; 1367 String codeString = ((PrimitiveType) code).asStringValue(); 1368 if (codeString == null || "".equals(codeString)) 1369 return null; 1370 if ("sender".equals(codeString)) 1371 return new Enumeration<ConformanceEventMode>(this, ConformanceEventMode.SENDER); 1372 if ("receiver".equals(codeString)) 1373 return new Enumeration<ConformanceEventMode>(this, ConformanceEventMode.RECEIVER); 1374 throw new FHIRException("Unknown ConformanceEventMode code '"+codeString+"'"); 1375 } 1376 public String toCode(ConformanceEventMode code) { 1377 if (code == ConformanceEventMode.SENDER) 1378 return "sender"; 1379 if (code == ConformanceEventMode.RECEIVER) 1380 return "receiver"; 1381 return "?"; 1382 } 1383 } 1384 1385 public enum DocumentMode { 1386 /** 1387 * The application produces documents of the specified type. 1388 */ 1389 PRODUCER, 1390 /** 1391 * The application consumes documents of the specified type. 1392 */ 1393 CONSUMER, 1394 /** 1395 * added to help the parsers 1396 */ 1397 NULL; 1398 public static DocumentMode fromCode(String codeString) throws FHIRException { 1399 if (codeString == null || "".equals(codeString)) 1400 return null; 1401 if ("producer".equals(codeString)) 1402 return PRODUCER; 1403 if ("consumer".equals(codeString)) 1404 return CONSUMER; 1405 throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); 1406 } 1407 public String toCode() { 1408 switch (this) { 1409 case PRODUCER: return "producer"; 1410 case CONSUMER: return "consumer"; 1411 default: return "?"; 1412 } 1413 } 1414 public String getSystem() { 1415 switch (this) { 1416 case PRODUCER: return "http://hl7.org/fhir/document-mode"; 1417 case CONSUMER: return "http://hl7.org/fhir/document-mode"; 1418 default: return "?"; 1419 } 1420 } 1421 public String getDefinition() { 1422 switch (this) { 1423 case PRODUCER: return "The application produces documents of the specified type."; 1424 case CONSUMER: return "The application consumes documents of the specified type."; 1425 default: return "?"; 1426 } 1427 } 1428 public String getDisplay() { 1429 switch (this) { 1430 case PRODUCER: return "Producer"; 1431 case CONSUMER: return "Consumer"; 1432 default: return "?"; 1433 } 1434 } 1435 } 1436 1437 public static class DocumentModeEnumFactory implements EnumFactory<DocumentMode> { 1438 public DocumentMode fromCode(String codeString) throws IllegalArgumentException { 1439 if (codeString == null || "".equals(codeString)) 1440 if (codeString == null || "".equals(codeString)) 1441 return null; 1442 if ("producer".equals(codeString)) 1443 return DocumentMode.PRODUCER; 1444 if ("consumer".equals(codeString)) 1445 return DocumentMode.CONSUMER; 1446 throw new IllegalArgumentException("Unknown DocumentMode code '"+codeString+"'"); 1447 } 1448 public Enumeration<DocumentMode> fromType(Base code) throws FHIRException { 1449 if (code == null || code.isEmpty()) 1450 return null; 1451 String codeString = ((PrimitiveType) code).asStringValue(); 1452 if (codeString == null || "".equals(codeString)) 1453 return null; 1454 if ("producer".equals(codeString)) 1455 return new Enumeration<DocumentMode>(this, DocumentMode.PRODUCER); 1456 if ("consumer".equals(codeString)) 1457 return new Enumeration<DocumentMode>(this, DocumentMode.CONSUMER); 1458 throw new FHIRException("Unknown DocumentMode code '"+codeString+"'"); 1459 } 1460 public String toCode(DocumentMode code) { 1461 if (code == DocumentMode.PRODUCER) 1462 return "producer"; 1463 if (code == DocumentMode.CONSUMER) 1464 return "consumer"; 1465 return "?"; 1466 } 1467 } 1468 1469 @Block() 1470 public static class ConformanceContactComponent extends BackboneElement implements IBaseBackboneElement { 1471 /** 1472 * The name of an individual to contact regarding the conformance. 1473 */ 1474 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 1475 @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the conformance." ) 1476 protected StringType name; 1477 1478 /** 1479 * Contact details for individual (if a name was provided) or the publisher. 1480 */ 1481 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1482 @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) 1483 protected List<ContactPoint> telecom; 1484 1485 private static final long serialVersionUID = -1179697803L; 1486 1487 /* 1488 * Constructor 1489 */ 1490 public ConformanceContactComponent() { 1491 super(); 1492 } 1493 1494 /** 1495 * @return {@link #name} (The name of an individual to contact regarding the conformance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1496 */ 1497 public StringType getNameElement() { 1498 if (this.name == null) 1499 if (Configuration.errorOnAutoCreate()) 1500 throw new Error("Attempt to auto-create ConformanceContactComponent.name"); 1501 else if (Configuration.doAutoCreate()) 1502 this.name = new StringType(); // bb 1503 return this.name; 1504 } 1505 1506 public boolean hasNameElement() { 1507 return this.name != null && !this.name.isEmpty(); 1508 } 1509 1510 public boolean hasName() { 1511 return this.name != null && !this.name.isEmpty(); 1512 } 1513 1514 /** 1515 * @param value {@link #name} (The name of an individual to contact regarding the conformance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1516 */ 1517 public ConformanceContactComponent setNameElement(StringType value) { 1518 this.name = value; 1519 return this; 1520 } 1521 1522 /** 1523 * @return The name of an individual to contact regarding the conformance. 1524 */ 1525 public String getName() { 1526 return this.name == null ? null : this.name.getValue(); 1527 } 1528 1529 /** 1530 * @param value The name of an individual to contact regarding the conformance. 1531 */ 1532 public ConformanceContactComponent setName(String value) { 1533 if (Utilities.noString(value)) 1534 this.name = null; 1535 else { 1536 if (this.name == null) 1537 this.name = new StringType(); 1538 this.name.setValue(value); 1539 } 1540 return this; 1541 } 1542 1543 /** 1544 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 1545 */ 1546 public List<ContactPoint> getTelecom() { 1547 if (this.telecom == null) 1548 this.telecom = new ArrayList<ContactPoint>(); 1549 return this.telecom; 1550 } 1551 1552 public boolean hasTelecom() { 1553 if (this.telecom == null) 1554 return false; 1555 for (ContactPoint item : this.telecom) 1556 if (!item.isEmpty()) 1557 return true; 1558 return false; 1559 } 1560 1561 /** 1562 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 1563 */ 1564 // syntactic sugar 1565 public ContactPoint addTelecom() { //3 1566 ContactPoint t = new ContactPoint(); 1567 if (this.telecom == null) 1568 this.telecom = new ArrayList<ContactPoint>(); 1569 this.telecom.add(t); 1570 return t; 1571 } 1572 1573 // syntactic sugar 1574 public ConformanceContactComponent addTelecom(ContactPoint t) { //3 1575 if (t == null) 1576 return this; 1577 if (this.telecom == null) 1578 this.telecom = new ArrayList<ContactPoint>(); 1579 this.telecom.add(t); 1580 return this; 1581 } 1582 1583 protected void listChildren(List<Property> childrenList) { 1584 super.listChildren(childrenList); 1585 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the conformance.", 0, java.lang.Integer.MAX_VALUE, name)); 1586 childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); 1587 } 1588 1589 @Override 1590 public void setProperty(String name, Base value) throws FHIRException { 1591 if (name.equals("name")) 1592 this.name = castToString(value); // StringType 1593 else if (name.equals("telecom")) 1594 this.getTelecom().add(castToContactPoint(value)); 1595 else 1596 super.setProperty(name, value); 1597 } 1598 1599 @Override 1600 public Base addChild(String name) throws FHIRException { 1601 if (name.equals("name")) { 1602 throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); 1603 } 1604 else if (name.equals("telecom")) { 1605 return addTelecom(); 1606 } 1607 else 1608 return super.addChild(name); 1609 } 1610 1611 public ConformanceContactComponent copy() { 1612 ConformanceContactComponent dst = new ConformanceContactComponent(); 1613 copyValues(dst); 1614 dst.name = name == null ? null : name.copy(); 1615 if (telecom != null) { 1616 dst.telecom = new ArrayList<ContactPoint>(); 1617 for (ContactPoint i : telecom) 1618 dst.telecom.add(i.copy()); 1619 }; 1620 return dst; 1621 } 1622 1623 @Override 1624 public boolean equalsDeep(Base other) { 1625 if (!super.equalsDeep(other)) 1626 return false; 1627 if (!(other instanceof ConformanceContactComponent)) 1628 return false; 1629 ConformanceContactComponent o = (ConformanceContactComponent) other; 1630 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 1631 } 1632 1633 @Override 1634 public boolean equalsShallow(Base other) { 1635 if (!super.equalsShallow(other)) 1636 return false; 1637 if (!(other instanceof ConformanceContactComponent)) 1638 return false; 1639 ConformanceContactComponent o = (ConformanceContactComponent) other; 1640 return compareValues(name, o.name, true); 1641 } 1642 1643 public boolean isEmpty() { 1644 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 1645 ; 1646 } 1647 1648 public String fhirType() { 1649 return "Conformance.contact"; 1650 1651 } 1652 1653 } 1654 1655 @Block() 1656 public static class ConformanceSoftwareComponent extends BackboneElement implements IBaseBackboneElement { 1657 /** 1658 * Name software is known by. 1659 */ 1660 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1661 @Description(shortDefinition="A name the software is known by", formalDefinition="Name software is known by." ) 1662 protected StringType name; 1663 1664 /** 1665 * The version identifier for the software covered by this statement. 1666 */ 1667 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1668 @Description(shortDefinition="Version covered by this statement", formalDefinition="The version identifier for the software covered by this statement." ) 1669 protected StringType version; 1670 1671 /** 1672 * Date this version of the software released. 1673 */ 1674 @Child(name = "releaseDate", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1675 @Description(shortDefinition="Date this version released", formalDefinition="Date this version of the software released." ) 1676 protected DateTimeType releaseDate; 1677 1678 private static final long serialVersionUID = 1819769027L; 1679 1680 /* 1681 * Constructor 1682 */ 1683 public ConformanceSoftwareComponent() { 1684 super(); 1685 } 1686 1687 /* 1688 * Constructor 1689 */ 1690 public ConformanceSoftwareComponent(StringType name) { 1691 super(); 1692 this.name = name; 1693 } 1694 1695 /** 1696 * @return {@link #name} (Name software is known by.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1697 */ 1698 public StringType getNameElement() { 1699 if (this.name == null) 1700 if (Configuration.errorOnAutoCreate()) 1701 throw new Error("Attempt to auto-create ConformanceSoftwareComponent.name"); 1702 else if (Configuration.doAutoCreate()) 1703 this.name = new StringType(); // bb 1704 return this.name; 1705 } 1706 1707 public boolean hasNameElement() { 1708 return this.name != null && !this.name.isEmpty(); 1709 } 1710 1711 public boolean hasName() { 1712 return this.name != null && !this.name.isEmpty(); 1713 } 1714 1715 /** 1716 * @param value {@link #name} (Name software is known by.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1717 */ 1718 public ConformanceSoftwareComponent setNameElement(StringType value) { 1719 this.name = value; 1720 return this; 1721 } 1722 1723 /** 1724 * @return Name software is known by. 1725 */ 1726 public String getName() { 1727 return this.name == null ? null : this.name.getValue(); 1728 } 1729 1730 /** 1731 * @param value Name software is known by. 1732 */ 1733 public ConformanceSoftwareComponent setName(String value) { 1734 if (this.name == null) 1735 this.name = new StringType(); 1736 this.name.setValue(value); 1737 return this; 1738 } 1739 1740 /** 1741 * @return {@link #version} (The version identifier for the software covered by this statement.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1742 */ 1743 public StringType getVersionElement() { 1744 if (this.version == null) 1745 if (Configuration.errorOnAutoCreate()) 1746 throw new Error("Attempt to auto-create ConformanceSoftwareComponent.version"); 1747 else if (Configuration.doAutoCreate()) 1748 this.version = new StringType(); // bb 1749 return this.version; 1750 } 1751 1752 public boolean hasVersionElement() { 1753 return this.version != null && !this.version.isEmpty(); 1754 } 1755 1756 public boolean hasVersion() { 1757 return this.version != null && !this.version.isEmpty(); 1758 } 1759 1760 /** 1761 * @param value {@link #version} (The version identifier for the software covered by this statement.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1762 */ 1763 public ConformanceSoftwareComponent setVersionElement(StringType value) { 1764 this.version = value; 1765 return this; 1766 } 1767 1768 /** 1769 * @return The version identifier for the software covered by this statement. 1770 */ 1771 public String getVersion() { 1772 return this.version == null ? null : this.version.getValue(); 1773 } 1774 1775 /** 1776 * @param value The version identifier for the software covered by this statement. 1777 */ 1778 public ConformanceSoftwareComponent setVersion(String value) { 1779 if (Utilities.noString(value)) 1780 this.version = null; 1781 else { 1782 if (this.version == null) 1783 this.version = new StringType(); 1784 this.version.setValue(value); 1785 } 1786 return this; 1787 } 1788 1789 /** 1790 * @return {@link #releaseDate} (Date this version of the software released.). This is the underlying object with id, value and extensions. The accessor "getReleaseDate" gives direct access to the value 1791 */ 1792 public DateTimeType getReleaseDateElement() { 1793 if (this.releaseDate == null) 1794 if (Configuration.errorOnAutoCreate()) 1795 throw new Error("Attempt to auto-create ConformanceSoftwareComponent.releaseDate"); 1796 else if (Configuration.doAutoCreate()) 1797 this.releaseDate = new DateTimeType(); // bb 1798 return this.releaseDate; 1799 } 1800 1801 public boolean hasReleaseDateElement() { 1802 return this.releaseDate != null && !this.releaseDate.isEmpty(); 1803 } 1804 1805 public boolean hasReleaseDate() { 1806 return this.releaseDate != null && !this.releaseDate.isEmpty(); 1807 } 1808 1809 /** 1810 * @param value {@link #releaseDate} (Date this version of the software released.). This is the underlying object with id, value and extensions. The accessor "getReleaseDate" gives direct access to the value 1811 */ 1812 public ConformanceSoftwareComponent setReleaseDateElement(DateTimeType value) { 1813 this.releaseDate = value; 1814 return this; 1815 } 1816 1817 /** 1818 * @return Date this version of the software released. 1819 */ 1820 public Date getReleaseDate() { 1821 return this.releaseDate == null ? null : this.releaseDate.getValue(); 1822 } 1823 1824 /** 1825 * @param value Date this version of the software released. 1826 */ 1827 public ConformanceSoftwareComponent setReleaseDate(Date value) { 1828 if (value == null) 1829 this.releaseDate = null; 1830 else { 1831 if (this.releaseDate == null) 1832 this.releaseDate = new DateTimeType(); 1833 this.releaseDate.setValue(value); 1834 } 1835 return this; 1836 } 1837 1838 protected void listChildren(List<Property> childrenList) { 1839 super.listChildren(childrenList); 1840 childrenList.add(new Property("name", "string", "Name software is known by.", 0, java.lang.Integer.MAX_VALUE, name)); 1841 childrenList.add(new Property("version", "string", "The version identifier for the software covered by this statement.", 0, java.lang.Integer.MAX_VALUE, version)); 1842 childrenList.add(new Property("releaseDate", "dateTime", "Date this version of the software released.", 0, java.lang.Integer.MAX_VALUE, releaseDate)); 1843 } 1844 1845 @Override 1846 public void setProperty(String name, Base value) throws FHIRException { 1847 if (name.equals("name")) 1848 this.name = castToString(value); // StringType 1849 else if (name.equals("version")) 1850 this.version = castToString(value); // StringType 1851 else if (name.equals("releaseDate")) 1852 this.releaseDate = castToDateTime(value); // DateTimeType 1853 else 1854 super.setProperty(name, value); 1855 } 1856 1857 @Override 1858 public Base addChild(String name) throws FHIRException { 1859 if (name.equals("name")) { 1860 throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); 1861 } 1862 else if (name.equals("version")) { 1863 throw new FHIRException("Cannot call addChild on a primitive type Conformance.version"); 1864 } 1865 else if (name.equals("releaseDate")) { 1866 throw new FHIRException("Cannot call addChild on a primitive type Conformance.releaseDate"); 1867 } 1868 else 1869 return super.addChild(name); 1870 } 1871 1872 public ConformanceSoftwareComponent copy() { 1873 ConformanceSoftwareComponent dst = new ConformanceSoftwareComponent(); 1874 copyValues(dst); 1875 dst.name = name == null ? null : name.copy(); 1876 dst.version = version == null ? null : version.copy(); 1877 dst.releaseDate = releaseDate == null ? null : releaseDate.copy(); 1878 return dst; 1879 } 1880 1881 @Override 1882 public boolean equalsDeep(Base other) { 1883 if (!super.equalsDeep(other)) 1884 return false; 1885 if (!(other instanceof ConformanceSoftwareComponent)) 1886 return false; 1887 ConformanceSoftwareComponent o = (ConformanceSoftwareComponent) other; 1888 return compareDeep(name, o.name, true) && compareDeep(version, o.version, true) && compareDeep(releaseDate, o.releaseDate, true) 1889 ; 1890 } 1891 1892 @Override 1893 public boolean equalsShallow(Base other) { 1894 if (!super.equalsShallow(other)) 1895 return false; 1896 if (!(other instanceof ConformanceSoftwareComponent)) 1897 return false; 1898 ConformanceSoftwareComponent o = (ConformanceSoftwareComponent) other; 1899 return compareValues(name, o.name, true) && compareValues(version, o.version, true) && compareValues(releaseDate, o.releaseDate, true) 1900 ; 1901 } 1902 1903 public boolean isEmpty() { 1904 return super.isEmpty() && (name == null || name.isEmpty()) && (version == null || version.isEmpty()) 1905 && (releaseDate == null || releaseDate.isEmpty()); 1906 } 1907 1908 public String fhirType() { 1909 return "Conformance.software"; 1910 1911 } 1912 1913 } 1914 1915 @Block() 1916 public static class ConformanceImplementationComponent extends BackboneElement implements IBaseBackboneElement { 1917 /** 1918 * Information about the specific installation that this conformance statement relates to. 1919 */ 1920 @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1921 @Description(shortDefinition="Describes this specific instance", formalDefinition="Information about the specific installation that this conformance statement relates to." ) 1922 protected StringType description; 1923 1924 /** 1925 * An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. 1926 */ 1927 @Child(name = "url", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1928 @Description(shortDefinition="Base URL for the installation", formalDefinition="An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces." ) 1929 protected UriType url; 1930 1931 private static final long serialVersionUID = -289238508L; 1932 1933 /* 1934 * Constructor 1935 */ 1936 public ConformanceImplementationComponent() { 1937 super(); 1938 } 1939 1940 /* 1941 * Constructor 1942 */ 1943 public ConformanceImplementationComponent(StringType description) { 1944 super(); 1945 this.description = description; 1946 } 1947 1948 /** 1949 * @return {@link #description} (Information about the specific installation that this conformance statement relates to.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1950 */ 1951 public StringType getDescriptionElement() { 1952 if (this.description == null) 1953 if (Configuration.errorOnAutoCreate()) 1954 throw new Error("Attempt to auto-create ConformanceImplementationComponent.description"); 1955 else if (Configuration.doAutoCreate()) 1956 this.description = new StringType(); // bb 1957 return this.description; 1958 } 1959 1960 public boolean hasDescriptionElement() { 1961 return this.description != null && !this.description.isEmpty(); 1962 } 1963 1964 public boolean hasDescription() { 1965 return this.description != null && !this.description.isEmpty(); 1966 } 1967 1968 /** 1969 * @param value {@link #description} (Information about the specific installation that this conformance statement relates to.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1970 */ 1971 public ConformanceImplementationComponent setDescriptionElement(StringType value) { 1972 this.description = value; 1973 return this; 1974 } 1975 1976 /** 1977 * @return Information about the specific installation that this conformance statement relates to. 1978 */ 1979 public String getDescription() { 1980 return this.description == null ? null : this.description.getValue(); 1981 } 1982 1983 /** 1984 * @param value Information about the specific installation that this conformance statement relates to. 1985 */ 1986 public ConformanceImplementationComponent setDescription(String value) { 1987 if (this.description == null) 1988 this.description = new StringType(); 1989 this.description.setValue(value); 1990 return this; 1991 } 1992 1993 /** 1994 * @return {@link #url} (An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1995 */ 1996 public UriType getUrlElement() { 1997 if (this.url == null) 1998 if (Configuration.errorOnAutoCreate()) 1999 throw new Error("Attempt to auto-create ConformanceImplementationComponent.url"); 2000 else if (Configuration.doAutoCreate()) 2001 this.url = new UriType(); // bb 2002 return this.url; 2003 } 2004 2005 public boolean hasUrlElement() { 2006 return this.url != null && !this.url.isEmpty(); 2007 } 2008 2009 public boolean hasUrl() { 2010 return this.url != null && !this.url.isEmpty(); 2011 } 2012 2013 /** 2014 * @param value {@link #url} (An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2015 */ 2016 public ConformanceImplementationComponent setUrlElement(UriType value) { 2017 this.url = value; 2018 return this; 2019 } 2020 2021 /** 2022 * @return An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. 2023 */ 2024 public String getUrl() { 2025 return this.url == null ? null : this.url.getValue(); 2026 } 2027 2028 /** 2029 * @param value An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. 2030 */ 2031 public ConformanceImplementationComponent setUrl(String value) { 2032 if (Utilities.noString(value)) 2033 this.url = null; 2034 else { 2035 if (this.url == null) 2036 this.url = new UriType(); 2037 this.url.setValue(value); 2038 } 2039 return this; 2040 } 2041 2042 protected void listChildren(List<Property> childrenList) { 2043 super.listChildren(childrenList); 2044 childrenList.add(new Property("description", "string", "Information about the specific installation that this conformance statement relates to.", 0, java.lang.Integer.MAX_VALUE, description)); 2045 childrenList.add(new Property("url", "uri", "An absolute base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces.", 0, java.lang.Integer.MAX_VALUE, url)); 2046 } 2047 2048 @Override 2049 public void setProperty(String name, Base value) throws FHIRException { 2050 if (name.equals("description")) 2051 this.description = castToString(value); // StringType 2052 else if (name.equals("url")) 2053 this.url = castToUri(value); // UriType 2054 else 2055 super.setProperty(name, value); 2056 } 2057 2058 @Override 2059 public Base addChild(String name) throws FHIRException { 2060 if (name.equals("description")) { 2061 throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); 2062 } 2063 else if (name.equals("url")) { 2064 throw new FHIRException("Cannot call addChild on a primitive type Conformance.url"); 2065 } 2066 else 2067 return super.addChild(name); 2068 } 2069 2070 public ConformanceImplementationComponent copy() { 2071 ConformanceImplementationComponent dst = new ConformanceImplementationComponent(); 2072 copyValues(dst); 2073 dst.description = description == null ? null : description.copy(); 2074 dst.url = url == null ? null : url.copy(); 2075 return dst; 2076 } 2077 2078 @Override 2079 public boolean equalsDeep(Base other) { 2080 if (!super.equalsDeep(other)) 2081 return false; 2082 if (!(other instanceof ConformanceImplementationComponent)) 2083 return false; 2084 ConformanceImplementationComponent o = (ConformanceImplementationComponent) other; 2085 return compareDeep(description, o.description, true) && compareDeep(url, o.url, true); 2086 } 2087 2088 @Override 2089 public boolean equalsShallow(Base other) { 2090 if (!super.equalsShallow(other)) 2091 return false; 2092 if (!(other instanceof ConformanceImplementationComponent)) 2093 return false; 2094 ConformanceImplementationComponent o = (ConformanceImplementationComponent) other; 2095 return compareValues(description, o.description, true) && compareValues(url, o.url, true); 2096 } 2097 2098 public boolean isEmpty() { 2099 return super.isEmpty() && (description == null || description.isEmpty()) && (url == null || url.isEmpty()) 2100 ; 2101 } 2102 2103 public String fhirType() { 2104 return "Conformance.implementation"; 2105 2106 } 2107 2108 } 2109 2110 @Block() 2111 public static class ConformanceRestComponent extends BackboneElement implements IBaseBackboneElement { 2112 /** 2113 * Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. 2114 */ 2115 @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2116 @Description(shortDefinition="client | server", formalDefinition="Identifies whether this portion of the statement is describing ability to initiate or receive restful operations." ) 2117 protected Enumeration<RestfulConformanceMode> mode; 2118 2119 /** 2120 * Information about the system's restful capabilities that apply across all applications, such as security. 2121 */ 2122 @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2123 @Description(shortDefinition="General description of implementation", formalDefinition="Information about the system's restful capabilities that apply across all applications, such as security." ) 2124 protected StringType documentation; 2125 2126 /** 2127 * Information about security implementation from an interface perspective - what a client needs to know. 2128 */ 2129 @Child(name = "security", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 2130 @Description(shortDefinition="Information about security of implementation", formalDefinition="Information about security implementation from an interface perspective - what a client needs to know." ) 2131 protected ConformanceRestSecurityComponent security; 2132 2133 /** 2134 * A specification of the restful capabilities of the solution for a specific resource type. 2135 */ 2136 @Child(name = "resource", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2137 @Description(shortDefinition="Resource served on the REST interface", formalDefinition="A specification of the restful capabilities of the solution for a specific resource type." ) 2138 protected List<ConformanceRestResourceComponent> resource; 2139 2140 /** 2141 * A specification of restful operations supported by the system. 2142 */ 2143 @Child(name = "interaction", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2144 @Description(shortDefinition="What operations are supported?", formalDefinition="A specification of restful operations supported by the system." ) 2145 protected List<SystemInteractionComponent> interaction; 2146 2147 /** 2148 * A code that indicates how transactions are supported. 2149 */ 2150 @Child(name = "transactionMode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2151 @Description(shortDefinition="not-supported | batch | transaction | both", formalDefinition="A code that indicates how transactions are supported." ) 2152 protected Enumeration<TransactionMode> transactionMode; 2153 2154 /** 2155 * Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. 2156 */ 2157 @Child(name = "searchParam", type = {ConformanceRestResourceSearchParamComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2158 @Description(shortDefinition="Search params for searching all resources", formalDefinition="Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." ) 2159 protected List<ConformanceRestResourceSearchParamComponent> searchParam; 2160 2161 /** 2162 * Definition of an operation or a named query and with its parameters and their meaning and type. 2163 */ 2164 @Child(name = "operation", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2165 @Description(shortDefinition="Definition of an operation or a custom query", formalDefinition="Definition of an operation or a named query and with its parameters and their meaning and type." ) 2166 protected List<ConformanceRestOperationComponent> operation; 2167 2168 /** 2169 * An absolute URI which is a reference to the definition of a compartment hosted by the system. 2170 */ 2171 @Child(name = "compartment", type = {UriType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2172 @Description(shortDefinition="Compartments served/used by system", formalDefinition="An absolute URI which is a reference to the definition of a compartment hosted by the system." ) 2173 protected List<UriType> compartment; 2174 2175 private static final long serialVersionUID = 931983837L; 2176 2177 /* 2178 * Constructor 2179 */ 2180 public ConformanceRestComponent() { 2181 super(); 2182 } 2183 2184 /* 2185 * Constructor 2186 */ 2187 public ConformanceRestComponent(Enumeration<RestfulConformanceMode> mode) { 2188 super(); 2189 this.mode = mode; 2190 } 2191 2192 /** 2193 * @return {@link #mode} (Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 2194 */ 2195 public Enumeration<RestfulConformanceMode> getModeElement() { 2196 if (this.mode == null) 2197 if (Configuration.errorOnAutoCreate()) 2198 throw new Error("Attempt to auto-create ConformanceRestComponent.mode"); 2199 else if (Configuration.doAutoCreate()) 2200 this.mode = new Enumeration<RestfulConformanceMode>(new RestfulConformanceModeEnumFactory()); // bb 2201 return this.mode; 2202 } 2203 2204 public boolean hasModeElement() { 2205 return this.mode != null && !this.mode.isEmpty(); 2206 } 2207 2208 public boolean hasMode() { 2209 return this.mode != null && !this.mode.isEmpty(); 2210 } 2211 2212 /** 2213 * @param value {@link #mode} (Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 2214 */ 2215 public ConformanceRestComponent setModeElement(Enumeration<RestfulConformanceMode> value) { 2216 this.mode = value; 2217 return this; 2218 } 2219 2220 /** 2221 * @return Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. 2222 */ 2223 public RestfulConformanceMode getMode() { 2224 return this.mode == null ? null : this.mode.getValue(); 2225 } 2226 2227 /** 2228 * @param value Identifies whether this portion of the statement is describing ability to initiate or receive restful operations. 2229 */ 2230 public ConformanceRestComponent setMode(RestfulConformanceMode value) { 2231 if (this.mode == null) 2232 this.mode = new Enumeration<RestfulConformanceMode>(new RestfulConformanceModeEnumFactory()); 2233 this.mode.setValue(value); 2234 return this; 2235 } 2236 2237 /** 2238 * @return {@link #documentation} (Information about the system's restful capabilities that apply across all applications, such as security.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 2239 */ 2240 public StringType getDocumentationElement() { 2241 if (this.documentation == null) 2242 if (Configuration.errorOnAutoCreate()) 2243 throw new Error("Attempt to auto-create ConformanceRestComponent.documentation"); 2244 else if (Configuration.doAutoCreate()) 2245 this.documentation = new StringType(); // bb 2246 return this.documentation; 2247 } 2248 2249 public boolean hasDocumentationElement() { 2250 return this.documentation != null && !this.documentation.isEmpty(); 2251 } 2252 2253 public boolean hasDocumentation() { 2254 return this.documentation != null && !this.documentation.isEmpty(); 2255 } 2256 2257 /** 2258 * @param value {@link #documentation} (Information about the system's restful capabilities that apply across all applications, such as security.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 2259 */ 2260 public ConformanceRestComponent setDocumentationElement(StringType value) { 2261 this.documentation = value; 2262 return this; 2263 } 2264 2265 /** 2266 * @return Information about the system's restful capabilities that apply across all applications, such as security. 2267 */ 2268 public String getDocumentation() { 2269 return this.documentation == null ? null : this.documentation.getValue(); 2270 } 2271 2272 /** 2273 * @param value Information about the system's restful capabilities that apply across all applications, such as security. 2274 */ 2275 public ConformanceRestComponent setDocumentation(String value) { 2276 if (Utilities.noString(value)) 2277 this.documentation = null; 2278 else { 2279 if (this.documentation == null) 2280 this.documentation = new StringType(); 2281 this.documentation.setValue(value); 2282 } 2283 return this; 2284 } 2285 2286 /** 2287 * @return {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.) 2288 */ 2289 public ConformanceRestSecurityComponent getSecurity() { 2290 if (this.security == null) 2291 if (Configuration.errorOnAutoCreate()) 2292 throw new Error("Attempt to auto-create ConformanceRestComponent.security"); 2293 else if (Configuration.doAutoCreate()) 2294 this.security = new ConformanceRestSecurityComponent(); // cc 2295 return this.security; 2296 } 2297 2298 public boolean hasSecurity() { 2299 return this.security != null && !this.security.isEmpty(); 2300 } 2301 2302 /** 2303 * @param value {@link #security} (Information about security implementation from an interface perspective - what a client needs to know.) 2304 */ 2305 public ConformanceRestComponent setSecurity(ConformanceRestSecurityComponent value) { 2306 this.security = value; 2307 return this; 2308 } 2309 2310 /** 2311 * @return {@link #resource} (A specification of the restful capabilities of the solution for a specific resource type.) 2312 */ 2313 public List<ConformanceRestResourceComponent> getResource() { 2314 if (this.resource == null) 2315 this.resource = new ArrayList<ConformanceRestResourceComponent>(); 2316 return this.resource; 2317 } 2318 2319 public boolean hasResource() { 2320 if (this.resource == null) 2321 return false; 2322 for (ConformanceRestResourceComponent item : this.resource) 2323 if (!item.isEmpty()) 2324 return true; 2325 return false; 2326 } 2327 2328 /** 2329 * @return {@link #resource} (A specification of the restful capabilities of the solution for a specific resource type.) 2330 */ 2331 // syntactic sugar 2332 public ConformanceRestResourceComponent addResource() { //3 2333 ConformanceRestResourceComponent t = new ConformanceRestResourceComponent(); 2334 if (this.resource == null) 2335 this.resource = new ArrayList<ConformanceRestResourceComponent>(); 2336 this.resource.add(t); 2337 return t; 2338 } 2339 2340 // syntactic sugar 2341 public ConformanceRestComponent addResource(ConformanceRestResourceComponent t) { //3 2342 if (t == null) 2343 return this; 2344 if (this.resource == null) 2345 this.resource = new ArrayList<ConformanceRestResourceComponent>(); 2346 this.resource.add(t); 2347 return this; 2348 } 2349 2350 /** 2351 * @return {@link #interaction} (A specification of restful operations supported by the system.) 2352 */ 2353 public List<SystemInteractionComponent> getInteraction() { 2354 if (this.interaction == null) 2355 this.interaction = new ArrayList<SystemInteractionComponent>(); 2356 return this.interaction; 2357 } 2358 2359 public boolean hasInteraction() { 2360 if (this.interaction == null) 2361 return false; 2362 for (SystemInteractionComponent item : this.interaction) 2363 if (!item.isEmpty()) 2364 return true; 2365 return false; 2366 } 2367 2368 /** 2369 * @return {@link #interaction} (A specification of restful operations supported by the system.) 2370 */ 2371 // syntactic sugar 2372 public SystemInteractionComponent addInteraction() { //3 2373 SystemInteractionComponent t = new SystemInteractionComponent(); 2374 if (this.interaction == null) 2375 this.interaction = new ArrayList<SystemInteractionComponent>(); 2376 this.interaction.add(t); 2377 return t; 2378 } 2379 2380 // syntactic sugar 2381 public ConformanceRestComponent addInteraction(SystemInteractionComponent t) { //3 2382 if (t == null) 2383 return this; 2384 if (this.interaction == null) 2385 this.interaction = new ArrayList<SystemInteractionComponent>(); 2386 this.interaction.add(t); 2387 return this; 2388 } 2389 2390 /** 2391 * @return {@link #transactionMode} (A code that indicates how transactions are supported.). This is the underlying object with id, value and extensions. The accessor "getTransactionMode" gives direct access to the value 2392 */ 2393 public Enumeration<TransactionMode> getTransactionModeElement() { 2394 if (this.transactionMode == null) 2395 if (Configuration.errorOnAutoCreate()) 2396 throw new Error("Attempt to auto-create ConformanceRestComponent.transactionMode"); 2397 else if (Configuration.doAutoCreate()) 2398 this.transactionMode = new Enumeration<TransactionMode>(new TransactionModeEnumFactory()); // bb 2399 return this.transactionMode; 2400 } 2401 2402 public boolean hasTransactionModeElement() { 2403 return this.transactionMode != null && !this.transactionMode.isEmpty(); 2404 } 2405 2406 public boolean hasTransactionMode() { 2407 return this.transactionMode != null && !this.transactionMode.isEmpty(); 2408 } 2409 2410 /** 2411 * @param value {@link #transactionMode} (A code that indicates how transactions are supported.). This is the underlying object with id, value and extensions. The accessor "getTransactionMode" gives direct access to the value 2412 */ 2413 public ConformanceRestComponent setTransactionModeElement(Enumeration<TransactionMode> value) { 2414 this.transactionMode = value; 2415 return this; 2416 } 2417 2418 /** 2419 * @return A code that indicates how transactions are supported. 2420 */ 2421 public TransactionMode getTransactionMode() { 2422 return this.transactionMode == null ? null : this.transactionMode.getValue(); 2423 } 2424 2425 /** 2426 * @param value A code that indicates how transactions are supported. 2427 */ 2428 public ConformanceRestComponent setTransactionMode(TransactionMode value) { 2429 if (value == null) 2430 this.transactionMode = null; 2431 else { 2432 if (this.transactionMode == null) 2433 this.transactionMode = new Enumeration<TransactionMode>(new TransactionModeEnumFactory()); 2434 this.transactionMode.setValue(value); 2435 } 2436 return this; 2437 } 2438 2439 /** 2440 * @return {@link #searchParam} (Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) 2441 */ 2442 public List<ConformanceRestResourceSearchParamComponent> getSearchParam() { 2443 if (this.searchParam == null) 2444 this.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 2445 return this.searchParam; 2446 } 2447 2448 public boolean hasSearchParam() { 2449 if (this.searchParam == null) 2450 return false; 2451 for (ConformanceRestResourceSearchParamComponent item : this.searchParam) 2452 if (!item.isEmpty()) 2453 return true; 2454 return false; 2455 } 2456 2457 /** 2458 * @return {@link #searchParam} (Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) 2459 */ 2460 // syntactic sugar 2461 public ConformanceRestResourceSearchParamComponent addSearchParam() { //3 2462 ConformanceRestResourceSearchParamComponent t = new ConformanceRestResourceSearchParamComponent(); 2463 if (this.searchParam == null) 2464 this.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 2465 this.searchParam.add(t); 2466 return t; 2467 } 2468 2469 // syntactic sugar 2470 public ConformanceRestComponent addSearchParam(ConformanceRestResourceSearchParamComponent t) { //3 2471 if (t == null) 2472 return this; 2473 if (this.searchParam == null) 2474 this.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 2475 this.searchParam.add(t); 2476 return this; 2477 } 2478 2479 /** 2480 * @return {@link #operation} (Definition of an operation or a named query and with its parameters and their meaning and type.) 2481 */ 2482 public List<ConformanceRestOperationComponent> getOperation() { 2483 if (this.operation == null) 2484 this.operation = new ArrayList<ConformanceRestOperationComponent>(); 2485 return this.operation; 2486 } 2487 2488 public boolean hasOperation() { 2489 if (this.operation == null) 2490 return false; 2491 for (ConformanceRestOperationComponent item : this.operation) 2492 if (!item.isEmpty()) 2493 return true; 2494 return false; 2495 } 2496 2497 /** 2498 * @return {@link #operation} (Definition of an operation or a named query and with its parameters and their meaning and type.) 2499 */ 2500 // syntactic sugar 2501 public ConformanceRestOperationComponent addOperation() { //3 2502 ConformanceRestOperationComponent t = new ConformanceRestOperationComponent(); 2503 if (this.operation == null) 2504 this.operation = new ArrayList<ConformanceRestOperationComponent>(); 2505 this.operation.add(t); 2506 return t; 2507 } 2508 2509 // syntactic sugar 2510 public ConformanceRestComponent addOperation(ConformanceRestOperationComponent t) { //3 2511 if (t == null) 2512 return this; 2513 if (this.operation == null) 2514 this.operation = new ArrayList<ConformanceRestOperationComponent>(); 2515 this.operation.add(t); 2516 return this; 2517 } 2518 2519 /** 2520 * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) 2521 */ 2522 public List<UriType> getCompartment() { 2523 if (this.compartment == null) 2524 this.compartment = new ArrayList<UriType>(); 2525 return this.compartment; 2526 } 2527 2528 public boolean hasCompartment() { 2529 if (this.compartment == null) 2530 return false; 2531 for (UriType item : this.compartment) 2532 if (!item.isEmpty()) 2533 return true; 2534 return false; 2535 } 2536 2537 /** 2538 * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) 2539 */ 2540 // syntactic sugar 2541 public UriType addCompartmentElement() {//2 2542 UriType t = new UriType(); 2543 if (this.compartment == null) 2544 this.compartment = new ArrayList<UriType>(); 2545 this.compartment.add(t); 2546 return t; 2547 } 2548 2549 /** 2550 * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) 2551 */ 2552 public ConformanceRestComponent addCompartment(String value) { //1 2553 UriType t = new UriType(); 2554 t.setValue(value); 2555 if (this.compartment == null) 2556 this.compartment = new ArrayList<UriType>(); 2557 this.compartment.add(t); 2558 return this; 2559 } 2560 2561 /** 2562 * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) 2563 */ 2564 public boolean hasCompartment(String value) { 2565 if (this.compartment == null) 2566 return false; 2567 for (UriType v : this.compartment) 2568 if (v.equals(value)) // uri 2569 return true; 2570 return false; 2571 } 2572 2573 protected void listChildren(List<Property> childrenList) { 2574 super.listChildren(childrenList); 2575 childrenList.add(new Property("mode", "code", "Identifies whether this portion of the statement is describing ability to initiate or receive restful operations.", 0, java.lang.Integer.MAX_VALUE, mode)); 2576 childrenList.add(new Property("documentation", "string", "Information about the system's restful capabilities that apply across all applications, such as security.", 0, java.lang.Integer.MAX_VALUE, documentation)); 2577 childrenList.add(new Property("security", "", "Information about security implementation from an interface perspective - what a client needs to know.", 0, java.lang.Integer.MAX_VALUE, security)); 2578 childrenList.add(new Property("resource", "", "A specification of the restful capabilities of the solution for a specific resource type.", 0, java.lang.Integer.MAX_VALUE, resource)); 2579 childrenList.add(new Property("interaction", "", "A specification of restful operations supported by the system.", 0, java.lang.Integer.MAX_VALUE, interaction)); 2580 childrenList.add(new Property("transactionMode", "code", "A code that indicates how transactions are supported.", 0, java.lang.Integer.MAX_VALUE, transactionMode)); 2581 childrenList.add(new Property("searchParam", "@Conformance.rest.resource.searchParam", "Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam)); 2582 childrenList.add(new Property("operation", "", "Definition of an operation or a named query and with its parameters and their meaning and type.", 0, java.lang.Integer.MAX_VALUE, operation)); 2583 childrenList.add(new Property("compartment", "uri", "An absolute URI which is a reference to the definition of a compartment hosted by the system.", 0, java.lang.Integer.MAX_VALUE, compartment)); 2584 } 2585 2586 @Override 2587 public void setProperty(String name, Base value) throws FHIRException { 2588 if (name.equals("mode")) 2589 this.mode = new RestfulConformanceModeEnumFactory().fromType(value); // Enumeration<RestfulConformanceMode> 2590 else if (name.equals("documentation")) 2591 this.documentation = castToString(value); // StringType 2592 else if (name.equals("security")) 2593 this.security = (ConformanceRestSecurityComponent) value; // ConformanceRestSecurityComponent 2594 else if (name.equals("resource")) 2595 this.getResource().add((ConformanceRestResourceComponent) value); 2596 else if (name.equals("interaction")) 2597 this.getInteraction().add((SystemInteractionComponent) value); 2598 else if (name.equals("transactionMode")) 2599 this.transactionMode = new TransactionModeEnumFactory().fromType(value); // Enumeration<TransactionMode> 2600 else if (name.equals("searchParam")) 2601 this.getSearchParam().add((ConformanceRestResourceSearchParamComponent) value); 2602 else if (name.equals("operation")) 2603 this.getOperation().add((ConformanceRestOperationComponent) value); 2604 else if (name.equals("compartment")) 2605 this.getCompartment().add(castToUri(value)); 2606 else 2607 super.setProperty(name, value); 2608 } 2609 2610 @Override 2611 public Base addChild(String name) throws FHIRException { 2612 if (name.equals("mode")) { 2613 throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); 2614 } 2615 else if (name.equals("documentation")) { 2616 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 2617 } 2618 else if (name.equals("security")) { 2619 this.security = new ConformanceRestSecurityComponent(); 2620 return this.security; 2621 } 2622 else if (name.equals("resource")) { 2623 return addResource(); 2624 } 2625 else if (name.equals("interaction")) { 2626 return addInteraction(); 2627 } 2628 else if (name.equals("transactionMode")) { 2629 throw new FHIRException("Cannot call addChild on a primitive type Conformance.transactionMode"); 2630 } 2631 else if (name.equals("searchParam")) { 2632 return addSearchParam(); 2633 } 2634 else if (name.equals("operation")) { 2635 return addOperation(); 2636 } 2637 else if (name.equals("compartment")) { 2638 throw new FHIRException("Cannot call addChild on a primitive type Conformance.compartment"); 2639 } 2640 else 2641 return super.addChild(name); 2642 } 2643 2644 public ConformanceRestComponent copy() { 2645 ConformanceRestComponent dst = new ConformanceRestComponent(); 2646 copyValues(dst); 2647 dst.mode = mode == null ? null : mode.copy(); 2648 dst.documentation = documentation == null ? null : documentation.copy(); 2649 dst.security = security == null ? null : security.copy(); 2650 if (resource != null) { 2651 dst.resource = new ArrayList<ConformanceRestResourceComponent>(); 2652 for (ConformanceRestResourceComponent i : resource) 2653 dst.resource.add(i.copy()); 2654 }; 2655 if (interaction != null) { 2656 dst.interaction = new ArrayList<SystemInteractionComponent>(); 2657 for (SystemInteractionComponent i : interaction) 2658 dst.interaction.add(i.copy()); 2659 }; 2660 dst.transactionMode = transactionMode == null ? null : transactionMode.copy(); 2661 if (searchParam != null) { 2662 dst.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 2663 for (ConformanceRestResourceSearchParamComponent i : searchParam) 2664 dst.searchParam.add(i.copy()); 2665 }; 2666 if (operation != null) { 2667 dst.operation = new ArrayList<ConformanceRestOperationComponent>(); 2668 for (ConformanceRestOperationComponent i : operation) 2669 dst.operation.add(i.copy()); 2670 }; 2671 if (compartment != null) { 2672 dst.compartment = new ArrayList<UriType>(); 2673 for (UriType i : compartment) 2674 dst.compartment.add(i.copy()); 2675 }; 2676 return dst; 2677 } 2678 2679 @Override 2680 public boolean equalsDeep(Base other) { 2681 if (!super.equalsDeep(other)) 2682 return false; 2683 if (!(other instanceof ConformanceRestComponent)) 2684 return false; 2685 ConformanceRestComponent o = (ConformanceRestComponent) other; 2686 return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(security, o.security, true) 2687 && compareDeep(resource, o.resource, true) && compareDeep(interaction, o.interaction, true) && compareDeep(transactionMode, o.transactionMode, true) 2688 && compareDeep(searchParam, o.searchParam, true) && compareDeep(operation, o.operation, true) && compareDeep(compartment, o.compartment, true) 2689 ; 2690 } 2691 2692 @Override 2693 public boolean equalsShallow(Base other) { 2694 if (!super.equalsShallow(other)) 2695 return false; 2696 if (!(other instanceof ConformanceRestComponent)) 2697 return false; 2698 ConformanceRestComponent o = (ConformanceRestComponent) other; 2699 return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true) && compareValues(transactionMode, o.transactionMode, true) 2700 && compareValues(compartment, o.compartment, true); 2701 } 2702 2703 public boolean isEmpty() { 2704 return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) 2705 && (security == null || security.isEmpty()) && (resource == null || resource.isEmpty()) && (interaction == null || interaction.isEmpty()) 2706 && (transactionMode == null || transactionMode.isEmpty()) && (searchParam == null || searchParam.isEmpty()) 2707 && (operation == null || operation.isEmpty()) && (compartment == null || compartment.isEmpty()) 2708 ; 2709 } 2710 2711 public String fhirType() { 2712 return "Conformance.rest"; 2713 2714 } 2715 2716 } 2717 2718 @Block() 2719 public static class ConformanceRestSecurityComponent extends BackboneElement implements IBaseBackboneElement { 2720 /** 2721 * Server adds CORS headers when responding to requests - this enables javascript applications to use the server. 2722 */ 2723 @Child(name = "cors", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2724 @Description(shortDefinition="Adds CORS Headers (http://enable-cors.org/)", formalDefinition="Server adds CORS headers when responding to requests - this enables javascript applications to use the server." ) 2725 protected BooleanType cors; 2726 2727 /** 2728 * Types of security services are supported/required by the system. 2729 */ 2730 @Child(name = "service", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2731 @Description(shortDefinition="OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", formalDefinition="Types of security services are supported/required by the system." ) 2732 protected List<CodeableConcept> service; 2733 2734 /** 2735 * General description of how security works. 2736 */ 2737 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2738 @Description(shortDefinition="General description of how security works", formalDefinition="General description of how security works." ) 2739 protected StringType description; 2740 2741 /** 2742 * Certificates associated with security profiles. 2743 */ 2744 @Child(name = "certificate", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2745 @Description(shortDefinition="Certificates associated with security profiles", formalDefinition="Certificates associated with security profiles." ) 2746 protected List<ConformanceRestSecurityCertificateComponent> certificate; 2747 2748 private static final long serialVersionUID = 391663952L; 2749 2750 /* 2751 * Constructor 2752 */ 2753 public ConformanceRestSecurityComponent() { 2754 super(); 2755 } 2756 2757 /** 2758 * @return {@link #cors} (Server adds CORS headers when responding to requests - this enables javascript applications to use the server.). This is the underlying object with id, value and extensions. The accessor "getCors" gives direct access to the value 2759 */ 2760 public BooleanType getCorsElement() { 2761 if (this.cors == null) 2762 if (Configuration.errorOnAutoCreate()) 2763 throw new Error("Attempt to auto-create ConformanceRestSecurityComponent.cors"); 2764 else if (Configuration.doAutoCreate()) 2765 this.cors = new BooleanType(); // bb 2766 return this.cors; 2767 } 2768 2769 public boolean hasCorsElement() { 2770 return this.cors != null && !this.cors.isEmpty(); 2771 } 2772 2773 public boolean hasCors() { 2774 return this.cors != null && !this.cors.isEmpty(); 2775 } 2776 2777 /** 2778 * @param value {@link #cors} (Server adds CORS headers when responding to requests - this enables javascript applications to use the server.). This is the underlying object with id, value and extensions. The accessor "getCors" gives direct access to the value 2779 */ 2780 public ConformanceRestSecurityComponent setCorsElement(BooleanType value) { 2781 this.cors = value; 2782 return this; 2783 } 2784 2785 /** 2786 * @return Server adds CORS headers when responding to requests - this enables javascript applications to use the server. 2787 */ 2788 public boolean getCors() { 2789 return this.cors == null || this.cors.isEmpty() ? false : this.cors.getValue(); 2790 } 2791 2792 /** 2793 * @param value Server adds CORS headers when responding to requests - this enables javascript applications to use the server. 2794 */ 2795 public ConformanceRestSecurityComponent setCors(boolean value) { 2796 if (this.cors == null) 2797 this.cors = new BooleanType(); 2798 this.cors.setValue(value); 2799 return this; 2800 } 2801 2802 /** 2803 * @return {@link #service} (Types of security services are supported/required by the system.) 2804 */ 2805 public List<CodeableConcept> getService() { 2806 if (this.service == null) 2807 this.service = new ArrayList<CodeableConcept>(); 2808 return this.service; 2809 } 2810 2811 public boolean hasService() { 2812 if (this.service == null) 2813 return false; 2814 for (CodeableConcept item : this.service) 2815 if (!item.isEmpty()) 2816 return true; 2817 return false; 2818 } 2819 2820 /** 2821 * @return {@link #service} (Types of security services are supported/required by the system.) 2822 */ 2823 // syntactic sugar 2824 public CodeableConcept addService() { //3 2825 CodeableConcept t = new CodeableConcept(); 2826 if (this.service == null) 2827 this.service = new ArrayList<CodeableConcept>(); 2828 this.service.add(t); 2829 return t; 2830 } 2831 2832 // syntactic sugar 2833 public ConformanceRestSecurityComponent addService(CodeableConcept t) { //3 2834 if (t == null) 2835 return this; 2836 if (this.service == null) 2837 this.service = new ArrayList<CodeableConcept>(); 2838 this.service.add(t); 2839 return this; 2840 } 2841 2842 /** 2843 * @return {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2844 */ 2845 public StringType getDescriptionElement() { 2846 if (this.description == null) 2847 if (Configuration.errorOnAutoCreate()) 2848 throw new Error("Attempt to auto-create ConformanceRestSecurityComponent.description"); 2849 else if (Configuration.doAutoCreate()) 2850 this.description = new StringType(); // bb 2851 return this.description; 2852 } 2853 2854 public boolean hasDescriptionElement() { 2855 return this.description != null && !this.description.isEmpty(); 2856 } 2857 2858 public boolean hasDescription() { 2859 return this.description != null && !this.description.isEmpty(); 2860 } 2861 2862 /** 2863 * @param value {@link #description} (General description of how security works.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2864 */ 2865 public ConformanceRestSecurityComponent setDescriptionElement(StringType value) { 2866 this.description = value; 2867 return this; 2868 } 2869 2870 /** 2871 * @return General description of how security works. 2872 */ 2873 public String getDescription() { 2874 return this.description == null ? null : this.description.getValue(); 2875 } 2876 2877 /** 2878 * @param value General description of how security works. 2879 */ 2880 public ConformanceRestSecurityComponent setDescription(String value) { 2881 if (Utilities.noString(value)) 2882 this.description = null; 2883 else { 2884 if (this.description == null) 2885 this.description = new StringType(); 2886 this.description.setValue(value); 2887 } 2888 return this; 2889 } 2890 2891 /** 2892 * @return {@link #certificate} (Certificates associated with security profiles.) 2893 */ 2894 public List<ConformanceRestSecurityCertificateComponent> getCertificate() { 2895 if (this.certificate == null) 2896 this.certificate = new ArrayList<ConformanceRestSecurityCertificateComponent>(); 2897 return this.certificate; 2898 } 2899 2900 public boolean hasCertificate() { 2901 if (this.certificate == null) 2902 return false; 2903 for (ConformanceRestSecurityCertificateComponent item : this.certificate) 2904 if (!item.isEmpty()) 2905 return true; 2906 return false; 2907 } 2908 2909 /** 2910 * @return {@link #certificate} (Certificates associated with security profiles.) 2911 */ 2912 // syntactic sugar 2913 public ConformanceRestSecurityCertificateComponent addCertificate() { //3 2914 ConformanceRestSecurityCertificateComponent t = new ConformanceRestSecurityCertificateComponent(); 2915 if (this.certificate == null) 2916 this.certificate = new ArrayList<ConformanceRestSecurityCertificateComponent>(); 2917 this.certificate.add(t); 2918 return t; 2919 } 2920 2921 // syntactic sugar 2922 public ConformanceRestSecurityComponent addCertificate(ConformanceRestSecurityCertificateComponent t) { //3 2923 if (t == null) 2924 return this; 2925 if (this.certificate == null) 2926 this.certificate = new ArrayList<ConformanceRestSecurityCertificateComponent>(); 2927 this.certificate.add(t); 2928 return this; 2929 } 2930 2931 protected void listChildren(List<Property> childrenList) { 2932 super.listChildren(childrenList); 2933 childrenList.add(new Property("cors", "boolean", "Server adds CORS headers when responding to requests - this enables javascript applications to use the server.", 0, java.lang.Integer.MAX_VALUE, cors)); 2934 childrenList.add(new Property("service", "CodeableConcept", "Types of security services are supported/required by the system.", 0, java.lang.Integer.MAX_VALUE, service)); 2935 childrenList.add(new Property("description", "string", "General description of how security works.", 0, java.lang.Integer.MAX_VALUE, description)); 2936 childrenList.add(new Property("certificate", "", "Certificates associated with security profiles.", 0, java.lang.Integer.MAX_VALUE, certificate)); 2937 } 2938 2939 @Override 2940 public void setProperty(String name, Base value) throws FHIRException { 2941 if (name.equals("cors")) 2942 this.cors = castToBoolean(value); // BooleanType 2943 else if (name.equals("service")) 2944 this.getService().add(castToCodeableConcept(value)); 2945 else if (name.equals("description")) 2946 this.description = castToString(value); // StringType 2947 else if (name.equals("certificate")) 2948 this.getCertificate().add((ConformanceRestSecurityCertificateComponent) value); 2949 else 2950 super.setProperty(name, value); 2951 } 2952 2953 @Override 2954 public Base addChild(String name) throws FHIRException { 2955 if (name.equals("cors")) { 2956 throw new FHIRException("Cannot call addChild on a primitive type Conformance.cors"); 2957 } 2958 else if (name.equals("service")) { 2959 return addService(); 2960 } 2961 else if (name.equals("description")) { 2962 throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); 2963 } 2964 else if (name.equals("certificate")) { 2965 return addCertificate(); 2966 } 2967 else 2968 return super.addChild(name); 2969 } 2970 2971 public ConformanceRestSecurityComponent copy() { 2972 ConformanceRestSecurityComponent dst = new ConformanceRestSecurityComponent(); 2973 copyValues(dst); 2974 dst.cors = cors == null ? null : cors.copy(); 2975 if (service != null) { 2976 dst.service = new ArrayList<CodeableConcept>(); 2977 for (CodeableConcept i : service) 2978 dst.service.add(i.copy()); 2979 }; 2980 dst.description = description == null ? null : description.copy(); 2981 if (certificate != null) { 2982 dst.certificate = new ArrayList<ConformanceRestSecurityCertificateComponent>(); 2983 for (ConformanceRestSecurityCertificateComponent i : certificate) 2984 dst.certificate.add(i.copy()); 2985 }; 2986 return dst; 2987 } 2988 2989 @Override 2990 public boolean equalsDeep(Base other) { 2991 if (!super.equalsDeep(other)) 2992 return false; 2993 if (!(other instanceof ConformanceRestSecurityComponent)) 2994 return false; 2995 ConformanceRestSecurityComponent o = (ConformanceRestSecurityComponent) other; 2996 return compareDeep(cors, o.cors, true) && compareDeep(service, o.service, true) && compareDeep(description, o.description, true) 2997 && compareDeep(certificate, o.certificate, true); 2998 } 2999 3000 @Override 3001 public boolean equalsShallow(Base other) { 3002 if (!super.equalsShallow(other)) 3003 return false; 3004 if (!(other instanceof ConformanceRestSecurityComponent)) 3005 return false; 3006 ConformanceRestSecurityComponent o = (ConformanceRestSecurityComponent) other; 3007 return compareValues(cors, o.cors, true) && compareValues(description, o.description, true); 3008 } 3009 3010 public boolean isEmpty() { 3011 return super.isEmpty() && (cors == null || cors.isEmpty()) && (service == null || service.isEmpty()) 3012 && (description == null || description.isEmpty()) && (certificate == null || certificate.isEmpty()) 3013 ; 3014 } 3015 3016 public String fhirType() { 3017 return "Conformance.rest.security"; 3018 3019 } 3020 3021 } 3022 3023 @Block() 3024 public static class ConformanceRestSecurityCertificateComponent extends BackboneElement implements IBaseBackboneElement { 3025 /** 3026 * Mime type for certificate. 3027 */ 3028 @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) 3029 @Description(shortDefinition="Mime type for certificate", formalDefinition="Mime type for certificate." ) 3030 protected CodeType type; 3031 3032 /** 3033 * Actual certificate. 3034 */ 3035 @Child(name = "blob", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3036 @Description(shortDefinition="Actual certificate", formalDefinition="Actual certificate." ) 3037 protected Base64BinaryType blob; 3038 3039 private static final long serialVersionUID = 2092655854L; 3040 3041 /* 3042 * Constructor 3043 */ 3044 public ConformanceRestSecurityCertificateComponent() { 3045 super(); 3046 } 3047 3048 /** 3049 * @return {@link #type} (Mime type for certificate.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 3050 */ 3051 public CodeType getTypeElement() { 3052 if (this.type == null) 3053 if (Configuration.errorOnAutoCreate()) 3054 throw new Error("Attempt to auto-create ConformanceRestSecurityCertificateComponent.type"); 3055 else if (Configuration.doAutoCreate()) 3056 this.type = new CodeType(); // bb 3057 return this.type; 3058 } 3059 3060 public boolean hasTypeElement() { 3061 return this.type != null && !this.type.isEmpty(); 3062 } 3063 3064 public boolean hasType() { 3065 return this.type != null && !this.type.isEmpty(); 3066 } 3067 3068 /** 3069 * @param value {@link #type} (Mime type for certificate.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 3070 */ 3071 public ConformanceRestSecurityCertificateComponent setTypeElement(CodeType value) { 3072 this.type = value; 3073 return this; 3074 } 3075 3076 /** 3077 * @return Mime type for certificate. 3078 */ 3079 public String getType() { 3080 return this.type == null ? null : this.type.getValue(); 3081 } 3082 3083 /** 3084 * @param value Mime type for certificate. 3085 */ 3086 public ConformanceRestSecurityCertificateComponent setType(String value) { 3087 if (Utilities.noString(value)) 3088 this.type = null; 3089 else { 3090 if (this.type == null) 3091 this.type = new CodeType(); 3092 this.type.setValue(value); 3093 } 3094 return this; 3095 } 3096 3097 /** 3098 * @return {@link #blob} (Actual certificate.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value 3099 */ 3100 public Base64BinaryType getBlobElement() { 3101 if (this.blob == null) 3102 if (Configuration.errorOnAutoCreate()) 3103 throw new Error("Attempt to auto-create ConformanceRestSecurityCertificateComponent.blob"); 3104 else if (Configuration.doAutoCreate()) 3105 this.blob = new Base64BinaryType(); // bb 3106 return this.blob; 3107 } 3108 3109 public boolean hasBlobElement() { 3110 return this.blob != null && !this.blob.isEmpty(); 3111 } 3112 3113 public boolean hasBlob() { 3114 return this.blob != null && !this.blob.isEmpty(); 3115 } 3116 3117 /** 3118 * @param value {@link #blob} (Actual certificate.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value 3119 */ 3120 public ConformanceRestSecurityCertificateComponent setBlobElement(Base64BinaryType value) { 3121 this.blob = value; 3122 return this; 3123 } 3124 3125 /** 3126 * @return Actual certificate. 3127 */ 3128 public byte[] getBlob() { 3129 return this.blob == null ? null : this.blob.getValue(); 3130 } 3131 3132 /** 3133 * @param value Actual certificate. 3134 */ 3135 public ConformanceRestSecurityCertificateComponent setBlob(byte[] value) { 3136 if (value == null) 3137 this.blob = null; 3138 else { 3139 if (this.blob == null) 3140 this.blob = new Base64BinaryType(); 3141 this.blob.setValue(value); 3142 } 3143 return this; 3144 } 3145 3146 protected void listChildren(List<Property> childrenList) { 3147 super.listChildren(childrenList); 3148 childrenList.add(new Property("type", "code", "Mime type for certificate.", 0, java.lang.Integer.MAX_VALUE, type)); 3149 childrenList.add(new Property("blob", "base64Binary", "Actual certificate.", 0, java.lang.Integer.MAX_VALUE, blob)); 3150 } 3151 3152 @Override 3153 public void setProperty(String name, Base value) throws FHIRException { 3154 if (name.equals("type")) 3155 this.type = castToCode(value); // CodeType 3156 else if (name.equals("blob")) 3157 this.blob = castToBase64Binary(value); // Base64BinaryType 3158 else 3159 super.setProperty(name, value); 3160 } 3161 3162 @Override 3163 public Base addChild(String name) throws FHIRException { 3164 if (name.equals("type")) { 3165 throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); 3166 } 3167 else if (name.equals("blob")) { 3168 throw new FHIRException("Cannot call addChild on a primitive type Conformance.blob"); 3169 } 3170 else 3171 return super.addChild(name); 3172 } 3173 3174 public ConformanceRestSecurityCertificateComponent copy() { 3175 ConformanceRestSecurityCertificateComponent dst = new ConformanceRestSecurityCertificateComponent(); 3176 copyValues(dst); 3177 dst.type = type == null ? null : type.copy(); 3178 dst.blob = blob == null ? null : blob.copy(); 3179 return dst; 3180 } 3181 3182 @Override 3183 public boolean equalsDeep(Base other) { 3184 if (!super.equalsDeep(other)) 3185 return false; 3186 if (!(other instanceof ConformanceRestSecurityCertificateComponent)) 3187 return false; 3188 ConformanceRestSecurityCertificateComponent o = (ConformanceRestSecurityCertificateComponent) other; 3189 return compareDeep(type, o.type, true) && compareDeep(blob, o.blob, true); 3190 } 3191 3192 @Override 3193 public boolean equalsShallow(Base other) { 3194 if (!super.equalsShallow(other)) 3195 return false; 3196 if (!(other instanceof ConformanceRestSecurityCertificateComponent)) 3197 return false; 3198 ConformanceRestSecurityCertificateComponent o = (ConformanceRestSecurityCertificateComponent) other; 3199 return compareValues(type, o.type, true) && compareValues(blob, o.blob, true); 3200 } 3201 3202 public boolean isEmpty() { 3203 return super.isEmpty() && (type == null || type.isEmpty()) && (blob == null || blob.isEmpty()) 3204 ; 3205 } 3206 3207 public String fhirType() { 3208 return "Conformance.rest.security.certificate"; 3209 3210 } 3211 3212 } 3213 3214 @Block() 3215 public static class ConformanceRestResourceComponent extends BackboneElement implements IBaseBackboneElement { 3216 /** 3217 * A type of resource exposed via the restful interface. 3218 */ 3219 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 3220 @Description(shortDefinition="A resource type that is supported", formalDefinition="A type of resource exposed via the restful interface." ) 3221 protected CodeType type; 3222 3223 /** 3224 * A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}. 3225 */ 3226 @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=0, max=1, modifier=false, summary=false) 3227 @Description(shortDefinition="Base System profile for all uses of resource", formalDefinition="A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}." ) 3228 protected Reference profile; 3229 3230 /** 3231 * The actual object that is the target of the reference (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 3232 */ 3233 protected StructureDefinition profileTarget; 3234 3235 /** 3236 * Identifies a restful operation supported by the solution. 3237 */ 3238 @Child(name = "interaction", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3239 @Description(shortDefinition="What operations are supported?", formalDefinition="Identifies a restful operation supported by the solution." ) 3240 protected List<ResourceInteractionComponent> interaction; 3241 3242 /** 3243 * This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API. 3244 */ 3245 @Child(name = "versioning", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3246 @Description(shortDefinition="no-version | versioned | versioned-update", formalDefinition="This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API." ) 3247 protected Enumeration<ResourceVersionPolicy> versioning; 3248 3249 /** 3250 * A flag for whether the server is able to return past versions as part of the vRead operation. 3251 */ 3252 @Child(name = "readHistory", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) 3253 @Description(shortDefinition="Whether vRead can return past versions", formalDefinition="A flag for whether the server is able to return past versions as part of the vRead operation." ) 3254 protected BooleanType readHistory; 3255 3256 /** 3257 * A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. 3258 */ 3259 @Child(name = "updateCreate", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) 3260 @Description(shortDefinition="If update can commit to a new identity", formalDefinition="A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server." ) 3261 protected BooleanType updateCreate; 3262 3263 /** 3264 * A flag that indicates that the server supports conditional create. 3265 */ 3266 @Child(name = "conditionalCreate", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) 3267 @Description(shortDefinition="If allows/uses conditional create", formalDefinition="A flag that indicates that the server supports conditional create." ) 3268 protected BooleanType conditionalCreate; 3269 3270 /** 3271 * A flag that indicates that the server supports conditional update. 3272 */ 3273 @Child(name = "conditionalUpdate", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 3274 @Description(shortDefinition="If allows/uses conditional update", formalDefinition="A flag that indicates that the server supports conditional update." ) 3275 protected BooleanType conditionalUpdate; 3276 3277 /** 3278 * A code that indicates how the server supports conditional delete. 3279 */ 3280 @Child(name = "conditionalDelete", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false) 3281 @Description(shortDefinition="not-supported | single | multiple - how conditional delete is supported", formalDefinition="A code that indicates how the server supports conditional delete." ) 3282 protected Enumeration<ConditionalDeleteStatus> conditionalDelete; 3283 3284 /** 3285 * A list of _include values supported by the server. 3286 */ 3287 @Child(name = "searchInclude", type = {StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3288 @Description(shortDefinition="_include values supported by the server", formalDefinition="A list of _include values supported by the server." ) 3289 protected List<StringType> searchInclude; 3290 3291 /** 3292 * A list of _revinclude (reverse include) values supported by the server. 3293 */ 3294 @Child(name = "searchRevInclude", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3295 @Description(shortDefinition="_revinclude values supported by the server", formalDefinition="A list of _revinclude (reverse include) values supported by the server." ) 3296 protected List<StringType> searchRevInclude; 3297 3298 /** 3299 * Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation. 3300 */ 3301 @Child(name = "searchParam", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3302 @Description(shortDefinition="Search params supported by implementation", formalDefinition="Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation." ) 3303 protected List<ConformanceRestResourceSearchParamComponent> searchParam; 3304 3305 private static final long serialVersionUID = 1781959905L; 3306 3307 /* 3308 * Constructor 3309 */ 3310 public ConformanceRestResourceComponent() { 3311 super(); 3312 } 3313 3314 /* 3315 * Constructor 3316 */ 3317 public ConformanceRestResourceComponent(CodeType type) { 3318 super(); 3319 this.type = type; 3320 } 3321 3322 /** 3323 * @return {@link #type} (A type of resource exposed via the restful interface.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 3324 */ 3325 public CodeType getTypeElement() { 3326 if (this.type == null) 3327 if (Configuration.errorOnAutoCreate()) 3328 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.type"); 3329 else if (Configuration.doAutoCreate()) 3330 this.type = new CodeType(); // bb 3331 return this.type; 3332 } 3333 3334 public boolean hasTypeElement() { 3335 return this.type != null && !this.type.isEmpty(); 3336 } 3337 3338 public boolean hasType() { 3339 return this.type != null && !this.type.isEmpty(); 3340 } 3341 3342 /** 3343 * @param value {@link #type} (A type of resource exposed via the restful interface.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 3344 */ 3345 public ConformanceRestResourceComponent setTypeElement(CodeType value) { 3346 this.type = value; 3347 return this; 3348 } 3349 3350 /** 3351 * @return A type of resource exposed via the restful interface. 3352 */ 3353 public String getType() { 3354 return this.type == null ? null : this.type.getValue(); 3355 } 3356 3357 /** 3358 * @param value A type of resource exposed via the restful interface. 3359 */ 3360 public ConformanceRestResourceComponent setType(String value) { 3361 if (this.type == null) 3362 this.type = new CodeType(); 3363 this.type.setValue(value); 3364 return this; 3365 } 3366 3367 /** 3368 * @return {@link #profile} (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 3369 */ 3370 public Reference getProfile() { 3371 if (this.profile == null) 3372 if (Configuration.errorOnAutoCreate()) 3373 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.profile"); 3374 else if (Configuration.doAutoCreate()) 3375 this.profile = new Reference(); // cc 3376 return this.profile; 3377 } 3378 3379 public boolean hasProfile() { 3380 return this.profile != null && !this.profile.isEmpty(); 3381 } 3382 3383 /** 3384 * @param value {@link #profile} (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 3385 */ 3386 public ConformanceRestResourceComponent setProfile(Reference value) { 3387 this.profile = value; 3388 return this; 3389 } 3390 3391 /** 3392 * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 3393 */ 3394 public StructureDefinition getProfileTarget() { 3395 if (this.profileTarget == null) 3396 if (Configuration.errorOnAutoCreate()) 3397 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.profile"); 3398 else if (Configuration.doAutoCreate()) 3399 this.profileTarget = new StructureDefinition(); // aa 3400 return this.profileTarget; 3401 } 3402 3403 /** 3404 * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 3405 */ 3406 public ConformanceRestResourceComponent setProfileTarget(StructureDefinition value) { 3407 this.profileTarget = value; 3408 return this; 3409 } 3410 3411 /** 3412 * @return {@link #interaction} (Identifies a restful operation supported by the solution.) 3413 */ 3414 public List<ResourceInteractionComponent> getInteraction() { 3415 if (this.interaction == null) 3416 this.interaction = new ArrayList<ResourceInteractionComponent>(); 3417 return this.interaction; 3418 } 3419 3420 public boolean hasInteraction() { 3421 if (this.interaction == null) 3422 return false; 3423 for (ResourceInteractionComponent item : this.interaction) 3424 if (!item.isEmpty()) 3425 return true; 3426 return false; 3427 } 3428 3429 /** 3430 * @return {@link #interaction} (Identifies a restful operation supported by the solution.) 3431 */ 3432 // syntactic sugar 3433 public ResourceInteractionComponent addInteraction() { //3 3434 ResourceInteractionComponent t = new ResourceInteractionComponent(); 3435 if (this.interaction == null) 3436 this.interaction = new ArrayList<ResourceInteractionComponent>(); 3437 this.interaction.add(t); 3438 return t; 3439 } 3440 3441 // syntactic sugar 3442 public ConformanceRestResourceComponent addInteraction(ResourceInteractionComponent t) { //3 3443 if (t == null) 3444 return this; 3445 if (this.interaction == null) 3446 this.interaction = new ArrayList<ResourceInteractionComponent>(); 3447 this.interaction.add(t); 3448 return this; 3449 } 3450 3451 /** 3452 * @return {@link #versioning} (This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value 3453 */ 3454 public Enumeration<ResourceVersionPolicy> getVersioningElement() { 3455 if (this.versioning == null) 3456 if (Configuration.errorOnAutoCreate()) 3457 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.versioning"); 3458 else if (Configuration.doAutoCreate()) 3459 this.versioning = new Enumeration<ResourceVersionPolicy>(new ResourceVersionPolicyEnumFactory()); // bb 3460 return this.versioning; 3461 } 3462 3463 public boolean hasVersioningElement() { 3464 return this.versioning != null && !this.versioning.isEmpty(); 3465 } 3466 3467 public boolean hasVersioning() { 3468 return this.versioning != null && !this.versioning.isEmpty(); 3469 } 3470 3471 /** 3472 * @param value {@link #versioning} (This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value 3473 */ 3474 public ConformanceRestResourceComponent setVersioningElement(Enumeration<ResourceVersionPolicy> value) { 3475 this.versioning = value; 3476 return this; 3477 } 3478 3479 /** 3480 * @return This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API. 3481 */ 3482 public ResourceVersionPolicy getVersioning() { 3483 return this.versioning == null ? null : this.versioning.getValue(); 3484 } 3485 3486 /** 3487 * @param value This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API. 3488 */ 3489 public ConformanceRestResourceComponent setVersioning(ResourceVersionPolicy value) { 3490 if (value == null) 3491 this.versioning = null; 3492 else { 3493 if (this.versioning == null) 3494 this.versioning = new Enumeration<ResourceVersionPolicy>(new ResourceVersionPolicyEnumFactory()); 3495 this.versioning.setValue(value); 3496 } 3497 return this; 3498 } 3499 3500 /** 3501 * @return {@link #readHistory} (A flag for whether the server is able to return past versions as part of the vRead operation.). This is the underlying object with id, value and extensions. The accessor "getReadHistory" gives direct access to the value 3502 */ 3503 public BooleanType getReadHistoryElement() { 3504 if (this.readHistory == null) 3505 if (Configuration.errorOnAutoCreate()) 3506 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.readHistory"); 3507 else if (Configuration.doAutoCreate()) 3508 this.readHistory = new BooleanType(); // bb 3509 return this.readHistory; 3510 } 3511 3512 public boolean hasReadHistoryElement() { 3513 return this.readHistory != null && !this.readHistory.isEmpty(); 3514 } 3515 3516 public boolean hasReadHistory() { 3517 return this.readHistory != null && !this.readHistory.isEmpty(); 3518 } 3519 3520 /** 3521 * @param value {@link #readHistory} (A flag for whether the server is able to return past versions as part of the vRead operation.). This is the underlying object with id, value and extensions. The accessor "getReadHistory" gives direct access to the value 3522 */ 3523 public ConformanceRestResourceComponent setReadHistoryElement(BooleanType value) { 3524 this.readHistory = value; 3525 return this; 3526 } 3527 3528 /** 3529 * @return A flag for whether the server is able to return past versions as part of the vRead operation. 3530 */ 3531 public boolean getReadHistory() { 3532 return this.readHistory == null || this.readHistory.isEmpty() ? false : this.readHistory.getValue(); 3533 } 3534 3535 /** 3536 * @param value A flag for whether the server is able to return past versions as part of the vRead operation. 3537 */ 3538 public ConformanceRestResourceComponent setReadHistory(boolean value) { 3539 if (this.readHistory == null) 3540 this.readHistory = new BooleanType(); 3541 this.readHistory.setValue(value); 3542 return this; 3543 } 3544 3545 /** 3546 * @return {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value 3547 */ 3548 public BooleanType getUpdateCreateElement() { 3549 if (this.updateCreate == null) 3550 if (Configuration.errorOnAutoCreate()) 3551 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.updateCreate"); 3552 else if (Configuration.doAutoCreate()) 3553 this.updateCreate = new BooleanType(); // bb 3554 return this.updateCreate; 3555 } 3556 3557 public boolean hasUpdateCreateElement() { 3558 return this.updateCreate != null && !this.updateCreate.isEmpty(); 3559 } 3560 3561 public boolean hasUpdateCreate() { 3562 return this.updateCreate != null && !this.updateCreate.isEmpty(); 3563 } 3564 3565 /** 3566 * @param value {@link #updateCreate} (A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.). This is the underlying object with id, value and extensions. The accessor "getUpdateCreate" gives direct access to the value 3567 */ 3568 public ConformanceRestResourceComponent setUpdateCreateElement(BooleanType value) { 3569 this.updateCreate = value; 3570 return this; 3571 } 3572 3573 /** 3574 * @return A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. 3575 */ 3576 public boolean getUpdateCreate() { 3577 return this.updateCreate == null || this.updateCreate.isEmpty() ? false : this.updateCreate.getValue(); 3578 } 3579 3580 /** 3581 * @param value A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server. 3582 */ 3583 public ConformanceRestResourceComponent setUpdateCreate(boolean value) { 3584 if (this.updateCreate == null) 3585 this.updateCreate = new BooleanType(); 3586 this.updateCreate.setValue(value); 3587 return this; 3588 } 3589 3590 /** 3591 * @return {@link #conditionalCreate} (A flag that indicates that the server supports conditional create.). This is the underlying object with id, value and extensions. The accessor "getConditionalCreate" gives direct access to the value 3592 */ 3593 public BooleanType getConditionalCreateElement() { 3594 if (this.conditionalCreate == null) 3595 if (Configuration.errorOnAutoCreate()) 3596 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.conditionalCreate"); 3597 else if (Configuration.doAutoCreate()) 3598 this.conditionalCreate = new BooleanType(); // bb 3599 return this.conditionalCreate; 3600 } 3601 3602 public boolean hasConditionalCreateElement() { 3603 return this.conditionalCreate != null && !this.conditionalCreate.isEmpty(); 3604 } 3605 3606 public boolean hasConditionalCreate() { 3607 return this.conditionalCreate != null && !this.conditionalCreate.isEmpty(); 3608 } 3609 3610 /** 3611 * @param value {@link #conditionalCreate} (A flag that indicates that the server supports conditional create.). This is the underlying object with id, value and extensions. The accessor "getConditionalCreate" gives direct access to the value 3612 */ 3613 public ConformanceRestResourceComponent setConditionalCreateElement(BooleanType value) { 3614 this.conditionalCreate = value; 3615 return this; 3616 } 3617 3618 /** 3619 * @return A flag that indicates that the server supports conditional create. 3620 */ 3621 public boolean getConditionalCreate() { 3622 return this.conditionalCreate == null || this.conditionalCreate.isEmpty() ? false : this.conditionalCreate.getValue(); 3623 } 3624 3625 /** 3626 * @param value A flag that indicates that the server supports conditional create. 3627 */ 3628 public ConformanceRestResourceComponent setConditionalCreate(boolean value) { 3629 if (this.conditionalCreate == null) 3630 this.conditionalCreate = new BooleanType(); 3631 this.conditionalCreate.setValue(value); 3632 return this; 3633 } 3634 3635 /** 3636 * @return {@link #conditionalUpdate} (A flag that indicates that the server supports conditional update.). This is the underlying object with id, value and extensions. The accessor "getConditionalUpdate" gives direct access to the value 3637 */ 3638 public BooleanType getConditionalUpdateElement() { 3639 if (this.conditionalUpdate == null) 3640 if (Configuration.errorOnAutoCreate()) 3641 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.conditionalUpdate"); 3642 else if (Configuration.doAutoCreate()) 3643 this.conditionalUpdate = new BooleanType(); // bb 3644 return this.conditionalUpdate; 3645 } 3646 3647 public boolean hasConditionalUpdateElement() { 3648 return this.conditionalUpdate != null && !this.conditionalUpdate.isEmpty(); 3649 } 3650 3651 public boolean hasConditionalUpdate() { 3652 return this.conditionalUpdate != null && !this.conditionalUpdate.isEmpty(); 3653 } 3654 3655 /** 3656 * @param value {@link #conditionalUpdate} (A flag that indicates that the server supports conditional update.). This is the underlying object with id, value and extensions. The accessor "getConditionalUpdate" gives direct access to the value 3657 */ 3658 public ConformanceRestResourceComponent setConditionalUpdateElement(BooleanType value) { 3659 this.conditionalUpdate = value; 3660 return this; 3661 } 3662 3663 /** 3664 * @return A flag that indicates that the server supports conditional update. 3665 */ 3666 public boolean getConditionalUpdate() { 3667 return this.conditionalUpdate == null || this.conditionalUpdate.isEmpty() ? false : this.conditionalUpdate.getValue(); 3668 } 3669 3670 /** 3671 * @param value A flag that indicates that the server supports conditional update. 3672 */ 3673 public ConformanceRestResourceComponent setConditionalUpdate(boolean value) { 3674 if (this.conditionalUpdate == null) 3675 this.conditionalUpdate = new BooleanType(); 3676 this.conditionalUpdate.setValue(value); 3677 return this; 3678 } 3679 3680 /** 3681 * @return {@link #conditionalDelete} (A code that indicates how the server supports conditional delete.). This is the underlying object with id, value and extensions. The accessor "getConditionalDelete" gives direct access to the value 3682 */ 3683 public Enumeration<ConditionalDeleteStatus> getConditionalDeleteElement() { 3684 if (this.conditionalDelete == null) 3685 if (Configuration.errorOnAutoCreate()) 3686 throw new Error("Attempt to auto-create ConformanceRestResourceComponent.conditionalDelete"); 3687 else if (Configuration.doAutoCreate()) 3688 this.conditionalDelete = new Enumeration<ConditionalDeleteStatus>(new ConditionalDeleteStatusEnumFactory()); // bb 3689 return this.conditionalDelete; 3690 } 3691 3692 public boolean hasConditionalDeleteElement() { 3693 return this.conditionalDelete != null && !this.conditionalDelete.isEmpty(); 3694 } 3695 3696 public boolean hasConditionalDelete() { 3697 return this.conditionalDelete != null && !this.conditionalDelete.isEmpty(); 3698 } 3699 3700 /** 3701 * @param value {@link #conditionalDelete} (A code that indicates how the server supports conditional delete.). This is the underlying object with id, value and extensions. The accessor "getConditionalDelete" gives direct access to the value 3702 */ 3703 public ConformanceRestResourceComponent setConditionalDeleteElement(Enumeration<ConditionalDeleteStatus> value) { 3704 this.conditionalDelete = value; 3705 return this; 3706 } 3707 3708 /** 3709 * @return A code that indicates how the server supports conditional delete. 3710 */ 3711 public ConditionalDeleteStatus getConditionalDelete() { 3712 return this.conditionalDelete == null ? null : this.conditionalDelete.getValue(); 3713 } 3714 3715 /** 3716 * @param value A code that indicates how the server supports conditional delete. 3717 */ 3718 public ConformanceRestResourceComponent setConditionalDelete(ConditionalDeleteStatus value) { 3719 if (value == null) 3720 this.conditionalDelete = null; 3721 else { 3722 if (this.conditionalDelete == null) 3723 this.conditionalDelete = new Enumeration<ConditionalDeleteStatus>(new ConditionalDeleteStatusEnumFactory()); 3724 this.conditionalDelete.setValue(value); 3725 } 3726 return this; 3727 } 3728 3729 /** 3730 * @return {@link #searchInclude} (A list of _include values supported by the server.) 3731 */ 3732 public List<StringType> getSearchInclude() { 3733 if (this.searchInclude == null) 3734 this.searchInclude = new ArrayList<StringType>(); 3735 return this.searchInclude; 3736 } 3737 3738 public boolean hasSearchInclude() { 3739 if (this.searchInclude == null) 3740 return false; 3741 for (StringType item : this.searchInclude) 3742 if (!item.isEmpty()) 3743 return true; 3744 return false; 3745 } 3746 3747 /** 3748 * @return {@link #searchInclude} (A list of _include values supported by the server.) 3749 */ 3750 // syntactic sugar 3751 public StringType addSearchIncludeElement() {//2 3752 StringType t = new StringType(); 3753 if (this.searchInclude == null) 3754 this.searchInclude = new ArrayList<StringType>(); 3755 this.searchInclude.add(t); 3756 return t; 3757 } 3758 3759 /** 3760 * @param value {@link #searchInclude} (A list of _include values supported by the server.) 3761 */ 3762 public ConformanceRestResourceComponent addSearchInclude(String value) { //1 3763 StringType t = new StringType(); 3764 t.setValue(value); 3765 if (this.searchInclude == null) 3766 this.searchInclude = new ArrayList<StringType>(); 3767 this.searchInclude.add(t); 3768 return this; 3769 } 3770 3771 /** 3772 * @param value {@link #searchInclude} (A list of _include values supported by the server.) 3773 */ 3774 public boolean hasSearchInclude(String value) { 3775 if (this.searchInclude == null) 3776 return false; 3777 for (StringType v : this.searchInclude) 3778 if (v.equals(value)) // string 3779 return true; 3780 return false; 3781 } 3782 3783 /** 3784 * @return {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) 3785 */ 3786 public List<StringType> getSearchRevInclude() { 3787 if (this.searchRevInclude == null) 3788 this.searchRevInclude = new ArrayList<StringType>(); 3789 return this.searchRevInclude; 3790 } 3791 3792 public boolean hasSearchRevInclude() { 3793 if (this.searchRevInclude == null) 3794 return false; 3795 for (StringType item : this.searchRevInclude) 3796 if (!item.isEmpty()) 3797 return true; 3798 return false; 3799 } 3800 3801 /** 3802 * @return {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) 3803 */ 3804 // syntactic sugar 3805 public StringType addSearchRevIncludeElement() {//2 3806 StringType t = new StringType(); 3807 if (this.searchRevInclude == null) 3808 this.searchRevInclude = new ArrayList<StringType>(); 3809 this.searchRevInclude.add(t); 3810 return t; 3811 } 3812 3813 /** 3814 * @param value {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) 3815 */ 3816 public ConformanceRestResourceComponent addSearchRevInclude(String value) { //1 3817 StringType t = new StringType(); 3818 t.setValue(value); 3819 if (this.searchRevInclude == null) 3820 this.searchRevInclude = new ArrayList<StringType>(); 3821 this.searchRevInclude.add(t); 3822 return this; 3823 } 3824 3825 /** 3826 * @param value {@link #searchRevInclude} (A list of _revinclude (reverse include) values supported by the server.) 3827 */ 3828 public boolean hasSearchRevInclude(String value) { 3829 if (this.searchRevInclude == null) 3830 return false; 3831 for (StringType v : this.searchRevInclude) 3832 if (v.equals(value)) // string 3833 return true; 3834 return false; 3835 } 3836 3837 /** 3838 * @return {@link #searchParam} (Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) 3839 */ 3840 public List<ConformanceRestResourceSearchParamComponent> getSearchParam() { 3841 if (this.searchParam == null) 3842 this.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 3843 return this.searchParam; 3844 } 3845 3846 public boolean hasSearchParam() { 3847 if (this.searchParam == null) 3848 return false; 3849 for (ConformanceRestResourceSearchParamComponent item : this.searchParam) 3850 if (!item.isEmpty()) 3851 return true; 3852 return false; 3853 } 3854 3855 /** 3856 * @return {@link #searchParam} (Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.) 3857 */ 3858 // syntactic sugar 3859 public ConformanceRestResourceSearchParamComponent addSearchParam() { //3 3860 ConformanceRestResourceSearchParamComponent t = new ConformanceRestResourceSearchParamComponent(); 3861 if (this.searchParam == null) 3862 this.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 3863 this.searchParam.add(t); 3864 return t; 3865 } 3866 3867 // syntactic sugar 3868 public ConformanceRestResourceComponent addSearchParam(ConformanceRestResourceSearchParamComponent t) { //3 3869 if (t == null) 3870 return this; 3871 if (this.searchParam == null) 3872 this.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 3873 this.searchParam.add(t); 3874 return this; 3875 } 3876 3877 protected void listChildren(List<Property> childrenList) { 3878 super.listChildren(childrenList); 3879 childrenList.add(new Property("type", "code", "A type of resource exposed via the restful interface.", 0, java.lang.Integer.MAX_VALUE, type)); 3880 childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", 0, java.lang.Integer.MAX_VALUE, profile)); 3881 childrenList.add(new Property("interaction", "", "Identifies a restful operation supported by the solution.", 0, java.lang.Integer.MAX_VALUE, interaction)); 3882 childrenList.add(new Property("versioning", "code", "This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API.", 0, java.lang.Integer.MAX_VALUE, versioning)); 3883 childrenList.add(new Property("readHistory", "boolean", "A flag for whether the server is able to return past versions as part of the vRead operation.", 0, java.lang.Integer.MAX_VALUE, readHistory)); 3884 childrenList.add(new Property("updateCreate", "boolean", "A flag to indicate that the server allows or needs to allow the client to create new identities on the server (e.g. that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server.", 0, java.lang.Integer.MAX_VALUE, updateCreate)); 3885 childrenList.add(new Property("conditionalCreate", "boolean", "A flag that indicates that the server supports conditional create.", 0, java.lang.Integer.MAX_VALUE, conditionalCreate)); 3886 childrenList.add(new Property("conditionalUpdate", "boolean", "A flag that indicates that the server supports conditional update.", 0, java.lang.Integer.MAX_VALUE, conditionalUpdate)); 3887 childrenList.add(new Property("conditionalDelete", "code", "A code that indicates how the server supports conditional delete.", 0, java.lang.Integer.MAX_VALUE, conditionalDelete)); 3888 childrenList.add(new Property("searchInclude", "string", "A list of _include values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchInclude)); 3889 childrenList.add(new Property("searchRevInclude", "string", "A list of _revinclude (reverse include) values supported by the server.", 0, java.lang.Integer.MAX_VALUE, searchRevInclude)); 3890 childrenList.add(new Property("searchParam", "", "Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam)); 3891 } 3892 3893 @Override 3894 public void setProperty(String name, Base value) throws FHIRException { 3895 if (name.equals("type")) 3896 this.type = castToCode(value); // CodeType 3897 else if (name.equals("profile")) 3898 this.profile = castToReference(value); // Reference 3899 else if (name.equals("interaction")) 3900 this.getInteraction().add((ResourceInteractionComponent) value); 3901 else if (name.equals("versioning")) 3902 this.versioning = new ResourceVersionPolicyEnumFactory().fromType(value); // Enumeration<ResourceVersionPolicy> 3903 else if (name.equals("readHistory")) 3904 this.readHistory = castToBoolean(value); // BooleanType 3905 else if (name.equals("updateCreate")) 3906 this.updateCreate = castToBoolean(value); // BooleanType 3907 else if (name.equals("conditionalCreate")) 3908 this.conditionalCreate = castToBoolean(value); // BooleanType 3909 else if (name.equals("conditionalUpdate")) 3910 this.conditionalUpdate = castToBoolean(value); // BooleanType 3911 else if (name.equals("conditionalDelete")) 3912 this.conditionalDelete = new ConditionalDeleteStatusEnumFactory().fromType(value); // Enumeration<ConditionalDeleteStatus> 3913 else if (name.equals("searchInclude")) 3914 this.getSearchInclude().add(castToString(value)); 3915 else if (name.equals("searchRevInclude")) 3916 this.getSearchRevInclude().add(castToString(value)); 3917 else if (name.equals("searchParam")) 3918 this.getSearchParam().add((ConformanceRestResourceSearchParamComponent) value); 3919 else 3920 super.setProperty(name, value); 3921 } 3922 3923 @Override 3924 public Base addChild(String name) throws FHIRException { 3925 if (name.equals("type")) { 3926 throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); 3927 } 3928 else if (name.equals("profile")) { 3929 this.profile = new Reference(); 3930 return this.profile; 3931 } 3932 else if (name.equals("interaction")) { 3933 return addInteraction(); 3934 } 3935 else if (name.equals("versioning")) { 3936 throw new FHIRException("Cannot call addChild on a primitive type Conformance.versioning"); 3937 } 3938 else if (name.equals("readHistory")) { 3939 throw new FHIRException("Cannot call addChild on a primitive type Conformance.readHistory"); 3940 } 3941 else if (name.equals("updateCreate")) { 3942 throw new FHIRException("Cannot call addChild on a primitive type Conformance.updateCreate"); 3943 } 3944 else if (name.equals("conditionalCreate")) { 3945 throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalCreate"); 3946 } 3947 else if (name.equals("conditionalUpdate")) { 3948 throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalUpdate"); 3949 } 3950 else if (name.equals("conditionalDelete")) { 3951 throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalDelete"); 3952 } 3953 else if (name.equals("searchInclude")) { 3954 throw new FHIRException("Cannot call addChild on a primitive type Conformance.searchInclude"); 3955 } 3956 else if (name.equals("searchRevInclude")) { 3957 throw new FHIRException("Cannot call addChild on a primitive type Conformance.searchRevInclude"); 3958 } 3959 else if (name.equals("searchParam")) { 3960 return addSearchParam(); 3961 } 3962 else 3963 return super.addChild(name); 3964 } 3965 3966 public ConformanceRestResourceComponent copy() { 3967 ConformanceRestResourceComponent dst = new ConformanceRestResourceComponent(); 3968 copyValues(dst); 3969 dst.type = type == null ? null : type.copy(); 3970 dst.profile = profile == null ? null : profile.copy(); 3971 if (interaction != null) { 3972 dst.interaction = new ArrayList<ResourceInteractionComponent>(); 3973 for (ResourceInteractionComponent i : interaction) 3974 dst.interaction.add(i.copy()); 3975 }; 3976 dst.versioning = versioning == null ? null : versioning.copy(); 3977 dst.readHistory = readHistory == null ? null : readHistory.copy(); 3978 dst.updateCreate = updateCreate == null ? null : updateCreate.copy(); 3979 dst.conditionalCreate = conditionalCreate == null ? null : conditionalCreate.copy(); 3980 dst.conditionalUpdate = conditionalUpdate == null ? null : conditionalUpdate.copy(); 3981 dst.conditionalDelete = conditionalDelete == null ? null : conditionalDelete.copy(); 3982 if (searchInclude != null) { 3983 dst.searchInclude = new ArrayList<StringType>(); 3984 for (StringType i : searchInclude) 3985 dst.searchInclude.add(i.copy()); 3986 }; 3987 if (searchRevInclude != null) { 3988 dst.searchRevInclude = new ArrayList<StringType>(); 3989 for (StringType i : searchRevInclude) 3990 dst.searchRevInclude.add(i.copy()); 3991 }; 3992 if (searchParam != null) { 3993 dst.searchParam = new ArrayList<ConformanceRestResourceSearchParamComponent>(); 3994 for (ConformanceRestResourceSearchParamComponent i : searchParam) 3995 dst.searchParam.add(i.copy()); 3996 }; 3997 return dst; 3998 } 3999 4000 @Override 4001 public boolean equalsDeep(Base other) { 4002 if (!super.equalsDeep(other)) 4003 return false; 4004 if (!(other instanceof ConformanceRestResourceComponent)) 4005 return false; 4006 ConformanceRestResourceComponent o = (ConformanceRestResourceComponent) other; 4007 return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(interaction, o.interaction, true) 4008 && compareDeep(versioning, o.versioning, true) && compareDeep(readHistory, o.readHistory, true) 4009 && compareDeep(updateCreate, o.updateCreate, true) && compareDeep(conditionalCreate, o.conditionalCreate, true) 4010 && compareDeep(conditionalUpdate, o.conditionalUpdate, true) && compareDeep(conditionalDelete, o.conditionalDelete, true) 4011 && compareDeep(searchInclude, o.searchInclude, true) && compareDeep(searchRevInclude, o.searchRevInclude, true) 4012 && compareDeep(searchParam, o.searchParam, true); 4013 } 4014 4015 @Override 4016 public boolean equalsShallow(Base other) { 4017 if (!super.equalsShallow(other)) 4018 return false; 4019 if (!(other instanceof ConformanceRestResourceComponent)) 4020 return false; 4021 ConformanceRestResourceComponent o = (ConformanceRestResourceComponent) other; 4022 return compareValues(type, o.type, true) && compareValues(versioning, o.versioning, true) && compareValues(readHistory, o.readHistory, true) 4023 && compareValues(updateCreate, o.updateCreate, true) && compareValues(conditionalCreate, o.conditionalCreate, true) 4024 && compareValues(conditionalUpdate, o.conditionalUpdate, true) && compareValues(conditionalDelete, o.conditionalDelete, true) 4025 && compareValues(searchInclude, o.searchInclude, true) && compareValues(searchRevInclude, o.searchRevInclude, true) 4026 ; 4027 } 4028 4029 public boolean isEmpty() { 4030 return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) 4031 && (interaction == null || interaction.isEmpty()) && (versioning == null || versioning.isEmpty()) 4032 && (readHistory == null || readHistory.isEmpty()) && (updateCreate == null || updateCreate.isEmpty()) 4033 && (conditionalCreate == null || conditionalCreate.isEmpty()) && (conditionalUpdate == null || conditionalUpdate.isEmpty()) 4034 && (conditionalDelete == null || conditionalDelete.isEmpty()) && (searchInclude == null || searchInclude.isEmpty()) 4035 && (searchRevInclude == null || searchRevInclude.isEmpty()) && (searchParam == null || searchParam.isEmpty()) 4036 ; 4037 } 4038 4039 public String fhirType() { 4040 return "Conformance.rest.resource"; 4041 4042 } 4043 4044 } 4045 4046 @Block() 4047 public static class ResourceInteractionComponent extends BackboneElement implements IBaseBackboneElement { 4048 /** 4049 * Coded identifier of the operation, supported by the system resource. 4050 */ 4051 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4052 @Description(shortDefinition="read | vread | update | delete | history-instance | validate | history-type | create | search-type", formalDefinition="Coded identifier of the operation, supported by the system resource." ) 4053 protected Enumeration<TypeRestfulInteraction> code; 4054 4055 /** 4056 * Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. 4057 */ 4058 @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4059 @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'." ) 4060 protected StringType documentation; 4061 4062 private static final long serialVersionUID = -437507806L; 4063 4064 /* 4065 * Constructor 4066 */ 4067 public ResourceInteractionComponent() { 4068 super(); 4069 } 4070 4071 /* 4072 * Constructor 4073 */ 4074 public ResourceInteractionComponent(Enumeration<TypeRestfulInteraction> code) { 4075 super(); 4076 this.code = code; 4077 } 4078 4079 /** 4080 * @return {@link #code} (Coded identifier of the operation, supported by the system resource.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 4081 */ 4082 public Enumeration<TypeRestfulInteraction> getCodeElement() { 4083 if (this.code == null) 4084 if (Configuration.errorOnAutoCreate()) 4085 throw new Error("Attempt to auto-create ResourceInteractionComponent.code"); 4086 else if (Configuration.doAutoCreate()) 4087 this.code = new Enumeration<TypeRestfulInteraction>(new TypeRestfulInteractionEnumFactory()); // bb 4088 return this.code; 4089 } 4090 4091 public boolean hasCodeElement() { 4092 return this.code != null && !this.code.isEmpty(); 4093 } 4094 4095 public boolean hasCode() { 4096 return this.code != null && !this.code.isEmpty(); 4097 } 4098 4099 /** 4100 * @param value {@link #code} (Coded identifier of the operation, supported by the system resource.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 4101 */ 4102 public ResourceInteractionComponent setCodeElement(Enumeration<TypeRestfulInteraction> value) { 4103 this.code = value; 4104 return this; 4105 } 4106 4107 /** 4108 * @return Coded identifier of the operation, supported by the system resource. 4109 */ 4110 public TypeRestfulInteraction getCode() { 4111 return this.code == null ? null : this.code.getValue(); 4112 } 4113 4114 /** 4115 * @param value Coded identifier of the operation, supported by the system resource. 4116 */ 4117 public ResourceInteractionComponent setCode(TypeRestfulInteraction value) { 4118 if (this.code == null) 4119 this.code = new Enumeration<TypeRestfulInteraction>(new TypeRestfulInteractionEnumFactory()); 4120 this.code.setValue(value); 4121 return this; 4122 } 4123 4124 /** 4125 * @return {@link #documentation} (Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 4126 */ 4127 public StringType getDocumentationElement() { 4128 if (this.documentation == null) 4129 if (Configuration.errorOnAutoCreate()) 4130 throw new Error("Attempt to auto-create ResourceInteractionComponent.documentation"); 4131 else if (Configuration.doAutoCreate()) 4132 this.documentation = new StringType(); // bb 4133 return this.documentation; 4134 } 4135 4136 public boolean hasDocumentationElement() { 4137 return this.documentation != null && !this.documentation.isEmpty(); 4138 } 4139 4140 public boolean hasDocumentation() { 4141 return this.documentation != null && !this.documentation.isEmpty(); 4142 } 4143 4144 /** 4145 * @param value {@link #documentation} (Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 4146 */ 4147 public ResourceInteractionComponent setDocumentationElement(StringType value) { 4148 this.documentation = value; 4149 return this; 4150 } 4151 4152 /** 4153 * @return Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. 4154 */ 4155 public String getDocumentation() { 4156 return this.documentation == null ? null : this.documentation.getValue(); 4157 } 4158 4159 /** 4160 * @param value Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'. 4161 */ 4162 public ResourceInteractionComponent setDocumentation(String value) { 4163 if (Utilities.noString(value)) 4164 this.documentation = null; 4165 else { 4166 if (this.documentation == null) 4167 this.documentation = new StringType(); 4168 this.documentation.setValue(value); 4169 } 4170 return this; 4171 } 4172 4173 protected void listChildren(List<Property> childrenList) { 4174 super.listChildren(childrenList); 4175 childrenList.add(new Property("code", "code", "Coded identifier of the operation, supported by the system resource.", 0, java.lang.Integer.MAX_VALUE, code)); 4176 childrenList.add(new Property("documentation", "string", "Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'.", 0, java.lang.Integer.MAX_VALUE, documentation)); 4177 } 4178 4179 @Override 4180 public void setProperty(String name, Base value) throws FHIRException { 4181 if (name.equals("code")) 4182 this.code = new TypeRestfulInteractionEnumFactory().fromType(value); // Enumeration<TypeRestfulInteraction> 4183 else if (name.equals("documentation")) 4184 this.documentation = castToString(value); // StringType 4185 else 4186 super.setProperty(name, value); 4187 } 4188 4189 @Override 4190 public Base addChild(String name) throws FHIRException { 4191 if (name.equals("code")) { 4192 throw new FHIRException("Cannot call addChild on a primitive type Conformance.code"); 4193 } 4194 else if (name.equals("documentation")) { 4195 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 4196 } 4197 else 4198 return super.addChild(name); 4199 } 4200 4201 public ResourceInteractionComponent copy() { 4202 ResourceInteractionComponent dst = new ResourceInteractionComponent(); 4203 copyValues(dst); 4204 dst.code = code == null ? null : code.copy(); 4205 dst.documentation = documentation == null ? null : documentation.copy(); 4206 return dst; 4207 } 4208 4209 @Override 4210 public boolean equalsDeep(Base other) { 4211 if (!super.equalsDeep(other)) 4212 return false; 4213 if (!(other instanceof ResourceInteractionComponent)) 4214 return false; 4215 ResourceInteractionComponent o = (ResourceInteractionComponent) other; 4216 return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true); 4217 } 4218 4219 @Override 4220 public boolean equalsShallow(Base other) { 4221 if (!super.equalsShallow(other)) 4222 return false; 4223 if (!(other instanceof ResourceInteractionComponent)) 4224 return false; 4225 ResourceInteractionComponent o = (ResourceInteractionComponent) other; 4226 return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true); 4227 } 4228 4229 public boolean isEmpty() { 4230 return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty()) 4231 ; 4232 } 4233 4234 public String fhirType() { 4235 return "Conformance.rest.resource.interaction"; 4236 4237 } 4238 4239 } 4240 4241 @Block() 4242 public static class ConformanceRestResourceSearchParamComponent extends BackboneElement implements IBaseBackboneElement { 4243 /** 4244 * The name of the search parameter used in the interface. 4245 */ 4246 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4247 @Description(shortDefinition="Name of search parameter", formalDefinition="The name of the search parameter used in the interface." ) 4248 protected StringType name; 4249 4250 /** 4251 * An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). 4252 */ 4253 @Child(name = "definition", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4254 @Description(shortDefinition="Source of definition for parameter", formalDefinition="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]])." ) 4255 protected UriType definition; 4256 4257 /** 4258 * The type of value a search parameter refers to, and how the content is interpreted. 4259 */ 4260 @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) 4261 @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) 4262 protected Enumeration<SearchParamType> type; 4263 4264 /** 4265 * This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. 4266 */ 4267 @Child(name = "documentation", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 4268 @Description(shortDefinition="Server-specific usage", formalDefinition="This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms." ) 4269 protected StringType documentation; 4270 4271 /** 4272 * Types of resource (if a resource is referenced). 4273 */ 4274 @Child(name = "target", type = {CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4275 @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) 4276 protected List<CodeType> target; 4277 4278 /** 4279 * A modifier supported for the search parameter. 4280 */ 4281 @Child(name = "modifier", type = {CodeType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4282 @Description(shortDefinition="missing | exact | contains | not | text | in | not-in | below | above | type", formalDefinition="A modifier supported for the search parameter." ) 4283 protected List<Enumeration<SearchModifierCode>> modifier; 4284 4285 /** 4286 * Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type. 4287 */ 4288 @Child(name = "chain", type = {StringType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4289 @Description(shortDefinition="Chained names supported", formalDefinition="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type." ) 4290 protected List<StringType> chain; 4291 4292 private static final long serialVersionUID = -1020405086L; 4293 4294 /* 4295 * Constructor 4296 */ 4297 public ConformanceRestResourceSearchParamComponent() { 4298 super(); 4299 } 4300 4301 /* 4302 * Constructor 4303 */ 4304 public ConformanceRestResourceSearchParamComponent(StringType name, Enumeration<SearchParamType> type) { 4305 super(); 4306 this.name = name; 4307 this.type = type; 4308 } 4309 4310 /** 4311 * @return {@link #name} (The name of the search parameter used in the interface.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 4312 */ 4313 public StringType getNameElement() { 4314 if (this.name == null) 4315 if (Configuration.errorOnAutoCreate()) 4316 throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.name"); 4317 else if (Configuration.doAutoCreate()) 4318 this.name = new StringType(); // bb 4319 return this.name; 4320 } 4321 4322 public boolean hasNameElement() { 4323 return this.name != null && !this.name.isEmpty(); 4324 } 4325 4326 public boolean hasName() { 4327 return this.name != null && !this.name.isEmpty(); 4328 } 4329 4330 /** 4331 * @param value {@link #name} (The name of the search parameter used in the interface.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 4332 */ 4333 public ConformanceRestResourceSearchParamComponent setNameElement(StringType value) { 4334 this.name = value; 4335 return this; 4336 } 4337 4338 /** 4339 * @return The name of the search parameter used in the interface. 4340 */ 4341 public String getName() { 4342 return this.name == null ? null : this.name.getValue(); 4343 } 4344 4345 /** 4346 * @param value The name of the search parameter used in the interface. 4347 */ 4348 public ConformanceRestResourceSearchParamComponent setName(String value) { 4349 if (this.name == null) 4350 this.name = new StringType(); 4351 this.name.setValue(value); 4352 return this; 4353 } 4354 4355 /** 4356 * @return {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 4357 */ 4358 public UriType getDefinitionElement() { 4359 if (this.definition == null) 4360 if (Configuration.errorOnAutoCreate()) 4361 throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.definition"); 4362 else if (Configuration.doAutoCreate()) 4363 this.definition = new UriType(); // bb 4364 return this.definition; 4365 } 4366 4367 public boolean hasDefinitionElement() { 4368 return this.definition != null && !this.definition.isEmpty(); 4369 } 4370 4371 public boolean hasDefinition() { 4372 return this.definition != null && !this.definition.isEmpty(); 4373 } 4374 4375 /** 4376 * @param value {@link #definition} (An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 4377 */ 4378 public ConformanceRestResourceSearchParamComponent setDefinitionElement(UriType value) { 4379 this.definition = value; 4380 return this; 4381 } 4382 4383 /** 4384 * @return An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). 4385 */ 4386 public String getDefinition() { 4387 return this.definition == null ? null : this.definition.getValue(); 4388 } 4389 4390 /** 4391 * @param value An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]). 4392 */ 4393 public ConformanceRestResourceSearchParamComponent setDefinition(String value) { 4394 if (Utilities.noString(value)) 4395 this.definition = null; 4396 else { 4397 if (this.definition == null) 4398 this.definition = new UriType(); 4399 this.definition.setValue(value); 4400 } 4401 return this; 4402 } 4403 4404 /** 4405 * @return {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4406 */ 4407 public Enumeration<SearchParamType> getTypeElement() { 4408 if (this.type == null) 4409 if (Configuration.errorOnAutoCreate()) 4410 throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.type"); 4411 else if (Configuration.doAutoCreate()) 4412 this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb 4413 return this.type; 4414 } 4415 4416 public boolean hasTypeElement() { 4417 return this.type != null && !this.type.isEmpty(); 4418 } 4419 4420 public boolean hasType() { 4421 return this.type != null && !this.type.isEmpty(); 4422 } 4423 4424 /** 4425 * @param value {@link #type} (The type of value a search parameter refers to, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4426 */ 4427 public ConformanceRestResourceSearchParamComponent setTypeElement(Enumeration<SearchParamType> value) { 4428 this.type = value; 4429 return this; 4430 } 4431 4432 /** 4433 * @return The type of value a search parameter refers to, and how the content is interpreted. 4434 */ 4435 public SearchParamType getType() { 4436 return this.type == null ? null : this.type.getValue(); 4437 } 4438 4439 /** 4440 * @param value The type of value a search parameter refers to, and how the content is interpreted. 4441 */ 4442 public ConformanceRestResourceSearchParamComponent setType(SearchParamType value) { 4443 if (this.type == null) 4444 this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); 4445 this.type.setValue(value); 4446 return this; 4447 } 4448 4449 /** 4450 * @return {@link #documentation} (This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 4451 */ 4452 public StringType getDocumentationElement() { 4453 if (this.documentation == null) 4454 if (Configuration.errorOnAutoCreate()) 4455 throw new Error("Attempt to auto-create ConformanceRestResourceSearchParamComponent.documentation"); 4456 else if (Configuration.doAutoCreate()) 4457 this.documentation = new StringType(); // bb 4458 return this.documentation; 4459 } 4460 4461 public boolean hasDocumentationElement() { 4462 return this.documentation != null && !this.documentation.isEmpty(); 4463 } 4464 4465 public boolean hasDocumentation() { 4466 return this.documentation != null && !this.documentation.isEmpty(); 4467 } 4468 4469 /** 4470 * @param value {@link #documentation} (This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 4471 */ 4472 public ConformanceRestResourceSearchParamComponent setDocumentationElement(StringType value) { 4473 this.documentation = value; 4474 return this; 4475 } 4476 4477 /** 4478 * @return This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. 4479 */ 4480 public String getDocumentation() { 4481 return this.documentation == null ? null : this.documentation.getValue(); 4482 } 4483 4484 /** 4485 * @param value This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms. 4486 */ 4487 public ConformanceRestResourceSearchParamComponent setDocumentation(String value) { 4488 if (Utilities.noString(value)) 4489 this.documentation = null; 4490 else { 4491 if (this.documentation == null) 4492 this.documentation = new StringType(); 4493 this.documentation.setValue(value); 4494 } 4495 return this; 4496 } 4497 4498 /** 4499 * @return {@link #target} (Types of resource (if a resource is referenced).) 4500 */ 4501 public List<CodeType> getTarget() { 4502 if (this.target == null) 4503 this.target = new ArrayList<CodeType>(); 4504 return this.target; 4505 } 4506 4507 public boolean hasTarget() { 4508 if (this.target == null) 4509 return false; 4510 for (CodeType item : this.target) 4511 if (!item.isEmpty()) 4512 return true; 4513 return false; 4514 } 4515 4516 /** 4517 * @return {@link #target} (Types of resource (if a resource is referenced).) 4518 */ 4519 // syntactic sugar 4520 public CodeType addTargetElement() {//2 4521 CodeType t = new CodeType(); 4522 if (this.target == null) 4523 this.target = new ArrayList<CodeType>(); 4524 this.target.add(t); 4525 return t; 4526 } 4527 4528 /** 4529 * @param value {@link #target} (Types of resource (if a resource is referenced).) 4530 */ 4531 public ConformanceRestResourceSearchParamComponent addTarget(String value) { //1 4532 CodeType t = new CodeType(); 4533 t.setValue(value); 4534 if (this.target == null) 4535 this.target = new ArrayList<CodeType>(); 4536 this.target.add(t); 4537 return this; 4538 } 4539 4540 /** 4541 * @param value {@link #target} (Types of resource (if a resource is referenced).) 4542 */ 4543 public boolean hasTarget(String value) { 4544 if (this.target == null) 4545 return false; 4546 for (CodeType v : this.target) 4547 if (v.equals(value)) // code 4548 return true; 4549 return false; 4550 } 4551 4552 /** 4553 * @return {@link #modifier} (A modifier supported for the search parameter.) 4554 */ 4555 public List<Enumeration<SearchModifierCode>> getModifier() { 4556 if (this.modifier == null) 4557 this.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 4558 return this.modifier; 4559 } 4560 4561 public boolean hasModifier() { 4562 if (this.modifier == null) 4563 return false; 4564 for (Enumeration<SearchModifierCode> item : this.modifier) 4565 if (!item.isEmpty()) 4566 return true; 4567 return false; 4568 } 4569 4570 /** 4571 * @return {@link #modifier} (A modifier supported for the search parameter.) 4572 */ 4573 // syntactic sugar 4574 public Enumeration<SearchModifierCode> addModifierElement() {//2 4575 Enumeration<SearchModifierCode> t = new Enumeration<SearchModifierCode>(new SearchModifierCodeEnumFactory()); 4576 if (this.modifier == null) 4577 this.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 4578 this.modifier.add(t); 4579 return t; 4580 } 4581 4582 /** 4583 * @param value {@link #modifier} (A modifier supported for the search parameter.) 4584 */ 4585 public ConformanceRestResourceSearchParamComponent addModifier(SearchModifierCode value) { //1 4586 Enumeration<SearchModifierCode> t = new Enumeration<SearchModifierCode>(new SearchModifierCodeEnumFactory()); 4587 t.setValue(value); 4588 if (this.modifier == null) 4589 this.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 4590 this.modifier.add(t); 4591 return this; 4592 } 4593 4594 /** 4595 * @param value {@link #modifier} (A modifier supported for the search parameter.) 4596 */ 4597 public boolean hasModifier(SearchModifierCode value) { 4598 if (this.modifier == null) 4599 return false; 4600 for (Enumeration<SearchModifierCode> v : this.modifier) 4601 if (v.equals(value)) // code 4602 return true; 4603 return false; 4604 } 4605 4606 /** 4607 * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) 4608 */ 4609 public List<StringType> getChain() { 4610 if (this.chain == null) 4611 this.chain = new ArrayList<StringType>(); 4612 return this.chain; 4613 } 4614 4615 public boolean hasChain() { 4616 if (this.chain == null) 4617 return false; 4618 for (StringType item : this.chain) 4619 if (!item.isEmpty()) 4620 return true; 4621 return false; 4622 } 4623 4624 /** 4625 * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) 4626 */ 4627 // syntactic sugar 4628 public StringType addChainElement() {//2 4629 StringType t = new StringType(); 4630 if (this.chain == null) 4631 this.chain = new ArrayList<StringType>(); 4632 this.chain.add(t); 4633 return t; 4634 } 4635 4636 /** 4637 * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) 4638 */ 4639 public ConformanceRestResourceSearchParamComponent addChain(String value) { //1 4640 StringType t = new StringType(); 4641 t.setValue(value); 4642 if (this.chain == null) 4643 this.chain = new ArrayList<StringType>(); 4644 this.chain.add(t); 4645 return this; 4646 } 4647 4648 /** 4649 * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.) 4650 */ 4651 public boolean hasChain(String value) { 4652 if (this.chain == null) 4653 return false; 4654 for (StringType v : this.chain) 4655 if (v.equals(value)) // string 4656 return true; 4657 return false; 4658 } 4659 4660 protected void listChildren(List<Property> childrenList) { 4661 super.listChildren(childrenList); 4662 childrenList.add(new Property("name", "string", "The name of the search parameter used in the interface.", 0, java.lang.Integer.MAX_VALUE, name)); 4663 childrenList.add(new Property("definition", "uri", "An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [[[SearchParameter.url]]]).", 0, java.lang.Integer.MAX_VALUE, definition)); 4664 childrenList.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, java.lang.Integer.MAX_VALUE, type)); 4665 childrenList.add(new Property("documentation", "string", "This allows documentation of any distinct behaviors about how the search parameter is used. For example, text matching algorithms.", 0, java.lang.Integer.MAX_VALUE, documentation)); 4666 childrenList.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target)); 4667 childrenList.add(new Property("modifier", "code", "A modifier supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, modifier)); 4668 childrenList.add(new Property("chain", "string", "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference, and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from Conformance.rest.resource.searchParam.name on the target resource type.", 0, java.lang.Integer.MAX_VALUE, chain)); 4669 } 4670 4671 @Override 4672 public void setProperty(String name, Base value) throws FHIRException { 4673 if (name.equals("name")) 4674 this.name = castToString(value); // StringType 4675 else if (name.equals("definition")) 4676 this.definition = castToUri(value); // UriType 4677 else if (name.equals("type")) 4678 this.type = new SearchParamTypeEnumFactory().fromType(value); // Enumeration<SearchParamType> 4679 else if (name.equals("documentation")) 4680 this.documentation = castToString(value); // StringType 4681 else if (name.equals("target")) 4682 this.getTarget().add(castToCode(value)); 4683 else if (name.equals("modifier")) 4684 this.getModifier().add(new SearchModifierCodeEnumFactory().fromType(value)); 4685 else if (name.equals("chain")) 4686 this.getChain().add(castToString(value)); 4687 else 4688 super.setProperty(name, value); 4689 } 4690 4691 @Override 4692 public Base addChild(String name) throws FHIRException { 4693 if (name.equals("name")) { 4694 throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); 4695 } 4696 else if (name.equals("definition")) { 4697 throw new FHIRException("Cannot call addChild on a primitive type Conformance.definition"); 4698 } 4699 else if (name.equals("type")) { 4700 throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); 4701 } 4702 else if (name.equals("documentation")) { 4703 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 4704 } 4705 else if (name.equals("target")) { 4706 throw new FHIRException("Cannot call addChild on a primitive type Conformance.target"); 4707 } 4708 else if (name.equals("modifier")) { 4709 throw new FHIRException("Cannot call addChild on a primitive type Conformance.modifier"); 4710 } 4711 else if (name.equals("chain")) { 4712 throw new FHIRException("Cannot call addChild on a primitive type Conformance.chain"); 4713 } 4714 else 4715 return super.addChild(name); 4716 } 4717 4718 public ConformanceRestResourceSearchParamComponent copy() { 4719 ConformanceRestResourceSearchParamComponent dst = new ConformanceRestResourceSearchParamComponent(); 4720 copyValues(dst); 4721 dst.name = name == null ? null : name.copy(); 4722 dst.definition = definition == null ? null : definition.copy(); 4723 dst.type = type == null ? null : type.copy(); 4724 dst.documentation = documentation == null ? null : documentation.copy(); 4725 if (target != null) { 4726 dst.target = new ArrayList<CodeType>(); 4727 for (CodeType i : target) 4728 dst.target.add(i.copy()); 4729 }; 4730 if (modifier != null) { 4731 dst.modifier = new ArrayList<Enumeration<SearchModifierCode>>(); 4732 for (Enumeration<SearchModifierCode> i : modifier) 4733 dst.modifier.add(i.copy()); 4734 }; 4735 if (chain != null) { 4736 dst.chain = new ArrayList<StringType>(); 4737 for (StringType i : chain) 4738 dst.chain.add(i.copy()); 4739 }; 4740 return dst; 4741 } 4742 4743 @Override 4744 public boolean equalsDeep(Base other) { 4745 if (!super.equalsDeep(other)) 4746 return false; 4747 if (!(other instanceof ConformanceRestResourceSearchParamComponent)) 4748 return false; 4749 ConformanceRestResourceSearchParamComponent o = (ConformanceRestResourceSearchParamComponent) other; 4750 return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true) && compareDeep(type, o.type, true) 4751 && compareDeep(documentation, o.documentation, true) && compareDeep(target, o.target, true) && compareDeep(modifier, o.modifier, true) 4752 && compareDeep(chain, o.chain, true); 4753 } 4754 4755 @Override 4756 public boolean equalsShallow(Base other) { 4757 if (!super.equalsShallow(other)) 4758 return false; 4759 if (!(other instanceof ConformanceRestResourceSearchParamComponent)) 4760 return false; 4761 ConformanceRestResourceSearchParamComponent o = (ConformanceRestResourceSearchParamComponent) other; 4762 return compareValues(name, o.name, true) && compareValues(definition, o.definition, true) && compareValues(type, o.type, true) 4763 && compareValues(documentation, o.documentation, true) && compareValues(target, o.target, true) && compareValues(modifier, o.modifier, true) 4764 && compareValues(chain, o.chain, true); 4765 } 4766 4767 public boolean isEmpty() { 4768 return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty()) 4769 && (type == null || type.isEmpty()) && (documentation == null || documentation.isEmpty()) 4770 && (target == null || target.isEmpty()) && (modifier == null || modifier.isEmpty()) && (chain == null || chain.isEmpty()) 4771 ; 4772 } 4773 4774 public String fhirType() { 4775 return "Conformance.rest.resource.searchParam"; 4776 4777 } 4778 4779 } 4780 4781 @Block() 4782 public static class SystemInteractionComponent extends BackboneElement implements IBaseBackboneElement { 4783 /** 4784 * A coded identifier of the operation, supported by the system. 4785 */ 4786 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4787 @Description(shortDefinition="transaction | search-system | history-system", formalDefinition="A coded identifier of the operation, supported by the system." ) 4788 protected Enumeration<SystemRestfulInteraction> code; 4789 4790 /** 4791 * Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. 4792 */ 4793 @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4794 @Description(shortDefinition="Anything special about operation behavior", formalDefinition="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented." ) 4795 protected StringType documentation; 4796 4797 private static final long serialVersionUID = 510675287L; 4798 4799 /* 4800 * Constructor 4801 */ 4802 public SystemInteractionComponent() { 4803 super(); 4804 } 4805 4806 /* 4807 * Constructor 4808 */ 4809 public SystemInteractionComponent(Enumeration<SystemRestfulInteraction> code) { 4810 super(); 4811 this.code = code; 4812 } 4813 4814 /** 4815 * @return {@link #code} (A coded identifier of the operation, supported by the system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 4816 */ 4817 public Enumeration<SystemRestfulInteraction> getCodeElement() { 4818 if (this.code == null) 4819 if (Configuration.errorOnAutoCreate()) 4820 throw new Error("Attempt to auto-create SystemInteractionComponent.code"); 4821 else if (Configuration.doAutoCreate()) 4822 this.code = new Enumeration<SystemRestfulInteraction>(new SystemRestfulInteractionEnumFactory()); // bb 4823 return this.code; 4824 } 4825 4826 public boolean hasCodeElement() { 4827 return this.code != null && !this.code.isEmpty(); 4828 } 4829 4830 public boolean hasCode() { 4831 return this.code != null && !this.code.isEmpty(); 4832 } 4833 4834 /** 4835 * @param value {@link #code} (A coded identifier of the operation, supported by the system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 4836 */ 4837 public SystemInteractionComponent setCodeElement(Enumeration<SystemRestfulInteraction> value) { 4838 this.code = value; 4839 return this; 4840 } 4841 4842 /** 4843 * @return A coded identifier of the operation, supported by the system. 4844 */ 4845 public SystemRestfulInteraction getCode() { 4846 return this.code == null ? null : this.code.getValue(); 4847 } 4848 4849 /** 4850 * @param value A coded identifier of the operation, supported by the system. 4851 */ 4852 public SystemInteractionComponent setCode(SystemRestfulInteraction value) { 4853 if (this.code == null) 4854 this.code = new Enumeration<SystemRestfulInteraction>(new SystemRestfulInteractionEnumFactory()); 4855 this.code.setValue(value); 4856 return this; 4857 } 4858 4859 /** 4860 * @return {@link #documentation} (Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 4861 */ 4862 public StringType getDocumentationElement() { 4863 if (this.documentation == null) 4864 if (Configuration.errorOnAutoCreate()) 4865 throw new Error("Attempt to auto-create SystemInteractionComponent.documentation"); 4866 else if (Configuration.doAutoCreate()) 4867 this.documentation = new StringType(); // bb 4868 return this.documentation; 4869 } 4870 4871 public boolean hasDocumentationElement() { 4872 return this.documentation != null && !this.documentation.isEmpty(); 4873 } 4874 4875 public boolean hasDocumentation() { 4876 return this.documentation != null && !this.documentation.isEmpty(); 4877 } 4878 4879 /** 4880 * @param value {@link #documentation} (Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 4881 */ 4882 public SystemInteractionComponent setDocumentationElement(StringType value) { 4883 this.documentation = value; 4884 return this; 4885 } 4886 4887 /** 4888 * @return Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. 4889 */ 4890 public String getDocumentation() { 4891 return this.documentation == null ? null : this.documentation.getValue(); 4892 } 4893 4894 /** 4895 * @param value Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented. 4896 */ 4897 public SystemInteractionComponent setDocumentation(String value) { 4898 if (Utilities.noString(value)) 4899 this.documentation = null; 4900 else { 4901 if (this.documentation == null) 4902 this.documentation = new StringType(); 4903 this.documentation.setValue(value); 4904 } 4905 return this; 4906 } 4907 4908 protected void listChildren(List<Property> childrenList) { 4909 super.listChildren(childrenList); 4910 childrenList.add(new Property("code", "code", "A coded identifier of the operation, supported by the system.", 0, java.lang.Integer.MAX_VALUE, code)); 4911 childrenList.add(new Property("documentation", "string", "Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.", 0, java.lang.Integer.MAX_VALUE, documentation)); 4912 } 4913 4914 @Override 4915 public void setProperty(String name, Base value) throws FHIRException { 4916 if (name.equals("code")) 4917 this.code = new SystemRestfulInteractionEnumFactory().fromType(value); // Enumeration<SystemRestfulInteraction> 4918 else if (name.equals("documentation")) 4919 this.documentation = castToString(value); // StringType 4920 else 4921 super.setProperty(name, value); 4922 } 4923 4924 @Override 4925 public Base addChild(String name) throws FHIRException { 4926 if (name.equals("code")) { 4927 throw new FHIRException("Cannot call addChild on a primitive type Conformance.code"); 4928 } 4929 else if (name.equals("documentation")) { 4930 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 4931 } 4932 else 4933 return super.addChild(name); 4934 } 4935 4936 public SystemInteractionComponent copy() { 4937 SystemInteractionComponent dst = new SystemInteractionComponent(); 4938 copyValues(dst); 4939 dst.code = code == null ? null : code.copy(); 4940 dst.documentation = documentation == null ? null : documentation.copy(); 4941 return dst; 4942 } 4943 4944 @Override 4945 public boolean equalsDeep(Base other) { 4946 if (!super.equalsDeep(other)) 4947 return false; 4948 if (!(other instanceof SystemInteractionComponent)) 4949 return false; 4950 SystemInteractionComponent o = (SystemInteractionComponent) other; 4951 return compareDeep(code, o.code, true) && compareDeep(documentation, o.documentation, true); 4952 } 4953 4954 @Override 4955 public boolean equalsShallow(Base other) { 4956 if (!super.equalsShallow(other)) 4957 return false; 4958 if (!(other instanceof SystemInteractionComponent)) 4959 return false; 4960 SystemInteractionComponent o = (SystemInteractionComponent) other; 4961 return compareValues(code, o.code, true) && compareValues(documentation, o.documentation, true); 4962 } 4963 4964 public boolean isEmpty() { 4965 return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty()) 4966 ; 4967 } 4968 4969 public String fhirType() { 4970 return "Conformance.rest.interaction"; 4971 4972 } 4973 4974 } 4975 4976 @Block() 4977 public static class ConformanceRestOperationComponent extends BackboneElement implements IBaseBackboneElement { 4978 /** 4979 * The name of a query, which is used in the _query parameter when the query is called. 4980 */ 4981 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4982 @Description(shortDefinition="Name by which the operation/query is invoked", formalDefinition="The name of a query, which is used in the _query parameter when the query is called." ) 4983 protected StringType name; 4984 4985 /** 4986 * Where the formal definition can be found. 4987 */ 4988 @Child(name = "definition", type = {OperationDefinition.class}, order=2, min=1, max=1, modifier=false, summary=false) 4989 @Description(shortDefinition="The defined operation/query", formalDefinition="Where the formal definition can be found." ) 4990 protected Reference definition; 4991 4992 /** 4993 * The actual object that is the target of the reference (Where the formal definition can be found.) 4994 */ 4995 protected OperationDefinition definitionTarget; 4996 4997 private static final long serialVersionUID = 122107272L; 4998 4999 /* 5000 * Constructor 5001 */ 5002 public ConformanceRestOperationComponent() { 5003 super(); 5004 } 5005 5006 /* 5007 * Constructor 5008 */ 5009 public ConformanceRestOperationComponent(StringType name, Reference definition) { 5010 super(); 5011 this.name = name; 5012 this.definition = definition; 5013 } 5014 5015 /** 5016 * @return {@link #name} (The name of a query, which is used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 5017 */ 5018 public StringType getNameElement() { 5019 if (this.name == null) 5020 if (Configuration.errorOnAutoCreate()) 5021 throw new Error("Attempt to auto-create ConformanceRestOperationComponent.name"); 5022 else if (Configuration.doAutoCreate()) 5023 this.name = new StringType(); // bb 5024 return this.name; 5025 } 5026 5027 public boolean hasNameElement() { 5028 return this.name != null && !this.name.isEmpty(); 5029 } 5030 5031 public boolean hasName() { 5032 return this.name != null && !this.name.isEmpty(); 5033 } 5034 5035 /** 5036 * @param value {@link #name} (The name of a query, which is used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 5037 */ 5038 public ConformanceRestOperationComponent setNameElement(StringType value) { 5039 this.name = value; 5040 return this; 5041 } 5042 5043 /** 5044 * @return The name of a query, which is used in the _query parameter when the query is called. 5045 */ 5046 public String getName() { 5047 return this.name == null ? null : this.name.getValue(); 5048 } 5049 5050 /** 5051 * @param value The name of a query, which is used in the _query parameter when the query is called. 5052 */ 5053 public ConformanceRestOperationComponent setName(String value) { 5054 if (this.name == null) 5055 this.name = new StringType(); 5056 this.name.setValue(value); 5057 return this; 5058 } 5059 5060 /** 5061 * @return {@link #definition} (Where the formal definition can be found.) 5062 */ 5063 public Reference getDefinition() { 5064 if (this.definition == null) 5065 if (Configuration.errorOnAutoCreate()) 5066 throw new Error("Attempt to auto-create ConformanceRestOperationComponent.definition"); 5067 else if (Configuration.doAutoCreate()) 5068 this.definition = new Reference(); // cc 5069 return this.definition; 5070 } 5071 5072 public boolean hasDefinition() { 5073 return this.definition != null && !this.definition.isEmpty(); 5074 } 5075 5076 /** 5077 * @param value {@link #definition} (Where the formal definition can be found.) 5078 */ 5079 public ConformanceRestOperationComponent setDefinition(Reference value) { 5080 this.definition = value; 5081 return this; 5082 } 5083 5084 /** 5085 * @return {@link #definition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the formal definition can be found.) 5086 */ 5087 public OperationDefinition getDefinitionTarget() { 5088 if (this.definitionTarget == null) 5089 if (Configuration.errorOnAutoCreate()) 5090 throw new Error("Attempt to auto-create ConformanceRestOperationComponent.definition"); 5091 else if (Configuration.doAutoCreate()) 5092 this.definitionTarget = new OperationDefinition(); // aa 5093 return this.definitionTarget; 5094 } 5095 5096 /** 5097 * @param value {@link #definition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the formal definition can be found.) 5098 */ 5099 public ConformanceRestOperationComponent setDefinitionTarget(OperationDefinition value) { 5100 this.definitionTarget = value; 5101 return this; 5102 } 5103 5104 protected void listChildren(List<Property> childrenList) { 5105 super.listChildren(childrenList); 5106 childrenList.add(new Property("name", "string", "The name of a query, which is used in the _query parameter when the query is called.", 0, java.lang.Integer.MAX_VALUE, name)); 5107 childrenList.add(new Property("definition", "Reference(OperationDefinition)", "Where the formal definition can be found.", 0, java.lang.Integer.MAX_VALUE, definition)); 5108 } 5109 5110 @Override 5111 public void setProperty(String name, Base value) throws FHIRException { 5112 if (name.equals("name")) 5113 this.name = castToString(value); // StringType 5114 else if (name.equals("definition")) 5115 this.definition = castToReference(value); // Reference 5116 else 5117 super.setProperty(name, value); 5118 } 5119 5120 @Override 5121 public Base addChild(String name) throws FHIRException { 5122 if (name.equals("name")) { 5123 throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); 5124 } 5125 else if (name.equals("definition")) { 5126 this.definition = new Reference(); 5127 return this.definition; 5128 } 5129 else 5130 return super.addChild(name); 5131 } 5132 5133 public ConformanceRestOperationComponent copy() { 5134 ConformanceRestOperationComponent dst = new ConformanceRestOperationComponent(); 5135 copyValues(dst); 5136 dst.name = name == null ? null : name.copy(); 5137 dst.definition = definition == null ? null : definition.copy(); 5138 return dst; 5139 } 5140 5141 @Override 5142 public boolean equalsDeep(Base other) { 5143 if (!super.equalsDeep(other)) 5144 return false; 5145 if (!(other instanceof ConformanceRestOperationComponent)) 5146 return false; 5147 ConformanceRestOperationComponent o = (ConformanceRestOperationComponent) other; 5148 return compareDeep(name, o.name, true) && compareDeep(definition, o.definition, true); 5149 } 5150 5151 @Override 5152 public boolean equalsShallow(Base other) { 5153 if (!super.equalsShallow(other)) 5154 return false; 5155 if (!(other instanceof ConformanceRestOperationComponent)) 5156 return false; 5157 ConformanceRestOperationComponent o = (ConformanceRestOperationComponent) other; 5158 return compareValues(name, o.name, true); 5159 } 5160 5161 public boolean isEmpty() { 5162 return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty()) 5163 ; 5164 } 5165 5166 public String fhirType() { 5167 return "Conformance.rest.operation"; 5168 5169 } 5170 5171 } 5172 5173 @Block() 5174 public static class ConformanceMessagingComponent extends BackboneElement implements IBaseBackboneElement { 5175 /** 5176 * An endpoint (network accessible address) to which messages and/or replies are to be sent. 5177 */ 5178 @Child(name = "endpoint", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5179 @Description(shortDefinition="A messaging service end-point", formalDefinition="An endpoint (network accessible address) to which messages and/or replies are to be sent." ) 5180 protected List<ConformanceMessagingEndpointComponent> endpoint; 5181 5182 /** 5183 * Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). 5184 */ 5185 @Child(name = "reliableCache", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5186 @Description(shortDefinition="Reliable Message Cache Length (min)", formalDefinition="Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)." ) 5187 protected UnsignedIntType reliableCache; 5188 5189 /** 5190 * Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. 5191 */ 5192 @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5193 @Description(shortDefinition="Messaging interface behavior details", formalDefinition="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner." ) 5194 protected StringType documentation; 5195 5196 /** 5197 * A description of the solution's support for an event at this end-point. 5198 */ 5199 @Child(name = "event", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5200 @Description(shortDefinition="Declare support for this event", formalDefinition="A description of the solution's support for an event at this end-point." ) 5201 protected List<ConformanceMessagingEventComponent> event; 5202 5203 private static final long serialVersionUID = -712362545L; 5204 5205 /* 5206 * Constructor 5207 */ 5208 public ConformanceMessagingComponent() { 5209 super(); 5210 } 5211 5212 /** 5213 * @return {@link #endpoint} (An endpoint (network accessible address) to which messages and/or replies are to be sent.) 5214 */ 5215 public List<ConformanceMessagingEndpointComponent> getEndpoint() { 5216 if (this.endpoint == null) 5217 this.endpoint = new ArrayList<ConformanceMessagingEndpointComponent>(); 5218 return this.endpoint; 5219 } 5220 5221 public boolean hasEndpoint() { 5222 if (this.endpoint == null) 5223 return false; 5224 for (ConformanceMessagingEndpointComponent item : this.endpoint) 5225 if (!item.isEmpty()) 5226 return true; 5227 return false; 5228 } 5229 5230 /** 5231 * @return {@link #endpoint} (An endpoint (network accessible address) to which messages and/or replies are to be sent.) 5232 */ 5233 // syntactic sugar 5234 public ConformanceMessagingEndpointComponent addEndpoint() { //3 5235 ConformanceMessagingEndpointComponent t = new ConformanceMessagingEndpointComponent(); 5236 if (this.endpoint == null) 5237 this.endpoint = new ArrayList<ConformanceMessagingEndpointComponent>(); 5238 this.endpoint.add(t); 5239 return t; 5240 } 5241 5242 // syntactic sugar 5243 public ConformanceMessagingComponent addEndpoint(ConformanceMessagingEndpointComponent t) { //3 5244 if (t == null) 5245 return this; 5246 if (this.endpoint == null) 5247 this.endpoint = new ArrayList<ConformanceMessagingEndpointComponent>(); 5248 this.endpoint.add(t); 5249 return this; 5250 } 5251 5252 /** 5253 * @return {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value 5254 */ 5255 public UnsignedIntType getReliableCacheElement() { 5256 if (this.reliableCache == null) 5257 if (Configuration.errorOnAutoCreate()) 5258 throw new Error("Attempt to auto-create ConformanceMessagingComponent.reliableCache"); 5259 else if (Configuration.doAutoCreate()) 5260 this.reliableCache = new UnsignedIntType(); // bb 5261 return this.reliableCache; 5262 } 5263 5264 public boolean hasReliableCacheElement() { 5265 return this.reliableCache != null && !this.reliableCache.isEmpty(); 5266 } 5267 5268 public boolean hasReliableCache() { 5269 return this.reliableCache != null && !this.reliableCache.isEmpty(); 5270 } 5271 5272 /** 5273 * @param value {@link #reliableCache} (Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).). This is the underlying object with id, value and extensions. The accessor "getReliableCache" gives direct access to the value 5274 */ 5275 public ConformanceMessagingComponent setReliableCacheElement(UnsignedIntType value) { 5276 this.reliableCache = value; 5277 return this; 5278 } 5279 5280 /** 5281 * @return Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). 5282 */ 5283 public int getReliableCache() { 5284 return this.reliableCache == null || this.reliableCache.isEmpty() ? 0 : this.reliableCache.getValue(); 5285 } 5286 5287 /** 5288 * @param value Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender). 5289 */ 5290 public ConformanceMessagingComponent setReliableCache(int value) { 5291 if (this.reliableCache == null) 5292 this.reliableCache = new UnsignedIntType(); 5293 this.reliableCache.setValue(value); 5294 return this; 5295 } 5296 5297 /** 5298 * @return {@link #documentation} (Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 5299 */ 5300 public StringType getDocumentationElement() { 5301 if (this.documentation == null) 5302 if (Configuration.errorOnAutoCreate()) 5303 throw new Error("Attempt to auto-create ConformanceMessagingComponent.documentation"); 5304 else if (Configuration.doAutoCreate()) 5305 this.documentation = new StringType(); // bb 5306 return this.documentation; 5307 } 5308 5309 public boolean hasDocumentationElement() { 5310 return this.documentation != null && !this.documentation.isEmpty(); 5311 } 5312 5313 public boolean hasDocumentation() { 5314 return this.documentation != null && !this.documentation.isEmpty(); 5315 } 5316 5317 /** 5318 * @param value {@link #documentation} (Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 5319 */ 5320 public ConformanceMessagingComponent setDocumentationElement(StringType value) { 5321 this.documentation = value; 5322 return this; 5323 } 5324 5325 /** 5326 * @return Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. 5327 */ 5328 public String getDocumentation() { 5329 return this.documentation == null ? null : this.documentation.getValue(); 5330 } 5331 5332 /** 5333 * @param value Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner. 5334 */ 5335 public ConformanceMessagingComponent setDocumentation(String value) { 5336 if (Utilities.noString(value)) 5337 this.documentation = null; 5338 else { 5339 if (this.documentation == null) 5340 this.documentation = new StringType(); 5341 this.documentation.setValue(value); 5342 } 5343 return this; 5344 } 5345 5346 /** 5347 * @return {@link #event} (A description of the solution's support for an event at this end-point.) 5348 */ 5349 public List<ConformanceMessagingEventComponent> getEvent() { 5350 if (this.event == null) 5351 this.event = new ArrayList<ConformanceMessagingEventComponent>(); 5352 return this.event; 5353 } 5354 5355 public boolean hasEvent() { 5356 if (this.event == null) 5357 return false; 5358 for (ConformanceMessagingEventComponent item : this.event) 5359 if (!item.isEmpty()) 5360 return true; 5361 return false; 5362 } 5363 5364 /** 5365 * @return {@link #event} (A description of the solution's support for an event at this end-point.) 5366 */ 5367 // syntactic sugar 5368 public ConformanceMessagingEventComponent addEvent() { //3 5369 ConformanceMessagingEventComponent t = new ConformanceMessagingEventComponent(); 5370 if (this.event == null) 5371 this.event = new ArrayList<ConformanceMessagingEventComponent>(); 5372 this.event.add(t); 5373 return t; 5374 } 5375 5376 // syntactic sugar 5377 public ConformanceMessagingComponent addEvent(ConformanceMessagingEventComponent t) { //3 5378 if (t == null) 5379 return this; 5380 if (this.event == null) 5381 this.event = new ArrayList<ConformanceMessagingEventComponent>(); 5382 this.event.add(t); 5383 return this; 5384 } 5385 5386 protected void listChildren(List<Property> childrenList) { 5387 super.listChildren(childrenList); 5388 childrenList.add(new Property("endpoint", "", "An endpoint (network accessible address) to which messages and/or replies are to be sent.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 5389 childrenList.add(new Property("reliableCache", "unsignedInt", "Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender).", 0, java.lang.Integer.MAX_VALUE, reliableCache)); 5390 childrenList.add(new Property("documentation", "string", "Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the conformance statement. For example, process for becoming an authorized messaging exchange partner.", 0, java.lang.Integer.MAX_VALUE, documentation)); 5391 childrenList.add(new Property("event", "", "A description of the solution's support for an event at this end-point.", 0, java.lang.Integer.MAX_VALUE, event)); 5392 } 5393 5394 @Override 5395 public void setProperty(String name, Base value) throws FHIRException { 5396 if (name.equals("endpoint")) 5397 this.getEndpoint().add((ConformanceMessagingEndpointComponent) value); 5398 else if (name.equals("reliableCache")) 5399 this.reliableCache = castToUnsignedInt(value); // UnsignedIntType 5400 else if (name.equals("documentation")) 5401 this.documentation = castToString(value); // StringType 5402 else if (name.equals("event")) 5403 this.getEvent().add((ConformanceMessagingEventComponent) value); 5404 else 5405 super.setProperty(name, value); 5406 } 5407 5408 @Override 5409 public Base addChild(String name) throws FHIRException { 5410 if (name.equals("endpoint")) { 5411 return addEndpoint(); 5412 } 5413 else if (name.equals("reliableCache")) { 5414 throw new FHIRException("Cannot call addChild on a primitive type Conformance.reliableCache"); 5415 } 5416 else if (name.equals("documentation")) { 5417 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 5418 } 5419 else if (name.equals("event")) { 5420 return addEvent(); 5421 } 5422 else 5423 return super.addChild(name); 5424 } 5425 5426 public ConformanceMessagingComponent copy() { 5427 ConformanceMessagingComponent dst = new ConformanceMessagingComponent(); 5428 copyValues(dst); 5429 if (endpoint != null) { 5430 dst.endpoint = new ArrayList<ConformanceMessagingEndpointComponent>(); 5431 for (ConformanceMessagingEndpointComponent i : endpoint) 5432 dst.endpoint.add(i.copy()); 5433 }; 5434 dst.reliableCache = reliableCache == null ? null : reliableCache.copy(); 5435 dst.documentation = documentation == null ? null : documentation.copy(); 5436 if (event != null) { 5437 dst.event = new ArrayList<ConformanceMessagingEventComponent>(); 5438 for (ConformanceMessagingEventComponent i : event) 5439 dst.event.add(i.copy()); 5440 }; 5441 return dst; 5442 } 5443 5444 @Override 5445 public boolean equalsDeep(Base other) { 5446 if (!super.equalsDeep(other)) 5447 return false; 5448 if (!(other instanceof ConformanceMessagingComponent)) 5449 return false; 5450 ConformanceMessagingComponent o = (ConformanceMessagingComponent) other; 5451 return compareDeep(endpoint, o.endpoint, true) && compareDeep(reliableCache, o.reliableCache, true) 5452 && compareDeep(documentation, o.documentation, true) && compareDeep(event, o.event, true); 5453 } 5454 5455 @Override 5456 public boolean equalsShallow(Base other) { 5457 if (!super.equalsShallow(other)) 5458 return false; 5459 if (!(other instanceof ConformanceMessagingComponent)) 5460 return false; 5461 ConformanceMessagingComponent o = (ConformanceMessagingComponent) other; 5462 return compareValues(reliableCache, o.reliableCache, true) && compareValues(documentation, o.documentation, true) 5463 ; 5464 } 5465 5466 public boolean isEmpty() { 5467 return super.isEmpty() && (endpoint == null || endpoint.isEmpty()) && (reliableCache == null || reliableCache.isEmpty()) 5468 && (documentation == null || documentation.isEmpty()) && (event == null || event.isEmpty()) 5469 ; 5470 } 5471 5472 public String fhirType() { 5473 return "Conformance.messaging"; 5474 5475 } 5476 5477 } 5478 5479 @Block() 5480 public static class ConformanceMessagingEndpointComponent extends BackboneElement implements IBaseBackboneElement { 5481 /** 5482 * A list of the messaging transport protocol(s) identifiers, supported by this endpoint. 5483 */ 5484 @Child(name = "protocol", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 5485 @Description(shortDefinition="http | ftp | mllp +", formalDefinition="A list of the messaging transport protocol(s) identifiers, supported by this endpoint." ) 5486 protected Coding protocol; 5487 5488 /** 5489 * The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier. 5490 */ 5491 @Child(name = "address", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 5492 @Description(shortDefinition="Address of end-point", formalDefinition="The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier." ) 5493 protected UriType address; 5494 5495 private static final long serialVersionUID = 1294656428L; 5496 5497 /* 5498 * Constructor 5499 */ 5500 public ConformanceMessagingEndpointComponent() { 5501 super(); 5502 } 5503 5504 /* 5505 * Constructor 5506 */ 5507 public ConformanceMessagingEndpointComponent(Coding protocol, UriType address) { 5508 super(); 5509 this.protocol = protocol; 5510 this.address = address; 5511 } 5512 5513 /** 5514 * @return {@link #protocol} (A list of the messaging transport protocol(s) identifiers, supported by this endpoint.) 5515 */ 5516 public Coding getProtocol() { 5517 if (this.protocol == null) 5518 if (Configuration.errorOnAutoCreate()) 5519 throw new Error("Attempt to auto-create ConformanceMessagingEndpointComponent.protocol"); 5520 else if (Configuration.doAutoCreate()) 5521 this.protocol = new Coding(); // cc 5522 return this.protocol; 5523 } 5524 5525 public boolean hasProtocol() { 5526 return this.protocol != null && !this.protocol.isEmpty(); 5527 } 5528 5529 /** 5530 * @param value {@link #protocol} (A list of the messaging transport protocol(s) identifiers, supported by this endpoint.) 5531 */ 5532 public ConformanceMessagingEndpointComponent setProtocol(Coding value) { 5533 this.protocol = value; 5534 return this; 5535 } 5536 5537 /** 5538 * @return {@link #address} (The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value 5539 */ 5540 public UriType getAddressElement() { 5541 if (this.address == null) 5542 if (Configuration.errorOnAutoCreate()) 5543 throw new Error("Attempt to auto-create ConformanceMessagingEndpointComponent.address"); 5544 else if (Configuration.doAutoCreate()) 5545 this.address = new UriType(); // bb 5546 return this.address; 5547 } 5548 5549 public boolean hasAddressElement() { 5550 return this.address != null && !this.address.isEmpty(); 5551 } 5552 5553 public boolean hasAddress() { 5554 return this.address != null && !this.address.isEmpty(); 5555 } 5556 5557 /** 5558 * @param value {@link #address} (The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value 5559 */ 5560 public ConformanceMessagingEndpointComponent setAddressElement(UriType value) { 5561 this.address = value; 5562 return this; 5563 } 5564 5565 /** 5566 * @return The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier. 5567 */ 5568 public String getAddress() { 5569 return this.address == null ? null : this.address.getValue(); 5570 } 5571 5572 /** 5573 * @param value The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier. 5574 */ 5575 public ConformanceMessagingEndpointComponent setAddress(String value) { 5576 if (this.address == null) 5577 this.address = new UriType(); 5578 this.address.setValue(value); 5579 return this; 5580 } 5581 5582 protected void listChildren(List<Property> childrenList) { 5583 super.listChildren(childrenList); 5584 childrenList.add(new Property("protocol", "Coding", "A list of the messaging transport protocol(s) identifiers, supported by this endpoint.", 0, java.lang.Integer.MAX_VALUE, protocol)); 5585 childrenList.add(new Property("address", "uri", "The network address of the end-point. For solutions that do not use network addresses for routing, it can be just an identifier.", 0, java.lang.Integer.MAX_VALUE, address)); 5586 } 5587 5588 @Override 5589 public void setProperty(String name, Base value) throws FHIRException { 5590 if (name.equals("protocol")) 5591 this.protocol = castToCoding(value); // Coding 5592 else if (name.equals("address")) 5593 this.address = castToUri(value); // UriType 5594 else 5595 super.setProperty(name, value); 5596 } 5597 5598 @Override 5599 public Base addChild(String name) throws FHIRException { 5600 if (name.equals("protocol")) { 5601 this.protocol = new Coding(); 5602 return this.protocol; 5603 } 5604 else if (name.equals("address")) { 5605 throw new FHIRException("Cannot call addChild on a primitive type Conformance.address"); 5606 } 5607 else 5608 return super.addChild(name); 5609 } 5610 5611 public ConformanceMessagingEndpointComponent copy() { 5612 ConformanceMessagingEndpointComponent dst = new ConformanceMessagingEndpointComponent(); 5613 copyValues(dst); 5614 dst.protocol = protocol == null ? null : protocol.copy(); 5615 dst.address = address == null ? null : address.copy(); 5616 return dst; 5617 } 5618 5619 @Override 5620 public boolean equalsDeep(Base other) { 5621 if (!super.equalsDeep(other)) 5622 return false; 5623 if (!(other instanceof ConformanceMessagingEndpointComponent)) 5624 return false; 5625 ConformanceMessagingEndpointComponent o = (ConformanceMessagingEndpointComponent) other; 5626 return compareDeep(protocol, o.protocol, true) && compareDeep(address, o.address, true); 5627 } 5628 5629 @Override 5630 public boolean equalsShallow(Base other) { 5631 if (!super.equalsShallow(other)) 5632 return false; 5633 if (!(other instanceof ConformanceMessagingEndpointComponent)) 5634 return false; 5635 ConformanceMessagingEndpointComponent o = (ConformanceMessagingEndpointComponent) other; 5636 return compareValues(address, o.address, true); 5637 } 5638 5639 public boolean isEmpty() { 5640 return super.isEmpty() && (protocol == null || protocol.isEmpty()) && (address == null || address.isEmpty()) 5641 ; 5642 } 5643 5644 public String fhirType() { 5645 return "Conformance.messaging.endpoint"; 5646 5647 } 5648 5649 } 5650 5651 @Block() 5652 public static class ConformanceMessagingEventComponent extends BackboneElement implements IBaseBackboneElement { 5653 /** 5654 * A coded identifier of a supported messaging event. 5655 */ 5656 @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 5657 @Description(shortDefinition="Event type", formalDefinition="A coded identifier of a supported messaging event." ) 5658 protected Coding code; 5659 5660 /** 5661 * The impact of the content of the message. 5662 */ 5663 @Child(name = "category", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5664 @Description(shortDefinition="Consequence | Currency | Notification", formalDefinition="The impact of the content of the message." ) 5665 protected Enumeration<MessageSignificanceCategory> category; 5666 5667 /** 5668 * The mode of this event declaration - whether application is sender or receiver. 5669 */ 5670 @Child(name = "mode", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) 5671 @Description(shortDefinition="sender | receiver", formalDefinition="The mode of this event declaration - whether application is sender or receiver." ) 5672 protected Enumeration<ConformanceEventMode> mode; 5673 5674 /** 5675 * A resource associated with the event. This is the resource that defines the event. 5676 */ 5677 @Child(name = "focus", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) 5678 @Description(shortDefinition="Resource that's focus of message", formalDefinition="A resource associated with the event. This is the resource that defines the event." ) 5679 protected CodeType focus; 5680 5681 /** 5682 * Information about the request for this event. 5683 */ 5684 @Child(name = "request", type = {StructureDefinition.class}, order=5, min=1, max=1, modifier=false, summary=false) 5685 @Description(shortDefinition="Profile that describes the request", formalDefinition="Information about the request for this event." ) 5686 protected Reference request; 5687 5688 /** 5689 * The actual object that is the target of the reference (Information about the request for this event.) 5690 */ 5691 protected StructureDefinition requestTarget; 5692 5693 /** 5694 * Information about the response for this event. 5695 */ 5696 @Child(name = "response", type = {StructureDefinition.class}, order=6, min=1, max=1, modifier=false, summary=false) 5697 @Description(shortDefinition="Profile that describes the response", formalDefinition="Information about the response for this event." ) 5698 protected Reference response; 5699 5700 /** 5701 * The actual object that is the target of the reference (Information about the response for this event.) 5702 */ 5703 protected StructureDefinition responseTarget; 5704 5705 /** 5706 * Guidance on how this event is handled, such as internal system trigger points, business rules, etc. 5707 */ 5708 @Child(name = "documentation", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5709 @Description(shortDefinition="Endpoint-specific event documentation", formalDefinition="Guidance on how this event is handled, such as internal system trigger points, business rules, etc." ) 5710 protected StringType documentation; 5711 5712 private static final long serialVersionUID = -47031390L; 5713 5714 /* 5715 * Constructor 5716 */ 5717 public ConformanceMessagingEventComponent() { 5718 super(); 5719 } 5720 5721 /* 5722 * Constructor 5723 */ 5724 public ConformanceMessagingEventComponent(Coding code, Enumeration<ConformanceEventMode> mode, CodeType focus, Reference request, Reference response) { 5725 super(); 5726 this.code = code; 5727 this.mode = mode; 5728 this.focus = focus; 5729 this.request = request; 5730 this.response = response; 5731 } 5732 5733 /** 5734 * @return {@link #code} (A coded identifier of a supported messaging event.) 5735 */ 5736 public Coding getCode() { 5737 if (this.code == null) 5738 if (Configuration.errorOnAutoCreate()) 5739 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.code"); 5740 else if (Configuration.doAutoCreate()) 5741 this.code = new Coding(); // cc 5742 return this.code; 5743 } 5744 5745 public boolean hasCode() { 5746 return this.code != null && !this.code.isEmpty(); 5747 } 5748 5749 /** 5750 * @param value {@link #code} (A coded identifier of a supported messaging event.) 5751 */ 5752 public ConformanceMessagingEventComponent setCode(Coding value) { 5753 this.code = value; 5754 return this; 5755 } 5756 5757 /** 5758 * @return {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value 5759 */ 5760 public Enumeration<MessageSignificanceCategory> getCategoryElement() { 5761 if (this.category == null) 5762 if (Configuration.errorOnAutoCreate()) 5763 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.category"); 5764 else if (Configuration.doAutoCreate()) 5765 this.category = new Enumeration<MessageSignificanceCategory>(new MessageSignificanceCategoryEnumFactory()); // bb 5766 return this.category; 5767 } 5768 5769 public boolean hasCategoryElement() { 5770 return this.category != null && !this.category.isEmpty(); 5771 } 5772 5773 public boolean hasCategory() { 5774 return this.category != null && !this.category.isEmpty(); 5775 } 5776 5777 /** 5778 * @param value {@link #category} (The impact of the content of the message.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value 5779 */ 5780 public ConformanceMessagingEventComponent setCategoryElement(Enumeration<MessageSignificanceCategory> value) { 5781 this.category = value; 5782 return this; 5783 } 5784 5785 /** 5786 * @return The impact of the content of the message. 5787 */ 5788 public MessageSignificanceCategory getCategory() { 5789 return this.category == null ? null : this.category.getValue(); 5790 } 5791 5792 /** 5793 * @param value The impact of the content of the message. 5794 */ 5795 public ConformanceMessagingEventComponent setCategory(MessageSignificanceCategory value) { 5796 if (value == null) 5797 this.category = null; 5798 else { 5799 if (this.category == null) 5800 this.category = new Enumeration<MessageSignificanceCategory>(new MessageSignificanceCategoryEnumFactory()); 5801 this.category.setValue(value); 5802 } 5803 return this; 5804 } 5805 5806 /** 5807 * @return {@link #mode} (The mode of this event declaration - whether application is sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 5808 */ 5809 public Enumeration<ConformanceEventMode> getModeElement() { 5810 if (this.mode == null) 5811 if (Configuration.errorOnAutoCreate()) 5812 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.mode"); 5813 else if (Configuration.doAutoCreate()) 5814 this.mode = new Enumeration<ConformanceEventMode>(new ConformanceEventModeEnumFactory()); // bb 5815 return this.mode; 5816 } 5817 5818 public boolean hasModeElement() { 5819 return this.mode != null && !this.mode.isEmpty(); 5820 } 5821 5822 public boolean hasMode() { 5823 return this.mode != null && !this.mode.isEmpty(); 5824 } 5825 5826 /** 5827 * @param value {@link #mode} (The mode of this event declaration - whether application is sender or receiver.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 5828 */ 5829 public ConformanceMessagingEventComponent setModeElement(Enumeration<ConformanceEventMode> value) { 5830 this.mode = value; 5831 return this; 5832 } 5833 5834 /** 5835 * @return The mode of this event declaration - whether application is sender or receiver. 5836 */ 5837 public ConformanceEventMode getMode() { 5838 return this.mode == null ? null : this.mode.getValue(); 5839 } 5840 5841 /** 5842 * @param value The mode of this event declaration - whether application is sender or receiver. 5843 */ 5844 public ConformanceMessagingEventComponent setMode(ConformanceEventMode value) { 5845 if (this.mode == null) 5846 this.mode = new Enumeration<ConformanceEventMode>(new ConformanceEventModeEnumFactory()); 5847 this.mode.setValue(value); 5848 return this; 5849 } 5850 5851 /** 5852 * @return {@link #focus} (A resource associated with the event. This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value 5853 */ 5854 public CodeType getFocusElement() { 5855 if (this.focus == null) 5856 if (Configuration.errorOnAutoCreate()) 5857 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.focus"); 5858 else if (Configuration.doAutoCreate()) 5859 this.focus = new CodeType(); // bb 5860 return this.focus; 5861 } 5862 5863 public boolean hasFocusElement() { 5864 return this.focus != null && !this.focus.isEmpty(); 5865 } 5866 5867 public boolean hasFocus() { 5868 return this.focus != null && !this.focus.isEmpty(); 5869 } 5870 5871 /** 5872 * @param value {@link #focus} (A resource associated with the event. This is the resource that defines the event.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value 5873 */ 5874 public ConformanceMessagingEventComponent setFocusElement(CodeType value) { 5875 this.focus = value; 5876 return this; 5877 } 5878 5879 /** 5880 * @return A resource associated with the event. This is the resource that defines the event. 5881 */ 5882 public String getFocus() { 5883 return this.focus == null ? null : this.focus.getValue(); 5884 } 5885 5886 /** 5887 * @param value A resource associated with the event. This is the resource that defines the event. 5888 */ 5889 public ConformanceMessagingEventComponent setFocus(String value) { 5890 if (this.focus == null) 5891 this.focus = new CodeType(); 5892 this.focus.setValue(value); 5893 return this; 5894 } 5895 5896 /** 5897 * @return {@link #request} (Information about the request for this event.) 5898 */ 5899 public Reference getRequest() { 5900 if (this.request == null) 5901 if (Configuration.errorOnAutoCreate()) 5902 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.request"); 5903 else if (Configuration.doAutoCreate()) 5904 this.request = new Reference(); // cc 5905 return this.request; 5906 } 5907 5908 public boolean hasRequest() { 5909 return this.request != null && !this.request.isEmpty(); 5910 } 5911 5912 /** 5913 * @param value {@link #request} (Information about the request for this event.) 5914 */ 5915 public ConformanceMessagingEventComponent setRequest(Reference value) { 5916 this.request = value; 5917 return this; 5918 } 5919 5920 /** 5921 * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the request for this event.) 5922 */ 5923 public StructureDefinition getRequestTarget() { 5924 if (this.requestTarget == null) 5925 if (Configuration.errorOnAutoCreate()) 5926 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.request"); 5927 else if (Configuration.doAutoCreate()) 5928 this.requestTarget = new StructureDefinition(); // aa 5929 return this.requestTarget; 5930 } 5931 5932 /** 5933 * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the request for this event.) 5934 */ 5935 public ConformanceMessagingEventComponent setRequestTarget(StructureDefinition value) { 5936 this.requestTarget = value; 5937 return this; 5938 } 5939 5940 /** 5941 * @return {@link #response} (Information about the response for this event.) 5942 */ 5943 public Reference getResponse() { 5944 if (this.response == null) 5945 if (Configuration.errorOnAutoCreate()) 5946 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.response"); 5947 else if (Configuration.doAutoCreate()) 5948 this.response = new Reference(); // cc 5949 return this.response; 5950 } 5951 5952 public boolean hasResponse() { 5953 return this.response != null && !this.response.isEmpty(); 5954 } 5955 5956 /** 5957 * @param value {@link #response} (Information about the response for this event.) 5958 */ 5959 public ConformanceMessagingEventComponent setResponse(Reference value) { 5960 this.response = value; 5961 return this; 5962 } 5963 5964 /** 5965 * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Information about the response for this event.) 5966 */ 5967 public StructureDefinition getResponseTarget() { 5968 if (this.responseTarget == null) 5969 if (Configuration.errorOnAutoCreate()) 5970 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.response"); 5971 else if (Configuration.doAutoCreate()) 5972 this.responseTarget = new StructureDefinition(); // aa 5973 return this.responseTarget; 5974 } 5975 5976 /** 5977 * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Information about the response for this event.) 5978 */ 5979 public ConformanceMessagingEventComponent setResponseTarget(StructureDefinition value) { 5980 this.responseTarget = value; 5981 return this; 5982 } 5983 5984 /** 5985 * @return {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 5986 */ 5987 public StringType getDocumentationElement() { 5988 if (this.documentation == null) 5989 if (Configuration.errorOnAutoCreate()) 5990 throw new Error("Attempt to auto-create ConformanceMessagingEventComponent.documentation"); 5991 else if (Configuration.doAutoCreate()) 5992 this.documentation = new StringType(); // bb 5993 return this.documentation; 5994 } 5995 5996 public boolean hasDocumentationElement() { 5997 return this.documentation != null && !this.documentation.isEmpty(); 5998 } 5999 6000 public boolean hasDocumentation() { 6001 return this.documentation != null && !this.documentation.isEmpty(); 6002 } 6003 6004 /** 6005 * @param value {@link #documentation} (Guidance on how this event is handled, such as internal system trigger points, business rules, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 6006 */ 6007 public ConformanceMessagingEventComponent setDocumentationElement(StringType value) { 6008 this.documentation = value; 6009 return this; 6010 } 6011 6012 /** 6013 * @return Guidance on how this event is handled, such as internal system trigger points, business rules, etc. 6014 */ 6015 public String getDocumentation() { 6016 return this.documentation == null ? null : this.documentation.getValue(); 6017 } 6018 6019 /** 6020 * @param value Guidance on how this event is handled, such as internal system trigger points, business rules, etc. 6021 */ 6022 public ConformanceMessagingEventComponent setDocumentation(String value) { 6023 if (Utilities.noString(value)) 6024 this.documentation = null; 6025 else { 6026 if (this.documentation == null) 6027 this.documentation = new StringType(); 6028 this.documentation.setValue(value); 6029 } 6030 return this; 6031 } 6032 6033 protected void listChildren(List<Property> childrenList) { 6034 super.listChildren(childrenList); 6035 childrenList.add(new Property("code", "Coding", "A coded identifier of a supported messaging event.", 0, java.lang.Integer.MAX_VALUE, code)); 6036 childrenList.add(new Property("category", "code", "The impact of the content of the message.", 0, java.lang.Integer.MAX_VALUE, category)); 6037 childrenList.add(new Property("mode", "code", "The mode of this event declaration - whether application is sender or receiver.", 0, java.lang.Integer.MAX_VALUE, mode)); 6038 childrenList.add(new Property("focus", "code", "A resource associated with the event. This is the resource that defines the event.", 0, java.lang.Integer.MAX_VALUE, focus)); 6039 childrenList.add(new Property("request", "Reference(StructureDefinition)", "Information about the request for this event.", 0, java.lang.Integer.MAX_VALUE, request)); 6040 childrenList.add(new Property("response", "Reference(StructureDefinition)", "Information about the response for this event.", 0, java.lang.Integer.MAX_VALUE, response)); 6041 childrenList.add(new Property("documentation", "string", "Guidance on how this event is handled, such as internal system trigger points, business rules, etc.", 0, java.lang.Integer.MAX_VALUE, documentation)); 6042 } 6043 6044 @Override 6045 public void setProperty(String name, Base value) throws FHIRException { 6046 if (name.equals("code")) 6047 this.code = castToCoding(value); // Coding 6048 else if (name.equals("category")) 6049 this.category = new MessageSignificanceCategoryEnumFactory().fromType(value); // Enumeration<MessageSignificanceCategory> 6050 else if (name.equals("mode")) 6051 this.mode = new ConformanceEventModeEnumFactory().fromType(value); // Enumeration<ConformanceEventMode> 6052 else if (name.equals("focus")) 6053 this.focus = castToCode(value); // CodeType 6054 else if (name.equals("request")) 6055 this.request = castToReference(value); // Reference 6056 else if (name.equals("response")) 6057 this.response = castToReference(value); // Reference 6058 else if (name.equals("documentation")) 6059 this.documentation = castToString(value); // StringType 6060 else 6061 super.setProperty(name, value); 6062 } 6063 6064 @Override 6065 public Base addChild(String name) throws FHIRException { 6066 if (name.equals("code")) { 6067 this.code = new Coding(); 6068 return this.code; 6069 } 6070 else if (name.equals("category")) { 6071 throw new FHIRException("Cannot call addChild on a primitive type Conformance.category"); 6072 } 6073 else if (name.equals("mode")) { 6074 throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); 6075 } 6076 else if (name.equals("focus")) { 6077 throw new FHIRException("Cannot call addChild on a primitive type Conformance.focus"); 6078 } 6079 else if (name.equals("request")) { 6080 this.request = new Reference(); 6081 return this.request; 6082 } 6083 else if (name.equals("response")) { 6084 this.response = new Reference(); 6085 return this.response; 6086 } 6087 else if (name.equals("documentation")) { 6088 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 6089 } 6090 else 6091 return super.addChild(name); 6092 } 6093 6094 public ConformanceMessagingEventComponent copy() { 6095 ConformanceMessagingEventComponent dst = new ConformanceMessagingEventComponent(); 6096 copyValues(dst); 6097 dst.code = code == null ? null : code.copy(); 6098 dst.category = category == null ? null : category.copy(); 6099 dst.mode = mode == null ? null : mode.copy(); 6100 dst.focus = focus == null ? null : focus.copy(); 6101 dst.request = request == null ? null : request.copy(); 6102 dst.response = response == null ? null : response.copy(); 6103 dst.documentation = documentation == null ? null : documentation.copy(); 6104 return dst; 6105 } 6106 6107 @Override 6108 public boolean equalsDeep(Base other) { 6109 if (!super.equalsDeep(other)) 6110 return false; 6111 if (!(other instanceof ConformanceMessagingEventComponent)) 6112 return false; 6113 ConformanceMessagingEventComponent o = (ConformanceMessagingEventComponent) other; 6114 return compareDeep(code, o.code, true) && compareDeep(category, o.category, true) && compareDeep(mode, o.mode, true) 6115 && compareDeep(focus, o.focus, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) 6116 && compareDeep(documentation, o.documentation, true); 6117 } 6118 6119 @Override 6120 public boolean equalsShallow(Base other) { 6121 if (!super.equalsShallow(other)) 6122 return false; 6123 if (!(other instanceof ConformanceMessagingEventComponent)) 6124 return false; 6125 ConformanceMessagingEventComponent o = (ConformanceMessagingEventComponent) other; 6126 return compareValues(category, o.category, true) && compareValues(mode, o.mode, true) && compareValues(focus, o.focus, true) 6127 && compareValues(documentation, o.documentation, true); 6128 } 6129 6130 public boolean isEmpty() { 6131 return super.isEmpty() && (code == null || code.isEmpty()) && (category == null || category.isEmpty()) 6132 && (mode == null || mode.isEmpty()) && (focus == null || focus.isEmpty()) && (request == null || request.isEmpty()) 6133 && (response == null || response.isEmpty()) && (documentation == null || documentation.isEmpty()) 6134 ; 6135 } 6136 6137 public String fhirType() { 6138 return "Conformance.messaging.event"; 6139 6140 } 6141 6142 } 6143 6144 @Block() 6145 public static class ConformanceDocumentComponent extends BackboneElement implements IBaseBackboneElement { 6146 /** 6147 * Mode of this document declaration - whether application is producer or consumer. 6148 */ 6149 @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 6150 @Description(shortDefinition="producer | consumer", formalDefinition="Mode of this document declaration - whether application is producer or consumer." ) 6151 protected Enumeration<DocumentMode> mode; 6152 6153 /** 6154 * A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. 6155 */ 6156 @Child(name = "documentation", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 6157 @Description(shortDefinition="Description of document support", formalDefinition="A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc." ) 6158 protected StringType documentation; 6159 6160 /** 6161 * A constraint on a resource used in the document. 6162 */ 6163 @Child(name = "profile", type = {StructureDefinition.class}, order=3, min=1, max=1, modifier=false, summary=false) 6164 @Description(shortDefinition="Constraint on a resource used in the document", formalDefinition="A constraint on a resource used in the document." ) 6165 protected Reference profile; 6166 6167 /** 6168 * The actual object that is the target of the reference (A constraint on a resource used in the document.) 6169 */ 6170 protected StructureDefinition profileTarget; 6171 6172 private static final long serialVersionUID = -1059555053L; 6173 6174 /* 6175 * Constructor 6176 */ 6177 public ConformanceDocumentComponent() { 6178 super(); 6179 } 6180 6181 /* 6182 * Constructor 6183 */ 6184 public ConformanceDocumentComponent(Enumeration<DocumentMode> mode, Reference profile) { 6185 super(); 6186 this.mode = mode; 6187 this.profile = profile; 6188 } 6189 6190 /** 6191 * @return {@link #mode} (Mode of this document declaration - whether application is producer or consumer.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 6192 */ 6193 public Enumeration<DocumentMode> getModeElement() { 6194 if (this.mode == null) 6195 if (Configuration.errorOnAutoCreate()) 6196 throw new Error("Attempt to auto-create ConformanceDocumentComponent.mode"); 6197 else if (Configuration.doAutoCreate()) 6198 this.mode = new Enumeration<DocumentMode>(new DocumentModeEnumFactory()); // bb 6199 return this.mode; 6200 } 6201 6202 public boolean hasModeElement() { 6203 return this.mode != null && !this.mode.isEmpty(); 6204 } 6205 6206 public boolean hasMode() { 6207 return this.mode != null && !this.mode.isEmpty(); 6208 } 6209 6210 /** 6211 * @param value {@link #mode} (Mode of this document declaration - whether application is producer or consumer.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 6212 */ 6213 public ConformanceDocumentComponent setModeElement(Enumeration<DocumentMode> value) { 6214 this.mode = value; 6215 return this; 6216 } 6217 6218 /** 6219 * @return Mode of this document declaration - whether application is producer or consumer. 6220 */ 6221 public DocumentMode getMode() { 6222 return this.mode == null ? null : this.mode.getValue(); 6223 } 6224 6225 /** 6226 * @param value Mode of this document declaration - whether application is producer or consumer. 6227 */ 6228 public ConformanceDocumentComponent setMode(DocumentMode value) { 6229 if (this.mode == null) 6230 this.mode = new Enumeration<DocumentMode>(new DocumentModeEnumFactory()); 6231 this.mode.setValue(value); 6232 return this; 6233 } 6234 6235 /** 6236 * @return {@link #documentation} (A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 6237 */ 6238 public StringType getDocumentationElement() { 6239 if (this.documentation == null) 6240 if (Configuration.errorOnAutoCreate()) 6241 throw new Error("Attempt to auto-create ConformanceDocumentComponent.documentation"); 6242 else if (Configuration.doAutoCreate()) 6243 this.documentation = new StringType(); // bb 6244 return this.documentation; 6245 } 6246 6247 public boolean hasDocumentationElement() { 6248 return this.documentation != null && !this.documentation.isEmpty(); 6249 } 6250 6251 public boolean hasDocumentation() { 6252 return this.documentation != null && !this.documentation.isEmpty(); 6253 } 6254 6255 /** 6256 * @param value {@link #documentation} (A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 6257 */ 6258 public ConformanceDocumentComponent setDocumentationElement(StringType value) { 6259 this.documentation = value; 6260 return this; 6261 } 6262 6263 /** 6264 * @return A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. 6265 */ 6266 public String getDocumentation() { 6267 return this.documentation == null ? null : this.documentation.getValue(); 6268 } 6269 6270 /** 6271 * @param value A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc. 6272 */ 6273 public ConformanceDocumentComponent setDocumentation(String value) { 6274 if (Utilities.noString(value)) 6275 this.documentation = null; 6276 else { 6277 if (this.documentation == null) 6278 this.documentation = new StringType(); 6279 this.documentation.setValue(value); 6280 } 6281 return this; 6282 } 6283 6284 /** 6285 * @return {@link #profile} (A constraint on a resource used in the document.) 6286 */ 6287 public Reference getProfile() { 6288 if (this.profile == null) 6289 if (Configuration.errorOnAutoCreate()) 6290 throw new Error("Attempt to auto-create ConformanceDocumentComponent.profile"); 6291 else if (Configuration.doAutoCreate()) 6292 this.profile = new Reference(); // cc 6293 return this.profile; 6294 } 6295 6296 public boolean hasProfile() { 6297 return this.profile != null && !this.profile.isEmpty(); 6298 } 6299 6300 /** 6301 * @param value {@link #profile} (A constraint on a resource used in the document.) 6302 */ 6303 public ConformanceDocumentComponent setProfile(Reference value) { 6304 this.profile = value; 6305 return this; 6306 } 6307 6308 /** 6309 * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.) 6310 */ 6311 public StructureDefinition getProfileTarget() { 6312 if (this.profileTarget == null) 6313 if (Configuration.errorOnAutoCreate()) 6314 throw new Error("Attempt to auto-create ConformanceDocumentComponent.profile"); 6315 else if (Configuration.doAutoCreate()) 6316 this.profileTarget = new StructureDefinition(); // aa 6317 return this.profileTarget; 6318 } 6319 6320 /** 6321 * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A constraint on a resource used in the document.) 6322 */ 6323 public ConformanceDocumentComponent setProfileTarget(StructureDefinition value) { 6324 this.profileTarget = value; 6325 return this; 6326 } 6327 6328 protected void listChildren(List<Property> childrenList) { 6329 super.listChildren(childrenList); 6330 childrenList.add(new Property("mode", "code", "Mode of this document declaration - whether application is producer or consumer.", 0, java.lang.Integer.MAX_VALUE, mode)); 6331 childrenList.add(new Property("documentation", "string", "A description of how the application supports or uses the specified document profile. For example, when are documents created, what action is taken with consumed documents, etc.", 0, java.lang.Integer.MAX_VALUE, documentation)); 6332 childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A constraint on a resource used in the document.", 0, java.lang.Integer.MAX_VALUE, profile)); 6333 } 6334 6335 @Override 6336 public void setProperty(String name, Base value) throws FHIRException { 6337 if (name.equals("mode")) 6338 this.mode = new DocumentModeEnumFactory().fromType(value); // Enumeration<DocumentMode> 6339 else if (name.equals("documentation")) 6340 this.documentation = castToString(value); // StringType 6341 else if (name.equals("profile")) 6342 this.profile = castToReference(value); // Reference 6343 else 6344 super.setProperty(name, value); 6345 } 6346 6347 @Override 6348 public Base addChild(String name) throws FHIRException { 6349 if (name.equals("mode")) { 6350 throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); 6351 } 6352 else if (name.equals("documentation")) { 6353 throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); 6354 } 6355 else if (name.equals("profile")) { 6356 this.profile = new Reference(); 6357 return this.profile; 6358 } 6359 else 6360 return super.addChild(name); 6361 } 6362 6363 public ConformanceDocumentComponent copy() { 6364 ConformanceDocumentComponent dst = new ConformanceDocumentComponent(); 6365 copyValues(dst); 6366 dst.mode = mode == null ? null : mode.copy(); 6367 dst.documentation = documentation == null ? null : documentation.copy(); 6368 dst.profile = profile == null ? null : profile.copy(); 6369 return dst; 6370 } 6371 6372 @Override 6373 public boolean equalsDeep(Base other) { 6374 if (!super.equalsDeep(other)) 6375 return false; 6376 if (!(other instanceof ConformanceDocumentComponent)) 6377 return false; 6378 ConformanceDocumentComponent o = (ConformanceDocumentComponent) other; 6379 return compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) && compareDeep(profile, o.profile, true) 6380 ; 6381 } 6382 6383 @Override 6384 public boolean equalsShallow(Base other) { 6385 if (!super.equalsShallow(other)) 6386 return false; 6387 if (!(other instanceof ConformanceDocumentComponent)) 6388 return false; 6389 ConformanceDocumentComponent o = (ConformanceDocumentComponent) other; 6390 return compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true); 6391 } 6392 6393 public boolean isEmpty() { 6394 return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) 6395 && (profile == null || profile.isEmpty()); 6396 } 6397 6398 public String fhirType() { 6399 return "Conformance.document"; 6400 6401 } 6402 6403 } 6404 6405 /** 6406 * An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published. 6407 */ 6408 @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) 6409 @Description(shortDefinition="Logical uri to reference this statement", formalDefinition="An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published." ) 6410 protected UriType url; 6411 6412 /** 6413 * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. 6414 */ 6415 @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 6416 @Description(shortDefinition="Logical id for this version of the statement", formalDefinition="The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) 6417 protected StringType version; 6418 6419 /** 6420 * A free text natural language name identifying the conformance statement. 6421 */ 6422 @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 6423 @Description(shortDefinition="Informal name for this conformance statement", formalDefinition="A free text natural language name identifying the conformance statement." ) 6424 protected StringType name; 6425 6426 /** 6427 * The status of this conformance statement. 6428 */ 6429 @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) 6430 @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." ) 6431 protected Enumeration<ConformanceResourceStatus> status; 6432 6433 /** 6434 * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 6435 */ 6436 @Child(name = "experimental", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) 6437 @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) 6438 protected BooleanType experimental; 6439 6440 /** 6441 * The name of the individual or organization that published the conformance. 6442 */ 6443 @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 6444 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the conformance." ) 6445 protected StringType publisher; 6446 6447 /** 6448 * Contacts to assist a user in finding and communicating with the publisher. 6449 */ 6450 @Child(name = "contact", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 6451 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 6452 protected List<ConformanceContactComponent> contact; 6453 6454 /** 6455 * The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes. 6456 */ 6457 @Child(name = "date", type = {DateTimeType.class}, order=7, min=1, max=1, modifier=false, summary=true) 6458 @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes." ) 6459 protected DateTimeType date; 6460 6461 /** 6462 * A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. 6463 */ 6464 @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) 6465 @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) 6466 protected StringType description; 6467 6468 /** 6469 * Explains why this conformance statement is needed and why it's been constrained as it has. 6470 */ 6471 @Child(name = "requirements", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 6472 @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this conformance statement is needed and why it's been constrained as it has." ) 6473 protected StringType requirements; 6474 6475 /** 6476 * A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. 6477 */ 6478 @Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 6479 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement." ) 6480 protected StringType copyright; 6481 6482 /** 6483 * The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). 6484 */ 6485 @Child(name = "kind", type = {CodeType.class}, order=11, min=1, max=1, modifier=false, summary=true) 6486 @Description(shortDefinition="instance | capability | requirements", formalDefinition="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase)." ) 6487 protected Enumeration<ConformanceStatementKind> kind; 6488 6489 /** 6490 * Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation. 6491 */ 6492 @Child(name = "software", type = {}, order=12, min=0, max=1, modifier=false, summary=true) 6493 @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation." ) 6494 protected ConformanceSoftwareComponent software; 6495 6496 /** 6497 * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program. 6498 */ 6499 @Child(name = "implementation", type = {}, order=13, min=0, max=1, modifier=false, summary=true) 6500 @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program." ) 6501 protected ConformanceImplementationComponent implementation; 6502 6503 /** 6504 * The version of the FHIR specification on which this conformance statement is based. 6505 */ 6506 @Child(name = "fhirVersion", type = {IdType.class}, order=14, min=1, max=1, modifier=false, summary=true) 6507 @Description(shortDefinition="FHIR Version the system uses", formalDefinition="The version of the FHIR specification on which this conformance statement is based." ) 6508 protected IdType fhirVersion; 6509 6510 /** 6511 * A code that indicates whether the application accepts unknown elements or extensions when reading resources. 6512 */ 6513 @Child(name = "acceptUnknown", type = {CodeType.class}, order=15, min=1, max=1, modifier=false, summary=true) 6514 @Description(shortDefinition="no | extensions | elements | both", formalDefinition="A code that indicates whether the application accepts unknown elements or extensions when reading resources." ) 6515 protected Enumeration<UnknownContentCode> acceptUnknown; 6516 6517 /** 6518 * A list of the formats supported by this implementation using their content types. 6519 */ 6520 @Child(name = "format", type = {CodeType.class}, order=16, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 6521 @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation using their content types." ) 6522 protected List<CodeType> format; 6523 6524 /** 6525 * A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}. 6526 */ 6527 @Child(name = "profile", type = {StructureDefinition.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6528 @Description(shortDefinition="Profiles for use cases supported", formalDefinition="A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}." ) 6529 protected List<Reference> profile; 6530 /** 6531 * The actual objects that are the target of the reference (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 6532 */ 6533 protected List<StructureDefinition> profileTarget; 6534 6535 6536 /** 6537 * A definition of the restful capabilities of the solution, if any. 6538 */ 6539 @Child(name = "rest", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 6540 @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." ) 6541 protected List<ConformanceRestComponent> rest; 6542 6543 /** 6544 * A description of the messaging capabilities of the solution. 6545 */ 6546 @Child(name = "messaging", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6547 @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." ) 6548 protected List<ConformanceMessagingComponent> messaging; 6549 6550 /** 6551 * A document definition. 6552 */ 6553 @Child(name = "document", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 6554 @Description(shortDefinition="Document definition", formalDefinition="A document definition." ) 6555 protected List<ConformanceDocumentComponent> document; 6556 6557 private static final long serialVersionUID = 1863739648L; 6558 6559 /* 6560 * Constructor 6561 */ 6562 public Conformance() { 6563 super(); 6564 } 6565 6566 /* 6567 * Constructor 6568 */ 6569 public Conformance(DateTimeType date, Enumeration<ConformanceStatementKind> kind, IdType fhirVersion, Enumeration<UnknownContentCode> acceptUnknown) { 6570 super(); 6571 this.date = date; 6572 this.kind = kind; 6573 this.fhirVersion = fhirVersion; 6574 this.acceptUnknown = acceptUnknown; 6575 } 6576 6577 /** 6578 * @return {@link #url} (An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 6579 */ 6580 public UriType getUrlElement() { 6581 if (this.url == null) 6582 if (Configuration.errorOnAutoCreate()) 6583 throw new Error("Attempt to auto-create Conformance.url"); 6584 else if (Configuration.doAutoCreate()) 6585 this.url = new UriType(); // bb 6586 return this.url; 6587 } 6588 6589 public boolean hasUrlElement() { 6590 return this.url != null && !this.url.isEmpty(); 6591 } 6592 6593 public boolean hasUrl() { 6594 return this.url != null && !this.url.isEmpty(); 6595 } 6596 6597 /** 6598 * @param value {@link #url} (An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 6599 */ 6600 public Conformance setUrlElement(UriType value) { 6601 this.url = value; 6602 return this; 6603 } 6604 6605 /** 6606 * @return An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published. 6607 */ 6608 public String getUrl() { 6609 return this.url == null ? null : this.url.getValue(); 6610 } 6611 6612 /** 6613 * @param value An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published. 6614 */ 6615 public Conformance setUrl(String value) { 6616 if (Utilities.noString(value)) 6617 this.url = null; 6618 else { 6619 if (this.url == null) 6620 this.url = new UriType(); 6621 this.url.setValue(value); 6622 } 6623 return this; 6624 } 6625 6626 /** 6627 * @return {@link #version} (The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 6628 */ 6629 public StringType getVersionElement() { 6630 if (this.version == null) 6631 if (Configuration.errorOnAutoCreate()) 6632 throw new Error("Attempt to auto-create Conformance.version"); 6633 else if (Configuration.doAutoCreate()) 6634 this.version = new StringType(); // bb 6635 return this.version; 6636 } 6637 6638 public boolean hasVersionElement() { 6639 return this.version != null && !this.version.isEmpty(); 6640 } 6641 6642 public boolean hasVersion() { 6643 return this.version != null && !this.version.isEmpty(); 6644 } 6645 6646 /** 6647 * @param value {@link #version} (The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 6648 */ 6649 public Conformance setVersionElement(StringType value) { 6650 this.version = value; 6651 return this; 6652 } 6653 6654 /** 6655 * @return The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. 6656 */ 6657 public String getVersion() { 6658 return this.version == null ? null : this.version.getValue(); 6659 } 6660 6661 /** 6662 * @param value The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. 6663 */ 6664 public Conformance setVersion(String value) { 6665 if (Utilities.noString(value)) 6666 this.version = null; 6667 else { 6668 if (this.version == null) 6669 this.version = new StringType(); 6670 this.version.setValue(value); 6671 } 6672 return this; 6673 } 6674 6675 /** 6676 * @return {@link #name} (A free text natural language name identifying the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 6677 */ 6678 public StringType getNameElement() { 6679 if (this.name == null) 6680 if (Configuration.errorOnAutoCreate()) 6681 throw new Error("Attempt to auto-create Conformance.name"); 6682 else if (Configuration.doAutoCreate()) 6683 this.name = new StringType(); // bb 6684 return this.name; 6685 } 6686 6687 public boolean hasNameElement() { 6688 return this.name != null && !this.name.isEmpty(); 6689 } 6690 6691 public boolean hasName() { 6692 return this.name != null && !this.name.isEmpty(); 6693 } 6694 6695 /** 6696 * @param value {@link #name} (A free text natural language name identifying the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 6697 */ 6698 public Conformance setNameElement(StringType value) { 6699 this.name = value; 6700 return this; 6701 } 6702 6703 /** 6704 * @return A free text natural language name identifying the conformance statement. 6705 */ 6706 public String getName() { 6707 return this.name == null ? null : this.name.getValue(); 6708 } 6709 6710 /** 6711 * @param value A free text natural language name identifying the conformance statement. 6712 */ 6713 public Conformance setName(String value) { 6714 if (Utilities.noString(value)) 6715 this.name = null; 6716 else { 6717 if (this.name == null) 6718 this.name = new StringType(); 6719 this.name.setValue(value); 6720 } 6721 return this; 6722 } 6723 6724 /** 6725 * @return {@link #status} (The status of this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 6726 */ 6727 public Enumeration<ConformanceResourceStatus> getStatusElement() { 6728 if (this.status == null) 6729 if (Configuration.errorOnAutoCreate()) 6730 throw new Error("Attempt to auto-create Conformance.status"); 6731 else if (Configuration.doAutoCreate()) 6732 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb 6733 return this.status; 6734 } 6735 6736 public boolean hasStatusElement() { 6737 return this.status != null && !this.status.isEmpty(); 6738 } 6739 6740 public boolean hasStatus() { 6741 return this.status != null && !this.status.isEmpty(); 6742 } 6743 6744 /** 6745 * @param value {@link #status} (The status of this conformance statement.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 6746 */ 6747 public Conformance setStatusElement(Enumeration<ConformanceResourceStatus> value) { 6748 this.status = value; 6749 return this; 6750 } 6751 6752 /** 6753 * @return The status of this conformance statement. 6754 */ 6755 public ConformanceResourceStatus getStatus() { 6756 return this.status == null ? null : this.status.getValue(); 6757 } 6758 6759 /** 6760 * @param value The status of this conformance statement. 6761 */ 6762 public Conformance setStatus(ConformanceResourceStatus value) { 6763 if (value == null) 6764 this.status = null; 6765 else { 6766 if (this.status == null) 6767 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); 6768 this.status.setValue(value); 6769 } 6770 return this; 6771 } 6772 6773 /** 6774 * @return {@link #experimental} (A flag to indicate that this conformance statement 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 6775 */ 6776 public BooleanType getExperimentalElement() { 6777 if (this.experimental == null) 6778 if (Configuration.errorOnAutoCreate()) 6779 throw new Error("Attempt to auto-create Conformance.experimental"); 6780 else if (Configuration.doAutoCreate()) 6781 this.experimental = new BooleanType(); // bb 6782 return this.experimental; 6783 } 6784 6785 public boolean hasExperimentalElement() { 6786 return this.experimental != null && !this.experimental.isEmpty(); 6787 } 6788 6789 public boolean hasExperimental() { 6790 return this.experimental != null && !this.experimental.isEmpty(); 6791 } 6792 6793 /** 6794 * @param value {@link #experimental} (A flag to indicate that this conformance statement 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 6795 */ 6796 public Conformance setExperimentalElement(BooleanType value) { 6797 this.experimental = value; 6798 return this; 6799 } 6800 6801 /** 6802 * @return A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 6803 */ 6804 public boolean getExperimental() { 6805 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 6806 } 6807 6808 /** 6809 * @param value A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 6810 */ 6811 public Conformance setExperimental(boolean value) { 6812 if (this.experimental == null) 6813 this.experimental = new BooleanType(); 6814 this.experimental.setValue(value); 6815 return this; 6816 } 6817 6818 /** 6819 * @return {@link #publisher} (The name of the individual or organization that published the conformance.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 6820 */ 6821 public StringType getPublisherElement() { 6822 if (this.publisher == null) 6823 if (Configuration.errorOnAutoCreate()) 6824 throw new Error("Attempt to auto-create Conformance.publisher"); 6825 else if (Configuration.doAutoCreate()) 6826 this.publisher = new StringType(); // bb 6827 return this.publisher; 6828 } 6829 6830 public boolean hasPublisherElement() { 6831 return this.publisher != null && !this.publisher.isEmpty(); 6832 } 6833 6834 public boolean hasPublisher() { 6835 return this.publisher != null && !this.publisher.isEmpty(); 6836 } 6837 6838 /** 6839 * @param value {@link #publisher} (The name of the individual or organization that published the conformance.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 6840 */ 6841 public Conformance setPublisherElement(StringType value) { 6842 this.publisher = value; 6843 return this; 6844 } 6845 6846 /** 6847 * @return The name of the individual or organization that published the conformance. 6848 */ 6849 public String getPublisher() { 6850 return this.publisher == null ? null : this.publisher.getValue(); 6851 } 6852 6853 /** 6854 * @param value The name of the individual or organization that published the conformance. 6855 */ 6856 public Conformance setPublisher(String value) { 6857 if (Utilities.noString(value)) 6858 this.publisher = null; 6859 else { 6860 if (this.publisher == null) 6861 this.publisher = new StringType(); 6862 this.publisher.setValue(value); 6863 } 6864 return this; 6865 } 6866 6867 /** 6868 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 6869 */ 6870 public List<ConformanceContactComponent> getContact() { 6871 if (this.contact == null) 6872 this.contact = new ArrayList<ConformanceContactComponent>(); 6873 return this.contact; 6874 } 6875 6876 public boolean hasContact() { 6877 if (this.contact == null) 6878 return false; 6879 for (ConformanceContactComponent item : this.contact) 6880 if (!item.isEmpty()) 6881 return true; 6882 return false; 6883 } 6884 6885 /** 6886 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 6887 */ 6888 // syntactic sugar 6889 public ConformanceContactComponent addContact() { //3 6890 ConformanceContactComponent t = new ConformanceContactComponent(); 6891 if (this.contact == null) 6892 this.contact = new ArrayList<ConformanceContactComponent>(); 6893 this.contact.add(t); 6894 return t; 6895 } 6896 6897 // syntactic sugar 6898 public Conformance addContact(ConformanceContactComponent t) { //3 6899 if (t == null) 6900 return this; 6901 if (this.contact == null) 6902 this.contact = new ArrayList<ConformanceContactComponent>(); 6903 this.contact.add(t); 6904 return this; 6905 } 6906 6907 /** 6908 * @return {@link #date} (The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 6909 */ 6910 public DateTimeType getDateElement() { 6911 if (this.date == null) 6912 if (Configuration.errorOnAutoCreate()) 6913 throw new Error("Attempt to auto-create Conformance.date"); 6914 else if (Configuration.doAutoCreate()) 6915 this.date = new DateTimeType(); // bb 6916 return this.date; 6917 } 6918 6919 public boolean hasDateElement() { 6920 return this.date != null && !this.date.isEmpty(); 6921 } 6922 6923 public boolean hasDate() { 6924 return this.date != null && !this.date.isEmpty(); 6925 } 6926 6927 /** 6928 * @param value {@link #date} (The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 6929 */ 6930 public Conformance setDateElement(DateTimeType value) { 6931 this.date = value; 6932 return this; 6933 } 6934 6935 /** 6936 * @return The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes. 6937 */ 6938 public Date getDate() { 6939 return this.date == null ? null : this.date.getValue(); 6940 } 6941 6942 /** 6943 * @param value The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes. 6944 */ 6945 public Conformance setDate(Date value) { 6946 if (this.date == null) 6947 this.date = new DateTimeType(); 6948 this.date.setValue(value); 6949 return this; 6950 } 6951 6952 /** 6953 * @return {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 6954 */ 6955 public StringType getDescriptionElement() { 6956 if (this.description == null) 6957 if (Configuration.errorOnAutoCreate()) 6958 throw new Error("Attempt to auto-create Conformance.description"); 6959 else if (Configuration.doAutoCreate()) 6960 this.description = new StringType(); // bb 6961 return this.description; 6962 } 6963 6964 public boolean hasDescriptionElement() { 6965 return this.description != null && !this.description.isEmpty(); 6966 } 6967 6968 public boolean hasDescription() { 6969 return this.description != null && !this.description.isEmpty(); 6970 } 6971 6972 /** 6973 * @param value {@link #description} (A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 6974 */ 6975 public Conformance setDescriptionElement(StringType value) { 6976 this.description = value; 6977 return this; 6978 } 6979 6980 /** 6981 * @return A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. 6982 */ 6983 public String getDescription() { 6984 return this.description == null ? null : this.description.getValue(); 6985 } 6986 6987 /** 6988 * @param value A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP. 6989 */ 6990 public Conformance setDescription(String value) { 6991 if (Utilities.noString(value)) 6992 this.description = null; 6993 else { 6994 if (this.description == null) 6995 this.description = new StringType(); 6996 this.description.setValue(value); 6997 } 6998 return this; 6999 } 7000 7001 /** 7002 * @return {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 7003 */ 7004 public StringType getRequirementsElement() { 7005 if (this.requirements == null) 7006 if (Configuration.errorOnAutoCreate()) 7007 throw new Error("Attempt to auto-create Conformance.requirements"); 7008 else if (Configuration.doAutoCreate()) 7009 this.requirements = new StringType(); // bb 7010 return this.requirements; 7011 } 7012 7013 public boolean hasRequirementsElement() { 7014 return this.requirements != null && !this.requirements.isEmpty(); 7015 } 7016 7017 public boolean hasRequirements() { 7018 return this.requirements != null && !this.requirements.isEmpty(); 7019 } 7020 7021 /** 7022 * @param value {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 7023 */ 7024 public Conformance setRequirementsElement(StringType value) { 7025 this.requirements = value; 7026 return this; 7027 } 7028 7029 /** 7030 * @return Explains why this conformance statement is needed and why it's been constrained as it has. 7031 */ 7032 public String getRequirements() { 7033 return this.requirements == null ? null : this.requirements.getValue(); 7034 } 7035 7036 /** 7037 * @param value Explains why this conformance statement is needed and why it's been constrained as it has. 7038 */ 7039 public Conformance setRequirements(String value) { 7040 if (Utilities.noString(value)) 7041 this.requirements = null; 7042 else { 7043 if (this.requirements == null) 7044 this.requirements = new StringType(); 7045 this.requirements.setValue(value); 7046 } 7047 return this; 7048 } 7049 7050 /** 7051 * @return {@link #copyright} (A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 7052 */ 7053 public StringType getCopyrightElement() { 7054 if (this.copyright == null) 7055 if (Configuration.errorOnAutoCreate()) 7056 throw new Error("Attempt to auto-create Conformance.copyright"); 7057 else if (Configuration.doAutoCreate()) 7058 this.copyright = new StringType(); // bb 7059 return this.copyright; 7060 } 7061 7062 public boolean hasCopyrightElement() { 7063 return this.copyright != null && !this.copyright.isEmpty(); 7064 } 7065 7066 public boolean hasCopyright() { 7067 return this.copyright != null && !this.copyright.isEmpty(); 7068 } 7069 7070 /** 7071 * @param value {@link #copyright} (A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 7072 */ 7073 public Conformance setCopyrightElement(StringType value) { 7074 this.copyright = value; 7075 return this; 7076 } 7077 7078 /** 7079 * @return A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. 7080 */ 7081 public String getCopyright() { 7082 return this.copyright == null ? null : this.copyright.getValue(); 7083 } 7084 7085 /** 7086 * @param value A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. 7087 */ 7088 public Conformance setCopyright(String value) { 7089 if (Utilities.noString(value)) 7090 this.copyright = null; 7091 else { 7092 if (this.copyright == null) 7093 this.copyright = new StringType(); 7094 this.copyright.setValue(value); 7095 } 7096 return this; 7097 } 7098 7099 /** 7100 * @return {@link #kind} (The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 7101 */ 7102 public Enumeration<ConformanceStatementKind> getKindElement() { 7103 if (this.kind == null) 7104 if (Configuration.errorOnAutoCreate()) 7105 throw new Error("Attempt to auto-create Conformance.kind"); 7106 else if (Configuration.doAutoCreate()) 7107 this.kind = new Enumeration<ConformanceStatementKind>(new ConformanceStatementKindEnumFactory()); // bb 7108 return this.kind; 7109 } 7110 7111 public boolean hasKindElement() { 7112 return this.kind != null && !this.kind.isEmpty(); 7113 } 7114 7115 public boolean hasKind() { 7116 return this.kind != null && !this.kind.isEmpty(); 7117 } 7118 7119 /** 7120 * @param value {@link #kind} (The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 7121 */ 7122 public Conformance setKindElement(Enumeration<ConformanceStatementKind> value) { 7123 this.kind = value; 7124 return this; 7125 } 7126 7127 /** 7128 * @return The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). 7129 */ 7130 public ConformanceStatementKind getKind() { 7131 return this.kind == null ? null : this.kind.getValue(); 7132 } 7133 7134 /** 7135 * @param value The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). 7136 */ 7137 public Conformance setKind(ConformanceStatementKind value) { 7138 if (this.kind == null) 7139 this.kind = new Enumeration<ConformanceStatementKind>(new ConformanceStatementKindEnumFactory()); 7140 this.kind.setValue(value); 7141 return this; 7142 } 7143 7144 /** 7145 * @return {@link #software} (Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.) 7146 */ 7147 public ConformanceSoftwareComponent getSoftware() { 7148 if (this.software == null) 7149 if (Configuration.errorOnAutoCreate()) 7150 throw new Error("Attempt to auto-create Conformance.software"); 7151 else if (Configuration.doAutoCreate()) 7152 this.software = new ConformanceSoftwareComponent(); // cc 7153 return this.software; 7154 } 7155 7156 public boolean hasSoftware() { 7157 return this.software != null && !this.software.isEmpty(); 7158 } 7159 7160 /** 7161 * @param value {@link #software} (Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.) 7162 */ 7163 public Conformance setSoftware(ConformanceSoftwareComponent value) { 7164 this.software = value; 7165 return this; 7166 } 7167 7168 /** 7169 * @return {@link #implementation} (Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.) 7170 */ 7171 public ConformanceImplementationComponent getImplementation() { 7172 if (this.implementation == null) 7173 if (Configuration.errorOnAutoCreate()) 7174 throw new Error("Attempt to auto-create Conformance.implementation"); 7175 else if (Configuration.doAutoCreate()) 7176 this.implementation = new ConformanceImplementationComponent(); // cc 7177 return this.implementation; 7178 } 7179 7180 public boolean hasImplementation() { 7181 return this.implementation != null && !this.implementation.isEmpty(); 7182 } 7183 7184 /** 7185 * @param value {@link #implementation} (Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.) 7186 */ 7187 public Conformance setImplementation(ConformanceImplementationComponent value) { 7188 this.implementation = value; 7189 return this; 7190 } 7191 7192 /** 7193 * @return {@link #fhirVersion} (The version of the FHIR specification on which this conformance statement is based.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value 7194 */ 7195 public IdType getFhirVersionElement() { 7196 if (this.fhirVersion == null) 7197 if (Configuration.errorOnAutoCreate()) 7198 throw new Error("Attempt to auto-create Conformance.fhirVersion"); 7199 else if (Configuration.doAutoCreate()) 7200 this.fhirVersion = new IdType(); // bb 7201 return this.fhirVersion; 7202 } 7203 7204 public boolean hasFhirVersionElement() { 7205 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 7206 } 7207 7208 public boolean hasFhirVersion() { 7209 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 7210 } 7211 7212 /** 7213 * @param value {@link #fhirVersion} (The version of the FHIR specification on which this conformance statement is based.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value 7214 */ 7215 public Conformance setFhirVersionElement(IdType value) { 7216 this.fhirVersion = value; 7217 return this; 7218 } 7219 7220 /** 7221 * @return The version of the FHIR specification on which this conformance statement is based. 7222 */ 7223 public String getFhirVersion() { 7224 return this.fhirVersion == null ? null : this.fhirVersion.getValue(); 7225 } 7226 7227 /** 7228 * @param value The version of the FHIR specification on which this conformance statement is based. 7229 */ 7230 public Conformance setFhirVersion(String value) { 7231 if (this.fhirVersion == null) 7232 this.fhirVersion = new IdType(); 7233 this.fhirVersion.setValue(value); 7234 return this; 7235 } 7236 7237 /** 7238 * @return {@link #acceptUnknown} (A code that indicates whether the application accepts unknown elements or extensions when reading resources.). This is the underlying object with id, value and extensions. The accessor "getAcceptUnknown" gives direct access to the value 7239 */ 7240 public Enumeration<UnknownContentCode> getAcceptUnknownElement() { 7241 if (this.acceptUnknown == null) 7242 if (Configuration.errorOnAutoCreate()) 7243 throw new Error("Attempt to auto-create Conformance.acceptUnknown"); 7244 else if (Configuration.doAutoCreate()) 7245 this.acceptUnknown = new Enumeration<UnknownContentCode>(new UnknownContentCodeEnumFactory()); // bb 7246 return this.acceptUnknown; 7247 } 7248 7249 public boolean hasAcceptUnknownElement() { 7250 return this.acceptUnknown != null && !this.acceptUnknown.isEmpty(); 7251 } 7252 7253 public boolean hasAcceptUnknown() { 7254 return this.acceptUnknown != null && !this.acceptUnknown.isEmpty(); 7255 } 7256 7257 /** 7258 * @param value {@link #acceptUnknown} (A code that indicates whether the application accepts unknown elements or extensions when reading resources.). This is the underlying object with id, value and extensions. The accessor "getAcceptUnknown" gives direct access to the value 7259 */ 7260 public Conformance setAcceptUnknownElement(Enumeration<UnknownContentCode> value) { 7261 this.acceptUnknown = value; 7262 return this; 7263 } 7264 7265 /** 7266 * @return A code that indicates whether the application accepts unknown elements or extensions when reading resources. 7267 */ 7268 public UnknownContentCode getAcceptUnknown() { 7269 return this.acceptUnknown == null ? null : this.acceptUnknown.getValue(); 7270 } 7271 7272 /** 7273 * @param value A code that indicates whether the application accepts unknown elements or extensions when reading resources. 7274 */ 7275 public Conformance setAcceptUnknown(UnknownContentCode value) { 7276 if (this.acceptUnknown == null) 7277 this.acceptUnknown = new Enumeration<UnknownContentCode>(new UnknownContentCodeEnumFactory()); 7278 this.acceptUnknown.setValue(value); 7279 return this; 7280 } 7281 7282 /** 7283 * @return {@link #format} (A list of the formats supported by this implementation using their content types.) 7284 */ 7285 public List<CodeType> getFormat() { 7286 if (this.format == null) 7287 this.format = new ArrayList<CodeType>(); 7288 return this.format; 7289 } 7290 7291 public boolean hasFormat() { 7292 if (this.format == null) 7293 return false; 7294 for (CodeType item : this.format) 7295 if (!item.isEmpty()) 7296 return true; 7297 return false; 7298 } 7299 7300 /** 7301 * @return {@link #format} (A list of the formats supported by this implementation using their content types.) 7302 */ 7303 // syntactic sugar 7304 public CodeType addFormatElement() {//2 7305 CodeType t = new CodeType(); 7306 if (this.format == null) 7307 this.format = new ArrayList<CodeType>(); 7308 this.format.add(t); 7309 return t; 7310 } 7311 7312 /** 7313 * @param value {@link #format} (A list of the formats supported by this implementation using their content types.) 7314 */ 7315 public Conformance addFormat(String value) { //1 7316 CodeType t = new CodeType(); 7317 t.setValue(value); 7318 if (this.format == null) 7319 this.format = new ArrayList<CodeType>(); 7320 this.format.add(t); 7321 return this; 7322 } 7323 7324 /** 7325 * @param value {@link #format} (A list of the formats supported by this implementation using their content types.) 7326 */ 7327 public boolean hasFormat(String value) { 7328 if (this.format == null) 7329 return false; 7330 for (CodeType v : this.format) 7331 if (v.equals(value)) // code 7332 return true; 7333 return false; 7334 } 7335 7336 /** 7337 * @return {@link #profile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 7338 */ 7339 public List<Reference> getProfile() { 7340 if (this.profile == null) 7341 this.profile = new ArrayList<Reference>(); 7342 return this.profile; 7343 } 7344 7345 public boolean hasProfile() { 7346 if (this.profile == null) 7347 return false; 7348 for (Reference item : this.profile) 7349 if (!item.isEmpty()) 7350 return true; 7351 return false; 7352 } 7353 7354 /** 7355 * @return {@link #profile} (A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 7356 */ 7357 // syntactic sugar 7358 public Reference addProfile() { //3 7359 Reference t = new Reference(); 7360 if (this.profile == null) 7361 this.profile = new ArrayList<Reference>(); 7362 this.profile.add(t); 7363 return t; 7364 } 7365 7366 // syntactic sugar 7367 public Conformance addProfile(Reference t) { //3 7368 if (t == null) 7369 return this; 7370 if (this.profile == null) 7371 this.profile = new ArrayList<Reference>(); 7372 this.profile.add(t); 7373 return this; 7374 } 7375 7376 /** 7377 * @return {@link #profile} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 7378 */ 7379 public List<StructureDefinition> getProfileTarget() { 7380 if (this.profileTarget == null) 7381 this.profileTarget = new ArrayList<StructureDefinition>(); 7382 return this.profileTarget; 7383 } 7384 7385 // syntactic sugar 7386 /** 7387 * @return {@link #profile} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.) 7388 */ 7389 public StructureDefinition addProfileTarget() { 7390 StructureDefinition r = new StructureDefinition(); 7391 if (this.profileTarget == null) 7392 this.profileTarget = new ArrayList<StructureDefinition>(); 7393 this.profileTarget.add(r); 7394 return r; 7395 } 7396 7397 /** 7398 * @return {@link #rest} (A definition of the restful capabilities of the solution, if any.) 7399 */ 7400 public List<ConformanceRestComponent> getRest() { 7401 if (this.rest == null) 7402 this.rest = new ArrayList<ConformanceRestComponent>(); 7403 return this.rest; 7404 } 7405 7406 public boolean hasRest() { 7407 if (this.rest == null) 7408 return false; 7409 for (ConformanceRestComponent item : this.rest) 7410 if (!item.isEmpty()) 7411 return true; 7412 return false; 7413 } 7414 7415 /** 7416 * @return {@link #rest} (A definition of the restful capabilities of the solution, if any.) 7417 */ 7418 // syntactic sugar 7419 public ConformanceRestComponent addRest() { //3 7420 ConformanceRestComponent t = new ConformanceRestComponent(); 7421 if (this.rest == null) 7422 this.rest = new ArrayList<ConformanceRestComponent>(); 7423 this.rest.add(t); 7424 return t; 7425 } 7426 7427 // syntactic sugar 7428 public Conformance addRest(ConformanceRestComponent t) { //3 7429 if (t == null) 7430 return this; 7431 if (this.rest == null) 7432 this.rest = new ArrayList<ConformanceRestComponent>(); 7433 this.rest.add(t); 7434 return this; 7435 } 7436 7437 /** 7438 * @return {@link #messaging} (A description of the messaging capabilities of the solution.) 7439 */ 7440 public List<ConformanceMessagingComponent> getMessaging() { 7441 if (this.messaging == null) 7442 this.messaging = new ArrayList<ConformanceMessagingComponent>(); 7443 return this.messaging; 7444 } 7445 7446 public boolean hasMessaging() { 7447 if (this.messaging == null) 7448 return false; 7449 for (ConformanceMessagingComponent item : this.messaging) 7450 if (!item.isEmpty()) 7451 return true; 7452 return false; 7453 } 7454 7455 /** 7456 * @return {@link #messaging} (A description of the messaging capabilities of the solution.) 7457 */ 7458 // syntactic sugar 7459 public ConformanceMessagingComponent addMessaging() { //3 7460 ConformanceMessagingComponent t = new ConformanceMessagingComponent(); 7461 if (this.messaging == null) 7462 this.messaging = new ArrayList<ConformanceMessagingComponent>(); 7463 this.messaging.add(t); 7464 return t; 7465 } 7466 7467 // syntactic sugar 7468 public Conformance addMessaging(ConformanceMessagingComponent t) { //3 7469 if (t == null) 7470 return this; 7471 if (this.messaging == null) 7472 this.messaging = new ArrayList<ConformanceMessagingComponent>(); 7473 this.messaging.add(t); 7474 return this; 7475 } 7476 7477 /** 7478 * @return {@link #document} (A document definition.) 7479 */ 7480 public List<ConformanceDocumentComponent> getDocument() { 7481 if (this.document == null) 7482 this.document = new ArrayList<ConformanceDocumentComponent>(); 7483 return this.document; 7484 } 7485 7486 public boolean hasDocument() { 7487 if (this.document == null) 7488 return false; 7489 for (ConformanceDocumentComponent item : this.document) 7490 if (!item.isEmpty()) 7491 return true; 7492 return false; 7493 } 7494 7495 /** 7496 * @return {@link #document} (A document definition.) 7497 */ 7498 // syntactic sugar 7499 public ConformanceDocumentComponent addDocument() { //3 7500 ConformanceDocumentComponent t = new ConformanceDocumentComponent(); 7501 if (this.document == null) 7502 this.document = new ArrayList<ConformanceDocumentComponent>(); 7503 this.document.add(t); 7504 return t; 7505 } 7506 7507 // syntactic sugar 7508 public Conformance addDocument(ConformanceDocumentComponent t) { //3 7509 if (t == null) 7510 return this; 7511 if (this.document == null) 7512 this.document = new ArrayList<ConformanceDocumentComponent>(); 7513 this.document.add(t); 7514 return this; 7515 } 7516 7517 protected void listChildren(List<Property> childrenList) { 7518 super.listChildren(childrenList); 7519 childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this conformance statement is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); 7520 childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); 7521 childrenList.add(new Property("name", "string", "A free text natural language name identifying the conformance statement.", 0, java.lang.Integer.MAX_VALUE, name)); 7522 childrenList.add(new Property("status", "code", "The status of this conformance statement.", 0, java.lang.Integer.MAX_VALUE, status)); 7523 childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); 7524 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the conformance.", 0, java.lang.Integer.MAX_VALUE, publisher)); 7525 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 7526 childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the conformance statement was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the conformance statement changes.", 0, java.lang.Integer.MAX_VALUE, date)); 7527 childrenList.add(new Property("description", "string", "A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", 0, java.lang.Integer.MAX_VALUE, description)); 7528 childrenList.add(new Property("requirements", "string", "Explains why this conformance statement is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); 7529 childrenList.add(new Property("copyright", "string", "A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.", 0, java.lang.Integer.MAX_VALUE, copyright)); 7530 childrenList.add(new Property("kind", "code", "The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).", 0, java.lang.Integer.MAX_VALUE, kind)); 7531 childrenList.add(new Property("software", "", "Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation.", 0, java.lang.Integer.MAX_VALUE, software)); 7532 childrenList.add(new Property("implementation", "", "Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program.", 0, java.lang.Integer.MAX_VALUE, implementation)); 7533 childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this conformance statement is based.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); 7534 childrenList.add(new Property("acceptUnknown", "code", "A code that indicates whether the application accepts unknown elements or extensions when reading resources.", 0, java.lang.Integer.MAX_VALUE, acceptUnknown)); 7535 childrenList.add(new Property("format", "code", "A list of the formats supported by this implementation using their content types.", 0, java.lang.Integer.MAX_VALUE, format)); 7536 childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}.", 0, java.lang.Integer.MAX_VALUE, profile)); 7537 childrenList.add(new Property("rest", "", "A definition of the restful capabilities of the solution, if any.", 0, java.lang.Integer.MAX_VALUE, rest)); 7538 childrenList.add(new Property("messaging", "", "A description of the messaging capabilities of the solution.", 0, java.lang.Integer.MAX_VALUE, messaging)); 7539 childrenList.add(new Property("document", "", "A document definition.", 0, java.lang.Integer.MAX_VALUE, document)); 7540 } 7541 7542 @Override 7543 public void setProperty(String name, Base value) throws FHIRException { 7544 if (name.equals("url")) 7545 this.url = castToUri(value); // UriType 7546 else if (name.equals("version")) 7547 this.version = castToString(value); // StringType 7548 else if (name.equals("name")) 7549 this.name = castToString(value); // StringType 7550 else if (name.equals("status")) 7551 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 7552 else if (name.equals("experimental")) 7553 this.experimental = castToBoolean(value); // BooleanType 7554 else if (name.equals("publisher")) 7555 this.publisher = castToString(value); // StringType 7556 else if (name.equals("contact")) 7557 this.getContact().add((ConformanceContactComponent) value); 7558 else if (name.equals("date")) 7559 this.date = castToDateTime(value); // DateTimeType 7560 else if (name.equals("description")) 7561 this.description = castToString(value); // StringType 7562 else if (name.equals("requirements")) 7563 this.requirements = castToString(value); // StringType 7564 else if (name.equals("copyright")) 7565 this.copyright = castToString(value); // StringType 7566 else if (name.equals("kind")) 7567 this.kind = new ConformanceStatementKindEnumFactory().fromType(value); // Enumeration<ConformanceStatementKind> 7568 else if (name.equals("software")) 7569 this.software = (ConformanceSoftwareComponent) value; // ConformanceSoftwareComponent 7570 else if (name.equals("implementation")) 7571 this.implementation = (ConformanceImplementationComponent) value; // ConformanceImplementationComponent 7572 else if (name.equals("fhirVersion")) 7573 this.fhirVersion = castToId(value); // IdType 7574 else if (name.equals("acceptUnknown")) 7575 this.acceptUnknown = new UnknownContentCodeEnumFactory().fromType(value); // Enumeration<UnknownContentCode> 7576 else if (name.equals("format")) 7577 this.getFormat().add(castToCode(value)); 7578 else if (name.equals("profile")) 7579 this.getProfile().add(castToReference(value)); 7580 else if (name.equals("rest")) 7581 this.getRest().add((ConformanceRestComponent) value); 7582 else if (name.equals("messaging")) 7583 this.getMessaging().add((ConformanceMessagingComponent) value); 7584 else if (name.equals("document")) 7585 this.getDocument().add((ConformanceDocumentComponent) value); 7586 else 7587 super.setProperty(name, value); 7588 } 7589 7590 @Override 7591 public Base addChild(String name) throws FHIRException { 7592 if (name.equals("url")) { 7593 throw new FHIRException("Cannot call addChild on a primitive type Conformance.url"); 7594 } 7595 else if (name.equals("version")) { 7596 throw new FHIRException("Cannot call addChild on a primitive type Conformance.version"); 7597 } 7598 else if (name.equals("name")) { 7599 throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); 7600 } 7601 else if (name.equals("status")) { 7602 throw new FHIRException("Cannot call addChild on a primitive type Conformance.status"); 7603 } 7604 else if (name.equals("experimental")) { 7605 throw new FHIRException("Cannot call addChild on a primitive type Conformance.experimental"); 7606 } 7607 else if (name.equals("publisher")) { 7608 throw new FHIRException("Cannot call addChild on a primitive type Conformance.publisher"); 7609 } 7610 else if (name.equals("contact")) { 7611 return addContact(); 7612 } 7613 else if (name.equals("date")) { 7614 throw new FHIRException("Cannot call addChild on a primitive type Conformance.date"); 7615 } 7616 else if (name.equals("description")) { 7617 throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); 7618 } 7619 else if (name.equals("requirements")) { 7620 throw new FHIRException("Cannot call addChild on a primitive type Conformance.requirements"); 7621 } 7622 else if (name.equals("copyright")) { 7623 throw new FHIRException("Cannot call addChild on a primitive type Conformance.copyright"); 7624 } 7625 else if (name.equals("kind")) { 7626 throw new FHIRException("Cannot call addChild on a primitive type Conformance.kind"); 7627 } 7628 else if (name.equals("software")) { 7629 this.software = new ConformanceSoftwareComponent(); 7630 return this.software; 7631 } 7632 else if (name.equals("implementation")) { 7633 this.implementation = new ConformanceImplementationComponent(); 7634 return this.implementation; 7635 } 7636 else if (name.equals("fhirVersion")) { 7637 throw new FHIRException("Cannot call addChild on a primitive type Conformance.fhirVersion"); 7638 } 7639 else if (name.equals("acceptUnknown")) { 7640 throw new FHIRException("Cannot call addChild on a primitive type Conformance.acceptUnknown"); 7641 } 7642 else if (name.equals("format")) { 7643 throw new FHIRException("Cannot call addChild on a primitive type Conformance.format"); 7644 } 7645 else if (name.equals("profile")) { 7646 return addProfile(); 7647 } 7648 else if (name.equals("rest")) { 7649 return addRest(); 7650 } 7651 else if (name.equals("messaging")) { 7652 return addMessaging(); 7653 } 7654 else if (name.equals("document")) { 7655 return addDocument(); 7656 } 7657 else 7658 return super.addChild(name); 7659 } 7660 7661 public String fhirType() { 7662 return "Conformance"; 7663 7664 } 7665 7666 public Conformance copy() { 7667 Conformance dst = new Conformance(); 7668 copyValues(dst); 7669 dst.url = url == null ? null : url.copy(); 7670 dst.version = version == null ? null : version.copy(); 7671 dst.name = name == null ? null : name.copy(); 7672 dst.status = status == null ? null : status.copy(); 7673 dst.experimental = experimental == null ? null : experimental.copy(); 7674 dst.publisher = publisher == null ? null : publisher.copy(); 7675 if (contact != null) { 7676 dst.contact = new ArrayList<ConformanceContactComponent>(); 7677 for (ConformanceContactComponent i : contact) 7678 dst.contact.add(i.copy()); 7679 }; 7680 dst.date = date == null ? null : date.copy(); 7681 dst.description = description == null ? null : description.copy(); 7682 dst.requirements = requirements == null ? null : requirements.copy(); 7683 dst.copyright = copyright == null ? null : copyright.copy(); 7684 dst.kind = kind == null ? null : kind.copy(); 7685 dst.software = software == null ? null : software.copy(); 7686 dst.implementation = implementation == null ? null : implementation.copy(); 7687 dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); 7688 dst.acceptUnknown = acceptUnknown == null ? null : acceptUnknown.copy(); 7689 if (format != null) { 7690 dst.format = new ArrayList<CodeType>(); 7691 for (CodeType i : format) 7692 dst.format.add(i.copy()); 7693 }; 7694 if (profile != null) { 7695 dst.profile = new ArrayList<Reference>(); 7696 for (Reference i : profile) 7697 dst.profile.add(i.copy()); 7698 }; 7699 if (rest != null) { 7700 dst.rest = new ArrayList<ConformanceRestComponent>(); 7701 for (ConformanceRestComponent i : rest) 7702 dst.rest.add(i.copy()); 7703 }; 7704 if (messaging != null) { 7705 dst.messaging = new ArrayList<ConformanceMessagingComponent>(); 7706 for (ConformanceMessagingComponent i : messaging) 7707 dst.messaging.add(i.copy()); 7708 }; 7709 if (document != null) { 7710 dst.document = new ArrayList<ConformanceDocumentComponent>(); 7711 for (ConformanceDocumentComponent i : document) 7712 dst.document.add(i.copy()); 7713 }; 7714 return dst; 7715 } 7716 7717 protected Conformance typedCopy() { 7718 return copy(); 7719 } 7720 7721 @Override 7722 public boolean equalsDeep(Base other) { 7723 if (!super.equalsDeep(other)) 7724 return false; 7725 if (!(other instanceof Conformance)) 7726 return false; 7727 Conformance o = (Conformance) other; 7728 return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) 7729 && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) 7730 && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) 7731 && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) 7732 && compareDeep(kind, o.kind, true) && compareDeep(software, o.software, true) && compareDeep(implementation, o.implementation, true) 7733 && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(acceptUnknown, o.acceptUnknown, true) 7734 && compareDeep(format, o.format, true) && compareDeep(profile, o.profile, true) && compareDeep(rest, o.rest, true) 7735 && compareDeep(messaging, o.messaging, true) && compareDeep(document, o.document, true); 7736 } 7737 7738 @Override 7739 public boolean equalsShallow(Base other) { 7740 if (!super.equalsShallow(other)) 7741 return false; 7742 if (!(other instanceof Conformance)) 7743 return false; 7744 Conformance o = (Conformance) other; 7745 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) 7746 && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) 7747 && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) 7748 && compareValues(copyright, o.copyright, true) && compareValues(kind, o.kind, true) && compareValues(fhirVersion, o.fhirVersion, true) 7749 && compareValues(acceptUnknown, o.acceptUnknown, true) && compareValues(format, o.format, true); 7750 } 7751 7752 public boolean isEmpty() { 7753 return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) 7754 && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) 7755 && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) 7756 && (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty()) 7757 && (copyright == null || copyright.isEmpty()) && (kind == null || kind.isEmpty()) && (software == null || software.isEmpty()) 7758 && (implementation == null || implementation.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) 7759 && (acceptUnknown == null || acceptUnknown.isEmpty()) && (format == null || format.isEmpty()) 7760 && (profile == null || profile.isEmpty()) && (rest == null || rest.isEmpty()) && (messaging == null || messaging.isEmpty()) 7761 && (document == null || document.isEmpty()); 7762 } 7763 7764 @Override 7765 public ResourceType getResourceType() { 7766 return ResourceType.Conformance; 7767 } 7768 7769 @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date", type="date" ) 7770 public static final String SP_DATE = "date"; 7771 @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" ) 7772 public static final String SP_SOFTWARE = "software"; 7773 @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" ) 7774 public static final String SP_RESOURCE = "resource"; 7775 @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement", type="reference" ) 7776 public static final String SP_PROFILE = "profile"; 7777 @SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" ) 7778 public static final String SP_FORMAT = "format"; 7779 @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" ) 7780 public static final String SP_DESCRIPTION = "description"; 7781 @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" ) 7782 public static final String SP_FHIRVERSION = "fhirversion"; 7783 @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" ) 7784 public static final String SP_VERSION = "version"; 7785 @SearchParamDefinition(name="url", path="Conformance.url", description="The uri that identifies the conformance statement", type="uri" ) 7786 public static final String SP_URL = "url"; 7787 @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles for use cases supported", type="reference" ) 7788 public static final String SP_SUPPORTEDPROFILE = "supported-profile"; 7789 @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" ) 7790 public static final String SP_MODE = "mode"; 7791 @SearchParamDefinition(name="security", path="Conformance.rest.security.service", description="OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates", type="token" ) 7792 public static final String SP_SECURITY = "security"; 7793 @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" ) 7794 public static final String SP_NAME = "name"; 7795 @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" ) 7796 public static final String SP_PUBLISHER = "publisher"; 7797 @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" ) 7798 public static final String SP_EVENT = "event"; 7799 @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" ) 7800 public static final String SP_STATUS = "status"; 7801 7802} 7803