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