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