001package org.hl7.fhir.dstu2016may.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.IBaseDatatypeElement; 039import org.hl7.fhir.instance.model.api.ICompositeType; 040import org.hl7.fhir.utilities.Utilities; 041 042import ca.uhn.fhir.model.api.annotation.Block; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.DatatypeDef; 045import ca.uhn.fhir.model.api.annotation.Description; 046/** 047 * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. 048 */ 049@DatatypeDef(name="ModuleMetadata") 050public class ModuleMetadata extends Type implements ICompositeType { 051 052 public enum ModuleMetadataType { 053 /** 054 * The resource is a description of a knowledge module 055 */ 056 MODULE, 057 /** 058 * The resource is a shareable library of formalized knowledge 059 */ 060 LIBRARY, 061 /** 062 * An Event-Condition-Action Rule Artifact 063 */ 064 DECISIONSUPPORTRULE, 065 /** 066 * A Documentation Template Artifact 067 */ 068 DOCUMENTATIONTEMPLATE, 069 /** 070 * An Order Set Artifact 071 */ 072 ORDERSET, 073 /** 074 * added to help the parsers 075 */ 076 NULL; 077 public static ModuleMetadataType fromCode(String codeString) throws FHIRException { 078 if (codeString == null || "".equals(codeString)) 079 return null; 080 if ("module".equals(codeString)) 081 return MODULE; 082 if ("library".equals(codeString)) 083 return LIBRARY; 084 if ("decision-support-rule".equals(codeString)) 085 return DECISIONSUPPORTRULE; 086 if ("documentation-template".equals(codeString)) 087 return DOCUMENTATIONTEMPLATE; 088 if ("order-set".equals(codeString)) 089 return ORDERSET; 090 throw new FHIRException("Unknown ModuleMetadataType code '"+codeString+"'"); 091 } 092 public String toCode() { 093 switch (this) { 094 case MODULE: return "module"; 095 case LIBRARY: return "library"; 096 case DECISIONSUPPORTRULE: return "decision-support-rule"; 097 case DOCUMENTATIONTEMPLATE: return "documentation-template"; 098 case ORDERSET: return "order-set"; 099 default: return "?"; 100 } 101 } 102 public String getSystem() { 103 switch (this) { 104 case MODULE: return "http://hl7.org/fhir/module-metadata-type"; 105 case LIBRARY: return "http://hl7.org/fhir/module-metadata-type"; 106 case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/module-metadata-type"; 107 case DOCUMENTATIONTEMPLATE: return "http://hl7.org/fhir/module-metadata-type"; 108 case ORDERSET: return "http://hl7.org/fhir/module-metadata-type"; 109 default: return "?"; 110 } 111 } 112 public String getDefinition() { 113 switch (this) { 114 case MODULE: return "The resource is a description of a knowledge module"; 115 case LIBRARY: return "The resource is a shareable library of formalized knowledge"; 116 case DECISIONSUPPORTRULE: return "An Event-Condition-Action Rule Artifact"; 117 case DOCUMENTATIONTEMPLATE: return "A Documentation Template Artifact"; 118 case ORDERSET: return "An Order Set Artifact"; 119 default: return "?"; 120 } 121 } 122 public String getDisplay() { 123 switch (this) { 124 case MODULE: return "Module"; 125 case LIBRARY: return "Library"; 126 case DECISIONSUPPORTRULE: return "Decision Support Rule"; 127 case DOCUMENTATIONTEMPLATE: return "Documentation Template"; 128 case ORDERSET: return "Order Set"; 129 default: return "?"; 130 } 131 } 132 } 133 134 public static class ModuleMetadataTypeEnumFactory implements EnumFactory<ModuleMetadataType> { 135 public ModuleMetadataType fromCode(String codeString) throws IllegalArgumentException { 136 if (codeString == null || "".equals(codeString)) 137 if (codeString == null || "".equals(codeString)) 138 return null; 139 if ("module".equals(codeString)) 140 return ModuleMetadataType.MODULE; 141 if ("library".equals(codeString)) 142 return ModuleMetadataType.LIBRARY; 143 if ("decision-support-rule".equals(codeString)) 144 return ModuleMetadataType.DECISIONSUPPORTRULE; 145 if ("documentation-template".equals(codeString)) 146 return ModuleMetadataType.DOCUMENTATIONTEMPLATE; 147 if ("order-set".equals(codeString)) 148 return ModuleMetadataType.ORDERSET; 149 throw new IllegalArgumentException("Unknown ModuleMetadataType code '"+codeString+"'"); 150 } 151 public Enumeration<ModuleMetadataType> fromType(Base code) throws FHIRException { 152 if (code == null || code.isEmpty()) 153 return null; 154 String codeString = ((PrimitiveType) code).asStringValue(); 155 if (codeString == null || "".equals(codeString)) 156 return null; 157 if ("module".equals(codeString)) 158 return new Enumeration<ModuleMetadataType>(this, ModuleMetadataType.MODULE); 159 if ("library".equals(codeString)) 160 return new Enumeration<ModuleMetadataType>(this, ModuleMetadataType.LIBRARY); 161 if ("decision-support-rule".equals(codeString)) 162 return new Enumeration<ModuleMetadataType>(this, ModuleMetadataType.DECISIONSUPPORTRULE); 163 if ("documentation-template".equals(codeString)) 164 return new Enumeration<ModuleMetadataType>(this, ModuleMetadataType.DOCUMENTATIONTEMPLATE); 165 if ("order-set".equals(codeString)) 166 return new Enumeration<ModuleMetadataType>(this, ModuleMetadataType.ORDERSET); 167 throw new FHIRException("Unknown ModuleMetadataType code '"+codeString+"'"); 168 } 169 public String toCode(ModuleMetadataType code) { 170 if (code == ModuleMetadataType.MODULE) 171 return "module"; 172 if (code == ModuleMetadataType.LIBRARY) 173 return "library"; 174 if (code == ModuleMetadataType.DECISIONSUPPORTRULE) 175 return "decision-support-rule"; 176 if (code == ModuleMetadataType.DOCUMENTATIONTEMPLATE) 177 return "documentation-template"; 178 if (code == ModuleMetadataType.ORDERSET) 179 return "order-set"; 180 return "?"; 181 } 182 public String toSystem(ModuleMetadataType code) { 183 return code.getSystem(); 184 } 185 } 186 187 public enum ModuleMetadataStatus { 188 /** 189 * The module is in draft state 190 */ 191 DRAFT, 192 /** 193 * The module is active 194 */ 195 ACTIVE, 196 /** 197 * The module is inactive, either rejected before publication, or retired after publication 198 */ 199 INACTIVE, 200 /** 201 * added to help the parsers 202 */ 203 NULL; 204 public static ModuleMetadataStatus fromCode(String codeString) throws FHIRException { 205 if (codeString == null || "".equals(codeString)) 206 return null; 207 if ("draft".equals(codeString)) 208 return DRAFT; 209 if ("active".equals(codeString)) 210 return ACTIVE; 211 if ("inactive".equals(codeString)) 212 return INACTIVE; 213 throw new FHIRException("Unknown ModuleMetadataStatus code '"+codeString+"'"); 214 } 215 public String toCode() { 216 switch (this) { 217 case DRAFT: return "draft"; 218 case ACTIVE: return "active"; 219 case INACTIVE: return "inactive"; 220 default: return "?"; 221 } 222 } 223 public String getSystem() { 224 switch (this) { 225 case DRAFT: return "http://hl7.org/fhir/module-metadata-status"; 226 case ACTIVE: return "http://hl7.org/fhir/module-metadata-status"; 227 case INACTIVE: return "http://hl7.org/fhir/module-metadata-status"; 228 default: return "?"; 229 } 230 } 231 public String getDefinition() { 232 switch (this) { 233 case DRAFT: return "The module is in draft state"; 234 case ACTIVE: return "The module is active"; 235 case INACTIVE: return "The module is inactive, either rejected before publication, or retired after publication"; 236 default: return "?"; 237 } 238 } 239 public String getDisplay() { 240 switch (this) { 241 case DRAFT: return "Draft"; 242 case ACTIVE: return "Active"; 243 case INACTIVE: return "Inactive"; 244 default: return "?"; 245 } 246 } 247 } 248 249 public static class ModuleMetadataStatusEnumFactory implements EnumFactory<ModuleMetadataStatus> { 250 public ModuleMetadataStatus fromCode(String codeString) throws IllegalArgumentException { 251 if (codeString == null || "".equals(codeString)) 252 if (codeString == null || "".equals(codeString)) 253 return null; 254 if ("draft".equals(codeString)) 255 return ModuleMetadataStatus.DRAFT; 256 if ("active".equals(codeString)) 257 return ModuleMetadataStatus.ACTIVE; 258 if ("inactive".equals(codeString)) 259 return ModuleMetadataStatus.INACTIVE; 260 throw new IllegalArgumentException("Unknown ModuleMetadataStatus code '"+codeString+"'"); 261 } 262 public Enumeration<ModuleMetadataStatus> fromType(Base code) throws FHIRException { 263 if (code == null || code.isEmpty()) 264 return null; 265 String codeString = ((PrimitiveType) code).asStringValue(); 266 if (codeString == null || "".equals(codeString)) 267 return null; 268 if ("draft".equals(codeString)) 269 return new Enumeration<ModuleMetadataStatus>(this, ModuleMetadataStatus.DRAFT); 270 if ("active".equals(codeString)) 271 return new Enumeration<ModuleMetadataStatus>(this, ModuleMetadataStatus.ACTIVE); 272 if ("inactive".equals(codeString)) 273 return new Enumeration<ModuleMetadataStatus>(this, ModuleMetadataStatus.INACTIVE); 274 throw new FHIRException("Unknown ModuleMetadataStatus code '"+codeString+"'"); 275 } 276 public String toCode(ModuleMetadataStatus code) { 277 if (code == ModuleMetadataStatus.DRAFT) 278 return "draft"; 279 if (code == ModuleMetadataStatus.ACTIVE) 280 return "active"; 281 if (code == ModuleMetadataStatus.INACTIVE) 282 return "inactive"; 283 return "?"; 284 } 285 public String toSystem(ModuleMetadataStatus code) { 286 return code.getSystem(); 287 } 288 } 289 290 public enum ModuleMetadataContributorType { 291 /** 292 * An author of the content of the module 293 */ 294 AUTHOR, 295 /** 296 * An editor of the content of the module 297 */ 298 EDITOR, 299 /** 300 * A reviewer of the content of the module 301 */ 302 REVIEWER, 303 /** 304 * An endorser of the content of the module 305 */ 306 ENDORSER, 307 /** 308 * added to help the parsers 309 */ 310 NULL; 311 public static ModuleMetadataContributorType fromCode(String codeString) throws FHIRException { 312 if (codeString == null || "".equals(codeString)) 313 return null; 314 if ("author".equals(codeString)) 315 return AUTHOR; 316 if ("editor".equals(codeString)) 317 return EDITOR; 318 if ("reviewer".equals(codeString)) 319 return REVIEWER; 320 if ("endorser".equals(codeString)) 321 return ENDORSER; 322 throw new FHIRException("Unknown ModuleMetadataContributorType code '"+codeString+"'"); 323 } 324 public String toCode() { 325 switch (this) { 326 case AUTHOR: return "author"; 327 case EDITOR: return "editor"; 328 case REVIEWER: return "reviewer"; 329 case ENDORSER: return "endorser"; 330 default: return "?"; 331 } 332 } 333 public String getSystem() { 334 switch (this) { 335 case AUTHOR: return "http://hl7.org/fhir/module-metadata-contributor"; 336 case EDITOR: return "http://hl7.org/fhir/module-metadata-contributor"; 337 case REVIEWER: return "http://hl7.org/fhir/module-metadata-contributor"; 338 case ENDORSER: return "http://hl7.org/fhir/module-metadata-contributor"; 339 default: return "?"; 340 } 341 } 342 public String getDefinition() { 343 switch (this) { 344 case AUTHOR: return "An author of the content of the module"; 345 case EDITOR: return "An editor of the content of the module"; 346 case REVIEWER: return "A reviewer of the content of the module"; 347 case ENDORSER: return "An endorser of the content of the module"; 348 default: return "?"; 349 } 350 } 351 public String getDisplay() { 352 switch (this) { 353 case AUTHOR: return "Author"; 354 case EDITOR: return "Editor"; 355 case REVIEWER: return "Reviewer"; 356 case ENDORSER: return "Endorser"; 357 default: return "?"; 358 } 359 } 360 } 361 362 public static class ModuleMetadataContributorTypeEnumFactory implements EnumFactory<ModuleMetadataContributorType> { 363 public ModuleMetadataContributorType fromCode(String codeString) throws IllegalArgumentException { 364 if (codeString == null || "".equals(codeString)) 365 if (codeString == null || "".equals(codeString)) 366 return null; 367 if ("author".equals(codeString)) 368 return ModuleMetadataContributorType.AUTHOR; 369 if ("editor".equals(codeString)) 370 return ModuleMetadataContributorType.EDITOR; 371 if ("reviewer".equals(codeString)) 372 return ModuleMetadataContributorType.REVIEWER; 373 if ("endorser".equals(codeString)) 374 return ModuleMetadataContributorType.ENDORSER; 375 throw new IllegalArgumentException("Unknown ModuleMetadataContributorType code '"+codeString+"'"); 376 } 377 public Enumeration<ModuleMetadataContributorType> fromType(Base code) throws FHIRException { 378 if (code == null || code.isEmpty()) 379 return null; 380 String codeString = ((PrimitiveType) code).asStringValue(); 381 if (codeString == null || "".equals(codeString)) 382 return null; 383 if ("author".equals(codeString)) 384 return new Enumeration<ModuleMetadataContributorType>(this, ModuleMetadataContributorType.AUTHOR); 385 if ("editor".equals(codeString)) 386 return new Enumeration<ModuleMetadataContributorType>(this, ModuleMetadataContributorType.EDITOR); 387 if ("reviewer".equals(codeString)) 388 return new Enumeration<ModuleMetadataContributorType>(this, ModuleMetadataContributorType.REVIEWER); 389 if ("endorser".equals(codeString)) 390 return new Enumeration<ModuleMetadataContributorType>(this, ModuleMetadataContributorType.ENDORSER); 391 throw new FHIRException("Unknown ModuleMetadataContributorType code '"+codeString+"'"); 392 } 393 public String toCode(ModuleMetadataContributorType code) { 394 if (code == ModuleMetadataContributorType.AUTHOR) 395 return "author"; 396 if (code == ModuleMetadataContributorType.EDITOR) 397 return "editor"; 398 if (code == ModuleMetadataContributorType.REVIEWER) 399 return "reviewer"; 400 if (code == ModuleMetadataContributorType.ENDORSER) 401 return "endorser"; 402 return "?"; 403 } 404 public String toSystem(ModuleMetadataContributorType code) { 405 return code.getSystem(); 406 } 407 } 408 409 public enum ModuleMetadataResourceType { 410 /** 411 * Additional documentation for the module. This would include additional instructions on usage as well additional information on clinical context or appropriateness 412 */ 413 DOCUMENTATION, 414 /** 415 * A summary of the justification for the artifact including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the module available to the consumer of interventions or results produced by the artifact 416 */ 417 JUSTIFICATION, 418 /** 419 * Bibliographic citation for papers, references, or other relevant material for the module. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this module 420 */ 421 CITATION, 422 /** 423 * The previous version of the module 424 */ 425 PREDECESSOR, 426 /** 427 * The next version of the module 428 */ 429 SUCCESSOR, 430 /** 431 * The module is derived from the resource. This is intended to capture the relationship when a particular module is based on the content of another module, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting 432 */ 433 DERIVEDFROM, 434 /** 435 * added to help the parsers 436 */ 437 NULL; 438 public static ModuleMetadataResourceType fromCode(String codeString) throws FHIRException { 439 if (codeString == null || "".equals(codeString)) 440 return null; 441 if ("documentation".equals(codeString)) 442 return DOCUMENTATION; 443 if ("justification".equals(codeString)) 444 return JUSTIFICATION; 445 if ("citation".equals(codeString)) 446 return CITATION; 447 if ("predecessor".equals(codeString)) 448 return PREDECESSOR; 449 if ("successor".equals(codeString)) 450 return SUCCESSOR; 451 if ("derived-from".equals(codeString)) 452 return DERIVEDFROM; 453 throw new FHIRException("Unknown ModuleMetadataResourceType code '"+codeString+"'"); 454 } 455 public String toCode() { 456 switch (this) { 457 case DOCUMENTATION: return "documentation"; 458 case JUSTIFICATION: return "justification"; 459 case CITATION: return "citation"; 460 case PREDECESSOR: return "predecessor"; 461 case SUCCESSOR: return "successor"; 462 case DERIVEDFROM: return "derived-from"; 463 default: return "?"; 464 } 465 } 466 public String getSystem() { 467 switch (this) { 468 case DOCUMENTATION: return "http://hl7.org/fhir/module-metadata-resource-type"; 469 case JUSTIFICATION: return "http://hl7.org/fhir/module-metadata-resource-type"; 470 case CITATION: return "http://hl7.org/fhir/module-metadata-resource-type"; 471 case PREDECESSOR: return "http://hl7.org/fhir/module-metadata-resource-type"; 472 case SUCCESSOR: return "http://hl7.org/fhir/module-metadata-resource-type"; 473 case DERIVEDFROM: return "http://hl7.org/fhir/module-metadata-resource-type"; 474 default: return "?"; 475 } 476 } 477 public String getDefinition() { 478 switch (this) { 479 case DOCUMENTATION: return "Additional documentation for the module. This would include additional instructions on usage as well additional information on clinical context or appropriateness"; 480 case JUSTIFICATION: return "A summary of the justification for the artifact including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the module available to the consumer of interventions or results produced by the artifact"; 481 case CITATION: return "Bibliographic citation for papers, references, or other relevant material for the module. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this module"; 482 case PREDECESSOR: return "The previous version of the module"; 483 case SUCCESSOR: return "The next version of the module"; 484 case DERIVEDFROM: return "The module is derived from the resource. This is intended to capture the relationship when a particular module is based on the content of another module, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting"; 485 default: return "?"; 486 } 487 } 488 public String getDisplay() { 489 switch (this) { 490 case DOCUMENTATION: return "Documentation"; 491 case JUSTIFICATION: return "Justification"; 492 case CITATION: return "Citation"; 493 case PREDECESSOR: return "Predecessor"; 494 case SUCCESSOR: return "Successor"; 495 case DERIVEDFROM: return "Derived From"; 496 default: return "?"; 497 } 498 } 499 } 500 501 public static class ModuleMetadataResourceTypeEnumFactory implements EnumFactory<ModuleMetadataResourceType> { 502 public ModuleMetadataResourceType fromCode(String codeString) throws IllegalArgumentException { 503 if (codeString == null || "".equals(codeString)) 504 if (codeString == null || "".equals(codeString)) 505 return null; 506 if ("documentation".equals(codeString)) 507 return ModuleMetadataResourceType.DOCUMENTATION; 508 if ("justification".equals(codeString)) 509 return ModuleMetadataResourceType.JUSTIFICATION; 510 if ("citation".equals(codeString)) 511 return ModuleMetadataResourceType.CITATION; 512 if ("predecessor".equals(codeString)) 513 return ModuleMetadataResourceType.PREDECESSOR; 514 if ("successor".equals(codeString)) 515 return ModuleMetadataResourceType.SUCCESSOR; 516 if ("derived-from".equals(codeString)) 517 return ModuleMetadataResourceType.DERIVEDFROM; 518 throw new IllegalArgumentException("Unknown ModuleMetadataResourceType code '"+codeString+"'"); 519 } 520 public Enumeration<ModuleMetadataResourceType> fromType(Base code) throws FHIRException { 521 if (code == null || code.isEmpty()) 522 return null; 523 String codeString = ((PrimitiveType) code).asStringValue(); 524 if (codeString == null || "".equals(codeString)) 525 return null; 526 if ("documentation".equals(codeString)) 527 return new Enumeration<ModuleMetadataResourceType>(this, ModuleMetadataResourceType.DOCUMENTATION); 528 if ("justification".equals(codeString)) 529 return new Enumeration<ModuleMetadataResourceType>(this, ModuleMetadataResourceType.JUSTIFICATION); 530 if ("citation".equals(codeString)) 531 return new Enumeration<ModuleMetadataResourceType>(this, ModuleMetadataResourceType.CITATION); 532 if ("predecessor".equals(codeString)) 533 return new Enumeration<ModuleMetadataResourceType>(this, ModuleMetadataResourceType.PREDECESSOR); 534 if ("successor".equals(codeString)) 535 return new Enumeration<ModuleMetadataResourceType>(this, ModuleMetadataResourceType.SUCCESSOR); 536 if ("derived-from".equals(codeString)) 537 return new Enumeration<ModuleMetadataResourceType>(this, ModuleMetadataResourceType.DERIVEDFROM); 538 throw new FHIRException("Unknown ModuleMetadataResourceType code '"+codeString+"'"); 539 } 540 public String toCode(ModuleMetadataResourceType code) { 541 if (code == ModuleMetadataResourceType.DOCUMENTATION) 542 return "documentation"; 543 if (code == ModuleMetadataResourceType.JUSTIFICATION) 544 return "justification"; 545 if (code == ModuleMetadataResourceType.CITATION) 546 return "citation"; 547 if (code == ModuleMetadataResourceType.PREDECESSOR) 548 return "predecessor"; 549 if (code == ModuleMetadataResourceType.SUCCESSOR) 550 return "successor"; 551 if (code == ModuleMetadataResourceType.DERIVEDFROM) 552 return "derived-from"; 553 return "?"; 554 } 555 public String toSystem(ModuleMetadataResourceType code) { 556 return code.getSystem(); 557 } 558 } 559 560 @Block() 561 public static class ModuleMetadataCoverageComponent extends Element implements IBaseDatatypeElement { 562 /** 563 * Specifies the focus of the coverage attribute. 564 */ 565 @Child(name = "focus", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 566 @Description(shortDefinition="patient-gender | patient-age-group | clinical-focus | target-user | workflow-setting | workflow-task | clinical-venue | jurisdiction", formalDefinition="Specifies the focus of the coverage attribute." ) 567 protected Coding focus; 568 569 /** 570 * Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus. 571 */ 572 @Child(name = "value", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) 573 @Description(shortDefinition="Value of the coverage attribute", formalDefinition="Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus." ) 574 protected CodeableConcept value; 575 576 private static final long serialVersionUID = 65126300L; 577 578 /** 579 * Constructor 580 */ 581 public ModuleMetadataCoverageComponent() { 582 super(); 583 } 584 585 /** 586 * Constructor 587 */ 588 public ModuleMetadataCoverageComponent(Coding focus, CodeableConcept value) { 589 super(); 590 this.focus = focus; 591 this.value = value; 592 } 593 594 /** 595 * @return {@link #focus} (Specifies the focus of the coverage attribute.) 596 */ 597 public Coding getFocus() { 598 if (this.focus == null) 599 if (Configuration.errorOnAutoCreate()) 600 throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.focus"); 601 else if (Configuration.doAutoCreate()) 602 this.focus = new Coding(); // cc 603 return this.focus; 604 } 605 606 public boolean hasFocus() { 607 return this.focus != null && !this.focus.isEmpty(); 608 } 609 610 /** 611 * @param value {@link #focus} (Specifies the focus of the coverage attribute.) 612 */ 613 public ModuleMetadataCoverageComponent setFocus(Coding value) { 614 this.focus = value; 615 return this; 616 } 617 618 /** 619 * @return {@link #value} (Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.) 620 */ 621 public CodeableConcept getValue() { 622 if (this.value == null) 623 if (Configuration.errorOnAutoCreate()) 624 throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.value"); 625 else if (Configuration.doAutoCreate()) 626 this.value = new CodeableConcept(); // cc 627 return this.value; 628 } 629 630 public boolean hasValue() { 631 return this.value != null && !this.value.isEmpty(); 632 } 633 634 /** 635 * @param value {@link #value} (Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.) 636 */ 637 public ModuleMetadataCoverageComponent setValue(CodeableConcept value) { 638 this.value = value; 639 return this; 640 } 641 642 protected void listChildren(List<Property> childrenList) { 643 super.listChildren(childrenList); 644 childrenList.add(new Property("focus", "Coding", "Specifies the focus of the coverage attribute.", 0, java.lang.Integer.MAX_VALUE, focus)); 645 childrenList.add(new Property("value", "CodeableConcept", "Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.", 0, java.lang.Integer.MAX_VALUE, value)); 646 } 647 648 @Override 649 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 650 switch (hash) { 651 case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Coding 652 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // CodeableConcept 653 default: return super.getProperty(hash, name, checkValid); 654 } 655 656 } 657 658 @Override 659 public void setProperty(int hash, String name, Base value) throws FHIRException { 660 switch (hash) { 661 case 97604824: // focus 662 this.focus = castToCoding(value); // Coding 663 break; 664 case 111972721: // value 665 this.value = castToCodeableConcept(value); // CodeableConcept 666 break; 667 default: super.setProperty(hash, name, value); 668 } 669 670 } 671 672 @Override 673 public void setProperty(String name, Base value) throws FHIRException { 674 if (name.equals("focus")) 675 this.focus = castToCoding(value); // Coding 676 else if (name.equals("value")) 677 this.value = castToCodeableConcept(value); // CodeableConcept 678 else 679 super.setProperty(name, value); 680 } 681 682 @Override 683 public Base makeProperty(int hash, String name) throws FHIRException { 684 switch (hash) { 685 case 97604824: return getFocus(); // Coding 686 case 111972721: return getValue(); // CodeableConcept 687 default: return super.makeProperty(hash, name); 688 } 689 690 } 691 692 @Override 693 public Base addChild(String name) throws FHIRException { 694 if (name.equals("focus")) { 695 this.focus = new Coding(); 696 return this.focus; 697 } 698 else if (name.equals("value")) { 699 this.value = new CodeableConcept(); 700 return this.value; 701 } 702 else 703 return super.addChild(name); 704 } 705 706 public ModuleMetadataCoverageComponent copy() { 707 ModuleMetadataCoverageComponent dst = new ModuleMetadataCoverageComponent(); 708 copyValues(dst); 709 dst.focus = focus == null ? null : focus.copy(); 710 dst.value = value == null ? null : value.copy(); 711 return dst; 712 } 713 714 @Override 715 public boolean equalsDeep(Base other) { 716 if (!super.equalsDeep(other)) 717 return false; 718 if (!(other instanceof ModuleMetadataCoverageComponent)) 719 return false; 720 ModuleMetadataCoverageComponent o = (ModuleMetadataCoverageComponent) other; 721 return compareDeep(focus, o.focus, true) && compareDeep(value, o.value, true); 722 } 723 724 @Override 725 public boolean equalsShallow(Base other) { 726 if (!super.equalsShallow(other)) 727 return false; 728 if (!(other instanceof ModuleMetadataCoverageComponent)) 729 return false; 730 ModuleMetadataCoverageComponent o = (ModuleMetadataCoverageComponent) other; 731 return true; 732 } 733 734 public boolean isEmpty() { 735 return super.isEmpty() && (focus == null || focus.isEmpty()) && (value == null || value.isEmpty()) 736 ; 737 } 738 739 public String fhirType() { 740 return "ModuleMetadata.coverage"; 741 742 } 743 744 } 745 746 @Block() 747 public static class ModuleMetadataContributorComponent extends Element implements IBaseDatatypeElement { 748 /** 749 * The type of contributor. 750 */ 751 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 752 @Description(shortDefinition="author | editor | reviewer | endorser", formalDefinition="The type of contributor." ) 753 protected Enumeration<ModuleMetadataContributorType> type; 754 755 /** 756 * The name of the individual or organization responsible for the contribution. 757 */ 758 @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 759 @Description(shortDefinition="Name of the contributor", formalDefinition="The name of the individual or organization responsible for the contribution." ) 760 protected StringType name; 761 762 /** 763 * Contacts to assist a user in finding and communicating with the contributor. 764 */ 765 @Child(name = "contact", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 766 @Description(shortDefinition="Contact details of the contributor", formalDefinition="Contacts to assist a user in finding and communicating with the contributor." ) 767 protected List<ModuleMetadataContributorContactComponent> contact; 768 769 private static final long serialVersionUID = 1033333886L; 770 771 /** 772 * Constructor 773 */ 774 public ModuleMetadataContributorComponent() { 775 super(); 776 } 777 778 /** 779 * Constructor 780 */ 781 public ModuleMetadataContributorComponent(Enumeration<ModuleMetadataContributorType> type, StringType name) { 782 super(); 783 this.type = type; 784 this.name = name; 785 } 786 787 /** 788 * @return {@link #type} (The type of contributor.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 789 */ 790 public Enumeration<ModuleMetadataContributorType> getTypeElement() { 791 if (this.type == null) 792 if (Configuration.errorOnAutoCreate()) 793 throw new Error("Attempt to auto-create ModuleMetadataContributorComponent.type"); 794 else if (Configuration.doAutoCreate()) 795 this.type = new Enumeration<ModuleMetadataContributorType>(new ModuleMetadataContributorTypeEnumFactory()); // bb 796 return this.type; 797 } 798 799 public boolean hasTypeElement() { 800 return this.type != null && !this.type.isEmpty(); 801 } 802 803 public boolean hasType() { 804 return this.type != null && !this.type.isEmpty(); 805 } 806 807 /** 808 * @param value {@link #type} (The type of contributor.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 809 */ 810 public ModuleMetadataContributorComponent setTypeElement(Enumeration<ModuleMetadataContributorType> value) { 811 this.type = value; 812 return this; 813 } 814 815 /** 816 * @return The type of contributor. 817 */ 818 public ModuleMetadataContributorType getType() { 819 return this.type == null ? null : this.type.getValue(); 820 } 821 822 /** 823 * @param value The type of contributor. 824 */ 825 public ModuleMetadataContributorComponent setType(ModuleMetadataContributorType value) { 826 if (this.type == null) 827 this.type = new Enumeration<ModuleMetadataContributorType>(new ModuleMetadataContributorTypeEnumFactory()); 828 this.type.setValue(value); 829 return this; 830 } 831 832 /** 833 * @return {@link #name} (The name of the individual or organization responsible for the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 834 */ 835 public StringType getNameElement() { 836 if (this.name == null) 837 if (Configuration.errorOnAutoCreate()) 838 throw new Error("Attempt to auto-create ModuleMetadataContributorComponent.name"); 839 else if (Configuration.doAutoCreate()) 840 this.name = new StringType(); // bb 841 return this.name; 842 } 843 844 public boolean hasNameElement() { 845 return this.name != null && !this.name.isEmpty(); 846 } 847 848 public boolean hasName() { 849 return this.name != null && !this.name.isEmpty(); 850 } 851 852 /** 853 * @param value {@link #name} (The name of the individual or organization responsible for the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 854 */ 855 public ModuleMetadataContributorComponent setNameElement(StringType value) { 856 this.name = value; 857 return this; 858 } 859 860 /** 861 * @return The name of the individual or organization responsible for the contribution. 862 */ 863 public String getName() { 864 return this.name == null ? null : this.name.getValue(); 865 } 866 867 /** 868 * @param value The name of the individual or organization responsible for the contribution. 869 */ 870 public ModuleMetadataContributorComponent setName(String value) { 871 if (this.name == null) 872 this.name = new StringType(); 873 this.name.setValue(value); 874 return this; 875 } 876 877 /** 878 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the contributor.) 879 */ 880 public List<ModuleMetadataContributorContactComponent> getContact() { 881 if (this.contact == null) 882 this.contact = new ArrayList<ModuleMetadataContributorContactComponent>(); 883 return this.contact; 884 } 885 886 public boolean hasContact() { 887 if (this.contact == null) 888 return false; 889 for (ModuleMetadataContributorContactComponent item : this.contact) 890 if (!item.isEmpty()) 891 return true; 892 return false; 893 } 894 895 /** 896 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the contributor.) 897 */ 898 // syntactic sugar 899 public ModuleMetadataContributorContactComponent addContact() { //3 900 ModuleMetadataContributorContactComponent t = new ModuleMetadataContributorContactComponent(); 901 if (this.contact == null) 902 this.contact = new ArrayList<ModuleMetadataContributorContactComponent>(); 903 this.contact.add(t); 904 return t; 905 } 906 907 // syntactic sugar 908 public ModuleMetadataContributorComponent addContact(ModuleMetadataContributorContactComponent t) { //3 909 if (t == null) 910 return this; 911 if (this.contact == null) 912 this.contact = new ArrayList<ModuleMetadataContributorContactComponent>(); 913 this.contact.add(t); 914 return this; 915 } 916 917 protected void listChildren(List<Property> childrenList) { 918 super.listChildren(childrenList); 919 childrenList.add(new Property("type", "code", "The type of contributor.", 0, java.lang.Integer.MAX_VALUE, type)); 920 childrenList.add(new Property("name", "string", "The name of the individual or organization responsible for the contribution.", 0, java.lang.Integer.MAX_VALUE, name)); 921 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the contributor.", 0, java.lang.Integer.MAX_VALUE, contact)); 922 } 923 924 @Override 925 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 926 switch (hash) { 927 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ModuleMetadataContributorType> 928 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 929 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ModuleMetadataContributorContactComponent 930 default: return super.getProperty(hash, name, checkValid); 931 } 932 933 } 934 935 @Override 936 public void setProperty(int hash, String name, Base value) throws FHIRException { 937 switch (hash) { 938 case 3575610: // type 939 this.type = new ModuleMetadataContributorTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataContributorType> 940 break; 941 case 3373707: // name 942 this.name = castToString(value); // StringType 943 break; 944 case 951526432: // contact 945 this.getContact().add((ModuleMetadataContributorContactComponent) value); // ModuleMetadataContributorContactComponent 946 break; 947 default: super.setProperty(hash, name, value); 948 } 949 950 } 951 952 @Override 953 public void setProperty(String name, Base value) throws FHIRException { 954 if (name.equals("type")) 955 this.type = new ModuleMetadataContributorTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataContributorType> 956 else if (name.equals("name")) 957 this.name = castToString(value); // StringType 958 else if (name.equals("contact")) 959 this.getContact().add((ModuleMetadataContributorContactComponent) value); 960 else 961 super.setProperty(name, value); 962 } 963 964 @Override 965 public Base makeProperty(int hash, String name) throws FHIRException { 966 switch (hash) { 967 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ModuleMetadataContributorType> 968 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 969 case 951526432: return addContact(); // ModuleMetadataContributorContactComponent 970 default: return super.makeProperty(hash, name); 971 } 972 973 } 974 975 @Override 976 public Base addChild(String name) throws FHIRException { 977 if (name.equals("type")) { 978 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); 979 } 980 else if (name.equals("name")) { 981 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); 982 } 983 else if (name.equals("contact")) { 984 return addContact(); 985 } 986 else 987 return super.addChild(name); 988 } 989 990 public ModuleMetadataContributorComponent copy() { 991 ModuleMetadataContributorComponent dst = new ModuleMetadataContributorComponent(); 992 copyValues(dst); 993 dst.type = type == null ? null : type.copy(); 994 dst.name = name == null ? null : name.copy(); 995 if (contact != null) { 996 dst.contact = new ArrayList<ModuleMetadataContributorContactComponent>(); 997 for (ModuleMetadataContributorContactComponent i : contact) 998 dst.contact.add(i.copy()); 999 }; 1000 return dst; 1001 } 1002 1003 @Override 1004 public boolean equalsDeep(Base other) { 1005 if (!super.equalsDeep(other)) 1006 return false; 1007 if (!(other instanceof ModuleMetadataContributorComponent)) 1008 return false; 1009 ModuleMetadataContributorComponent o = (ModuleMetadataContributorComponent) other; 1010 return compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(contact, o.contact, true) 1011 ; 1012 } 1013 1014 @Override 1015 public boolean equalsShallow(Base other) { 1016 if (!super.equalsShallow(other)) 1017 return false; 1018 if (!(other instanceof ModuleMetadataContributorComponent)) 1019 return false; 1020 ModuleMetadataContributorComponent o = (ModuleMetadataContributorComponent) other; 1021 return compareValues(type, o.type, true) && compareValues(name, o.name, true); 1022 } 1023 1024 public boolean isEmpty() { 1025 return super.isEmpty() && (type == null || type.isEmpty()) && (name == null || name.isEmpty()) 1026 && (contact == null || contact.isEmpty()); 1027 } 1028 1029 public String fhirType() { 1030 return "ModuleMetadata.contributor"; 1031 1032 } 1033 1034 } 1035 1036 @Block() 1037 public static class ModuleMetadataContributorContactComponent extends Element implements IBaseDatatypeElement { 1038 /** 1039 * The name of an individual to contact regarding the contribution. 1040 */ 1041 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1042 @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the contribution." ) 1043 protected StringType name; 1044 1045 /** 1046 * Contact details for the individual (if a name was provided) or the contributor. 1047 */ 1048 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1049 @Description(shortDefinition="Contact details for an individual or contributor", formalDefinition="Contact details for the individual (if a name was provided) or the contributor." ) 1050 protected List<ContactPoint> telecom; 1051 1052 private static final long serialVersionUID = -1179697803L; 1053 1054 /** 1055 * Constructor 1056 */ 1057 public ModuleMetadataContributorContactComponent() { 1058 super(); 1059 } 1060 1061 /** 1062 * @return {@link #name} (The name of an individual to contact regarding the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1063 */ 1064 public StringType getNameElement() { 1065 if (this.name == null) 1066 if (Configuration.errorOnAutoCreate()) 1067 throw new Error("Attempt to auto-create ModuleMetadataContributorContactComponent.name"); 1068 else if (Configuration.doAutoCreate()) 1069 this.name = new StringType(); // bb 1070 return this.name; 1071 } 1072 1073 public boolean hasNameElement() { 1074 return this.name != null && !this.name.isEmpty(); 1075 } 1076 1077 public boolean hasName() { 1078 return this.name != null && !this.name.isEmpty(); 1079 } 1080 1081 /** 1082 * @param value {@link #name} (The name of an individual to contact regarding the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1083 */ 1084 public ModuleMetadataContributorContactComponent setNameElement(StringType value) { 1085 this.name = value; 1086 return this; 1087 } 1088 1089 /** 1090 * @return The name of an individual to contact regarding the contribution. 1091 */ 1092 public String getName() { 1093 return this.name == null ? null : this.name.getValue(); 1094 } 1095 1096 /** 1097 * @param value The name of an individual to contact regarding the contribution. 1098 */ 1099 public ModuleMetadataContributorContactComponent setName(String value) { 1100 if (Utilities.noString(value)) 1101 this.name = null; 1102 else { 1103 if (this.name == null) 1104 this.name = new StringType(); 1105 this.name.setValue(value); 1106 } 1107 return this; 1108 } 1109 1110 /** 1111 * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the contributor.) 1112 */ 1113 public List<ContactPoint> getTelecom() { 1114 if (this.telecom == null) 1115 this.telecom = new ArrayList<ContactPoint>(); 1116 return this.telecom; 1117 } 1118 1119 public boolean hasTelecom() { 1120 if (this.telecom == null) 1121 return false; 1122 for (ContactPoint item : this.telecom) 1123 if (!item.isEmpty()) 1124 return true; 1125 return false; 1126 } 1127 1128 /** 1129 * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the contributor.) 1130 */ 1131 // syntactic sugar 1132 public ContactPoint addTelecom() { //3 1133 ContactPoint t = new ContactPoint(); 1134 if (this.telecom == null) 1135 this.telecom = new ArrayList<ContactPoint>(); 1136 this.telecom.add(t); 1137 return t; 1138 } 1139 1140 // syntactic sugar 1141 public ModuleMetadataContributorContactComponent addTelecom(ContactPoint t) { //3 1142 if (t == null) 1143 return this; 1144 if (this.telecom == null) 1145 this.telecom = new ArrayList<ContactPoint>(); 1146 this.telecom.add(t); 1147 return this; 1148 } 1149 1150 protected void listChildren(List<Property> childrenList) { 1151 super.listChildren(childrenList); 1152 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the contribution.", 0, java.lang.Integer.MAX_VALUE, name)); 1153 childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the contributor.", 0, java.lang.Integer.MAX_VALUE, telecom)); 1154 } 1155 1156 @Override 1157 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1158 switch (hash) { 1159 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1160 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 1161 default: return super.getProperty(hash, name, checkValid); 1162 } 1163 1164 } 1165 1166 @Override 1167 public void setProperty(int hash, String name, Base value) throws FHIRException { 1168 switch (hash) { 1169 case 3373707: // name 1170 this.name = castToString(value); // StringType 1171 break; 1172 case -1429363305: // telecom 1173 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 1174 break; 1175 default: super.setProperty(hash, name, value); 1176 } 1177 1178 } 1179 1180 @Override 1181 public void setProperty(String name, Base value) throws FHIRException { 1182 if (name.equals("name")) 1183 this.name = castToString(value); // StringType 1184 else if (name.equals("telecom")) 1185 this.getTelecom().add(castToContactPoint(value)); 1186 else 1187 super.setProperty(name, value); 1188 } 1189 1190 @Override 1191 public Base makeProperty(int hash, String name) throws FHIRException { 1192 switch (hash) { 1193 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 1194 case -1429363305: return addTelecom(); // ContactPoint 1195 default: return super.makeProperty(hash, name); 1196 } 1197 1198 } 1199 1200 @Override 1201 public Base addChild(String name) throws FHIRException { 1202 if (name.equals("name")) { 1203 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); 1204 } 1205 else if (name.equals("telecom")) { 1206 return addTelecom(); 1207 } 1208 else 1209 return super.addChild(name); 1210 } 1211 1212 public ModuleMetadataContributorContactComponent copy() { 1213 ModuleMetadataContributorContactComponent dst = new ModuleMetadataContributorContactComponent(); 1214 copyValues(dst); 1215 dst.name = name == null ? null : name.copy(); 1216 if (telecom != null) { 1217 dst.telecom = new ArrayList<ContactPoint>(); 1218 for (ContactPoint i : telecom) 1219 dst.telecom.add(i.copy()); 1220 }; 1221 return dst; 1222 } 1223 1224 @Override 1225 public boolean equalsDeep(Base other) { 1226 if (!super.equalsDeep(other)) 1227 return false; 1228 if (!(other instanceof ModuleMetadataContributorContactComponent)) 1229 return false; 1230 ModuleMetadataContributorContactComponent o = (ModuleMetadataContributorContactComponent) other; 1231 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 1232 } 1233 1234 @Override 1235 public boolean equalsShallow(Base other) { 1236 if (!super.equalsShallow(other)) 1237 return false; 1238 if (!(other instanceof ModuleMetadataContributorContactComponent)) 1239 return false; 1240 ModuleMetadataContributorContactComponent o = (ModuleMetadataContributorContactComponent) other; 1241 return compareValues(name, o.name, true); 1242 } 1243 1244 public boolean isEmpty() { 1245 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 1246 ; 1247 } 1248 1249 public String fhirType() { 1250 return "ModuleMetadata.contributor.contact"; 1251 1252 } 1253 1254 } 1255 1256 @Block() 1257 public static class ModuleMetadataContactComponent extends Element implements IBaseDatatypeElement { 1258 /** 1259 * The name of an individual to contact regarding the module. 1260 */ 1261 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1262 @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the module." ) 1263 protected StringType name; 1264 1265 /** 1266 * Contact details for the individual (if a name was provided) or the publisher. 1267 */ 1268 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1269 @Description(shortDefinition="Contact details for an individual or publisher", formalDefinition="Contact details for the individual (if a name was provided) or the publisher." ) 1270 protected List<ContactPoint> telecom; 1271 1272 private static final long serialVersionUID = -1179697803L; 1273 1274 /** 1275 * Constructor 1276 */ 1277 public ModuleMetadataContactComponent() { 1278 super(); 1279 } 1280 1281 /** 1282 * @return {@link #name} (The name of an individual to contact regarding the module.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1283 */ 1284 public StringType getNameElement() { 1285 if (this.name == null) 1286 if (Configuration.errorOnAutoCreate()) 1287 throw new Error("Attempt to auto-create ModuleMetadataContactComponent.name"); 1288 else if (Configuration.doAutoCreate()) 1289 this.name = new StringType(); // bb 1290 return this.name; 1291 } 1292 1293 public boolean hasNameElement() { 1294 return this.name != null && !this.name.isEmpty(); 1295 } 1296 1297 public boolean hasName() { 1298 return this.name != null && !this.name.isEmpty(); 1299 } 1300 1301 /** 1302 * @param value {@link #name} (The name of an individual to contact regarding the module.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1303 */ 1304 public ModuleMetadataContactComponent setNameElement(StringType value) { 1305 this.name = value; 1306 return this; 1307 } 1308 1309 /** 1310 * @return The name of an individual to contact regarding the module. 1311 */ 1312 public String getName() { 1313 return this.name == null ? null : this.name.getValue(); 1314 } 1315 1316 /** 1317 * @param value The name of an individual to contact regarding the module. 1318 */ 1319 public ModuleMetadataContactComponent setName(String value) { 1320 if (Utilities.noString(value)) 1321 this.name = null; 1322 else { 1323 if (this.name == null) 1324 this.name = new StringType(); 1325 this.name.setValue(value); 1326 } 1327 return this; 1328 } 1329 1330 /** 1331 * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the publisher.) 1332 */ 1333 public List<ContactPoint> getTelecom() { 1334 if (this.telecom == null) 1335 this.telecom = new ArrayList<ContactPoint>(); 1336 return this.telecom; 1337 } 1338 1339 public boolean hasTelecom() { 1340 if (this.telecom == null) 1341 return false; 1342 for (ContactPoint item : this.telecom) 1343 if (!item.isEmpty()) 1344 return true; 1345 return false; 1346 } 1347 1348 /** 1349 * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the publisher.) 1350 */ 1351 // syntactic sugar 1352 public ContactPoint addTelecom() { //3 1353 ContactPoint t = new ContactPoint(); 1354 if (this.telecom == null) 1355 this.telecom = new ArrayList<ContactPoint>(); 1356 this.telecom.add(t); 1357 return t; 1358 } 1359 1360 // syntactic sugar 1361 public ModuleMetadataContactComponent addTelecom(ContactPoint t) { //3 1362 if (t == null) 1363 return this; 1364 if (this.telecom == null) 1365 this.telecom = new ArrayList<ContactPoint>(); 1366 this.telecom.add(t); 1367 return this; 1368 } 1369 1370 protected void listChildren(List<Property> childrenList) { 1371 super.listChildren(childrenList); 1372 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the module.", 0, java.lang.Integer.MAX_VALUE, name)); 1373 childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); 1374 } 1375 1376 @Override 1377 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1378 switch (hash) { 1379 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1380 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 1381 default: return super.getProperty(hash, name, checkValid); 1382 } 1383 1384 } 1385 1386 @Override 1387 public void setProperty(int hash, String name, Base value) throws FHIRException { 1388 switch (hash) { 1389 case 3373707: // name 1390 this.name = castToString(value); // StringType 1391 break; 1392 case -1429363305: // telecom 1393 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 1394 break; 1395 default: super.setProperty(hash, name, value); 1396 } 1397 1398 } 1399 1400 @Override 1401 public void setProperty(String name, Base value) throws FHIRException { 1402 if (name.equals("name")) 1403 this.name = castToString(value); // StringType 1404 else if (name.equals("telecom")) 1405 this.getTelecom().add(castToContactPoint(value)); 1406 else 1407 super.setProperty(name, value); 1408 } 1409 1410 @Override 1411 public Base makeProperty(int hash, String name) throws FHIRException { 1412 switch (hash) { 1413 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 1414 case -1429363305: return addTelecom(); // ContactPoint 1415 default: return super.makeProperty(hash, name); 1416 } 1417 1418 } 1419 1420 @Override 1421 public Base addChild(String name) throws FHIRException { 1422 if (name.equals("name")) { 1423 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); 1424 } 1425 else if (name.equals("telecom")) { 1426 return addTelecom(); 1427 } 1428 else 1429 return super.addChild(name); 1430 } 1431 1432 public ModuleMetadataContactComponent copy() { 1433 ModuleMetadataContactComponent dst = new ModuleMetadataContactComponent(); 1434 copyValues(dst); 1435 dst.name = name == null ? null : name.copy(); 1436 if (telecom != null) { 1437 dst.telecom = new ArrayList<ContactPoint>(); 1438 for (ContactPoint i : telecom) 1439 dst.telecom.add(i.copy()); 1440 }; 1441 return dst; 1442 } 1443 1444 @Override 1445 public boolean equalsDeep(Base other) { 1446 if (!super.equalsDeep(other)) 1447 return false; 1448 if (!(other instanceof ModuleMetadataContactComponent)) 1449 return false; 1450 ModuleMetadataContactComponent o = (ModuleMetadataContactComponent) other; 1451 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 1452 } 1453 1454 @Override 1455 public boolean equalsShallow(Base other) { 1456 if (!super.equalsShallow(other)) 1457 return false; 1458 if (!(other instanceof ModuleMetadataContactComponent)) 1459 return false; 1460 ModuleMetadataContactComponent o = (ModuleMetadataContactComponent) other; 1461 return compareValues(name, o.name, true); 1462 } 1463 1464 public boolean isEmpty() { 1465 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 1466 ; 1467 } 1468 1469 public String fhirType() { 1470 return "ModuleMetadata.contact"; 1471 1472 } 1473 1474 } 1475 1476 @Block() 1477 public static class ModuleMetadataRelatedResourceComponent extends Element implements IBaseDatatypeElement { 1478 /** 1479 * The type of related resource. 1480 */ 1481 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1482 @Description(shortDefinition="documentation | justification | citation | predecessor | successor | derived-from", formalDefinition="The type of related resource." ) 1483 protected Enumeration<ModuleMetadataResourceType> type; 1484 1485 /** 1486 * The document being referenced, represented as an attachment. This is exclusive with the resource element. 1487 */ 1488 @Child(name = "document", type = {Attachment.class}, order=2, min=0, max=1, modifier=false, summary=false) 1489 @Description(shortDefinition="The related document", formalDefinition="The document being referenced, represented as an attachment. This is exclusive with the resource element." ) 1490 protected Attachment document; 1491 1492 /** 1493 * The related resource, such as a library, value set, profile, or other module. 1494 */ 1495 @Child(name = "resource", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 1496 @Description(shortDefinition="The related resource", formalDefinition="The related resource, such as a library, value set, profile, or other module." ) 1497 protected Reference resource; 1498 1499 /** 1500 * The actual object that is the target of the reference (The related resource, such as a library, value set, profile, or other module.) 1501 */ 1502 protected Resource resourceTarget; 1503 1504 private static final long serialVersionUID = -1400982664L; 1505 1506 /** 1507 * Constructor 1508 */ 1509 public ModuleMetadataRelatedResourceComponent() { 1510 super(); 1511 } 1512 1513 /** 1514 * Constructor 1515 */ 1516 public ModuleMetadataRelatedResourceComponent(Enumeration<ModuleMetadataResourceType> type) { 1517 super(); 1518 this.type = type; 1519 } 1520 1521 /** 1522 * @return {@link #type} (The type of related resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1523 */ 1524 public Enumeration<ModuleMetadataResourceType> getTypeElement() { 1525 if (this.type == null) 1526 if (Configuration.errorOnAutoCreate()) 1527 throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.type"); 1528 else if (Configuration.doAutoCreate()) 1529 this.type = new Enumeration<ModuleMetadataResourceType>(new ModuleMetadataResourceTypeEnumFactory()); // bb 1530 return this.type; 1531 } 1532 1533 public boolean hasTypeElement() { 1534 return this.type != null && !this.type.isEmpty(); 1535 } 1536 1537 public boolean hasType() { 1538 return this.type != null && !this.type.isEmpty(); 1539 } 1540 1541 /** 1542 * @param value {@link #type} (The type of related resource.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1543 */ 1544 public ModuleMetadataRelatedResourceComponent setTypeElement(Enumeration<ModuleMetadataResourceType> value) { 1545 this.type = value; 1546 return this; 1547 } 1548 1549 /** 1550 * @return The type of related resource. 1551 */ 1552 public ModuleMetadataResourceType getType() { 1553 return this.type == null ? null : this.type.getValue(); 1554 } 1555 1556 /** 1557 * @param value The type of related resource. 1558 */ 1559 public ModuleMetadataRelatedResourceComponent setType(ModuleMetadataResourceType value) { 1560 if (this.type == null) 1561 this.type = new Enumeration<ModuleMetadataResourceType>(new ModuleMetadataResourceTypeEnumFactory()); 1562 this.type.setValue(value); 1563 return this; 1564 } 1565 1566 /** 1567 * @return {@link #document} (The document being referenced, represented as an attachment. This is exclusive with the resource element.) 1568 */ 1569 public Attachment getDocument() { 1570 if (this.document == null) 1571 if (Configuration.errorOnAutoCreate()) 1572 throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.document"); 1573 else if (Configuration.doAutoCreate()) 1574 this.document = new Attachment(); // cc 1575 return this.document; 1576 } 1577 1578 public boolean hasDocument() { 1579 return this.document != null && !this.document.isEmpty(); 1580 } 1581 1582 /** 1583 * @param value {@link #document} (The document being referenced, represented as an attachment. This is exclusive with the resource element.) 1584 */ 1585 public ModuleMetadataRelatedResourceComponent setDocument(Attachment value) { 1586 this.document = value; 1587 return this; 1588 } 1589 1590 /** 1591 * @return {@link #resource} (The related resource, such as a library, value set, profile, or other module.) 1592 */ 1593 public Reference getResource() { 1594 if (this.resource == null) 1595 if (Configuration.errorOnAutoCreate()) 1596 throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.resource"); 1597 else if (Configuration.doAutoCreate()) 1598 this.resource = new Reference(); // cc 1599 return this.resource; 1600 } 1601 1602 public boolean hasResource() { 1603 return this.resource != null && !this.resource.isEmpty(); 1604 } 1605 1606 /** 1607 * @param value {@link #resource} (The related resource, such as a library, value set, profile, or other module.) 1608 */ 1609 public ModuleMetadataRelatedResourceComponent setResource(Reference value) { 1610 this.resource = value; 1611 return this; 1612 } 1613 1614 /** 1615 * @return {@link #resource} 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. (The related resource, such as a library, value set, profile, or other module.) 1616 */ 1617 public Resource getResourceTarget() { 1618 return this.resourceTarget; 1619 } 1620 1621 /** 1622 * @param value {@link #resource} 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. (The related resource, such as a library, value set, profile, or other module.) 1623 */ 1624 public ModuleMetadataRelatedResourceComponent setResourceTarget(Resource value) { 1625 this.resourceTarget = value; 1626 return this; 1627 } 1628 1629 protected void listChildren(List<Property> childrenList) { 1630 super.listChildren(childrenList); 1631 childrenList.add(new Property("type", "code", "The type of related resource.", 0, java.lang.Integer.MAX_VALUE, type)); 1632 childrenList.add(new Property("document", "Attachment", "The document being referenced, represented as an attachment. This is exclusive with the resource element.", 0, java.lang.Integer.MAX_VALUE, document)); 1633 childrenList.add(new Property("resource", "Reference(Any)", "The related resource, such as a library, value set, profile, or other module.", 0, java.lang.Integer.MAX_VALUE, resource)); 1634 } 1635 1636 @Override 1637 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1638 switch (hash) { 1639 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ModuleMetadataResourceType> 1640 case 861720859: /*document*/ return this.document == null ? new Base[0] : new Base[] {this.document}; // Attachment 1641 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 1642 default: return super.getProperty(hash, name, checkValid); 1643 } 1644 1645 } 1646 1647 @Override 1648 public void setProperty(int hash, String name, Base value) throws FHIRException { 1649 switch (hash) { 1650 case 3575610: // type 1651 this.type = new ModuleMetadataResourceTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataResourceType> 1652 break; 1653 case 861720859: // document 1654 this.document = castToAttachment(value); // Attachment 1655 break; 1656 case -341064690: // resource 1657 this.resource = castToReference(value); // Reference 1658 break; 1659 default: super.setProperty(hash, name, value); 1660 } 1661 1662 } 1663 1664 @Override 1665 public void setProperty(String name, Base value) throws FHIRException { 1666 if (name.equals("type")) 1667 this.type = new ModuleMetadataResourceTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataResourceType> 1668 else if (name.equals("document")) 1669 this.document = castToAttachment(value); // Attachment 1670 else if (name.equals("resource")) 1671 this.resource = castToReference(value); // Reference 1672 else 1673 super.setProperty(name, value); 1674 } 1675 1676 @Override 1677 public Base makeProperty(int hash, String name) throws FHIRException { 1678 switch (hash) { 1679 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ModuleMetadataResourceType> 1680 case 861720859: return getDocument(); // Attachment 1681 case -341064690: return getResource(); // Reference 1682 default: return super.makeProperty(hash, name); 1683 } 1684 1685 } 1686 1687 @Override 1688 public Base addChild(String name) throws FHIRException { 1689 if (name.equals("type")) { 1690 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); 1691 } 1692 else if (name.equals("document")) { 1693 this.document = new Attachment(); 1694 return this.document; 1695 } 1696 else if (name.equals("resource")) { 1697 this.resource = new Reference(); 1698 return this.resource; 1699 } 1700 else 1701 return super.addChild(name); 1702 } 1703 1704 public ModuleMetadataRelatedResourceComponent copy() { 1705 ModuleMetadataRelatedResourceComponent dst = new ModuleMetadataRelatedResourceComponent(); 1706 copyValues(dst); 1707 dst.type = type == null ? null : type.copy(); 1708 dst.document = document == null ? null : document.copy(); 1709 dst.resource = resource == null ? null : resource.copy(); 1710 return dst; 1711 } 1712 1713 @Override 1714 public boolean equalsDeep(Base other) { 1715 if (!super.equalsDeep(other)) 1716 return false; 1717 if (!(other instanceof ModuleMetadataRelatedResourceComponent)) 1718 return false; 1719 ModuleMetadataRelatedResourceComponent o = (ModuleMetadataRelatedResourceComponent) other; 1720 return compareDeep(type, o.type, true) && compareDeep(document, o.document, true) && compareDeep(resource, o.resource, true) 1721 ; 1722 } 1723 1724 @Override 1725 public boolean equalsShallow(Base other) { 1726 if (!super.equalsShallow(other)) 1727 return false; 1728 if (!(other instanceof ModuleMetadataRelatedResourceComponent)) 1729 return false; 1730 ModuleMetadataRelatedResourceComponent o = (ModuleMetadataRelatedResourceComponent) other; 1731 return compareValues(type, o.type, true); 1732 } 1733 1734 public boolean isEmpty() { 1735 return super.isEmpty() && (type == null || type.isEmpty()) && (document == null || document.isEmpty()) 1736 && (resource == null || resource.isEmpty()); 1737 } 1738 1739 public String fhirType() { 1740 return "ModuleMetadata.relatedResource"; 1741 1742 } 1743 1744 } 1745 1746 /** 1747 * An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published. 1748 */ 1749 @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) 1750 @Description(shortDefinition="Logical URL to reference this module", formalDefinition="An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published." ) 1751 protected UriType url; 1752 1753 /** 1754 * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. 1755 */ 1756 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1757 @Description(shortDefinition="Logical identifier(s) for the module", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) 1758 protected List<Identifier> identifier; 1759 1760 /** 1761 * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact. 1762 */ 1763 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1764 @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact." ) 1765 protected StringType version; 1766 1767 /** 1768 * A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation. 1769 */ 1770 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 1771 @Description(shortDefinition="A machine-friendly name for the module", formalDefinition="A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation." ) 1772 protected StringType name; 1773 1774 /** 1775 * A short, descriptive, user-friendly title for the module. 1776 */ 1777 @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 1778 @Description(shortDefinition="A user-friendly title for the module", formalDefinition="A short, descriptive, user-friendly title for the module." ) 1779 protected StringType title; 1780 1781 /** 1782 * Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. 1783 */ 1784 @Child(name = "type", type = {CodeType.class}, order=5, min=1, max=1, modifier=true, summary=true) 1785 @Description(shortDefinition="module | library | decision-support-rule | documentation-template | order-set", formalDefinition="Identifies the type of knowledge module, such as a rule, library, documentation template, or measure." ) 1786 protected Enumeration<ModuleMetadataType> type; 1787 1788 /** 1789 * The status of the module. 1790 */ 1791 @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 1792 @Description(shortDefinition="draft | active | inactive", formalDefinition="The status of the module." ) 1793 protected Enumeration<ModuleMetadataStatus> status; 1794 1795 /** 1796 * Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments. 1797 */ 1798 @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=true, summary=true) 1799 @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments." ) 1800 protected BooleanType experimental; 1801 1802 /** 1803 * A free text natural language description of the module from the consumer's perspective. 1804 */ 1805 @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 1806 @Description(shortDefinition="Natural language description of the module", formalDefinition="A free text natural language description of the module from the consumer's perspective." ) 1807 protected StringType description; 1808 1809 /** 1810 * A brief description of the purpose of the module. 1811 */ 1812 @Child(name = "purpose", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 1813 @Description(shortDefinition="Describes the purpose of the module", formalDefinition="A brief description of the purpose of the module." ) 1814 protected StringType purpose; 1815 1816 /** 1817 * A detailed description of how the module is used from a clinical perspective. 1818 */ 1819 @Child(name = "usage", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 1820 @Description(shortDefinition="Describes the clinical usage of the module", formalDefinition="A detailed description of how the module is used from a clinical perspective." ) 1821 protected StringType usage; 1822 1823 /** 1824 * The date on which the module was published. 1825 */ 1826 @Child(name = "publicationDate", type = {DateType.class}, order=11, min=0, max=1, modifier=false, summary=false) 1827 @Description(shortDefinition="Publication date for this version of the module", formalDefinition="The date on which the module was published." ) 1828 protected DateType publicationDate; 1829 1830 /** 1831 * The date on which the module content was last reviewed. 1832 */ 1833 @Child(name = "lastReviewDate", type = {DateType.class}, order=12, min=0, max=1, modifier=false, summary=false) 1834 @Description(shortDefinition="Last review date for the module", formalDefinition="The date on which the module content was last reviewed." ) 1835 protected DateType lastReviewDate; 1836 1837 /** 1838 * The period during which the module content is effective. 1839 */ 1840 @Child(name = "effectivePeriod", type = {Period.class}, order=13, min=0, max=1, modifier=false, summary=false) 1841 @Description(shortDefinition="The effective date range for the module", formalDefinition="The period during which the module content is effective." ) 1842 protected Period effectivePeriod; 1843 1844 /** 1845 * Specifies various attributes of the patient population for whom and/or environment of care in which the knowledge module is applicable. 1846 */ 1847 @Child(name = "coverage", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1848 @Description(shortDefinition="Describes the context of use for this module", formalDefinition="Specifies various attributes of the patient population for whom and/or environment of care in which the knowledge module is applicable." ) 1849 protected List<ModuleMetadataCoverageComponent> coverage; 1850 1851 /** 1852 * Clinical topics related to the content of the module. 1853 */ 1854 @Child(name = "topic", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1855 @Description(shortDefinition="Descriptional topics for the module", formalDefinition="Clinical topics related to the content of the module." ) 1856 protected List<CodeableConcept> topic; 1857 1858 /** 1859 * A contributor to the content of the module, including authors, editors, reviewers, and endorsers. 1860 */ 1861 @Child(name = "contributor", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1862 @Description(shortDefinition="A content contributor", formalDefinition="A contributor to the content of the module, including authors, editors, reviewers, and endorsers." ) 1863 protected List<ModuleMetadataContributorComponent> contributor; 1864 1865 /** 1866 * The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts. 1867 */ 1868 @Child(name = "publisher", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) 1869 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts." ) 1870 protected StringType publisher; 1871 1872 /** 1873 * Contacts to assist a user in finding and communicating with the publisher. 1874 */ 1875 @Child(name = "contact", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1876 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 1877 protected List<ModuleMetadataContactComponent> contact; 1878 1879 /** 1880 * A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module. 1881 */ 1882 @Child(name = "copyright", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false) 1883 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module." ) 1884 protected StringType copyright; 1885 1886 /** 1887 * Related resources such as additional documentation, justification, or bibliographic references. 1888 */ 1889 @Child(name = "relatedResource", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1890 @Description(shortDefinition="Related resources for the module", formalDefinition="Related resources such as additional documentation, justification, or bibliographic references." ) 1891 protected List<ModuleMetadataRelatedResourceComponent> relatedResource; 1892 1893 private static final long serialVersionUID = 1528493169L; 1894 1895 /** 1896 * Constructor 1897 */ 1898 public ModuleMetadata() { 1899 super(); 1900 } 1901 1902 /** 1903 * Constructor 1904 */ 1905 public ModuleMetadata(Enumeration<ModuleMetadataType> type, Enumeration<ModuleMetadataStatus> status) { 1906 super(); 1907 this.type = type; 1908 this.status = status; 1909 } 1910 1911 /** 1912 * @return {@link #url} (An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1913 */ 1914 public UriType getUrlElement() { 1915 if (this.url == null) 1916 if (Configuration.errorOnAutoCreate()) 1917 throw new Error("Attempt to auto-create ModuleMetadata.url"); 1918 else if (Configuration.doAutoCreate()) 1919 this.url = new UriType(); // bb 1920 return this.url; 1921 } 1922 1923 public boolean hasUrlElement() { 1924 return this.url != null && !this.url.isEmpty(); 1925 } 1926 1927 public boolean hasUrl() { 1928 return this.url != null && !this.url.isEmpty(); 1929 } 1930 1931 /** 1932 * @param value {@link #url} (An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1933 */ 1934 public ModuleMetadata setUrlElement(UriType value) { 1935 this.url = value; 1936 return this; 1937 } 1938 1939 /** 1940 * @return An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published. 1941 */ 1942 public String getUrl() { 1943 return this.url == null ? null : this.url.getValue(); 1944 } 1945 1946 /** 1947 * @param value An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published. 1948 */ 1949 public ModuleMetadata setUrl(String value) { 1950 if (Utilities.noString(value)) 1951 this.url = null; 1952 else { 1953 if (this.url == null) 1954 this.url = new UriType(); 1955 this.url.setValue(value); 1956 } 1957 return this; 1958 } 1959 1960 /** 1961 * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) 1962 */ 1963 public List<Identifier> getIdentifier() { 1964 if (this.identifier == null) 1965 this.identifier = new ArrayList<Identifier>(); 1966 return this.identifier; 1967 } 1968 1969 public boolean hasIdentifier() { 1970 if (this.identifier == null) 1971 return false; 1972 for (Identifier item : this.identifier) 1973 if (!item.isEmpty()) 1974 return true; 1975 return false; 1976 } 1977 1978 /** 1979 * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) 1980 */ 1981 // syntactic sugar 1982 public Identifier addIdentifier() { //3 1983 Identifier t = new Identifier(); 1984 if (this.identifier == null) 1985 this.identifier = new ArrayList<Identifier>(); 1986 this.identifier.add(t); 1987 return t; 1988 } 1989 1990 // syntactic sugar 1991 public ModuleMetadata addIdentifier(Identifier t) { //3 1992 if (t == null) 1993 return this; 1994 if (this.identifier == null) 1995 this.identifier = new ArrayList<Identifier>(); 1996 this.identifier.add(t); 1997 return this; 1998 } 1999 2000 /** 2001 * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2002 */ 2003 public StringType getVersionElement() { 2004 if (this.version == null) 2005 if (Configuration.errorOnAutoCreate()) 2006 throw new Error("Attempt to auto-create ModuleMetadata.version"); 2007 else if (Configuration.doAutoCreate()) 2008 this.version = new StringType(); // bb 2009 return this.version; 2010 } 2011 2012 public boolean hasVersionElement() { 2013 return this.version != null && !this.version.isEmpty(); 2014 } 2015 2016 public boolean hasVersion() { 2017 return this.version != null && !this.version.isEmpty(); 2018 } 2019 2020 /** 2021 * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2022 */ 2023 public ModuleMetadata setVersionElement(StringType value) { 2024 this.version = value; 2025 return this; 2026 } 2027 2028 /** 2029 * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact. 2030 */ 2031 public String getVersion() { 2032 return this.version == null ? null : this.version.getValue(); 2033 } 2034 2035 /** 2036 * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact. 2037 */ 2038 public ModuleMetadata setVersion(String value) { 2039 if (Utilities.noString(value)) 2040 this.version = null; 2041 else { 2042 if (this.version == null) 2043 this.version = new StringType(); 2044 this.version.setValue(value); 2045 } 2046 return this; 2047 } 2048 2049 /** 2050 * @return {@link #name} (A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2051 */ 2052 public StringType getNameElement() { 2053 if (this.name == null) 2054 if (Configuration.errorOnAutoCreate()) 2055 throw new Error("Attempt to auto-create ModuleMetadata.name"); 2056 else if (Configuration.doAutoCreate()) 2057 this.name = new StringType(); // bb 2058 return this.name; 2059 } 2060 2061 public boolean hasNameElement() { 2062 return this.name != null && !this.name.isEmpty(); 2063 } 2064 2065 public boolean hasName() { 2066 return this.name != null && !this.name.isEmpty(); 2067 } 2068 2069 /** 2070 * @param value {@link #name} (A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2071 */ 2072 public ModuleMetadata setNameElement(StringType value) { 2073 this.name = value; 2074 return this; 2075 } 2076 2077 /** 2078 * @return A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation. 2079 */ 2080 public String getName() { 2081 return this.name == null ? null : this.name.getValue(); 2082 } 2083 2084 /** 2085 * @param value A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation. 2086 */ 2087 public ModuleMetadata setName(String value) { 2088 if (Utilities.noString(value)) 2089 this.name = null; 2090 else { 2091 if (this.name == null) 2092 this.name = new StringType(); 2093 this.name.setValue(value); 2094 } 2095 return this; 2096 } 2097 2098 /** 2099 * @return {@link #title} (A short, descriptive, user-friendly title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2100 */ 2101 public StringType getTitleElement() { 2102 if (this.title == null) 2103 if (Configuration.errorOnAutoCreate()) 2104 throw new Error("Attempt to auto-create ModuleMetadata.title"); 2105 else if (Configuration.doAutoCreate()) 2106 this.title = new StringType(); // bb 2107 return this.title; 2108 } 2109 2110 public boolean hasTitleElement() { 2111 return this.title != null && !this.title.isEmpty(); 2112 } 2113 2114 public boolean hasTitle() { 2115 return this.title != null && !this.title.isEmpty(); 2116 } 2117 2118 /** 2119 * @param value {@link #title} (A short, descriptive, user-friendly title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2120 */ 2121 public ModuleMetadata setTitleElement(StringType value) { 2122 this.title = value; 2123 return this; 2124 } 2125 2126 /** 2127 * @return A short, descriptive, user-friendly title for the module. 2128 */ 2129 public String getTitle() { 2130 return this.title == null ? null : this.title.getValue(); 2131 } 2132 2133 /** 2134 * @param value A short, descriptive, user-friendly title for the module. 2135 */ 2136 public ModuleMetadata setTitle(String value) { 2137 if (Utilities.noString(value)) 2138 this.title = null; 2139 else { 2140 if (this.title == null) 2141 this.title = new StringType(); 2142 this.title.setValue(value); 2143 } 2144 return this; 2145 } 2146 2147 /** 2148 * @return {@link #type} (Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2149 */ 2150 public Enumeration<ModuleMetadataType> getTypeElement() { 2151 if (this.type == null) 2152 if (Configuration.errorOnAutoCreate()) 2153 throw new Error("Attempt to auto-create ModuleMetadata.type"); 2154 else if (Configuration.doAutoCreate()) 2155 this.type = new Enumeration<ModuleMetadataType>(new ModuleMetadataTypeEnumFactory()); // bb 2156 return this.type; 2157 } 2158 2159 public boolean hasTypeElement() { 2160 return this.type != null && !this.type.isEmpty(); 2161 } 2162 2163 public boolean hasType() { 2164 return this.type != null && !this.type.isEmpty(); 2165 } 2166 2167 /** 2168 * @param value {@link #type} (Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2169 */ 2170 public ModuleMetadata setTypeElement(Enumeration<ModuleMetadataType> value) { 2171 this.type = value; 2172 return this; 2173 } 2174 2175 /** 2176 * @return Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. 2177 */ 2178 public ModuleMetadataType getType() { 2179 return this.type == null ? null : this.type.getValue(); 2180 } 2181 2182 /** 2183 * @param value Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. 2184 */ 2185 public ModuleMetadata setType(ModuleMetadataType value) { 2186 if (this.type == null) 2187 this.type = new Enumeration<ModuleMetadataType>(new ModuleMetadataTypeEnumFactory()); 2188 this.type.setValue(value); 2189 return this; 2190 } 2191 2192 /** 2193 * @return {@link #status} (The status of the module.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2194 */ 2195 public Enumeration<ModuleMetadataStatus> getStatusElement() { 2196 if (this.status == null) 2197 if (Configuration.errorOnAutoCreate()) 2198 throw new Error("Attempt to auto-create ModuleMetadata.status"); 2199 else if (Configuration.doAutoCreate()) 2200 this.status = new Enumeration<ModuleMetadataStatus>(new ModuleMetadataStatusEnumFactory()); // bb 2201 return this.status; 2202 } 2203 2204 public boolean hasStatusElement() { 2205 return this.status != null && !this.status.isEmpty(); 2206 } 2207 2208 public boolean hasStatus() { 2209 return this.status != null && !this.status.isEmpty(); 2210 } 2211 2212 /** 2213 * @param value {@link #status} (The status of the module.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2214 */ 2215 public ModuleMetadata setStatusElement(Enumeration<ModuleMetadataStatus> value) { 2216 this.status = value; 2217 return this; 2218 } 2219 2220 /** 2221 * @return The status of the module. 2222 */ 2223 public ModuleMetadataStatus getStatus() { 2224 return this.status == null ? null : this.status.getValue(); 2225 } 2226 2227 /** 2228 * @param value The status of the module. 2229 */ 2230 public ModuleMetadata setStatus(ModuleMetadataStatus value) { 2231 if (this.status == null) 2232 this.status = new Enumeration<ModuleMetadataStatus>(new ModuleMetadataStatusEnumFactory()); 2233 this.status.setValue(value); 2234 return this; 2235 } 2236 2237 /** 2238 * @return {@link #experimental} (Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 2239 */ 2240 public BooleanType getExperimentalElement() { 2241 if (this.experimental == null) 2242 if (Configuration.errorOnAutoCreate()) 2243 throw new Error("Attempt to auto-create ModuleMetadata.experimental"); 2244 else if (Configuration.doAutoCreate()) 2245 this.experimental = new BooleanType(); // bb 2246 return this.experimental; 2247 } 2248 2249 public boolean hasExperimentalElement() { 2250 return this.experimental != null && !this.experimental.isEmpty(); 2251 } 2252 2253 public boolean hasExperimental() { 2254 return this.experimental != null && !this.experimental.isEmpty(); 2255 } 2256 2257 /** 2258 * @param value {@link #experimental} (Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 2259 */ 2260 public ModuleMetadata setExperimentalElement(BooleanType value) { 2261 this.experimental = value; 2262 return this; 2263 } 2264 2265 /** 2266 * @return Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments. 2267 */ 2268 public boolean getExperimental() { 2269 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 2270 } 2271 2272 /** 2273 * @param value Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments. 2274 */ 2275 public ModuleMetadata setExperimental(boolean value) { 2276 if (this.experimental == null) 2277 this.experimental = new BooleanType(); 2278 this.experimental.setValue(value); 2279 return this; 2280 } 2281 2282 /** 2283 * @return {@link #description} (A free text natural language description of the module from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2284 */ 2285 public StringType getDescriptionElement() { 2286 if (this.description == null) 2287 if (Configuration.errorOnAutoCreate()) 2288 throw new Error("Attempt to auto-create ModuleMetadata.description"); 2289 else if (Configuration.doAutoCreate()) 2290 this.description = new StringType(); // bb 2291 return this.description; 2292 } 2293 2294 public boolean hasDescriptionElement() { 2295 return this.description != null && !this.description.isEmpty(); 2296 } 2297 2298 public boolean hasDescription() { 2299 return this.description != null && !this.description.isEmpty(); 2300 } 2301 2302 /** 2303 * @param value {@link #description} (A free text natural language description of the module from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2304 */ 2305 public ModuleMetadata setDescriptionElement(StringType value) { 2306 this.description = value; 2307 return this; 2308 } 2309 2310 /** 2311 * @return A free text natural language description of the module from the consumer's perspective. 2312 */ 2313 public String getDescription() { 2314 return this.description == null ? null : this.description.getValue(); 2315 } 2316 2317 /** 2318 * @param value A free text natural language description of the module from the consumer's perspective. 2319 */ 2320 public ModuleMetadata setDescription(String value) { 2321 if (Utilities.noString(value)) 2322 this.description = null; 2323 else { 2324 if (this.description == null) 2325 this.description = new StringType(); 2326 this.description.setValue(value); 2327 } 2328 return this; 2329 } 2330 2331 /** 2332 * @return {@link #purpose} (A brief description of the purpose of the module.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 2333 */ 2334 public StringType getPurposeElement() { 2335 if (this.purpose == null) 2336 if (Configuration.errorOnAutoCreate()) 2337 throw new Error("Attempt to auto-create ModuleMetadata.purpose"); 2338 else if (Configuration.doAutoCreate()) 2339 this.purpose = new StringType(); // bb 2340 return this.purpose; 2341 } 2342 2343 public boolean hasPurposeElement() { 2344 return this.purpose != null && !this.purpose.isEmpty(); 2345 } 2346 2347 public boolean hasPurpose() { 2348 return this.purpose != null && !this.purpose.isEmpty(); 2349 } 2350 2351 /** 2352 * @param value {@link #purpose} (A brief description of the purpose of the module.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 2353 */ 2354 public ModuleMetadata setPurposeElement(StringType value) { 2355 this.purpose = value; 2356 return this; 2357 } 2358 2359 /** 2360 * @return A brief description of the purpose of the module. 2361 */ 2362 public String getPurpose() { 2363 return this.purpose == null ? null : this.purpose.getValue(); 2364 } 2365 2366 /** 2367 * @param value A brief description of the purpose of the module. 2368 */ 2369 public ModuleMetadata setPurpose(String value) { 2370 if (Utilities.noString(value)) 2371 this.purpose = null; 2372 else { 2373 if (this.purpose == null) 2374 this.purpose = new StringType(); 2375 this.purpose.setValue(value); 2376 } 2377 return this; 2378 } 2379 2380 /** 2381 * @return {@link #usage} (A detailed description of how the module is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value 2382 */ 2383 public StringType getUsageElement() { 2384 if (this.usage == null) 2385 if (Configuration.errorOnAutoCreate()) 2386 throw new Error("Attempt to auto-create ModuleMetadata.usage"); 2387 else if (Configuration.doAutoCreate()) 2388 this.usage = new StringType(); // bb 2389 return this.usage; 2390 } 2391 2392 public boolean hasUsageElement() { 2393 return this.usage != null && !this.usage.isEmpty(); 2394 } 2395 2396 public boolean hasUsage() { 2397 return this.usage != null && !this.usage.isEmpty(); 2398 } 2399 2400 /** 2401 * @param value {@link #usage} (A detailed description of how the module is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value 2402 */ 2403 public ModuleMetadata setUsageElement(StringType value) { 2404 this.usage = value; 2405 return this; 2406 } 2407 2408 /** 2409 * @return A detailed description of how the module is used from a clinical perspective. 2410 */ 2411 public String getUsage() { 2412 return this.usage == null ? null : this.usage.getValue(); 2413 } 2414 2415 /** 2416 * @param value A detailed description of how the module is used from a clinical perspective. 2417 */ 2418 public ModuleMetadata setUsage(String value) { 2419 if (Utilities.noString(value)) 2420 this.usage = null; 2421 else { 2422 if (this.usage == null) 2423 this.usage = new StringType(); 2424 this.usage.setValue(value); 2425 } 2426 return this; 2427 } 2428 2429 /** 2430 * @return {@link #publicationDate} (The date on which the module was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value 2431 */ 2432 public DateType getPublicationDateElement() { 2433 if (this.publicationDate == null) 2434 if (Configuration.errorOnAutoCreate()) 2435 throw new Error("Attempt to auto-create ModuleMetadata.publicationDate"); 2436 else if (Configuration.doAutoCreate()) 2437 this.publicationDate = new DateType(); // bb 2438 return this.publicationDate; 2439 } 2440 2441 public boolean hasPublicationDateElement() { 2442 return this.publicationDate != null && !this.publicationDate.isEmpty(); 2443 } 2444 2445 public boolean hasPublicationDate() { 2446 return this.publicationDate != null && !this.publicationDate.isEmpty(); 2447 } 2448 2449 /** 2450 * @param value {@link #publicationDate} (The date on which the module was published.). This is the underlying object with id, value and extensions. The accessor "getPublicationDate" gives direct access to the value 2451 */ 2452 public ModuleMetadata setPublicationDateElement(DateType value) { 2453 this.publicationDate = value; 2454 return this; 2455 } 2456 2457 /** 2458 * @return The date on which the module was published. 2459 */ 2460 public Date getPublicationDate() { 2461 return this.publicationDate == null ? null : this.publicationDate.getValue(); 2462 } 2463 2464 /** 2465 * @param value The date on which the module was published. 2466 */ 2467 public ModuleMetadata setPublicationDate(Date value) { 2468 if (value == null) 2469 this.publicationDate = null; 2470 else { 2471 if (this.publicationDate == null) 2472 this.publicationDate = new DateType(); 2473 this.publicationDate.setValue(value); 2474 } 2475 return this; 2476 } 2477 2478 /** 2479 * @return {@link #lastReviewDate} (The date on which the module content was last reviewed.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 2480 */ 2481 public DateType getLastReviewDateElement() { 2482 if (this.lastReviewDate == null) 2483 if (Configuration.errorOnAutoCreate()) 2484 throw new Error("Attempt to auto-create ModuleMetadata.lastReviewDate"); 2485 else if (Configuration.doAutoCreate()) 2486 this.lastReviewDate = new DateType(); // bb 2487 return this.lastReviewDate; 2488 } 2489 2490 public boolean hasLastReviewDateElement() { 2491 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 2492 } 2493 2494 public boolean hasLastReviewDate() { 2495 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 2496 } 2497 2498 /** 2499 * @param value {@link #lastReviewDate} (The date on which the module content was last reviewed.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 2500 */ 2501 public ModuleMetadata setLastReviewDateElement(DateType value) { 2502 this.lastReviewDate = value; 2503 return this; 2504 } 2505 2506 /** 2507 * @return The date on which the module content was last reviewed. 2508 */ 2509 public Date getLastReviewDate() { 2510 return this.lastReviewDate == null ? null : this.lastReviewDate.getValue(); 2511 } 2512 2513 /** 2514 * @param value The date on which the module content was last reviewed. 2515 */ 2516 public ModuleMetadata setLastReviewDate(Date value) { 2517 if (value == null) 2518 this.lastReviewDate = null; 2519 else { 2520 if (this.lastReviewDate == null) 2521 this.lastReviewDate = new DateType(); 2522 this.lastReviewDate.setValue(value); 2523 } 2524 return this; 2525 } 2526 2527 /** 2528 * @return {@link #effectivePeriod} (The period during which the module content is effective.) 2529 */ 2530 public Period getEffectivePeriod() { 2531 if (this.effectivePeriod == null) 2532 if (Configuration.errorOnAutoCreate()) 2533 throw new Error("Attempt to auto-create ModuleMetadata.effectivePeriod"); 2534 else if (Configuration.doAutoCreate()) 2535 this.effectivePeriod = new Period(); // cc 2536 return this.effectivePeriod; 2537 } 2538 2539 public boolean hasEffectivePeriod() { 2540 return this.effectivePeriod != null && !this.effectivePeriod.isEmpty(); 2541 } 2542 2543 /** 2544 * @param value {@link #effectivePeriod} (The period during which the module content is effective.) 2545 */ 2546 public ModuleMetadata setEffectivePeriod(Period value) { 2547 this.effectivePeriod = value; 2548 return this; 2549 } 2550 2551 /** 2552 * @return {@link #coverage} (Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.) 2553 */ 2554 public List<ModuleMetadataCoverageComponent> getCoverage() { 2555 if (this.coverage == null) 2556 this.coverage = new ArrayList<ModuleMetadataCoverageComponent>(); 2557 return this.coverage; 2558 } 2559 2560 public boolean hasCoverage() { 2561 if (this.coverage == null) 2562 return false; 2563 for (ModuleMetadataCoverageComponent item : this.coverage) 2564 if (!item.isEmpty()) 2565 return true; 2566 return false; 2567 } 2568 2569 /** 2570 * @return {@link #coverage} (Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.) 2571 */ 2572 // syntactic sugar 2573 public ModuleMetadataCoverageComponent addCoverage() { //3 2574 ModuleMetadataCoverageComponent t = new ModuleMetadataCoverageComponent(); 2575 if (this.coverage == null) 2576 this.coverage = new ArrayList<ModuleMetadataCoverageComponent>(); 2577 this.coverage.add(t); 2578 return t; 2579 } 2580 2581 // syntactic sugar 2582 public ModuleMetadata addCoverage(ModuleMetadataCoverageComponent t) { //3 2583 if (t == null) 2584 return this; 2585 if (this.coverage == null) 2586 this.coverage = new ArrayList<ModuleMetadataCoverageComponent>(); 2587 this.coverage.add(t); 2588 return this; 2589 } 2590 2591 /** 2592 * @return {@link #topic} (Clinical topics related to the content of the module.) 2593 */ 2594 public List<CodeableConcept> getTopic() { 2595 if (this.topic == null) 2596 this.topic = new ArrayList<CodeableConcept>(); 2597 return this.topic; 2598 } 2599 2600 public boolean hasTopic() { 2601 if (this.topic == null) 2602 return false; 2603 for (CodeableConcept item : this.topic) 2604 if (!item.isEmpty()) 2605 return true; 2606 return false; 2607 } 2608 2609 /** 2610 * @return {@link #topic} (Clinical topics related to the content of the module.) 2611 */ 2612 // syntactic sugar 2613 public CodeableConcept addTopic() { //3 2614 CodeableConcept t = new CodeableConcept(); 2615 if (this.topic == null) 2616 this.topic = new ArrayList<CodeableConcept>(); 2617 this.topic.add(t); 2618 return t; 2619 } 2620 2621 // syntactic sugar 2622 public ModuleMetadata addTopic(CodeableConcept t) { //3 2623 if (t == null) 2624 return this; 2625 if (this.topic == null) 2626 this.topic = new ArrayList<CodeableConcept>(); 2627 this.topic.add(t); 2628 return this; 2629 } 2630 2631 /** 2632 * @return {@link #contributor} (A contributor to the content of the module, including authors, editors, reviewers, and endorsers.) 2633 */ 2634 public List<ModuleMetadataContributorComponent> getContributor() { 2635 if (this.contributor == null) 2636 this.contributor = new ArrayList<ModuleMetadataContributorComponent>(); 2637 return this.contributor; 2638 } 2639 2640 public boolean hasContributor() { 2641 if (this.contributor == null) 2642 return false; 2643 for (ModuleMetadataContributorComponent item : this.contributor) 2644 if (!item.isEmpty()) 2645 return true; 2646 return false; 2647 } 2648 2649 /** 2650 * @return {@link #contributor} (A contributor to the content of the module, including authors, editors, reviewers, and endorsers.) 2651 */ 2652 // syntactic sugar 2653 public ModuleMetadataContributorComponent addContributor() { //3 2654 ModuleMetadataContributorComponent t = new ModuleMetadataContributorComponent(); 2655 if (this.contributor == null) 2656 this.contributor = new ArrayList<ModuleMetadataContributorComponent>(); 2657 this.contributor.add(t); 2658 return t; 2659 } 2660 2661 // syntactic sugar 2662 public ModuleMetadata addContributor(ModuleMetadataContributorComponent t) { //3 2663 if (t == null) 2664 return this; 2665 if (this.contributor == null) 2666 this.contributor = new ArrayList<ModuleMetadataContributorComponent>(); 2667 this.contributor.add(t); 2668 return this; 2669 } 2670 2671 /** 2672 * @return {@link #publisher} (The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2673 */ 2674 public StringType getPublisherElement() { 2675 if (this.publisher == null) 2676 if (Configuration.errorOnAutoCreate()) 2677 throw new Error("Attempt to auto-create ModuleMetadata.publisher"); 2678 else if (Configuration.doAutoCreate()) 2679 this.publisher = new StringType(); // bb 2680 return this.publisher; 2681 } 2682 2683 public boolean hasPublisherElement() { 2684 return this.publisher != null && !this.publisher.isEmpty(); 2685 } 2686 2687 public boolean hasPublisher() { 2688 return this.publisher != null && !this.publisher.isEmpty(); 2689 } 2690 2691 /** 2692 * @param value {@link #publisher} (The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2693 */ 2694 public ModuleMetadata setPublisherElement(StringType value) { 2695 this.publisher = value; 2696 return this; 2697 } 2698 2699 /** 2700 * @return The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts. 2701 */ 2702 public String getPublisher() { 2703 return this.publisher == null ? null : this.publisher.getValue(); 2704 } 2705 2706 /** 2707 * @param value The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts. 2708 */ 2709 public ModuleMetadata setPublisher(String value) { 2710 if (Utilities.noString(value)) 2711 this.publisher = null; 2712 else { 2713 if (this.publisher == null) 2714 this.publisher = new StringType(); 2715 this.publisher.setValue(value); 2716 } 2717 return this; 2718 } 2719 2720 /** 2721 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 2722 */ 2723 public List<ModuleMetadataContactComponent> getContact() { 2724 if (this.contact == null) 2725 this.contact = new ArrayList<ModuleMetadataContactComponent>(); 2726 return this.contact; 2727 } 2728 2729 public boolean hasContact() { 2730 if (this.contact == null) 2731 return false; 2732 for (ModuleMetadataContactComponent item : this.contact) 2733 if (!item.isEmpty()) 2734 return true; 2735 return false; 2736 } 2737 2738 /** 2739 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 2740 */ 2741 // syntactic sugar 2742 public ModuleMetadataContactComponent addContact() { //3 2743 ModuleMetadataContactComponent t = new ModuleMetadataContactComponent(); 2744 if (this.contact == null) 2745 this.contact = new ArrayList<ModuleMetadataContactComponent>(); 2746 this.contact.add(t); 2747 return t; 2748 } 2749 2750 // syntactic sugar 2751 public ModuleMetadata addContact(ModuleMetadataContactComponent t) { //3 2752 if (t == null) 2753 return this; 2754 if (this.contact == null) 2755 this.contact = new ArrayList<ModuleMetadataContactComponent>(); 2756 this.contact.add(t); 2757 return this; 2758 } 2759 2760 /** 2761 * @return {@link #copyright} (A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 2762 */ 2763 public StringType getCopyrightElement() { 2764 if (this.copyright == null) 2765 if (Configuration.errorOnAutoCreate()) 2766 throw new Error("Attempt to auto-create ModuleMetadata.copyright"); 2767 else if (Configuration.doAutoCreate()) 2768 this.copyright = new StringType(); // bb 2769 return this.copyright; 2770 } 2771 2772 public boolean hasCopyrightElement() { 2773 return this.copyright != null && !this.copyright.isEmpty(); 2774 } 2775 2776 public boolean hasCopyright() { 2777 return this.copyright != null && !this.copyright.isEmpty(); 2778 } 2779 2780 /** 2781 * @param value {@link #copyright} (A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 2782 */ 2783 public ModuleMetadata setCopyrightElement(StringType value) { 2784 this.copyright = value; 2785 return this; 2786 } 2787 2788 /** 2789 * @return A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module. 2790 */ 2791 public String getCopyright() { 2792 return this.copyright == null ? null : this.copyright.getValue(); 2793 } 2794 2795 /** 2796 * @param value A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module. 2797 */ 2798 public ModuleMetadata setCopyright(String value) { 2799 if (Utilities.noString(value)) 2800 this.copyright = null; 2801 else { 2802 if (this.copyright == null) 2803 this.copyright = new StringType(); 2804 this.copyright.setValue(value); 2805 } 2806 return this; 2807 } 2808 2809 /** 2810 * @return {@link #relatedResource} (Related resources such as additional documentation, justification, or bibliographic references.) 2811 */ 2812 public List<ModuleMetadataRelatedResourceComponent> getRelatedResource() { 2813 if (this.relatedResource == null) 2814 this.relatedResource = new ArrayList<ModuleMetadataRelatedResourceComponent>(); 2815 return this.relatedResource; 2816 } 2817 2818 public boolean hasRelatedResource() { 2819 if (this.relatedResource == null) 2820 return false; 2821 for (ModuleMetadataRelatedResourceComponent item : this.relatedResource) 2822 if (!item.isEmpty()) 2823 return true; 2824 return false; 2825 } 2826 2827 /** 2828 * @return {@link #relatedResource} (Related resources such as additional documentation, justification, or bibliographic references.) 2829 */ 2830 // syntactic sugar 2831 public ModuleMetadataRelatedResourceComponent addRelatedResource() { //3 2832 ModuleMetadataRelatedResourceComponent t = new ModuleMetadataRelatedResourceComponent(); 2833 if (this.relatedResource == null) 2834 this.relatedResource = new ArrayList<ModuleMetadataRelatedResourceComponent>(); 2835 this.relatedResource.add(t); 2836 return t; 2837 } 2838 2839 // syntactic sugar 2840 public ModuleMetadata addRelatedResource(ModuleMetadataRelatedResourceComponent t) { //3 2841 if (t == null) 2842 return this; 2843 if (this.relatedResource == null) 2844 this.relatedResource = new ArrayList<ModuleMetadataRelatedResourceComponent>(); 2845 this.relatedResource.add(t); 2846 return this; 2847 } 2848 2849 protected void listChildren(List<Property> childrenList) { 2850 super.listChildren(childrenList); 2851 childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); 2852 childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2853 childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact.", 0, java.lang.Integer.MAX_VALUE, version)); 2854 childrenList.add(new Property("name", "string", "A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, java.lang.Integer.MAX_VALUE, name)); 2855 childrenList.add(new Property("title", "string", "A short, descriptive, user-friendly title for the module.", 0, java.lang.Integer.MAX_VALUE, title)); 2856 childrenList.add(new Property("type", "code", "Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.", 0, java.lang.Integer.MAX_VALUE, type)); 2857 childrenList.add(new Property("status", "code", "The status of the module.", 0, java.lang.Integer.MAX_VALUE, status)); 2858 childrenList.add(new Property("experimental", "boolean", "Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments.", 0, java.lang.Integer.MAX_VALUE, experimental)); 2859 childrenList.add(new Property("description", "string", "A free text natural language description of the module from the consumer's perspective.", 0, java.lang.Integer.MAX_VALUE, description)); 2860 childrenList.add(new Property("purpose", "string", "A brief description of the purpose of the module.", 0, java.lang.Integer.MAX_VALUE, purpose)); 2861 childrenList.add(new Property("usage", "string", "A detailed description of how the module is used from a clinical perspective.", 0, java.lang.Integer.MAX_VALUE, usage)); 2862 childrenList.add(new Property("publicationDate", "date", "The date on which the module was published.", 0, java.lang.Integer.MAX_VALUE, publicationDate)); 2863 childrenList.add(new Property("lastReviewDate", "date", "The date on which the module content was last reviewed.", 0, java.lang.Integer.MAX_VALUE, lastReviewDate)); 2864 childrenList.add(new Property("effectivePeriod", "Period", "The period during which the module content is effective.", 0, java.lang.Integer.MAX_VALUE, effectivePeriod)); 2865 childrenList.add(new Property("coverage", "", "Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.", 0, java.lang.Integer.MAX_VALUE, coverage)); 2866 childrenList.add(new Property("topic", "CodeableConcept", "Clinical topics related to the content of the module.", 0, java.lang.Integer.MAX_VALUE, topic)); 2867 childrenList.add(new Property("contributor", "", "A contributor to the content of the module, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor)); 2868 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts.", 0, java.lang.Integer.MAX_VALUE, publisher)); 2869 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 2870 childrenList.add(new Property("copyright", "string", "A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module.", 0, java.lang.Integer.MAX_VALUE, copyright)); 2871 childrenList.add(new Property("relatedResource", "", "Related resources such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedResource)); 2872 } 2873 2874 @Override 2875 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2876 switch (hash) { 2877 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 2878 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2879 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 2880 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2881 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2882 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ModuleMetadataType> 2883 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ModuleMetadataStatus> 2884 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 2885 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2886 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // StringType 2887 case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType 2888 case 1470566394: /*publicationDate*/ return this.publicationDate == null ? new Base[0] : new Base[] {this.publicationDate}; // DateType 2889 case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType 2890 case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period 2891 case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // ModuleMetadataCoverageComponent 2892 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept 2893 case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // ModuleMetadataContributorComponent 2894 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 2895 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ModuleMetadataContactComponent 2896 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType 2897 case 1554540889: /*relatedResource*/ return this.relatedResource == null ? new Base[0] : this.relatedResource.toArray(new Base[this.relatedResource.size()]); // ModuleMetadataRelatedResourceComponent 2898 default: return super.getProperty(hash, name, checkValid); 2899 } 2900 2901 } 2902 2903 @Override 2904 public void setProperty(int hash, String name, Base value) throws FHIRException { 2905 switch (hash) { 2906 case 116079: // url 2907 this.url = castToUri(value); // UriType 2908 break; 2909 case -1618432855: // identifier 2910 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2911 break; 2912 case 351608024: // version 2913 this.version = castToString(value); // StringType 2914 break; 2915 case 3373707: // name 2916 this.name = castToString(value); // StringType 2917 break; 2918 case 110371416: // title 2919 this.title = castToString(value); // StringType 2920 break; 2921 case 3575610: // type 2922 this.type = new ModuleMetadataTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataType> 2923 break; 2924 case -892481550: // status 2925 this.status = new ModuleMetadataStatusEnumFactory().fromType(value); // Enumeration<ModuleMetadataStatus> 2926 break; 2927 case -404562712: // experimental 2928 this.experimental = castToBoolean(value); // BooleanType 2929 break; 2930 case -1724546052: // description 2931 this.description = castToString(value); // StringType 2932 break; 2933 case -220463842: // purpose 2934 this.purpose = castToString(value); // StringType 2935 break; 2936 case 111574433: // usage 2937 this.usage = castToString(value); // StringType 2938 break; 2939 case 1470566394: // publicationDate 2940 this.publicationDate = castToDate(value); // DateType 2941 break; 2942 case -1687512484: // lastReviewDate 2943 this.lastReviewDate = castToDate(value); // DateType 2944 break; 2945 case -403934648: // effectivePeriod 2946 this.effectivePeriod = castToPeriod(value); // Period 2947 break; 2948 case -351767064: // coverage 2949 this.getCoverage().add((ModuleMetadataCoverageComponent) value); // ModuleMetadataCoverageComponent 2950 break; 2951 case 110546223: // topic 2952 this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept 2953 break; 2954 case -1895276325: // contributor 2955 this.getContributor().add((ModuleMetadataContributorComponent) value); // ModuleMetadataContributorComponent 2956 break; 2957 case 1447404028: // publisher 2958 this.publisher = castToString(value); // StringType 2959 break; 2960 case 951526432: // contact 2961 this.getContact().add((ModuleMetadataContactComponent) value); // ModuleMetadataContactComponent 2962 break; 2963 case 1522889671: // copyright 2964 this.copyright = castToString(value); // StringType 2965 break; 2966 case 1554540889: // relatedResource 2967 this.getRelatedResource().add((ModuleMetadataRelatedResourceComponent) value); // ModuleMetadataRelatedResourceComponent 2968 break; 2969 default: super.setProperty(hash, name, value); 2970 } 2971 2972 } 2973 2974 @Override 2975 public void setProperty(String name, Base value) throws FHIRException { 2976 if (name.equals("url")) 2977 this.url = castToUri(value); // UriType 2978 else if (name.equals("identifier")) 2979 this.getIdentifier().add(castToIdentifier(value)); 2980 else if (name.equals("version")) 2981 this.version = castToString(value); // StringType 2982 else if (name.equals("name")) 2983 this.name = castToString(value); // StringType 2984 else if (name.equals("title")) 2985 this.title = castToString(value); // StringType 2986 else if (name.equals("type")) 2987 this.type = new ModuleMetadataTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataType> 2988 else if (name.equals("status")) 2989 this.status = new ModuleMetadataStatusEnumFactory().fromType(value); // Enumeration<ModuleMetadataStatus> 2990 else if (name.equals("experimental")) 2991 this.experimental = castToBoolean(value); // BooleanType 2992 else if (name.equals("description")) 2993 this.description = castToString(value); // StringType 2994 else if (name.equals("purpose")) 2995 this.purpose = castToString(value); // StringType 2996 else if (name.equals("usage")) 2997 this.usage = castToString(value); // StringType 2998 else if (name.equals("publicationDate")) 2999 this.publicationDate = castToDate(value); // DateType 3000 else if (name.equals("lastReviewDate")) 3001 this.lastReviewDate = castToDate(value); // DateType 3002 else if (name.equals("effectivePeriod")) 3003 this.effectivePeriod = castToPeriod(value); // Period 3004 else if (name.equals("coverage")) 3005 this.getCoverage().add((ModuleMetadataCoverageComponent) value); 3006 else if (name.equals("topic")) 3007 this.getTopic().add(castToCodeableConcept(value)); 3008 else if (name.equals("contributor")) 3009 this.getContributor().add((ModuleMetadataContributorComponent) value); 3010 else if (name.equals("publisher")) 3011 this.publisher = castToString(value); // StringType 3012 else if (name.equals("contact")) 3013 this.getContact().add((ModuleMetadataContactComponent) value); 3014 else if (name.equals("copyright")) 3015 this.copyright = castToString(value); // StringType 3016 else if (name.equals("relatedResource")) 3017 this.getRelatedResource().add((ModuleMetadataRelatedResourceComponent) value); 3018 else 3019 super.setProperty(name, value); 3020 } 3021 3022 @Override 3023 public Base makeProperty(int hash, String name) throws FHIRException { 3024 switch (hash) { 3025 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 3026 case -1618432855: return addIdentifier(); // Identifier 3027 case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType 3028 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 3029 case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType 3030 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ModuleMetadataType> 3031 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ModuleMetadataStatus> 3032 case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType 3033 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 3034 case -220463842: throw new FHIRException("Cannot make property purpose as it is not a complex type"); // StringType 3035 case 111574433: throw new FHIRException("Cannot make property usage as it is not a complex type"); // StringType 3036 case 1470566394: throw new FHIRException("Cannot make property publicationDate as it is not a complex type"); // DateType 3037 case -1687512484: throw new FHIRException("Cannot make property lastReviewDate as it is not a complex type"); // DateType 3038 case -403934648: return getEffectivePeriod(); // Period 3039 case -351767064: return addCoverage(); // ModuleMetadataCoverageComponent 3040 case 110546223: return addTopic(); // CodeableConcept 3041 case -1895276325: return addContributor(); // ModuleMetadataContributorComponent 3042 case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType 3043 case 951526432: return addContact(); // ModuleMetadataContactComponent 3044 case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType 3045 case 1554540889: return addRelatedResource(); // ModuleMetadataRelatedResourceComponent 3046 default: return super.makeProperty(hash, name); 3047 } 3048 3049 } 3050 3051 @Override 3052 public Base addChild(String name) throws FHIRException { 3053 if (name.equals("url")) { 3054 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.url"); 3055 } 3056 else if (name.equals("identifier")) { 3057 return addIdentifier(); 3058 } 3059 else if (name.equals("version")) { 3060 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.version"); 3061 } 3062 else if (name.equals("name")) { 3063 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); 3064 } 3065 else if (name.equals("title")) { 3066 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.title"); 3067 } 3068 else if (name.equals("type")) { 3069 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); 3070 } 3071 else if (name.equals("status")) { 3072 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.status"); 3073 } 3074 else if (name.equals("experimental")) { 3075 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.experimental"); 3076 } 3077 else if (name.equals("description")) { 3078 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); 3079 } 3080 else if (name.equals("purpose")) { 3081 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.purpose"); 3082 } 3083 else if (name.equals("usage")) { 3084 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.usage"); 3085 } 3086 else if (name.equals("publicationDate")) { 3087 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.publicationDate"); 3088 } 3089 else if (name.equals("lastReviewDate")) { 3090 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.lastReviewDate"); 3091 } 3092 else if (name.equals("effectivePeriod")) { 3093 this.effectivePeriod = new Period(); 3094 return this.effectivePeriod; 3095 } 3096 else if (name.equals("coverage")) { 3097 return addCoverage(); 3098 } 3099 else if (name.equals("topic")) { 3100 return addTopic(); 3101 } 3102 else if (name.equals("contributor")) { 3103 return addContributor(); 3104 } 3105 else if (name.equals("publisher")) { 3106 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.publisher"); 3107 } 3108 else if (name.equals("contact")) { 3109 return addContact(); 3110 } 3111 else if (name.equals("copyright")) { 3112 throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.copyright"); 3113 } 3114 else if (name.equals("relatedResource")) { 3115 return addRelatedResource(); 3116 } 3117 else 3118 return super.addChild(name); 3119 } 3120 3121 public String fhirType() { 3122 return "ModuleMetadata"; 3123 3124 } 3125 3126 public ModuleMetadata copy() { 3127 ModuleMetadata dst = new ModuleMetadata(); 3128 copyValues(dst); 3129 dst.url = url == null ? null : url.copy(); 3130 if (identifier != null) { 3131 dst.identifier = new ArrayList<Identifier>(); 3132 for (Identifier i : identifier) 3133 dst.identifier.add(i.copy()); 3134 }; 3135 dst.version = version == null ? null : version.copy(); 3136 dst.name = name == null ? null : name.copy(); 3137 dst.title = title == null ? null : title.copy(); 3138 dst.type = type == null ? null : type.copy(); 3139 dst.status = status == null ? null : status.copy(); 3140 dst.experimental = experimental == null ? null : experimental.copy(); 3141 dst.description = description == null ? null : description.copy(); 3142 dst.purpose = purpose == null ? null : purpose.copy(); 3143 dst.usage = usage == null ? null : usage.copy(); 3144 dst.publicationDate = publicationDate == null ? null : publicationDate.copy(); 3145 dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy(); 3146 dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy(); 3147 if (coverage != null) { 3148 dst.coverage = new ArrayList<ModuleMetadataCoverageComponent>(); 3149 for (ModuleMetadataCoverageComponent i : coverage) 3150 dst.coverage.add(i.copy()); 3151 }; 3152 if (topic != null) { 3153 dst.topic = new ArrayList<CodeableConcept>(); 3154 for (CodeableConcept i : topic) 3155 dst.topic.add(i.copy()); 3156 }; 3157 if (contributor != null) { 3158 dst.contributor = new ArrayList<ModuleMetadataContributorComponent>(); 3159 for (ModuleMetadataContributorComponent i : contributor) 3160 dst.contributor.add(i.copy()); 3161 }; 3162 dst.publisher = publisher == null ? null : publisher.copy(); 3163 if (contact != null) { 3164 dst.contact = new ArrayList<ModuleMetadataContactComponent>(); 3165 for (ModuleMetadataContactComponent i : contact) 3166 dst.contact.add(i.copy()); 3167 }; 3168 dst.copyright = copyright == null ? null : copyright.copy(); 3169 if (relatedResource != null) { 3170 dst.relatedResource = new ArrayList<ModuleMetadataRelatedResourceComponent>(); 3171 for (ModuleMetadataRelatedResourceComponent i : relatedResource) 3172 dst.relatedResource.add(i.copy()); 3173 }; 3174 return dst; 3175 } 3176 3177 protected ModuleMetadata typedCopy() { 3178 return copy(); 3179 } 3180 3181 @Override 3182 public boolean equalsDeep(Base other) { 3183 if (!super.equalsDeep(other)) 3184 return false; 3185 if (!(other instanceof ModuleMetadata)) 3186 return false; 3187 ModuleMetadata o = (ModuleMetadata) other; 3188 return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) 3189 && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(type, o.type, true) 3190 && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(description, o.description, true) 3191 && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true) && compareDeep(publicationDate, o.publicationDate, true) 3192 && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true) 3193 && compareDeep(coverage, o.coverage, true) && compareDeep(topic, o.topic, true) && compareDeep(contributor, o.contributor, true) 3194 && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(copyright, o.copyright, true) 3195 && compareDeep(relatedResource, o.relatedResource, true); 3196 } 3197 3198 @Override 3199 public boolean equalsShallow(Base other) { 3200 if (!super.equalsShallow(other)) 3201 return false; 3202 if (!(other instanceof ModuleMetadata)) 3203 return false; 3204 ModuleMetadata o = (ModuleMetadata) other; 3205 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) 3206 && compareValues(title, o.title, true) && compareValues(type, o.type, true) && compareValues(status, o.status, true) 3207 && compareValues(experimental, o.experimental, true) && compareValues(description, o.description, true) 3208 && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(publicationDate, o.publicationDate, true) 3209 && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(publisher, o.publisher, true) 3210 && compareValues(copyright, o.copyright, true); 3211 } 3212 3213 public boolean isEmpty() { 3214 return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) 3215 && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (title == null || title.isEmpty()) 3216 && (type == null || type.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) 3217 && (description == null || description.isEmpty()) && (purpose == null || purpose.isEmpty()) 3218 && (usage == null || usage.isEmpty()) && (publicationDate == null || publicationDate.isEmpty()) 3219 && (lastReviewDate == null || lastReviewDate.isEmpty()) && (effectivePeriod == null || effectivePeriod.isEmpty()) 3220 && (coverage == null || coverage.isEmpty()) && (topic == null || topic.isEmpty()) && (contributor == null || contributor.isEmpty()) 3221 && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (copyright == null || copyright.isEmpty()) 3222 && (relatedResource == null || relatedResource.isEmpty()); 3223 } 3224 3225 3226} 3227