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