001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import ca.uhn.fhir.model.api.annotation.ResourceDef; 040import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 041import ca.uhn.fhir.model.api.annotation.Child; 042import ca.uhn.fhir.model.api.annotation.ChildOrder; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.Block; 045import org.hl7.fhir.instance.model.api.*; 046import org.hl7.fhir.exceptions.FHIRException; 047/** 048 * The regulatory authorization of a medicinal product. 049 */ 050@ResourceDef(name="MedicinalProductAuthorization", profile="http://hl7.org/fhir/StructureDefinition/MedicinalProductAuthorization") 051public class MedicinalProductAuthorization extends DomainResource { 052 053 @Block() 054 public static class MedicinalProductAuthorizationJurisdictionalAuthorizationComponent extends BackboneElement implements IBaseBackboneElement { 055 /** 056 * The assigned number for the marketing authorization. 057 */ 058 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 059 @Description(shortDefinition="The assigned number for the marketing authorization", formalDefinition="The assigned number for the marketing authorization." ) 060 protected List<Identifier> identifier; 061 062 /** 063 * Country of authorization. 064 */ 065 @Child(name = "country", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) 066 @Description(shortDefinition="Country of authorization", formalDefinition="Country of authorization." ) 067 protected CodeableConcept country; 068 069 /** 070 * Jurisdiction within a country. 071 */ 072 @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 073 @Description(shortDefinition="Jurisdiction within a country", formalDefinition="Jurisdiction within a country." ) 074 protected List<CodeableConcept> jurisdiction; 075 076 /** 077 * The legal status of supply in a jurisdiction or region. 078 */ 079 @Child(name = "legalStatusOfSupply", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 080 @Description(shortDefinition="The legal status of supply in a jurisdiction or region", formalDefinition="The legal status of supply in a jurisdiction or region." ) 081 protected CodeableConcept legalStatusOfSupply; 082 083 /** 084 * The start and expected end date of the authorization. 085 */ 086 @Child(name = "validityPeriod", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true) 087 @Description(shortDefinition="The start and expected end date of the authorization", formalDefinition="The start and expected end date of the authorization." ) 088 protected Period validityPeriod; 089 090 private static final long serialVersionUID = -1893307291L; 091 092 /** 093 * Constructor 094 */ 095 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent() { 096 super(); 097 } 098 099 /** 100 * @return {@link #identifier} (The assigned number for the marketing authorization.) 101 */ 102 public List<Identifier> getIdentifier() { 103 if (this.identifier == null) 104 this.identifier = new ArrayList<Identifier>(); 105 return this.identifier; 106 } 107 108 /** 109 * @return Returns a reference to <code>this</code> for easy method chaining 110 */ 111 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent setIdentifier(List<Identifier> theIdentifier) { 112 this.identifier = theIdentifier; 113 return this; 114 } 115 116 public boolean hasIdentifier() { 117 if (this.identifier == null) 118 return false; 119 for (Identifier item : this.identifier) 120 if (!item.isEmpty()) 121 return true; 122 return false; 123 } 124 125 public Identifier addIdentifier() { //3 126 Identifier t = new Identifier(); 127 if (this.identifier == null) 128 this.identifier = new ArrayList<Identifier>(); 129 this.identifier.add(t); 130 return t; 131 } 132 133 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent addIdentifier(Identifier t) { //3 134 if (t == null) 135 return this; 136 if (this.identifier == null) 137 this.identifier = new ArrayList<Identifier>(); 138 this.identifier.add(t); 139 return this; 140 } 141 142 /** 143 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 144 */ 145 public Identifier getIdentifierFirstRep() { 146 if (getIdentifier().isEmpty()) { 147 addIdentifier(); 148 } 149 return getIdentifier().get(0); 150 } 151 152 /** 153 * @return {@link #country} (Country of authorization.) 154 */ 155 public CodeableConcept getCountry() { 156 if (this.country == null) 157 if (Configuration.errorOnAutoCreate()) 158 throw new Error("Attempt to auto-create MedicinalProductAuthorizationJurisdictionalAuthorizationComponent.country"); 159 else if (Configuration.doAutoCreate()) 160 this.country = new CodeableConcept(); // cc 161 return this.country; 162 } 163 164 public boolean hasCountry() { 165 return this.country != null && !this.country.isEmpty(); 166 } 167 168 /** 169 * @param value {@link #country} (Country of authorization.) 170 */ 171 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent setCountry(CodeableConcept value) { 172 this.country = value; 173 return this; 174 } 175 176 /** 177 * @return {@link #jurisdiction} (Jurisdiction within a country.) 178 */ 179 public List<CodeableConcept> getJurisdiction() { 180 if (this.jurisdiction == null) 181 this.jurisdiction = new ArrayList<CodeableConcept>(); 182 return this.jurisdiction; 183 } 184 185 /** 186 * @return Returns a reference to <code>this</code> for easy method chaining 187 */ 188 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent setJurisdiction(List<CodeableConcept> theJurisdiction) { 189 this.jurisdiction = theJurisdiction; 190 return this; 191 } 192 193 public boolean hasJurisdiction() { 194 if (this.jurisdiction == null) 195 return false; 196 for (CodeableConcept item : this.jurisdiction) 197 if (!item.isEmpty()) 198 return true; 199 return false; 200 } 201 202 public CodeableConcept addJurisdiction() { //3 203 CodeableConcept t = new CodeableConcept(); 204 if (this.jurisdiction == null) 205 this.jurisdiction = new ArrayList<CodeableConcept>(); 206 this.jurisdiction.add(t); 207 return t; 208 } 209 210 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent addJurisdiction(CodeableConcept t) { //3 211 if (t == null) 212 return this; 213 if (this.jurisdiction == null) 214 this.jurisdiction = new ArrayList<CodeableConcept>(); 215 this.jurisdiction.add(t); 216 return this; 217 } 218 219 /** 220 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 221 */ 222 public CodeableConcept getJurisdictionFirstRep() { 223 if (getJurisdiction().isEmpty()) { 224 addJurisdiction(); 225 } 226 return getJurisdiction().get(0); 227 } 228 229 /** 230 * @return {@link #legalStatusOfSupply} (The legal status of supply in a jurisdiction or region.) 231 */ 232 public CodeableConcept getLegalStatusOfSupply() { 233 if (this.legalStatusOfSupply == null) 234 if (Configuration.errorOnAutoCreate()) 235 throw new Error("Attempt to auto-create MedicinalProductAuthorizationJurisdictionalAuthorizationComponent.legalStatusOfSupply"); 236 else if (Configuration.doAutoCreate()) 237 this.legalStatusOfSupply = new CodeableConcept(); // cc 238 return this.legalStatusOfSupply; 239 } 240 241 public boolean hasLegalStatusOfSupply() { 242 return this.legalStatusOfSupply != null && !this.legalStatusOfSupply.isEmpty(); 243 } 244 245 /** 246 * @param value {@link #legalStatusOfSupply} (The legal status of supply in a jurisdiction or region.) 247 */ 248 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent setLegalStatusOfSupply(CodeableConcept value) { 249 this.legalStatusOfSupply = value; 250 return this; 251 } 252 253 /** 254 * @return {@link #validityPeriod} (The start and expected end date of the authorization.) 255 */ 256 public Period getValidityPeriod() { 257 if (this.validityPeriod == null) 258 if (Configuration.errorOnAutoCreate()) 259 throw new Error("Attempt to auto-create MedicinalProductAuthorizationJurisdictionalAuthorizationComponent.validityPeriod"); 260 else if (Configuration.doAutoCreate()) 261 this.validityPeriod = new Period(); // cc 262 return this.validityPeriod; 263 } 264 265 public boolean hasValidityPeriod() { 266 return this.validityPeriod != null && !this.validityPeriod.isEmpty(); 267 } 268 269 /** 270 * @param value {@link #validityPeriod} (The start and expected end date of the authorization.) 271 */ 272 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent setValidityPeriod(Period value) { 273 this.validityPeriod = value; 274 return this; 275 } 276 277 protected void listChildren(List<Property> children) { 278 super.listChildren(children); 279 children.add(new Property("identifier", "Identifier", "The assigned number for the marketing authorization.", 0, java.lang.Integer.MAX_VALUE, identifier)); 280 children.add(new Property("country", "CodeableConcept", "Country of authorization.", 0, 1, country)); 281 children.add(new Property("jurisdiction", "CodeableConcept", "Jurisdiction within a country.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 282 children.add(new Property("legalStatusOfSupply", "CodeableConcept", "The legal status of supply in a jurisdiction or region.", 0, 1, legalStatusOfSupply)); 283 children.add(new Property("validityPeriod", "Period", "The start and expected end date of the authorization.", 0, 1, validityPeriod)); 284 } 285 286 @Override 287 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 288 switch (_hash) { 289 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The assigned number for the marketing authorization.", 0, java.lang.Integer.MAX_VALUE, identifier); 290 case 957831062: /*country*/ return new Property("country", "CodeableConcept", "Country of authorization.", 0, 1, country); 291 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "Jurisdiction within a country.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 292 case -844874031: /*legalStatusOfSupply*/ return new Property("legalStatusOfSupply", "CodeableConcept", "The legal status of supply in a jurisdiction or region.", 0, 1, legalStatusOfSupply); 293 case -1434195053: /*validityPeriod*/ return new Property("validityPeriod", "Period", "The start and expected end date of the authorization.", 0, 1, validityPeriod); 294 default: return super.getNamedProperty(_hash, _name, _checkValid); 295 } 296 297 } 298 299 @Override 300 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 301 switch (hash) { 302 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 303 case 957831062: /*country*/ return this.country == null ? new Base[0] : new Base[] {this.country}; // CodeableConcept 304 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 305 case -844874031: /*legalStatusOfSupply*/ return this.legalStatusOfSupply == null ? new Base[0] : new Base[] {this.legalStatusOfSupply}; // CodeableConcept 306 case -1434195053: /*validityPeriod*/ return this.validityPeriod == null ? new Base[0] : new Base[] {this.validityPeriod}; // Period 307 default: return super.getProperty(hash, name, checkValid); 308 } 309 310 } 311 312 @Override 313 public Base setProperty(int hash, String name, Base value) throws FHIRException { 314 switch (hash) { 315 case -1618432855: // identifier 316 this.getIdentifier().add(castToIdentifier(value)); // Identifier 317 return value; 318 case 957831062: // country 319 this.country = castToCodeableConcept(value); // CodeableConcept 320 return value; 321 case -507075711: // jurisdiction 322 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 323 return value; 324 case -844874031: // legalStatusOfSupply 325 this.legalStatusOfSupply = castToCodeableConcept(value); // CodeableConcept 326 return value; 327 case -1434195053: // validityPeriod 328 this.validityPeriod = castToPeriod(value); // Period 329 return value; 330 default: return super.setProperty(hash, name, value); 331 } 332 333 } 334 335 @Override 336 public Base setProperty(String name, Base value) throws FHIRException { 337 if (name.equals("identifier")) { 338 this.getIdentifier().add(castToIdentifier(value)); 339 } else if (name.equals("country")) { 340 this.country = castToCodeableConcept(value); // CodeableConcept 341 } else if (name.equals("jurisdiction")) { 342 this.getJurisdiction().add(castToCodeableConcept(value)); 343 } else if (name.equals("legalStatusOfSupply")) { 344 this.legalStatusOfSupply = castToCodeableConcept(value); // CodeableConcept 345 } else if (name.equals("validityPeriod")) { 346 this.validityPeriod = castToPeriod(value); // Period 347 } else 348 return super.setProperty(name, value); 349 return value; 350 } 351 352 @Override 353 public Base makeProperty(int hash, String name) throws FHIRException { 354 switch (hash) { 355 case -1618432855: return addIdentifier(); 356 case 957831062: return getCountry(); 357 case -507075711: return addJurisdiction(); 358 case -844874031: return getLegalStatusOfSupply(); 359 case -1434195053: return getValidityPeriod(); 360 default: return super.makeProperty(hash, name); 361 } 362 363 } 364 365 @Override 366 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 367 switch (hash) { 368 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 369 case 957831062: /*country*/ return new String[] {"CodeableConcept"}; 370 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 371 case -844874031: /*legalStatusOfSupply*/ return new String[] {"CodeableConcept"}; 372 case -1434195053: /*validityPeriod*/ return new String[] {"Period"}; 373 default: return super.getTypesForProperty(hash, name); 374 } 375 376 } 377 378 @Override 379 public Base addChild(String name) throws FHIRException { 380 if (name.equals("identifier")) { 381 return addIdentifier(); 382 } 383 else if (name.equals("country")) { 384 this.country = new CodeableConcept(); 385 return this.country; 386 } 387 else if (name.equals("jurisdiction")) { 388 return addJurisdiction(); 389 } 390 else if (name.equals("legalStatusOfSupply")) { 391 this.legalStatusOfSupply = new CodeableConcept(); 392 return this.legalStatusOfSupply; 393 } 394 else if (name.equals("validityPeriod")) { 395 this.validityPeriod = new Period(); 396 return this.validityPeriod; 397 } 398 else 399 return super.addChild(name); 400 } 401 402 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent copy() { 403 MedicinalProductAuthorizationJurisdictionalAuthorizationComponent dst = new MedicinalProductAuthorizationJurisdictionalAuthorizationComponent(); 404 copyValues(dst); 405 return dst; 406 } 407 408 public void copyValues(MedicinalProductAuthorizationJurisdictionalAuthorizationComponent dst) { 409 super.copyValues(dst); 410 if (identifier != null) { 411 dst.identifier = new ArrayList<Identifier>(); 412 for (Identifier i : identifier) 413 dst.identifier.add(i.copy()); 414 }; 415 dst.country = country == null ? null : country.copy(); 416 if (jurisdiction != null) { 417 dst.jurisdiction = new ArrayList<CodeableConcept>(); 418 for (CodeableConcept i : jurisdiction) 419 dst.jurisdiction.add(i.copy()); 420 }; 421 dst.legalStatusOfSupply = legalStatusOfSupply == null ? null : legalStatusOfSupply.copy(); 422 dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy(); 423 } 424 425 @Override 426 public boolean equalsDeep(Base other_) { 427 if (!super.equalsDeep(other_)) 428 return false; 429 if (!(other_ instanceof MedicinalProductAuthorizationJurisdictionalAuthorizationComponent)) 430 return false; 431 MedicinalProductAuthorizationJurisdictionalAuthorizationComponent o = (MedicinalProductAuthorizationJurisdictionalAuthorizationComponent) other_; 432 return compareDeep(identifier, o.identifier, true) && compareDeep(country, o.country, true) && compareDeep(jurisdiction, o.jurisdiction, true) 433 && compareDeep(legalStatusOfSupply, o.legalStatusOfSupply, true) && compareDeep(validityPeriod, o.validityPeriod, true) 434 ; 435 } 436 437 @Override 438 public boolean equalsShallow(Base other_) { 439 if (!super.equalsShallow(other_)) 440 return false; 441 if (!(other_ instanceof MedicinalProductAuthorizationJurisdictionalAuthorizationComponent)) 442 return false; 443 MedicinalProductAuthorizationJurisdictionalAuthorizationComponent o = (MedicinalProductAuthorizationJurisdictionalAuthorizationComponent) other_; 444 return true; 445 } 446 447 public boolean isEmpty() { 448 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, country, jurisdiction 449 , legalStatusOfSupply, validityPeriod); 450 } 451 452 public String fhirType() { 453 return "MedicinalProductAuthorization.jurisdictionalAuthorization"; 454 455 } 456 457 } 458 459 @Block() 460 public static class MedicinalProductAuthorizationProcedureComponent extends BackboneElement implements IBaseBackboneElement { 461 /** 462 * Identifier for this procedure. 463 */ 464 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 465 @Description(shortDefinition="Identifier for this procedure", formalDefinition="Identifier for this procedure." ) 466 protected Identifier identifier; 467 468 /** 469 * Type of procedure. 470 */ 471 @Child(name = "type", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) 472 @Description(shortDefinition="Type of procedure", formalDefinition="Type of procedure." ) 473 protected CodeableConcept type; 474 475 /** 476 * Date of procedure. 477 */ 478 @Child(name = "date", type = {Period.class, DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 479 @Description(shortDefinition="Date of procedure", formalDefinition="Date of procedure." ) 480 protected Type date; 481 482 /** 483 * Applcations submitted to obtain a marketing authorization. 484 */ 485 @Child(name = "application", type = {MedicinalProductAuthorizationProcedureComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 486 @Description(shortDefinition="Applcations submitted to obtain a marketing authorization", formalDefinition="Applcations submitted to obtain a marketing authorization." ) 487 protected List<MedicinalProductAuthorizationProcedureComponent> application; 488 489 private static final long serialVersionUID = 930236001L; 490 491 /** 492 * Constructor 493 */ 494 public MedicinalProductAuthorizationProcedureComponent() { 495 super(); 496 } 497 498 /** 499 * Constructor 500 */ 501 public MedicinalProductAuthorizationProcedureComponent(CodeableConcept type) { 502 super(); 503 this.type = type; 504 } 505 506 /** 507 * @return {@link #identifier} (Identifier for this procedure.) 508 */ 509 public Identifier getIdentifier() { 510 if (this.identifier == null) 511 if (Configuration.errorOnAutoCreate()) 512 throw new Error("Attempt to auto-create MedicinalProductAuthorizationProcedureComponent.identifier"); 513 else if (Configuration.doAutoCreate()) 514 this.identifier = new Identifier(); // cc 515 return this.identifier; 516 } 517 518 public boolean hasIdentifier() { 519 return this.identifier != null && !this.identifier.isEmpty(); 520 } 521 522 /** 523 * @param value {@link #identifier} (Identifier for this procedure.) 524 */ 525 public MedicinalProductAuthorizationProcedureComponent setIdentifier(Identifier value) { 526 this.identifier = value; 527 return this; 528 } 529 530 /** 531 * @return {@link #type} (Type of procedure.) 532 */ 533 public CodeableConcept getType() { 534 if (this.type == null) 535 if (Configuration.errorOnAutoCreate()) 536 throw new Error("Attempt to auto-create MedicinalProductAuthorizationProcedureComponent.type"); 537 else if (Configuration.doAutoCreate()) 538 this.type = new CodeableConcept(); // cc 539 return this.type; 540 } 541 542 public boolean hasType() { 543 return this.type != null && !this.type.isEmpty(); 544 } 545 546 /** 547 * @param value {@link #type} (Type of procedure.) 548 */ 549 public MedicinalProductAuthorizationProcedureComponent setType(CodeableConcept value) { 550 this.type = value; 551 return this; 552 } 553 554 /** 555 * @return {@link #date} (Date of procedure.) 556 */ 557 public Type getDate() { 558 return this.date; 559 } 560 561 /** 562 * @return {@link #date} (Date of procedure.) 563 */ 564 public Period getDatePeriod() throws FHIRException { 565 if (this.date == null) 566 this.date = new Period(); 567 if (!(this.date instanceof Period)) 568 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.date.getClass().getName()+" was encountered"); 569 return (Period) this.date; 570 } 571 572 public boolean hasDatePeriod() { 573 return this != null && this.date instanceof Period; 574 } 575 576 /** 577 * @return {@link #date} (Date of procedure.) 578 */ 579 public DateTimeType getDateDateTimeType() throws FHIRException { 580 if (this.date == null) 581 this.date = new DateTimeType(); 582 if (!(this.date instanceof DateTimeType)) 583 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.date.getClass().getName()+" was encountered"); 584 return (DateTimeType) this.date; 585 } 586 587 public boolean hasDateDateTimeType() { 588 return this != null && this.date instanceof DateTimeType; 589 } 590 591 public boolean hasDate() { 592 return this.date != null && !this.date.isEmpty(); 593 } 594 595 /** 596 * @param value {@link #date} (Date of procedure.) 597 */ 598 public MedicinalProductAuthorizationProcedureComponent setDate(Type value) { 599 if (value != null && !(value instanceof Period || value instanceof DateTimeType)) 600 throw new Error("Not the right type for MedicinalProductAuthorization.procedure.date[x]: "+value.fhirType()); 601 this.date = value; 602 return this; 603 } 604 605 /** 606 * @return {@link #application} (Applcations submitted to obtain a marketing authorization.) 607 */ 608 public List<MedicinalProductAuthorizationProcedureComponent> getApplication() { 609 if (this.application == null) 610 this.application = new ArrayList<MedicinalProductAuthorizationProcedureComponent>(); 611 return this.application; 612 } 613 614 /** 615 * @return Returns a reference to <code>this</code> for easy method chaining 616 */ 617 public MedicinalProductAuthorizationProcedureComponent setApplication(List<MedicinalProductAuthorizationProcedureComponent> theApplication) { 618 this.application = theApplication; 619 return this; 620 } 621 622 public boolean hasApplication() { 623 if (this.application == null) 624 return false; 625 for (MedicinalProductAuthorizationProcedureComponent item : this.application) 626 if (!item.isEmpty()) 627 return true; 628 return false; 629 } 630 631 public MedicinalProductAuthorizationProcedureComponent addApplication() { //3 632 MedicinalProductAuthorizationProcedureComponent t = new MedicinalProductAuthorizationProcedureComponent(); 633 if (this.application == null) 634 this.application = new ArrayList<MedicinalProductAuthorizationProcedureComponent>(); 635 this.application.add(t); 636 return t; 637 } 638 639 public MedicinalProductAuthorizationProcedureComponent addApplication(MedicinalProductAuthorizationProcedureComponent t) { //3 640 if (t == null) 641 return this; 642 if (this.application == null) 643 this.application = new ArrayList<MedicinalProductAuthorizationProcedureComponent>(); 644 this.application.add(t); 645 return this; 646 } 647 648 /** 649 * @return The first repetition of repeating field {@link #application}, creating it if it does not already exist 650 */ 651 public MedicinalProductAuthorizationProcedureComponent getApplicationFirstRep() { 652 if (getApplication().isEmpty()) { 653 addApplication(); 654 } 655 return getApplication().get(0); 656 } 657 658 protected void listChildren(List<Property> children) { 659 super.listChildren(children); 660 children.add(new Property("identifier", "Identifier", "Identifier for this procedure.", 0, 1, identifier)); 661 children.add(new Property("type", "CodeableConcept", "Type of procedure.", 0, 1, type)); 662 children.add(new Property("date[x]", "Period|dateTime", "Date of procedure.", 0, 1, date)); 663 children.add(new Property("application", "@MedicinalProductAuthorization.procedure", "Applcations submitted to obtain a marketing authorization.", 0, java.lang.Integer.MAX_VALUE, application)); 664 } 665 666 @Override 667 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 668 switch (_hash) { 669 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier for this procedure.", 0, 1, identifier); 670 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type of procedure.", 0, 1, type); 671 case 1443311122: /*date[x]*/ return new Property("date[x]", "Period|dateTime", "Date of procedure.", 0, 1, date); 672 case 3076014: /*date*/ return new Property("date[x]", "Period|dateTime", "Date of procedure.", 0, 1, date); 673 case 432297743: /*datePeriod*/ return new Property("date[x]", "Period|dateTime", "Date of procedure.", 0, 1, date); 674 case 185136489: /*dateDateTime*/ return new Property("date[x]", "Period|dateTime", "Date of procedure.", 0, 1, date); 675 case 1554253136: /*application*/ return new Property("application", "@MedicinalProductAuthorization.procedure", "Applcations submitted to obtain a marketing authorization.", 0, java.lang.Integer.MAX_VALUE, application); 676 default: return super.getNamedProperty(_hash, _name, _checkValid); 677 } 678 679 } 680 681 @Override 682 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 683 switch (hash) { 684 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 685 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 686 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // Type 687 case 1554253136: /*application*/ return this.application == null ? new Base[0] : this.application.toArray(new Base[this.application.size()]); // MedicinalProductAuthorizationProcedureComponent 688 default: return super.getProperty(hash, name, checkValid); 689 } 690 691 } 692 693 @Override 694 public Base setProperty(int hash, String name, Base value) throws FHIRException { 695 switch (hash) { 696 case -1618432855: // identifier 697 this.identifier = castToIdentifier(value); // Identifier 698 return value; 699 case 3575610: // type 700 this.type = castToCodeableConcept(value); // CodeableConcept 701 return value; 702 case 3076014: // date 703 this.date = castToType(value); // Type 704 return value; 705 case 1554253136: // application 706 this.getApplication().add((MedicinalProductAuthorizationProcedureComponent) value); // MedicinalProductAuthorizationProcedureComponent 707 return value; 708 default: return super.setProperty(hash, name, value); 709 } 710 711 } 712 713 @Override 714 public Base setProperty(String name, Base value) throws FHIRException { 715 if (name.equals("identifier")) { 716 this.identifier = castToIdentifier(value); // Identifier 717 } else if (name.equals("type")) { 718 this.type = castToCodeableConcept(value); // CodeableConcept 719 } else if (name.equals("date[x]")) { 720 this.date = castToType(value); // Type 721 } else if (name.equals("application")) { 722 this.getApplication().add((MedicinalProductAuthorizationProcedureComponent) value); 723 } else 724 return super.setProperty(name, value); 725 return value; 726 } 727 728 @Override 729 public Base makeProperty(int hash, String name) throws FHIRException { 730 switch (hash) { 731 case -1618432855: return getIdentifier(); 732 case 3575610: return getType(); 733 case 1443311122: return getDate(); 734 case 3076014: return getDate(); 735 case 1554253136: return addApplication(); 736 default: return super.makeProperty(hash, name); 737 } 738 739 } 740 741 @Override 742 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 743 switch (hash) { 744 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 745 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 746 case 3076014: /*date*/ return new String[] {"Period", "dateTime"}; 747 case 1554253136: /*application*/ return new String[] {"@MedicinalProductAuthorization.procedure"}; 748 default: return super.getTypesForProperty(hash, name); 749 } 750 751 } 752 753 @Override 754 public Base addChild(String name) throws FHIRException { 755 if (name.equals("identifier")) { 756 this.identifier = new Identifier(); 757 return this.identifier; 758 } 759 else if (name.equals("type")) { 760 this.type = new CodeableConcept(); 761 return this.type; 762 } 763 else if (name.equals("datePeriod")) { 764 this.date = new Period(); 765 return this.date; 766 } 767 else if (name.equals("dateDateTime")) { 768 this.date = new DateTimeType(); 769 return this.date; 770 } 771 else if (name.equals("application")) { 772 return addApplication(); 773 } 774 else 775 return super.addChild(name); 776 } 777 778 public MedicinalProductAuthorizationProcedureComponent copy() { 779 MedicinalProductAuthorizationProcedureComponent dst = new MedicinalProductAuthorizationProcedureComponent(); 780 copyValues(dst); 781 return dst; 782 } 783 784 public void copyValues(MedicinalProductAuthorizationProcedureComponent dst) { 785 super.copyValues(dst); 786 dst.identifier = identifier == null ? null : identifier.copy(); 787 dst.type = type == null ? null : type.copy(); 788 dst.date = date == null ? null : date.copy(); 789 if (application != null) { 790 dst.application = new ArrayList<MedicinalProductAuthorizationProcedureComponent>(); 791 for (MedicinalProductAuthorizationProcedureComponent i : application) 792 dst.application.add(i.copy()); 793 }; 794 } 795 796 @Override 797 public boolean equalsDeep(Base other_) { 798 if (!super.equalsDeep(other_)) 799 return false; 800 if (!(other_ instanceof MedicinalProductAuthorizationProcedureComponent)) 801 return false; 802 MedicinalProductAuthorizationProcedureComponent o = (MedicinalProductAuthorizationProcedureComponent) other_; 803 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(date, o.date, true) 804 && compareDeep(application, o.application, true); 805 } 806 807 @Override 808 public boolean equalsShallow(Base other_) { 809 if (!super.equalsShallow(other_)) 810 return false; 811 if (!(other_ instanceof MedicinalProductAuthorizationProcedureComponent)) 812 return false; 813 MedicinalProductAuthorizationProcedureComponent o = (MedicinalProductAuthorizationProcedureComponent) other_; 814 return true; 815 } 816 817 public boolean isEmpty() { 818 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, date, application 819 ); 820 } 821 822 public String fhirType() { 823 return "MedicinalProductAuthorization.procedure"; 824 825 } 826 827 } 828 829 /** 830 * Business identifier for the marketing authorization, as assigned by a regulator. 831 */ 832 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 833 @Description(shortDefinition="Business identifier for the marketing authorization, as assigned by a regulator", formalDefinition="Business identifier for the marketing authorization, as assigned by a regulator." ) 834 protected List<Identifier> identifier; 835 836 /** 837 * The medicinal product that is being authorized. 838 */ 839 @Child(name = "subject", type = {MedicinalProduct.class, MedicinalProductPackaged.class}, order=1, min=0, max=1, modifier=false, summary=true) 840 @Description(shortDefinition="The medicinal product that is being authorized", formalDefinition="The medicinal product that is being authorized." ) 841 protected Reference subject; 842 843 /** 844 * The actual object that is the target of the reference (The medicinal product that is being authorized.) 845 */ 846 protected Resource subjectTarget; 847 848 /** 849 * The country in which the marketing authorization has been granted. 850 */ 851 @Child(name = "country", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 852 @Description(shortDefinition="The country in which the marketing authorization has been granted", formalDefinition="The country in which the marketing authorization has been granted." ) 853 protected List<CodeableConcept> country; 854 855 /** 856 * Jurisdiction within a country. 857 */ 858 @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 859 @Description(shortDefinition="Jurisdiction within a country", formalDefinition="Jurisdiction within a country." ) 860 protected List<CodeableConcept> jurisdiction; 861 862 /** 863 * The status of the marketing authorization. 864 */ 865 @Child(name = "status", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 866 @Description(shortDefinition="The status of the marketing authorization", formalDefinition="The status of the marketing authorization." ) 867 protected CodeableConcept status; 868 869 /** 870 * The date at which the given status has become applicable. 871 */ 872 @Child(name = "statusDate", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 873 @Description(shortDefinition="The date at which the given status has become applicable", formalDefinition="The date at which the given status has become applicable." ) 874 protected DateTimeType statusDate; 875 876 /** 877 * The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored. 878 */ 879 @Child(name = "restoreDate", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 880 @Description(shortDefinition="The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored", formalDefinition="The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored." ) 881 protected DateTimeType restoreDate; 882 883 /** 884 * The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format. 885 */ 886 @Child(name = "validityPeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) 887 @Description(shortDefinition="The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format", formalDefinition="The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format." ) 888 protected Period validityPeriod; 889 890 /** 891 * A period of time after authorization before generic product applicatiosn can be submitted. 892 */ 893 @Child(name = "dataExclusivityPeriod", type = {Period.class}, order=8, min=0, max=1, modifier=false, summary=true) 894 @Description(shortDefinition="A period of time after authorization before generic product applicatiosn can be submitted", formalDefinition="A period of time after authorization before generic product applicatiosn can be submitted." ) 895 protected Period dataExclusivityPeriod; 896 897 /** 898 * The date when the first authorization was granted by a Medicines Regulatory Agency. 899 */ 900 @Child(name = "dateOfFirstAuthorization", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true) 901 @Description(shortDefinition="The date when the first authorization was granted by a Medicines Regulatory Agency", formalDefinition="The date when the first authorization was granted by a Medicines Regulatory Agency." ) 902 protected DateTimeType dateOfFirstAuthorization; 903 904 /** 905 * Date of first marketing authorization for a company's new medicinal product in any country in the World. 906 */ 907 @Child(name = "internationalBirthDate", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) 908 @Description(shortDefinition="Date of first marketing authorization for a company's new medicinal product in any country in the World", formalDefinition="Date of first marketing authorization for a company's new medicinal product in any country in the World." ) 909 protected DateTimeType internationalBirthDate; 910 911 /** 912 * The legal framework against which this authorization is granted. 913 */ 914 @Child(name = "legalBasis", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true) 915 @Description(shortDefinition="The legal framework against which this authorization is granted", formalDefinition="The legal framework against which this authorization is granted." ) 916 protected CodeableConcept legalBasis; 917 918 /** 919 * Authorization in areas within a country. 920 */ 921 @Child(name = "jurisdictionalAuthorization", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 922 @Description(shortDefinition="Authorization in areas within a country", formalDefinition="Authorization in areas within a country." ) 923 protected List<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent> jurisdictionalAuthorization; 924 925 /** 926 * Marketing Authorization Holder. 927 */ 928 @Child(name = "holder", type = {Organization.class}, order=13, min=0, max=1, modifier=false, summary=true) 929 @Description(shortDefinition="Marketing Authorization Holder", formalDefinition="Marketing Authorization Holder." ) 930 protected Reference holder; 931 932 /** 933 * The actual object that is the target of the reference (Marketing Authorization Holder.) 934 */ 935 protected Organization holderTarget; 936 937 /** 938 * Medicines Regulatory Agency. 939 */ 940 @Child(name = "regulator", type = {Organization.class}, order=14, min=0, max=1, modifier=false, summary=true) 941 @Description(shortDefinition="Medicines Regulatory Agency", formalDefinition="Medicines Regulatory Agency." ) 942 protected Reference regulator; 943 944 /** 945 * The actual object that is the target of the reference (Medicines Regulatory Agency.) 946 */ 947 protected Organization regulatorTarget; 948 949 /** 950 * The regulatory procedure for granting or amending a marketing authorization. 951 */ 952 @Child(name = "procedure", type = {}, order=15, min=0, max=1, modifier=false, summary=true) 953 @Description(shortDefinition="The regulatory procedure for granting or amending a marketing authorization", formalDefinition="The regulatory procedure for granting or amending a marketing authorization." ) 954 protected MedicinalProductAuthorizationProcedureComponent procedure; 955 956 private static final long serialVersionUID = 16249078L; 957 958 /** 959 * Constructor 960 */ 961 public MedicinalProductAuthorization() { 962 super(); 963 } 964 965 /** 966 * @return {@link #identifier} (Business identifier for the marketing authorization, as assigned by a regulator.) 967 */ 968 public List<Identifier> getIdentifier() { 969 if (this.identifier == null) 970 this.identifier = new ArrayList<Identifier>(); 971 return this.identifier; 972 } 973 974 /** 975 * @return Returns a reference to <code>this</code> for easy method chaining 976 */ 977 public MedicinalProductAuthorization setIdentifier(List<Identifier> theIdentifier) { 978 this.identifier = theIdentifier; 979 return this; 980 } 981 982 public boolean hasIdentifier() { 983 if (this.identifier == null) 984 return false; 985 for (Identifier item : this.identifier) 986 if (!item.isEmpty()) 987 return true; 988 return false; 989 } 990 991 public Identifier addIdentifier() { //3 992 Identifier t = new Identifier(); 993 if (this.identifier == null) 994 this.identifier = new ArrayList<Identifier>(); 995 this.identifier.add(t); 996 return t; 997 } 998 999 public MedicinalProductAuthorization addIdentifier(Identifier t) { //3 1000 if (t == null) 1001 return this; 1002 if (this.identifier == null) 1003 this.identifier = new ArrayList<Identifier>(); 1004 this.identifier.add(t); 1005 return this; 1006 } 1007 1008 /** 1009 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1010 */ 1011 public Identifier getIdentifierFirstRep() { 1012 if (getIdentifier().isEmpty()) { 1013 addIdentifier(); 1014 } 1015 return getIdentifier().get(0); 1016 } 1017 1018 /** 1019 * @return {@link #subject} (The medicinal product that is being authorized.) 1020 */ 1021 public Reference getSubject() { 1022 if (this.subject == null) 1023 if (Configuration.errorOnAutoCreate()) 1024 throw new Error("Attempt to auto-create MedicinalProductAuthorization.subject"); 1025 else if (Configuration.doAutoCreate()) 1026 this.subject = new Reference(); // cc 1027 return this.subject; 1028 } 1029 1030 public boolean hasSubject() { 1031 return this.subject != null && !this.subject.isEmpty(); 1032 } 1033 1034 /** 1035 * @param value {@link #subject} (The medicinal product that is being authorized.) 1036 */ 1037 public MedicinalProductAuthorization setSubject(Reference value) { 1038 this.subject = value; 1039 return this; 1040 } 1041 1042 /** 1043 * @return {@link #subject} 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 medicinal product that is being authorized.) 1044 */ 1045 public Resource getSubjectTarget() { 1046 return this.subjectTarget; 1047 } 1048 1049 /** 1050 * @param value {@link #subject} 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 medicinal product that is being authorized.) 1051 */ 1052 public MedicinalProductAuthorization setSubjectTarget(Resource value) { 1053 this.subjectTarget = value; 1054 return this; 1055 } 1056 1057 /** 1058 * @return {@link #country} (The country in which the marketing authorization has been granted.) 1059 */ 1060 public List<CodeableConcept> getCountry() { 1061 if (this.country == null) 1062 this.country = new ArrayList<CodeableConcept>(); 1063 return this.country; 1064 } 1065 1066 /** 1067 * @return Returns a reference to <code>this</code> for easy method chaining 1068 */ 1069 public MedicinalProductAuthorization setCountry(List<CodeableConcept> theCountry) { 1070 this.country = theCountry; 1071 return this; 1072 } 1073 1074 public boolean hasCountry() { 1075 if (this.country == null) 1076 return false; 1077 for (CodeableConcept item : this.country) 1078 if (!item.isEmpty()) 1079 return true; 1080 return false; 1081 } 1082 1083 public CodeableConcept addCountry() { //3 1084 CodeableConcept t = new CodeableConcept(); 1085 if (this.country == null) 1086 this.country = new ArrayList<CodeableConcept>(); 1087 this.country.add(t); 1088 return t; 1089 } 1090 1091 public MedicinalProductAuthorization addCountry(CodeableConcept t) { //3 1092 if (t == null) 1093 return this; 1094 if (this.country == null) 1095 this.country = new ArrayList<CodeableConcept>(); 1096 this.country.add(t); 1097 return this; 1098 } 1099 1100 /** 1101 * @return The first repetition of repeating field {@link #country}, creating it if it does not already exist 1102 */ 1103 public CodeableConcept getCountryFirstRep() { 1104 if (getCountry().isEmpty()) { 1105 addCountry(); 1106 } 1107 return getCountry().get(0); 1108 } 1109 1110 /** 1111 * @return {@link #jurisdiction} (Jurisdiction within a country.) 1112 */ 1113 public List<CodeableConcept> getJurisdiction() { 1114 if (this.jurisdiction == null) 1115 this.jurisdiction = new ArrayList<CodeableConcept>(); 1116 return this.jurisdiction; 1117 } 1118 1119 /** 1120 * @return Returns a reference to <code>this</code> for easy method chaining 1121 */ 1122 public MedicinalProductAuthorization setJurisdiction(List<CodeableConcept> theJurisdiction) { 1123 this.jurisdiction = theJurisdiction; 1124 return this; 1125 } 1126 1127 public boolean hasJurisdiction() { 1128 if (this.jurisdiction == null) 1129 return false; 1130 for (CodeableConcept item : this.jurisdiction) 1131 if (!item.isEmpty()) 1132 return true; 1133 return false; 1134 } 1135 1136 public CodeableConcept addJurisdiction() { //3 1137 CodeableConcept t = new CodeableConcept(); 1138 if (this.jurisdiction == null) 1139 this.jurisdiction = new ArrayList<CodeableConcept>(); 1140 this.jurisdiction.add(t); 1141 return t; 1142 } 1143 1144 public MedicinalProductAuthorization addJurisdiction(CodeableConcept t) { //3 1145 if (t == null) 1146 return this; 1147 if (this.jurisdiction == null) 1148 this.jurisdiction = new ArrayList<CodeableConcept>(); 1149 this.jurisdiction.add(t); 1150 return this; 1151 } 1152 1153 /** 1154 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 1155 */ 1156 public CodeableConcept getJurisdictionFirstRep() { 1157 if (getJurisdiction().isEmpty()) { 1158 addJurisdiction(); 1159 } 1160 return getJurisdiction().get(0); 1161 } 1162 1163 /** 1164 * @return {@link #status} (The status of the marketing authorization.) 1165 */ 1166 public CodeableConcept getStatus() { 1167 if (this.status == null) 1168 if (Configuration.errorOnAutoCreate()) 1169 throw new Error("Attempt to auto-create MedicinalProductAuthorization.status"); 1170 else if (Configuration.doAutoCreate()) 1171 this.status = new CodeableConcept(); // cc 1172 return this.status; 1173 } 1174 1175 public boolean hasStatus() { 1176 return this.status != null && !this.status.isEmpty(); 1177 } 1178 1179 /** 1180 * @param value {@link #status} (The status of the marketing authorization.) 1181 */ 1182 public MedicinalProductAuthorization setStatus(CodeableConcept value) { 1183 this.status = value; 1184 return this; 1185 } 1186 1187 /** 1188 * @return {@link #statusDate} (The date at which the given status has become applicable.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 1189 */ 1190 public DateTimeType getStatusDateElement() { 1191 if (this.statusDate == null) 1192 if (Configuration.errorOnAutoCreate()) 1193 throw new Error("Attempt to auto-create MedicinalProductAuthorization.statusDate"); 1194 else if (Configuration.doAutoCreate()) 1195 this.statusDate = new DateTimeType(); // bb 1196 return this.statusDate; 1197 } 1198 1199 public boolean hasStatusDateElement() { 1200 return this.statusDate != null && !this.statusDate.isEmpty(); 1201 } 1202 1203 public boolean hasStatusDate() { 1204 return this.statusDate != null && !this.statusDate.isEmpty(); 1205 } 1206 1207 /** 1208 * @param value {@link #statusDate} (The date at which the given status has become applicable.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 1209 */ 1210 public MedicinalProductAuthorization setStatusDateElement(DateTimeType value) { 1211 this.statusDate = value; 1212 return this; 1213 } 1214 1215 /** 1216 * @return The date at which the given status has become applicable. 1217 */ 1218 public Date getStatusDate() { 1219 return this.statusDate == null ? null : this.statusDate.getValue(); 1220 } 1221 1222 /** 1223 * @param value The date at which the given status has become applicable. 1224 */ 1225 public MedicinalProductAuthorization setStatusDate(Date value) { 1226 if (value == null) 1227 this.statusDate = null; 1228 else { 1229 if (this.statusDate == null) 1230 this.statusDate = new DateTimeType(); 1231 this.statusDate.setValue(value); 1232 } 1233 return this; 1234 } 1235 1236 /** 1237 * @return {@link #restoreDate} (The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.). This is the underlying object with id, value and extensions. The accessor "getRestoreDate" gives direct access to the value 1238 */ 1239 public DateTimeType getRestoreDateElement() { 1240 if (this.restoreDate == null) 1241 if (Configuration.errorOnAutoCreate()) 1242 throw new Error("Attempt to auto-create MedicinalProductAuthorization.restoreDate"); 1243 else if (Configuration.doAutoCreate()) 1244 this.restoreDate = new DateTimeType(); // bb 1245 return this.restoreDate; 1246 } 1247 1248 public boolean hasRestoreDateElement() { 1249 return this.restoreDate != null && !this.restoreDate.isEmpty(); 1250 } 1251 1252 public boolean hasRestoreDate() { 1253 return this.restoreDate != null && !this.restoreDate.isEmpty(); 1254 } 1255 1256 /** 1257 * @param value {@link #restoreDate} (The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.). This is the underlying object with id, value and extensions. The accessor "getRestoreDate" gives direct access to the value 1258 */ 1259 public MedicinalProductAuthorization setRestoreDateElement(DateTimeType value) { 1260 this.restoreDate = value; 1261 return this; 1262 } 1263 1264 /** 1265 * @return The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored. 1266 */ 1267 public Date getRestoreDate() { 1268 return this.restoreDate == null ? null : this.restoreDate.getValue(); 1269 } 1270 1271 /** 1272 * @param value The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored. 1273 */ 1274 public MedicinalProductAuthorization setRestoreDate(Date value) { 1275 if (value == null) 1276 this.restoreDate = null; 1277 else { 1278 if (this.restoreDate == null) 1279 this.restoreDate = new DateTimeType(); 1280 this.restoreDate.setValue(value); 1281 } 1282 return this; 1283 } 1284 1285 /** 1286 * @return {@link #validityPeriod} (The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.) 1287 */ 1288 public Period getValidityPeriod() { 1289 if (this.validityPeriod == null) 1290 if (Configuration.errorOnAutoCreate()) 1291 throw new Error("Attempt to auto-create MedicinalProductAuthorization.validityPeriod"); 1292 else if (Configuration.doAutoCreate()) 1293 this.validityPeriod = new Period(); // cc 1294 return this.validityPeriod; 1295 } 1296 1297 public boolean hasValidityPeriod() { 1298 return this.validityPeriod != null && !this.validityPeriod.isEmpty(); 1299 } 1300 1301 /** 1302 * @param value {@link #validityPeriod} (The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.) 1303 */ 1304 public MedicinalProductAuthorization setValidityPeriod(Period value) { 1305 this.validityPeriod = value; 1306 return this; 1307 } 1308 1309 /** 1310 * @return {@link #dataExclusivityPeriod} (A period of time after authorization before generic product applicatiosn can be submitted.) 1311 */ 1312 public Period getDataExclusivityPeriod() { 1313 if (this.dataExclusivityPeriod == null) 1314 if (Configuration.errorOnAutoCreate()) 1315 throw new Error("Attempt to auto-create MedicinalProductAuthorization.dataExclusivityPeriod"); 1316 else if (Configuration.doAutoCreate()) 1317 this.dataExclusivityPeriod = new Period(); // cc 1318 return this.dataExclusivityPeriod; 1319 } 1320 1321 public boolean hasDataExclusivityPeriod() { 1322 return this.dataExclusivityPeriod != null && !this.dataExclusivityPeriod.isEmpty(); 1323 } 1324 1325 /** 1326 * @param value {@link #dataExclusivityPeriod} (A period of time after authorization before generic product applicatiosn can be submitted.) 1327 */ 1328 public MedicinalProductAuthorization setDataExclusivityPeriod(Period value) { 1329 this.dataExclusivityPeriod = value; 1330 return this; 1331 } 1332 1333 /** 1334 * @return {@link #dateOfFirstAuthorization} (The date when the first authorization was granted by a Medicines Regulatory Agency.). This is the underlying object with id, value and extensions. The accessor "getDateOfFirstAuthorization" gives direct access to the value 1335 */ 1336 public DateTimeType getDateOfFirstAuthorizationElement() { 1337 if (this.dateOfFirstAuthorization == null) 1338 if (Configuration.errorOnAutoCreate()) 1339 throw new Error("Attempt to auto-create MedicinalProductAuthorization.dateOfFirstAuthorization"); 1340 else if (Configuration.doAutoCreate()) 1341 this.dateOfFirstAuthorization = new DateTimeType(); // bb 1342 return this.dateOfFirstAuthorization; 1343 } 1344 1345 public boolean hasDateOfFirstAuthorizationElement() { 1346 return this.dateOfFirstAuthorization != null && !this.dateOfFirstAuthorization.isEmpty(); 1347 } 1348 1349 public boolean hasDateOfFirstAuthorization() { 1350 return this.dateOfFirstAuthorization != null && !this.dateOfFirstAuthorization.isEmpty(); 1351 } 1352 1353 /** 1354 * @param value {@link #dateOfFirstAuthorization} (The date when the first authorization was granted by a Medicines Regulatory Agency.). This is the underlying object with id, value and extensions. The accessor "getDateOfFirstAuthorization" gives direct access to the value 1355 */ 1356 public MedicinalProductAuthorization setDateOfFirstAuthorizationElement(DateTimeType value) { 1357 this.dateOfFirstAuthorization = value; 1358 return this; 1359 } 1360 1361 /** 1362 * @return The date when the first authorization was granted by a Medicines Regulatory Agency. 1363 */ 1364 public Date getDateOfFirstAuthorization() { 1365 return this.dateOfFirstAuthorization == null ? null : this.dateOfFirstAuthorization.getValue(); 1366 } 1367 1368 /** 1369 * @param value The date when the first authorization was granted by a Medicines Regulatory Agency. 1370 */ 1371 public MedicinalProductAuthorization setDateOfFirstAuthorization(Date value) { 1372 if (value == null) 1373 this.dateOfFirstAuthorization = null; 1374 else { 1375 if (this.dateOfFirstAuthorization == null) 1376 this.dateOfFirstAuthorization = new DateTimeType(); 1377 this.dateOfFirstAuthorization.setValue(value); 1378 } 1379 return this; 1380 } 1381 1382 /** 1383 * @return {@link #internationalBirthDate} (Date of first marketing authorization for a company's new medicinal product in any country in the World.). This is the underlying object with id, value and extensions. The accessor "getInternationalBirthDate" gives direct access to the value 1384 */ 1385 public DateTimeType getInternationalBirthDateElement() { 1386 if (this.internationalBirthDate == null) 1387 if (Configuration.errorOnAutoCreate()) 1388 throw new Error("Attempt to auto-create MedicinalProductAuthorization.internationalBirthDate"); 1389 else if (Configuration.doAutoCreate()) 1390 this.internationalBirthDate = new DateTimeType(); // bb 1391 return this.internationalBirthDate; 1392 } 1393 1394 public boolean hasInternationalBirthDateElement() { 1395 return this.internationalBirthDate != null && !this.internationalBirthDate.isEmpty(); 1396 } 1397 1398 public boolean hasInternationalBirthDate() { 1399 return this.internationalBirthDate != null && !this.internationalBirthDate.isEmpty(); 1400 } 1401 1402 /** 1403 * @param value {@link #internationalBirthDate} (Date of first marketing authorization for a company's new medicinal product in any country in the World.). This is the underlying object with id, value and extensions. The accessor "getInternationalBirthDate" gives direct access to the value 1404 */ 1405 public MedicinalProductAuthorization setInternationalBirthDateElement(DateTimeType value) { 1406 this.internationalBirthDate = value; 1407 return this; 1408 } 1409 1410 /** 1411 * @return Date of first marketing authorization for a company's new medicinal product in any country in the World. 1412 */ 1413 public Date getInternationalBirthDate() { 1414 return this.internationalBirthDate == null ? null : this.internationalBirthDate.getValue(); 1415 } 1416 1417 /** 1418 * @param value Date of first marketing authorization for a company's new medicinal product in any country in the World. 1419 */ 1420 public MedicinalProductAuthorization setInternationalBirthDate(Date value) { 1421 if (value == null) 1422 this.internationalBirthDate = null; 1423 else { 1424 if (this.internationalBirthDate == null) 1425 this.internationalBirthDate = new DateTimeType(); 1426 this.internationalBirthDate.setValue(value); 1427 } 1428 return this; 1429 } 1430 1431 /** 1432 * @return {@link #legalBasis} (The legal framework against which this authorization is granted.) 1433 */ 1434 public CodeableConcept getLegalBasis() { 1435 if (this.legalBasis == null) 1436 if (Configuration.errorOnAutoCreate()) 1437 throw new Error("Attempt to auto-create MedicinalProductAuthorization.legalBasis"); 1438 else if (Configuration.doAutoCreate()) 1439 this.legalBasis = new CodeableConcept(); // cc 1440 return this.legalBasis; 1441 } 1442 1443 public boolean hasLegalBasis() { 1444 return this.legalBasis != null && !this.legalBasis.isEmpty(); 1445 } 1446 1447 /** 1448 * @param value {@link #legalBasis} (The legal framework against which this authorization is granted.) 1449 */ 1450 public MedicinalProductAuthorization setLegalBasis(CodeableConcept value) { 1451 this.legalBasis = value; 1452 return this; 1453 } 1454 1455 /** 1456 * @return {@link #jurisdictionalAuthorization} (Authorization in areas within a country.) 1457 */ 1458 public List<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent> getJurisdictionalAuthorization() { 1459 if (this.jurisdictionalAuthorization == null) 1460 this.jurisdictionalAuthorization = new ArrayList<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent>(); 1461 return this.jurisdictionalAuthorization; 1462 } 1463 1464 /** 1465 * @return Returns a reference to <code>this</code> for easy method chaining 1466 */ 1467 public MedicinalProductAuthorization setJurisdictionalAuthorization(List<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent> theJurisdictionalAuthorization) { 1468 this.jurisdictionalAuthorization = theJurisdictionalAuthorization; 1469 return this; 1470 } 1471 1472 public boolean hasJurisdictionalAuthorization() { 1473 if (this.jurisdictionalAuthorization == null) 1474 return false; 1475 for (MedicinalProductAuthorizationJurisdictionalAuthorizationComponent item : this.jurisdictionalAuthorization) 1476 if (!item.isEmpty()) 1477 return true; 1478 return false; 1479 } 1480 1481 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent addJurisdictionalAuthorization() { //3 1482 MedicinalProductAuthorizationJurisdictionalAuthorizationComponent t = new MedicinalProductAuthorizationJurisdictionalAuthorizationComponent(); 1483 if (this.jurisdictionalAuthorization == null) 1484 this.jurisdictionalAuthorization = new ArrayList<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent>(); 1485 this.jurisdictionalAuthorization.add(t); 1486 return t; 1487 } 1488 1489 public MedicinalProductAuthorization addJurisdictionalAuthorization(MedicinalProductAuthorizationJurisdictionalAuthorizationComponent t) { //3 1490 if (t == null) 1491 return this; 1492 if (this.jurisdictionalAuthorization == null) 1493 this.jurisdictionalAuthorization = new ArrayList<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent>(); 1494 this.jurisdictionalAuthorization.add(t); 1495 return this; 1496 } 1497 1498 /** 1499 * @return The first repetition of repeating field {@link #jurisdictionalAuthorization}, creating it if it does not already exist 1500 */ 1501 public MedicinalProductAuthorizationJurisdictionalAuthorizationComponent getJurisdictionalAuthorizationFirstRep() { 1502 if (getJurisdictionalAuthorization().isEmpty()) { 1503 addJurisdictionalAuthorization(); 1504 } 1505 return getJurisdictionalAuthorization().get(0); 1506 } 1507 1508 /** 1509 * @return {@link #holder} (Marketing Authorization Holder.) 1510 */ 1511 public Reference getHolder() { 1512 if (this.holder == null) 1513 if (Configuration.errorOnAutoCreate()) 1514 throw new Error("Attempt to auto-create MedicinalProductAuthorization.holder"); 1515 else if (Configuration.doAutoCreate()) 1516 this.holder = new Reference(); // cc 1517 return this.holder; 1518 } 1519 1520 public boolean hasHolder() { 1521 return this.holder != null && !this.holder.isEmpty(); 1522 } 1523 1524 /** 1525 * @param value {@link #holder} (Marketing Authorization Holder.) 1526 */ 1527 public MedicinalProductAuthorization setHolder(Reference value) { 1528 this.holder = value; 1529 return this; 1530 } 1531 1532 /** 1533 * @return {@link #holder} 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. (Marketing Authorization Holder.) 1534 */ 1535 public Organization getHolderTarget() { 1536 if (this.holderTarget == null) 1537 if (Configuration.errorOnAutoCreate()) 1538 throw new Error("Attempt to auto-create MedicinalProductAuthorization.holder"); 1539 else if (Configuration.doAutoCreate()) 1540 this.holderTarget = new Organization(); // aa 1541 return this.holderTarget; 1542 } 1543 1544 /** 1545 * @param value {@link #holder} 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. (Marketing Authorization Holder.) 1546 */ 1547 public MedicinalProductAuthorization setHolderTarget(Organization value) { 1548 this.holderTarget = value; 1549 return this; 1550 } 1551 1552 /** 1553 * @return {@link #regulator} (Medicines Regulatory Agency.) 1554 */ 1555 public Reference getRegulator() { 1556 if (this.regulator == null) 1557 if (Configuration.errorOnAutoCreate()) 1558 throw new Error("Attempt to auto-create MedicinalProductAuthorization.regulator"); 1559 else if (Configuration.doAutoCreate()) 1560 this.regulator = new Reference(); // cc 1561 return this.regulator; 1562 } 1563 1564 public boolean hasRegulator() { 1565 return this.regulator != null && !this.regulator.isEmpty(); 1566 } 1567 1568 /** 1569 * @param value {@link #regulator} (Medicines Regulatory Agency.) 1570 */ 1571 public MedicinalProductAuthorization setRegulator(Reference value) { 1572 this.regulator = value; 1573 return this; 1574 } 1575 1576 /** 1577 * @return {@link #regulator} 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. (Medicines Regulatory Agency.) 1578 */ 1579 public Organization getRegulatorTarget() { 1580 if (this.regulatorTarget == null) 1581 if (Configuration.errorOnAutoCreate()) 1582 throw new Error("Attempt to auto-create MedicinalProductAuthorization.regulator"); 1583 else if (Configuration.doAutoCreate()) 1584 this.regulatorTarget = new Organization(); // aa 1585 return this.regulatorTarget; 1586 } 1587 1588 /** 1589 * @param value {@link #regulator} 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. (Medicines Regulatory Agency.) 1590 */ 1591 public MedicinalProductAuthorization setRegulatorTarget(Organization value) { 1592 this.regulatorTarget = value; 1593 return this; 1594 } 1595 1596 /** 1597 * @return {@link #procedure} (The regulatory procedure for granting or amending a marketing authorization.) 1598 */ 1599 public MedicinalProductAuthorizationProcedureComponent getProcedure() { 1600 if (this.procedure == null) 1601 if (Configuration.errorOnAutoCreate()) 1602 throw new Error("Attempt to auto-create MedicinalProductAuthorization.procedure"); 1603 else if (Configuration.doAutoCreate()) 1604 this.procedure = new MedicinalProductAuthorizationProcedureComponent(); // cc 1605 return this.procedure; 1606 } 1607 1608 public boolean hasProcedure() { 1609 return this.procedure != null && !this.procedure.isEmpty(); 1610 } 1611 1612 /** 1613 * @param value {@link #procedure} (The regulatory procedure for granting or amending a marketing authorization.) 1614 */ 1615 public MedicinalProductAuthorization setProcedure(MedicinalProductAuthorizationProcedureComponent value) { 1616 this.procedure = value; 1617 return this; 1618 } 1619 1620 protected void listChildren(List<Property> children) { 1621 super.listChildren(children); 1622 children.add(new Property("identifier", "Identifier", "Business identifier for the marketing authorization, as assigned by a regulator.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1623 children.add(new Property("subject", "Reference(MedicinalProduct|MedicinalProductPackaged)", "The medicinal product that is being authorized.", 0, 1, subject)); 1624 children.add(new Property("country", "CodeableConcept", "The country in which the marketing authorization has been granted.", 0, java.lang.Integer.MAX_VALUE, country)); 1625 children.add(new Property("jurisdiction", "CodeableConcept", "Jurisdiction within a country.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 1626 children.add(new Property("status", "CodeableConcept", "The status of the marketing authorization.", 0, 1, status)); 1627 children.add(new Property("statusDate", "dateTime", "The date at which the given status has become applicable.", 0, 1, statusDate)); 1628 children.add(new Property("restoreDate", "dateTime", "The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.", 0, 1, restoreDate)); 1629 children.add(new Property("validityPeriod", "Period", "The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.", 0, 1, validityPeriod)); 1630 children.add(new Property("dataExclusivityPeriod", "Period", "A period of time after authorization before generic product applicatiosn can be submitted.", 0, 1, dataExclusivityPeriod)); 1631 children.add(new Property("dateOfFirstAuthorization", "dateTime", "The date when the first authorization was granted by a Medicines Regulatory Agency.", 0, 1, dateOfFirstAuthorization)); 1632 children.add(new Property("internationalBirthDate", "dateTime", "Date of first marketing authorization for a company's new medicinal product in any country in the World.", 0, 1, internationalBirthDate)); 1633 children.add(new Property("legalBasis", "CodeableConcept", "The legal framework against which this authorization is granted.", 0, 1, legalBasis)); 1634 children.add(new Property("jurisdictionalAuthorization", "", "Authorization in areas within a country.", 0, java.lang.Integer.MAX_VALUE, jurisdictionalAuthorization)); 1635 children.add(new Property("holder", "Reference(Organization)", "Marketing Authorization Holder.", 0, 1, holder)); 1636 children.add(new Property("regulator", "Reference(Organization)", "Medicines Regulatory Agency.", 0, 1, regulator)); 1637 children.add(new Property("procedure", "", "The regulatory procedure for granting or amending a marketing authorization.", 0, 1, procedure)); 1638 } 1639 1640 @Override 1641 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1642 switch (_hash) { 1643 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Business identifier for the marketing authorization, as assigned by a regulator.", 0, java.lang.Integer.MAX_VALUE, identifier); 1644 case -1867885268: /*subject*/ return new Property("subject", "Reference(MedicinalProduct|MedicinalProductPackaged)", "The medicinal product that is being authorized.", 0, 1, subject); 1645 case 957831062: /*country*/ return new Property("country", "CodeableConcept", "The country in which the marketing authorization has been granted.", 0, java.lang.Integer.MAX_VALUE, country); 1646 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "Jurisdiction within a country.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 1647 case -892481550: /*status*/ return new Property("status", "CodeableConcept", "The status of the marketing authorization.", 0, 1, status); 1648 case 247524032: /*statusDate*/ return new Property("statusDate", "dateTime", "The date at which the given status has become applicable.", 0, 1, statusDate); 1649 case 329465692: /*restoreDate*/ return new Property("restoreDate", "dateTime", "The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored.", 0, 1, restoreDate); 1650 case -1434195053: /*validityPeriod*/ return new Property("validityPeriod", "Period", "The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format.", 0, 1, validityPeriod); 1651 case 1940655806: /*dataExclusivityPeriod*/ return new Property("dataExclusivityPeriod", "Period", "A period of time after authorization before generic product applicatiosn can be submitted.", 0, 1, dataExclusivityPeriod); 1652 case -1026933074: /*dateOfFirstAuthorization*/ return new Property("dateOfFirstAuthorization", "dateTime", "The date when the first authorization was granted by a Medicines Regulatory Agency.", 0, 1, dateOfFirstAuthorization); 1653 case 400069151: /*internationalBirthDate*/ return new Property("internationalBirthDate", "dateTime", "Date of first marketing authorization for a company's new medicinal product in any country in the World.", 0, 1, internationalBirthDate); 1654 case 552357125: /*legalBasis*/ return new Property("legalBasis", "CodeableConcept", "The legal framework against which this authorization is granted.", 0, 1, legalBasis); 1655 case 1459432557: /*jurisdictionalAuthorization*/ return new Property("jurisdictionalAuthorization", "", "Authorization in areas within a country.", 0, java.lang.Integer.MAX_VALUE, jurisdictionalAuthorization); 1656 case -1211707988: /*holder*/ return new Property("holder", "Reference(Organization)", "Marketing Authorization Holder.", 0, 1, holder); 1657 case 414760449: /*regulator*/ return new Property("regulator", "Reference(Organization)", "Medicines Regulatory Agency.", 0, 1, regulator); 1658 case -1095204141: /*procedure*/ return new Property("procedure", "", "The regulatory procedure for granting or amending a marketing authorization.", 0, 1, procedure); 1659 default: return super.getNamedProperty(_hash, _name, _checkValid); 1660 } 1661 1662 } 1663 1664 @Override 1665 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1666 switch (hash) { 1667 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1668 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1669 case 957831062: /*country*/ return this.country == null ? new Base[0] : this.country.toArray(new Base[this.country.size()]); // CodeableConcept 1670 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 1671 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // CodeableConcept 1672 case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateTimeType 1673 case 329465692: /*restoreDate*/ return this.restoreDate == null ? new Base[0] : new Base[] {this.restoreDate}; // DateTimeType 1674 case -1434195053: /*validityPeriod*/ return this.validityPeriod == null ? new Base[0] : new Base[] {this.validityPeriod}; // Period 1675 case 1940655806: /*dataExclusivityPeriod*/ return this.dataExclusivityPeriod == null ? new Base[0] : new Base[] {this.dataExclusivityPeriod}; // Period 1676 case -1026933074: /*dateOfFirstAuthorization*/ return this.dateOfFirstAuthorization == null ? new Base[0] : new Base[] {this.dateOfFirstAuthorization}; // DateTimeType 1677 case 400069151: /*internationalBirthDate*/ return this.internationalBirthDate == null ? new Base[0] : new Base[] {this.internationalBirthDate}; // DateTimeType 1678 case 552357125: /*legalBasis*/ return this.legalBasis == null ? new Base[0] : new Base[] {this.legalBasis}; // CodeableConcept 1679 case 1459432557: /*jurisdictionalAuthorization*/ return this.jurisdictionalAuthorization == null ? new Base[0] : this.jurisdictionalAuthorization.toArray(new Base[this.jurisdictionalAuthorization.size()]); // MedicinalProductAuthorizationJurisdictionalAuthorizationComponent 1680 case -1211707988: /*holder*/ return this.holder == null ? new Base[0] : new Base[] {this.holder}; // Reference 1681 case 414760449: /*regulator*/ return this.regulator == null ? new Base[0] : new Base[] {this.regulator}; // Reference 1682 case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : new Base[] {this.procedure}; // MedicinalProductAuthorizationProcedureComponent 1683 default: return super.getProperty(hash, name, checkValid); 1684 } 1685 1686 } 1687 1688 @Override 1689 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1690 switch (hash) { 1691 case -1618432855: // identifier 1692 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1693 return value; 1694 case -1867885268: // subject 1695 this.subject = castToReference(value); // Reference 1696 return value; 1697 case 957831062: // country 1698 this.getCountry().add(castToCodeableConcept(value)); // CodeableConcept 1699 return value; 1700 case -507075711: // jurisdiction 1701 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 1702 return value; 1703 case -892481550: // status 1704 this.status = castToCodeableConcept(value); // CodeableConcept 1705 return value; 1706 case 247524032: // statusDate 1707 this.statusDate = castToDateTime(value); // DateTimeType 1708 return value; 1709 case 329465692: // restoreDate 1710 this.restoreDate = castToDateTime(value); // DateTimeType 1711 return value; 1712 case -1434195053: // validityPeriod 1713 this.validityPeriod = castToPeriod(value); // Period 1714 return value; 1715 case 1940655806: // dataExclusivityPeriod 1716 this.dataExclusivityPeriod = castToPeriod(value); // Period 1717 return value; 1718 case -1026933074: // dateOfFirstAuthorization 1719 this.dateOfFirstAuthorization = castToDateTime(value); // DateTimeType 1720 return value; 1721 case 400069151: // internationalBirthDate 1722 this.internationalBirthDate = castToDateTime(value); // DateTimeType 1723 return value; 1724 case 552357125: // legalBasis 1725 this.legalBasis = castToCodeableConcept(value); // CodeableConcept 1726 return value; 1727 case 1459432557: // jurisdictionalAuthorization 1728 this.getJurisdictionalAuthorization().add((MedicinalProductAuthorizationJurisdictionalAuthorizationComponent) value); // MedicinalProductAuthorizationJurisdictionalAuthorizationComponent 1729 return value; 1730 case -1211707988: // holder 1731 this.holder = castToReference(value); // Reference 1732 return value; 1733 case 414760449: // regulator 1734 this.regulator = castToReference(value); // Reference 1735 return value; 1736 case -1095204141: // procedure 1737 this.procedure = (MedicinalProductAuthorizationProcedureComponent) value; // MedicinalProductAuthorizationProcedureComponent 1738 return value; 1739 default: return super.setProperty(hash, name, value); 1740 } 1741 1742 } 1743 1744 @Override 1745 public Base setProperty(String name, Base value) throws FHIRException { 1746 if (name.equals("identifier")) { 1747 this.getIdentifier().add(castToIdentifier(value)); 1748 } else if (name.equals("subject")) { 1749 this.subject = castToReference(value); // Reference 1750 } else if (name.equals("country")) { 1751 this.getCountry().add(castToCodeableConcept(value)); 1752 } else if (name.equals("jurisdiction")) { 1753 this.getJurisdiction().add(castToCodeableConcept(value)); 1754 } else if (name.equals("status")) { 1755 this.status = castToCodeableConcept(value); // CodeableConcept 1756 } else if (name.equals("statusDate")) { 1757 this.statusDate = castToDateTime(value); // DateTimeType 1758 } else if (name.equals("restoreDate")) { 1759 this.restoreDate = castToDateTime(value); // DateTimeType 1760 } else if (name.equals("validityPeriod")) { 1761 this.validityPeriod = castToPeriod(value); // Period 1762 } else if (name.equals("dataExclusivityPeriod")) { 1763 this.dataExclusivityPeriod = castToPeriod(value); // Period 1764 } else if (name.equals("dateOfFirstAuthorization")) { 1765 this.dateOfFirstAuthorization = castToDateTime(value); // DateTimeType 1766 } else if (name.equals("internationalBirthDate")) { 1767 this.internationalBirthDate = castToDateTime(value); // DateTimeType 1768 } else if (name.equals("legalBasis")) { 1769 this.legalBasis = castToCodeableConcept(value); // CodeableConcept 1770 } else if (name.equals("jurisdictionalAuthorization")) { 1771 this.getJurisdictionalAuthorization().add((MedicinalProductAuthorizationJurisdictionalAuthorizationComponent) value); 1772 } else if (name.equals("holder")) { 1773 this.holder = castToReference(value); // Reference 1774 } else if (name.equals("regulator")) { 1775 this.regulator = castToReference(value); // Reference 1776 } else if (name.equals("procedure")) { 1777 this.procedure = (MedicinalProductAuthorizationProcedureComponent) value; // MedicinalProductAuthorizationProcedureComponent 1778 } else 1779 return super.setProperty(name, value); 1780 return value; 1781 } 1782 1783 @Override 1784 public Base makeProperty(int hash, String name) throws FHIRException { 1785 switch (hash) { 1786 case -1618432855: return addIdentifier(); 1787 case -1867885268: return getSubject(); 1788 case 957831062: return addCountry(); 1789 case -507075711: return addJurisdiction(); 1790 case -892481550: return getStatus(); 1791 case 247524032: return getStatusDateElement(); 1792 case 329465692: return getRestoreDateElement(); 1793 case -1434195053: return getValidityPeriod(); 1794 case 1940655806: return getDataExclusivityPeriod(); 1795 case -1026933074: return getDateOfFirstAuthorizationElement(); 1796 case 400069151: return getInternationalBirthDateElement(); 1797 case 552357125: return getLegalBasis(); 1798 case 1459432557: return addJurisdictionalAuthorization(); 1799 case -1211707988: return getHolder(); 1800 case 414760449: return getRegulator(); 1801 case -1095204141: return getProcedure(); 1802 default: return super.makeProperty(hash, name); 1803 } 1804 1805 } 1806 1807 @Override 1808 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1809 switch (hash) { 1810 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1811 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1812 case 957831062: /*country*/ return new String[] {"CodeableConcept"}; 1813 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 1814 case -892481550: /*status*/ return new String[] {"CodeableConcept"}; 1815 case 247524032: /*statusDate*/ return new String[] {"dateTime"}; 1816 case 329465692: /*restoreDate*/ return new String[] {"dateTime"}; 1817 case -1434195053: /*validityPeriod*/ return new String[] {"Period"}; 1818 case 1940655806: /*dataExclusivityPeriod*/ return new String[] {"Period"}; 1819 case -1026933074: /*dateOfFirstAuthorization*/ return new String[] {"dateTime"}; 1820 case 400069151: /*internationalBirthDate*/ return new String[] {"dateTime"}; 1821 case 552357125: /*legalBasis*/ return new String[] {"CodeableConcept"}; 1822 case 1459432557: /*jurisdictionalAuthorization*/ return new String[] {}; 1823 case -1211707988: /*holder*/ return new String[] {"Reference"}; 1824 case 414760449: /*regulator*/ return new String[] {"Reference"}; 1825 case -1095204141: /*procedure*/ return new String[] {}; 1826 default: return super.getTypesForProperty(hash, name); 1827 } 1828 1829 } 1830 1831 @Override 1832 public Base addChild(String name) throws FHIRException { 1833 if (name.equals("identifier")) { 1834 return addIdentifier(); 1835 } 1836 else if (name.equals("subject")) { 1837 this.subject = new Reference(); 1838 return this.subject; 1839 } 1840 else if (name.equals("country")) { 1841 return addCountry(); 1842 } 1843 else if (name.equals("jurisdiction")) { 1844 return addJurisdiction(); 1845 } 1846 else if (name.equals("status")) { 1847 this.status = new CodeableConcept(); 1848 return this.status; 1849 } 1850 else if (name.equals("statusDate")) { 1851 throw new FHIRException("Cannot call addChild on a primitive type MedicinalProductAuthorization.statusDate"); 1852 } 1853 else if (name.equals("restoreDate")) { 1854 throw new FHIRException("Cannot call addChild on a primitive type MedicinalProductAuthorization.restoreDate"); 1855 } 1856 else if (name.equals("validityPeriod")) { 1857 this.validityPeriod = new Period(); 1858 return this.validityPeriod; 1859 } 1860 else if (name.equals("dataExclusivityPeriod")) { 1861 this.dataExclusivityPeriod = new Period(); 1862 return this.dataExclusivityPeriod; 1863 } 1864 else if (name.equals("dateOfFirstAuthorization")) { 1865 throw new FHIRException("Cannot call addChild on a primitive type MedicinalProductAuthorization.dateOfFirstAuthorization"); 1866 } 1867 else if (name.equals("internationalBirthDate")) { 1868 throw new FHIRException("Cannot call addChild on a primitive type MedicinalProductAuthorization.internationalBirthDate"); 1869 } 1870 else if (name.equals("legalBasis")) { 1871 this.legalBasis = new CodeableConcept(); 1872 return this.legalBasis; 1873 } 1874 else if (name.equals("jurisdictionalAuthorization")) { 1875 return addJurisdictionalAuthorization(); 1876 } 1877 else if (name.equals("holder")) { 1878 this.holder = new Reference(); 1879 return this.holder; 1880 } 1881 else if (name.equals("regulator")) { 1882 this.regulator = new Reference(); 1883 return this.regulator; 1884 } 1885 else if (name.equals("procedure")) { 1886 this.procedure = new MedicinalProductAuthorizationProcedureComponent(); 1887 return this.procedure; 1888 } 1889 else 1890 return super.addChild(name); 1891 } 1892 1893 public String fhirType() { 1894 return "MedicinalProductAuthorization"; 1895 1896 } 1897 1898 public MedicinalProductAuthorization copy() { 1899 MedicinalProductAuthorization dst = new MedicinalProductAuthorization(); 1900 copyValues(dst); 1901 return dst; 1902 } 1903 1904 public void copyValues(MedicinalProductAuthorization dst) { 1905 super.copyValues(dst); 1906 if (identifier != null) { 1907 dst.identifier = new ArrayList<Identifier>(); 1908 for (Identifier i : identifier) 1909 dst.identifier.add(i.copy()); 1910 }; 1911 dst.subject = subject == null ? null : subject.copy(); 1912 if (country != null) { 1913 dst.country = new ArrayList<CodeableConcept>(); 1914 for (CodeableConcept i : country) 1915 dst.country.add(i.copy()); 1916 }; 1917 if (jurisdiction != null) { 1918 dst.jurisdiction = new ArrayList<CodeableConcept>(); 1919 for (CodeableConcept i : jurisdiction) 1920 dst.jurisdiction.add(i.copy()); 1921 }; 1922 dst.status = status == null ? null : status.copy(); 1923 dst.statusDate = statusDate == null ? null : statusDate.copy(); 1924 dst.restoreDate = restoreDate == null ? null : restoreDate.copy(); 1925 dst.validityPeriod = validityPeriod == null ? null : validityPeriod.copy(); 1926 dst.dataExclusivityPeriod = dataExclusivityPeriod == null ? null : dataExclusivityPeriod.copy(); 1927 dst.dateOfFirstAuthorization = dateOfFirstAuthorization == null ? null : dateOfFirstAuthorization.copy(); 1928 dst.internationalBirthDate = internationalBirthDate == null ? null : internationalBirthDate.copy(); 1929 dst.legalBasis = legalBasis == null ? null : legalBasis.copy(); 1930 if (jurisdictionalAuthorization != null) { 1931 dst.jurisdictionalAuthorization = new ArrayList<MedicinalProductAuthorizationJurisdictionalAuthorizationComponent>(); 1932 for (MedicinalProductAuthorizationJurisdictionalAuthorizationComponent i : jurisdictionalAuthorization) 1933 dst.jurisdictionalAuthorization.add(i.copy()); 1934 }; 1935 dst.holder = holder == null ? null : holder.copy(); 1936 dst.regulator = regulator == null ? null : regulator.copy(); 1937 dst.procedure = procedure == null ? null : procedure.copy(); 1938 } 1939 1940 protected MedicinalProductAuthorization typedCopy() { 1941 return copy(); 1942 } 1943 1944 @Override 1945 public boolean equalsDeep(Base other_) { 1946 if (!super.equalsDeep(other_)) 1947 return false; 1948 if (!(other_ instanceof MedicinalProductAuthorization)) 1949 return false; 1950 MedicinalProductAuthorization o = (MedicinalProductAuthorization) other_; 1951 return compareDeep(identifier, o.identifier, true) && compareDeep(subject, o.subject, true) && compareDeep(country, o.country, true) 1952 && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true) 1953 && compareDeep(restoreDate, o.restoreDate, true) && compareDeep(validityPeriod, o.validityPeriod, true) 1954 && compareDeep(dataExclusivityPeriod, o.dataExclusivityPeriod, true) && compareDeep(dateOfFirstAuthorization, o.dateOfFirstAuthorization, true) 1955 && compareDeep(internationalBirthDate, o.internationalBirthDate, true) && compareDeep(legalBasis, o.legalBasis, true) 1956 && compareDeep(jurisdictionalAuthorization, o.jurisdictionalAuthorization, true) && compareDeep(holder, o.holder, true) 1957 && compareDeep(regulator, o.regulator, true) && compareDeep(procedure, o.procedure, true); 1958 } 1959 1960 @Override 1961 public boolean equalsShallow(Base other_) { 1962 if (!super.equalsShallow(other_)) 1963 return false; 1964 if (!(other_ instanceof MedicinalProductAuthorization)) 1965 return false; 1966 MedicinalProductAuthorization o = (MedicinalProductAuthorization) other_; 1967 return compareValues(statusDate, o.statusDate, true) && compareValues(restoreDate, o.restoreDate, true) 1968 && compareValues(dateOfFirstAuthorization, o.dateOfFirstAuthorization, true) && compareValues(internationalBirthDate, o.internationalBirthDate, true) 1969 ; 1970 } 1971 1972 public boolean isEmpty() { 1973 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subject, country 1974 , jurisdiction, status, statusDate, restoreDate, validityPeriod, dataExclusivityPeriod 1975 , dateOfFirstAuthorization, internationalBirthDate, legalBasis, jurisdictionalAuthorization 1976 , holder, regulator, procedure); 1977 } 1978 1979 @Override 1980 public ResourceType getResourceType() { 1981 return ResourceType.MedicinalProductAuthorization; 1982 } 1983 1984 /** 1985 * Search parameter: <b>identifier</b> 1986 * <p> 1987 * Description: <b>Business identifier for the marketing authorization, as assigned by a regulator</b><br> 1988 * Type: <b>token</b><br> 1989 * Path: <b>MedicinalProductAuthorization.identifier</b><br> 1990 * </p> 1991 */ 1992 @SearchParamDefinition(name="identifier", path="MedicinalProductAuthorization.identifier", description="Business identifier for the marketing authorization, as assigned by a regulator", type="token" ) 1993 public static final String SP_IDENTIFIER = "identifier"; 1994 /** 1995 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1996 * <p> 1997 * Description: <b>Business identifier for the marketing authorization, as assigned by a regulator</b><br> 1998 * Type: <b>token</b><br> 1999 * Path: <b>MedicinalProductAuthorization.identifier</b><br> 2000 * </p> 2001 */ 2002 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2003 2004 /** 2005 * Search parameter: <b>country</b> 2006 * <p> 2007 * Description: <b>The country in which the marketing authorization has been granted</b><br> 2008 * Type: <b>token</b><br> 2009 * Path: <b>MedicinalProductAuthorization.country</b><br> 2010 * </p> 2011 */ 2012 @SearchParamDefinition(name="country", path="MedicinalProductAuthorization.country", description="The country in which the marketing authorization has been granted", type="token" ) 2013 public static final String SP_COUNTRY = "country"; 2014 /** 2015 * <b>Fluent Client</b> search parameter constant for <b>country</b> 2016 * <p> 2017 * Description: <b>The country in which the marketing authorization has been granted</b><br> 2018 * Type: <b>token</b><br> 2019 * Path: <b>MedicinalProductAuthorization.country</b><br> 2020 * </p> 2021 */ 2022 public static final ca.uhn.fhir.rest.gclient.TokenClientParam COUNTRY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_COUNTRY); 2023 2024 /** 2025 * Search parameter: <b>subject</b> 2026 * <p> 2027 * Description: <b>The medicinal product that is being authorized</b><br> 2028 * Type: <b>reference</b><br> 2029 * Path: <b>MedicinalProductAuthorization.subject</b><br> 2030 * </p> 2031 */ 2032 @SearchParamDefinition(name="subject", path="MedicinalProductAuthorization.subject", description="The medicinal product that is being authorized", type="reference", target={MedicinalProduct.class, MedicinalProductPackaged.class } ) 2033 public static final String SP_SUBJECT = "subject"; 2034 /** 2035 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2036 * <p> 2037 * Description: <b>The medicinal product that is being authorized</b><br> 2038 * Type: <b>reference</b><br> 2039 * Path: <b>MedicinalProductAuthorization.subject</b><br> 2040 * </p> 2041 */ 2042 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2043 2044/** 2045 * Constant for fluent queries to be used to add include statements. Specifies 2046 * the path value of "<b>MedicinalProductAuthorization:subject</b>". 2047 */ 2048 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("MedicinalProductAuthorization:subject").toLocked(); 2049 2050 /** 2051 * Search parameter: <b>holder</b> 2052 * <p> 2053 * Description: <b>Marketing Authorization Holder</b><br> 2054 * Type: <b>reference</b><br> 2055 * Path: <b>MedicinalProductAuthorization.holder</b><br> 2056 * </p> 2057 */ 2058 @SearchParamDefinition(name="holder", path="MedicinalProductAuthorization.holder", description="Marketing Authorization Holder", type="reference", target={Organization.class } ) 2059 public static final String SP_HOLDER = "holder"; 2060 /** 2061 * <b>Fluent Client</b> search parameter constant for <b>holder</b> 2062 * <p> 2063 * Description: <b>Marketing Authorization Holder</b><br> 2064 * Type: <b>reference</b><br> 2065 * Path: <b>MedicinalProductAuthorization.holder</b><br> 2066 * </p> 2067 */ 2068 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam HOLDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_HOLDER); 2069 2070/** 2071 * Constant for fluent queries to be used to add include statements. Specifies 2072 * the path value of "<b>MedicinalProductAuthorization:holder</b>". 2073 */ 2074 public static final ca.uhn.fhir.model.api.Include INCLUDE_HOLDER = new ca.uhn.fhir.model.api.Include("MedicinalProductAuthorization:holder").toLocked(); 2075 2076 /** 2077 * Search parameter: <b>status</b> 2078 * <p> 2079 * Description: <b>The status of the marketing authorization</b><br> 2080 * Type: <b>token</b><br> 2081 * Path: <b>MedicinalProductAuthorization.status</b><br> 2082 * </p> 2083 */ 2084 @SearchParamDefinition(name="status", path="MedicinalProductAuthorization.status", description="The status of the marketing authorization", type="token" ) 2085 public static final String SP_STATUS = "status"; 2086 /** 2087 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2088 * <p> 2089 * Description: <b>The status of the marketing authorization</b><br> 2090 * Type: <b>token</b><br> 2091 * Path: <b>MedicinalProductAuthorization.status</b><br> 2092 * </p> 2093 */ 2094 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2095 2096 2097}