001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import ca.uhn.fhir.model.api.annotation.ResourceDef;
038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
039import ca.uhn.fhir.model.api.annotation.Child;
040import ca.uhn.fhir.model.api.annotation.ChildOrder;
041import ca.uhn.fhir.model.api.annotation.Description;
042import ca.uhn.fhir.model.api.annotation.Block;
043import org.hl7.fhir.instance.model.api.*;
044import org.hl7.fhir.exceptions.FHIRException;
045/**
046 * Describes validation requirements, source(s), status and dates for one or more elements.
047 */
048@ResourceDef(name="VerificationResult", profile="http://hl7.org/fhir/StructureDefinition/VerificationResult")
049public class VerificationResult extends DomainResource {
050
051    public enum Status {
052        /**
053         * ***TODO***
054         */
055        ATTESTED, 
056        /**
057         * ***TODO***
058         */
059        VALIDATED, 
060        /**
061         * ***TODO***
062         */
063        INPROCESS, 
064        /**
065         * ***TODO***
066         */
067        REQREVALID, 
068        /**
069         * ***TODO***
070         */
071        VALFAIL, 
072        /**
073         * ***TODO***
074         */
075        REVALFAIL, 
076        /**
077         * added to help the parsers with the generic types
078         */
079        NULL;
080        public static Status fromCode(String codeString) throws FHIRException {
081            if (codeString == null || "".equals(codeString))
082                return null;
083        if ("attested".equals(codeString))
084          return ATTESTED;
085        if ("validated".equals(codeString))
086          return VALIDATED;
087        if ("in-process".equals(codeString))
088          return INPROCESS;
089        if ("req-revalid".equals(codeString))
090          return REQREVALID;
091        if ("val-fail".equals(codeString))
092          return VALFAIL;
093        if ("reval-fail".equals(codeString))
094          return REVALFAIL;
095        if (Configuration.isAcceptInvalidEnums())
096          return null;
097        else
098          throw new FHIRException("Unknown Status code '"+codeString+"'");
099        }
100        public String toCode() {
101          switch (this) {
102            case ATTESTED: return "attested";
103            case VALIDATED: return "validated";
104            case INPROCESS: return "in-process";
105            case REQREVALID: return "req-revalid";
106            case VALFAIL: return "val-fail";
107            case REVALFAIL: return "reval-fail";
108            default: return "?";
109          }
110        }
111        public String getSystem() {
112          switch (this) {
113            case ATTESTED: return "http://hl7.org/fhir/CodeSystem/status";
114            case VALIDATED: return "http://hl7.org/fhir/CodeSystem/status";
115            case INPROCESS: return "http://hl7.org/fhir/CodeSystem/status";
116            case REQREVALID: return "http://hl7.org/fhir/CodeSystem/status";
117            case VALFAIL: return "http://hl7.org/fhir/CodeSystem/status";
118            case REVALFAIL: return "http://hl7.org/fhir/CodeSystem/status";
119            default: return "?";
120          }
121        }
122        public String getDefinition() {
123          switch (this) {
124            case ATTESTED: return "***TODO***";
125            case VALIDATED: return "***TODO***";
126            case INPROCESS: return "***TODO***";
127            case REQREVALID: return "***TODO***";
128            case VALFAIL: return "***TODO***";
129            case REVALFAIL: return "***TODO***";
130            default: return "?";
131          }
132        }
133        public String getDisplay() {
134          switch (this) {
135            case ATTESTED: return "Attested";
136            case VALIDATED: return "Validated";
137            case INPROCESS: return "In process";
138            case REQREVALID: return "Requires revalidation";
139            case VALFAIL: return "Validation failed";
140            case REVALFAIL: return "Re-Validation failed";
141            default: return "?";
142          }
143        }
144    }
145
146  public static class StatusEnumFactory implements EnumFactory<Status> {
147    public Status fromCode(String codeString) throws IllegalArgumentException {
148      if (codeString == null || "".equals(codeString))
149            if (codeString == null || "".equals(codeString))
150                return null;
151        if ("attested".equals(codeString))
152          return Status.ATTESTED;
153        if ("validated".equals(codeString))
154          return Status.VALIDATED;
155        if ("in-process".equals(codeString))
156          return Status.INPROCESS;
157        if ("req-revalid".equals(codeString))
158          return Status.REQREVALID;
159        if ("val-fail".equals(codeString))
160          return Status.VALFAIL;
161        if ("reval-fail".equals(codeString))
162          return Status.REVALFAIL;
163        throw new IllegalArgumentException("Unknown Status code '"+codeString+"'");
164        }
165        public Enumeration<Status> fromType(Base code) throws FHIRException {
166          if (code == null)
167            return null;
168          if (code.isEmpty())
169            return new Enumeration<Status>(this);
170          String codeString = ((PrimitiveType) code).asStringValue();
171          if (codeString == null || "".equals(codeString))
172            return null;
173        if ("attested".equals(codeString))
174          return new Enumeration<Status>(this, Status.ATTESTED);
175        if ("validated".equals(codeString))
176          return new Enumeration<Status>(this, Status.VALIDATED);
177        if ("in-process".equals(codeString))
178          return new Enumeration<Status>(this, Status.INPROCESS);
179        if ("req-revalid".equals(codeString))
180          return new Enumeration<Status>(this, Status.REQREVALID);
181        if ("val-fail".equals(codeString))
182          return new Enumeration<Status>(this, Status.VALFAIL);
183        if ("reval-fail".equals(codeString))
184          return new Enumeration<Status>(this, Status.REVALFAIL);
185        throw new FHIRException("Unknown Status code '"+codeString+"'");
186        }
187    public String toCode(Status code) {
188      if (code == Status.ATTESTED)
189        return "attested";
190      if (code == Status.VALIDATED)
191        return "validated";
192      if (code == Status.INPROCESS)
193        return "in-process";
194      if (code == Status.REQREVALID)
195        return "req-revalid";
196      if (code == Status.VALFAIL)
197        return "val-fail";
198      if (code == Status.REVALFAIL)
199        return "reval-fail";
200      return "?";
201      }
202    public String toSystem(Status code) {
203      return code.getSystem();
204      }
205    }
206
207    @Block()
208    public static class VerificationResultPrimarySourceComponent extends BackboneElement implements IBaseBackboneElement {
209        /**
210         * Reference to the primary source.
211         */
212        @Child(name = "organization", type = {Organization.class}, order=1, min=0, max=1, modifier=false, summary=false)
213        @Description(shortDefinition="Reference to the primary source", formalDefinition="Reference to the primary source." )
214        protected Reference organization;
215
216        /**
217         * The actual object that is the target of the reference (Reference to the primary source.)
218         */
219        protected Organization organizationTarget;
220
221        /**
222         * Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).
223         */
224        @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
225        @Description(shortDefinition="Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)", formalDefinition="Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)." )
226        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-primary-source-type")
227        protected List<CodeableConcept> type;
228
229        /**
230         * Method for communicating with the primary source (manual; API; Push).
231         */
232        @Child(name = "validationProcess", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
233        @Description(shortDefinition="The process(es) by which the target is validated", formalDefinition="Method for communicating with the primary source (manual; API; Push)." )
234        protected List<CodeableConcept> validationProcess;
235
236        /**
237         * Status of the validation of the target against the primary source (successful; failed; unknown).
238         */
239        @Child(name = "validationStatus", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
240        @Description(shortDefinition="successful | failed | unknown", formalDefinition="Status of the validation of the target against the primary source (successful; failed; unknown)." )
241        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-validation-status")
242        protected CodeableConcept validationStatus;
243
244        /**
245         * When the target was validated against the primary source.
246         */
247        @Child(name = "validationDate", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
248        @Description(shortDefinition="When the target was validated against the primary source", formalDefinition="When the target was validated against the primary source." )
249        protected DateTimeType validationDate;
250
251        /**
252         * Ability of the primary source to push updates/alerts (yes; no; undetermined).
253         */
254        @Child(name = "canPushUpdates", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true)
255        @Description(shortDefinition="yes | no | undetermined", formalDefinition="Ability of the primary source to push updates/alerts (yes; no; undetermined)." )
256        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-can-push-updates")
257        protected CodeableConcept canPushUpdates;
258
259        /**
260         * Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).
261         */
262        @Child(name = "pushTypeAvailable", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
263        @Description(shortDefinition="specific | any | source", formalDefinition="Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source)." )
264        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-push-type-available")
265        protected List<CodeableConcept> pushTypeAvailable;
266
267        private static final long serialVersionUID = 1288479702L;
268
269    /**
270     * Constructor
271     */
272      public VerificationResultPrimarySourceComponent() {
273        super();
274      }
275
276        /**
277         * @return {@link #organization} (Reference to the primary source.)
278         */
279        public Reference getOrganization() { 
280          if (this.organization == null)
281            if (Configuration.errorOnAutoCreate())
282              throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.organization");
283            else if (Configuration.doAutoCreate())
284              this.organization = new Reference(); // cc
285          return this.organization;
286        }
287
288        public boolean hasOrganization() { 
289          return this.organization != null && !this.organization.isEmpty();
290        }
291
292        /**
293         * @param value {@link #organization} (Reference to the primary source.)
294         */
295        public VerificationResultPrimarySourceComponent setOrganization(Reference value) { 
296          this.organization = value;
297          return this;
298        }
299
300        /**
301         * @return {@link #organization} 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. (Reference to the primary source.)
302         */
303        public Organization getOrganizationTarget() { 
304          if (this.organizationTarget == null)
305            if (Configuration.errorOnAutoCreate())
306              throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.organization");
307            else if (Configuration.doAutoCreate())
308              this.organizationTarget = new Organization(); // aa
309          return this.organizationTarget;
310        }
311
312        /**
313         * @param value {@link #organization} 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. (Reference to the primary source.)
314         */
315        public VerificationResultPrimarySourceComponent setOrganizationTarget(Organization value) { 
316          this.organizationTarget = value;
317          return this;
318        }
319
320        /**
321         * @return {@link #type} (Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).)
322         */
323        public List<CodeableConcept> getType() { 
324          if (this.type == null)
325            this.type = new ArrayList<CodeableConcept>();
326          return this.type;
327        }
328
329        /**
330         * @return Returns a reference to <code>this</code> for easy method chaining
331         */
332        public VerificationResultPrimarySourceComponent setType(List<CodeableConcept> theType) { 
333          this.type = theType;
334          return this;
335        }
336
337        public boolean hasType() { 
338          if (this.type == null)
339            return false;
340          for (CodeableConcept item : this.type)
341            if (!item.isEmpty())
342              return true;
343          return false;
344        }
345
346        public CodeableConcept addType() { //3
347          CodeableConcept t = new CodeableConcept();
348          if (this.type == null)
349            this.type = new ArrayList<CodeableConcept>();
350          this.type.add(t);
351          return t;
352        }
353
354        public VerificationResultPrimarySourceComponent addType(CodeableConcept t) { //3
355          if (t == null)
356            return this;
357          if (this.type == null)
358            this.type = new ArrayList<CodeableConcept>();
359          this.type.add(t);
360          return this;
361        }
362
363        /**
364         * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
365         */
366        public CodeableConcept getTypeFirstRep() { 
367          if (getType().isEmpty()) {
368            addType();
369          }
370          return getType().get(0);
371        }
372
373        /**
374         * @return {@link #validationProcess} (Method for communicating with the primary source (manual; API; Push).)
375         */
376        public List<CodeableConcept> getValidationProcess() { 
377          if (this.validationProcess == null)
378            this.validationProcess = new ArrayList<CodeableConcept>();
379          return this.validationProcess;
380        }
381
382        /**
383         * @return Returns a reference to <code>this</code> for easy method chaining
384         */
385        public VerificationResultPrimarySourceComponent setValidationProcess(List<CodeableConcept> theValidationProcess) { 
386          this.validationProcess = theValidationProcess;
387          return this;
388        }
389
390        public boolean hasValidationProcess() { 
391          if (this.validationProcess == null)
392            return false;
393          for (CodeableConcept item : this.validationProcess)
394            if (!item.isEmpty())
395              return true;
396          return false;
397        }
398
399        public CodeableConcept addValidationProcess() { //3
400          CodeableConcept t = new CodeableConcept();
401          if (this.validationProcess == null)
402            this.validationProcess = new ArrayList<CodeableConcept>();
403          this.validationProcess.add(t);
404          return t;
405        }
406
407        public VerificationResultPrimarySourceComponent addValidationProcess(CodeableConcept t) { //3
408          if (t == null)
409            return this;
410          if (this.validationProcess == null)
411            this.validationProcess = new ArrayList<CodeableConcept>();
412          this.validationProcess.add(t);
413          return this;
414        }
415
416        /**
417         * @return The first repetition of repeating field {@link #validationProcess}, creating it if it does not already exist
418         */
419        public CodeableConcept getValidationProcessFirstRep() { 
420          if (getValidationProcess().isEmpty()) {
421            addValidationProcess();
422          }
423          return getValidationProcess().get(0);
424        }
425
426        /**
427         * @return {@link #validationStatus} (Status of the validation of the target against the primary source (successful; failed; unknown).)
428         */
429        public CodeableConcept getValidationStatus() { 
430          if (this.validationStatus == null)
431            if (Configuration.errorOnAutoCreate())
432              throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.validationStatus");
433            else if (Configuration.doAutoCreate())
434              this.validationStatus = new CodeableConcept(); // cc
435          return this.validationStatus;
436        }
437
438        public boolean hasValidationStatus() { 
439          return this.validationStatus != null && !this.validationStatus.isEmpty();
440        }
441
442        /**
443         * @param value {@link #validationStatus} (Status of the validation of the target against the primary source (successful; failed; unknown).)
444         */
445        public VerificationResultPrimarySourceComponent setValidationStatus(CodeableConcept value) { 
446          this.validationStatus = value;
447          return this;
448        }
449
450        /**
451         * @return {@link #validationDate} (When the target was validated against the primary source.). This is the underlying object with id, value and extensions. The accessor "getValidationDate" gives direct access to the value
452         */
453        public DateTimeType getValidationDateElement() { 
454          if (this.validationDate == null)
455            if (Configuration.errorOnAutoCreate())
456              throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.validationDate");
457            else if (Configuration.doAutoCreate())
458              this.validationDate = new DateTimeType(); // bb
459          return this.validationDate;
460        }
461
462        public boolean hasValidationDateElement() { 
463          return this.validationDate != null && !this.validationDate.isEmpty();
464        }
465
466        public boolean hasValidationDate() { 
467          return this.validationDate != null && !this.validationDate.isEmpty();
468        }
469
470        /**
471         * @param value {@link #validationDate} (When the target was validated against the primary source.). This is the underlying object with id, value and extensions. The accessor "getValidationDate" gives direct access to the value
472         */
473        public VerificationResultPrimarySourceComponent setValidationDateElement(DateTimeType value) { 
474          this.validationDate = value;
475          return this;
476        }
477
478        /**
479         * @return When the target was validated against the primary source.
480         */
481        public Date getValidationDate() { 
482          return this.validationDate == null ? null : this.validationDate.getValue();
483        }
484
485        /**
486         * @param value When the target was validated against the primary source.
487         */
488        public VerificationResultPrimarySourceComponent setValidationDate(Date value) { 
489          if (value == null)
490            this.validationDate = null;
491          else {
492            if (this.validationDate == null)
493              this.validationDate = new DateTimeType();
494            this.validationDate.setValue(value);
495          }
496          return this;
497        }
498
499        /**
500         * @return {@link #canPushUpdates} (Ability of the primary source to push updates/alerts (yes; no; undetermined).)
501         */
502        public CodeableConcept getCanPushUpdates() { 
503          if (this.canPushUpdates == null)
504            if (Configuration.errorOnAutoCreate())
505              throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.canPushUpdates");
506            else if (Configuration.doAutoCreate())
507              this.canPushUpdates = new CodeableConcept(); // cc
508          return this.canPushUpdates;
509        }
510
511        public boolean hasCanPushUpdates() { 
512          return this.canPushUpdates != null && !this.canPushUpdates.isEmpty();
513        }
514
515        /**
516         * @param value {@link #canPushUpdates} (Ability of the primary source to push updates/alerts (yes; no; undetermined).)
517         */
518        public VerificationResultPrimarySourceComponent setCanPushUpdates(CodeableConcept value) { 
519          this.canPushUpdates = value;
520          return this;
521        }
522
523        /**
524         * @return {@link #pushTypeAvailable} (Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).)
525         */
526        public List<CodeableConcept> getPushTypeAvailable() { 
527          if (this.pushTypeAvailable == null)
528            this.pushTypeAvailable = new ArrayList<CodeableConcept>();
529          return this.pushTypeAvailable;
530        }
531
532        /**
533         * @return Returns a reference to <code>this</code> for easy method chaining
534         */
535        public VerificationResultPrimarySourceComponent setPushTypeAvailable(List<CodeableConcept> thePushTypeAvailable) { 
536          this.pushTypeAvailable = thePushTypeAvailable;
537          return this;
538        }
539
540        public boolean hasPushTypeAvailable() { 
541          if (this.pushTypeAvailable == null)
542            return false;
543          for (CodeableConcept item : this.pushTypeAvailable)
544            if (!item.isEmpty())
545              return true;
546          return false;
547        }
548
549        public CodeableConcept addPushTypeAvailable() { //3
550          CodeableConcept t = new CodeableConcept();
551          if (this.pushTypeAvailable == null)
552            this.pushTypeAvailable = new ArrayList<CodeableConcept>();
553          this.pushTypeAvailable.add(t);
554          return t;
555        }
556
557        public VerificationResultPrimarySourceComponent addPushTypeAvailable(CodeableConcept t) { //3
558          if (t == null)
559            return this;
560          if (this.pushTypeAvailable == null)
561            this.pushTypeAvailable = new ArrayList<CodeableConcept>();
562          this.pushTypeAvailable.add(t);
563          return this;
564        }
565
566        /**
567         * @return The first repetition of repeating field {@link #pushTypeAvailable}, creating it if it does not already exist
568         */
569        public CodeableConcept getPushTypeAvailableFirstRep() { 
570          if (getPushTypeAvailable().isEmpty()) {
571            addPushTypeAvailable();
572          }
573          return getPushTypeAvailable().get(0);
574        }
575
576        protected void listChildren(List<Property> children) {
577          super.listChildren(children);
578          children.add(new Property("organization", "Reference(Organization)", "Reference to the primary source.", 0, 1, organization));
579          children.add(new Property("type", "CodeableConcept", "Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).", 0, java.lang.Integer.MAX_VALUE, type));
580          children.add(new Property("validationProcess", "CodeableConcept", "Method for communicating with the primary source (manual; API; Push).", 0, java.lang.Integer.MAX_VALUE, validationProcess));
581          children.add(new Property("validationStatus", "CodeableConcept", "Status of the validation of the target against the primary source (successful; failed; unknown).", 0, 1, validationStatus));
582          children.add(new Property("validationDate", "dateTime", "When the target was validated against the primary source.", 0, 1, validationDate));
583          children.add(new Property("canPushUpdates", "CodeableConcept", "Ability of the primary source to push updates/alerts (yes; no; undetermined).", 0, 1, canPushUpdates));
584          children.add(new Property("pushTypeAvailable", "CodeableConcept", "Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).", 0, java.lang.Integer.MAX_VALUE, pushTypeAvailable));
585        }
586
587        @Override
588        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
589          switch (_hash) {
590          case 1178922291: /*organization*/  return new Property("organization", "Reference(Organization)", "Reference to the primary source.", 0, 1, organization);
591          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).", 0, java.lang.Integer.MAX_VALUE, type);
592          case 797680566: /*validationProcess*/  return new Property("validationProcess", "CodeableConcept", "Method for communicating with the primary source (manual; API; Push).", 0, java.lang.Integer.MAX_VALUE, validationProcess);
593          case 1775633867: /*validationStatus*/  return new Property("validationStatus", "CodeableConcept", "Status of the validation of the target against the primary source (successful; failed; unknown).", 0, 1, validationStatus);
594          case -280180793: /*validationDate*/  return new Property("validationDate", "dateTime", "When the target was validated against the primary source.", 0, 1, validationDate);
595          case 1463787104: /*canPushUpdates*/  return new Property("canPushUpdates", "CodeableConcept", "Ability of the primary source to push updates/alerts (yes; no; undetermined).", 0, 1, canPushUpdates);
596          case 945223605: /*pushTypeAvailable*/  return new Property("pushTypeAvailable", "CodeableConcept", "Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).", 0, java.lang.Integer.MAX_VALUE, pushTypeAvailable);
597          default: return super.getNamedProperty(_hash, _name, _checkValid);
598          }
599
600        }
601
602      @Override
603      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
604        switch (hash) {
605        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
606        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
607        case 797680566: /*validationProcess*/ return this.validationProcess == null ? new Base[0] : this.validationProcess.toArray(new Base[this.validationProcess.size()]); // CodeableConcept
608        case 1775633867: /*validationStatus*/ return this.validationStatus == null ? new Base[0] : new Base[] {this.validationStatus}; // CodeableConcept
609        case -280180793: /*validationDate*/ return this.validationDate == null ? new Base[0] : new Base[] {this.validationDate}; // DateTimeType
610        case 1463787104: /*canPushUpdates*/ return this.canPushUpdates == null ? new Base[0] : new Base[] {this.canPushUpdates}; // CodeableConcept
611        case 945223605: /*pushTypeAvailable*/ return this.pushTypeAvailable == null ? new Base[0] : this.pushTypeAvailable.toArray(new Base[this.pushTypeAvailable.size()]); // CodeableConcept
612        default: return super.getProperty(hash, name, checkValid);
613        }
614
615      }
616
617      @Override
618      public Base setProperty(int hash, String name, Base value) throws FHIRException {
619        switch (hash) {
620        case 1178922291: // organization
621          this.organization = castToReference(value); // Reference
622          return value;
623        case 3575610: // type
624          this.getType().add(castToCodeableConcept(value)); // CodeableConcept
625          return value;
626        case 797680566: // validationProcess
627          this.getValidationProcess().add(castToCodeableConcept(value)); // CodeableConcept
628          return value;
629        case 1775633867: // validationStatus
630          this.validationStatus = castToCodeableConcept(value); // CodeableConcept
631          return value;
632        case -280180793: // validationDate
633          this.validationDate = castToDateTime(value); // DateTimeType
634          return value;
635        case 1463787104: // canPushUpdates
636          this.canPushUpdates = castToCodeableConcept(value); // CodeableConcept
637          return value;
638        case 945223605: // pushTypeAvailable
639          this.getPushTypeAvailable().add(castToCodeableConcept(value)); // CodeableConcept
640          return value;
641        default: return super.setProperty(hash, name, value);
642        }
643
644      }
645
646      @Override
647      public Base setProperty(String name, Base value) throws FHIRException {
648        if (name.equals("organization")) {
649          this.organization = castToReference(value); // Reference
650        } else if (name.equals("type")) {
651          this.getType().add(castToCodeableConcept(value));
652        } else if (name.equals("validationProcess")) {
653          this.getValidationProcess().add(castToCodeableConcept(value));
654        } else if (name.equals("validationStatus")) {
655          this.validationStatus = castToCodeableConcept(value); // CodeableConcept
656        } else if (name.equals("validationDate")) {
657          this.validationDate = castToDateTime(value); // DateTimeType
658        } else if (name.equals("canPushUpdates")) {
659          this.canPushUpdates = castToCodeableConcept(value); // CodeableConcept
660        } else if (name.equals("pushTypeAvailable")) {
661          this.getPushTypeAvailable().add(castToCodeableConcept(value));
662        } else
663          return super.setProperty(name, value);
664        return value;
665      }
666
667      @Override
668      public Base makeProperty(int hash, String name) throws FHIRException {
669        switch (hash) {
670        case 1178922291:  return getOrganization(); 
671        case 3575610:  return addType(); 
672        case 797680566:  return addValidationProcess(); 
673        case 1775633867:  return getValidationStatus(); 
674        case -280180793:  return getValidationDateElement();
675        case 1463787104:  return getCanPushUpdates(); 
676        case 945223605:  return addPushTypeAvailable(); 
677        default: return super.makeProperty(hash, name);
678        }
679
680      }
681
682      @Override
683      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
684        switch (hash) {
685        case 1178922291: /*organization*/ return new String[] {"Reference"};
686        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
687        case 797680566: /*validationProcess*/ return new String[] {"CodeableConcept"};
688        case 1775633867: /*validationStatus*/ return new String[] {"CodeableConcept"};
689        case -280180793: /*validationDate*/ return new String[] {"dateTime"};
690        case 1463787104: /*canPushUpdates*/ return new String[] {"CodeableConcept"};
691        case 945223605: /*pushTypeAvailable*/ return new String[] {"CodeableConcept"};
692        default: return super.getTypesForProperty(hash, name);
693        }
694
695      }
696
697      @Override
698      public Base addChild(String name) throws FHIRException {
699        if (name.equals("organization")) {
700          this.organization = new Reference();
701          return this.organization;
702        }
703        else if (name.equals("type")) {
704          return addType();
705        }
706        else if (name.equals("validationProcess")) {
707          return addValidationProcess();
708        }
709        else if (name.equals("validationStatus")) {
710          this.validationStatus = new CodeableConcept();
711          return this.validationStatus;
712        }
713        else if (name.equals("validationDate")) {
714          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.validationDate");
715        }
716        else if (name.equals("canPushUpdates")) {
717          this.canPushUpdates = new CodeableConcept();
718          return this.canPushUpdates;
719        }
720        else if (name.equals("pushTypeAvailable")) {
721          return addPushTypeAvailable();
722        }
723        else
724          return super.addChild(name);
725      }
726
727      public VerificationResultPrimarySourceComponent copy() {
728        VerificationResultPrimarySourceComponent dst = new VerificationResultPrimarySourceComponent();
729        copyValues(dst);
730        dst.organization = organization == null ? null : organization.copy();
731        if (type != null) {
732          dst.type = new ArrayList<CodeableConcept>();
733          for (CodeableConcept i : type)
734            dst.type.add(i.copy());
735        };
736        if (validationProcess != null) {
737          dst.validationProcess = new ArrayList<CodeableConcept>();
738          for (CodeableConcept i : validationProcess)
739            dst.validationProcess.add(i.copy());
740        };
741        dst.validationStatus = validationStatus == null ? null : validationStatus.copy();
742        dst.validationDate = validationDate == null ? null : validationDate.copy();
743        dst.canPushUpdates = canPushUpdates == null ? null : canPushUpdates.copy();
744        if (pushTypeAvailable != null) {
745          dst.pushTypeAvailable = new ArrayList<CodeableConcept>();
746          for (CodeableConcept i : pushTypeAvailable)
747            dst.pushTypeAvailable.add(i.copy());
748        };
749        return dst;
750      }
751
752      @Override
753      public boolean equalsDeep(Base other_) {
754        if (!super.equalsDeep(other_))
755          return false;
756        if (!(other_ instanceof VerificationResultPrimarySourceComponent))
757          return false;
758        VerificationResultPrimarySourceComponent o = (VerificationResultPrimarySourceComponent) other_;
759        return compareDeep(organization, o.organization, true) && compareDeep(type, o.type, true) && compareDeep(validationProcess, o.validationProcess, true)
760           && compareDeep(validationStatus, o.validationStatus, true) && compareDeep(validationDate, o.validationDate, true)
761           && compareDeep(canPushUpdates, o.canPushUpdates, true) && compareDeep(pushTypeAvailable, o.pushTypeAvailable, true)
762          ;
763      }
764
765      @Override
766      public boolean equalsShallow(Base other_) {
767        if (!super.equalsShallow(other_))
768          return false;
769        if (!(other_ instanceof VerificationResultPrimarySourceComponent))
770          return false;
771        VerificationResultPrimarySourceComponent o = (VerificationResultPrimarySourceComponent) other_;
772        return compareValues(validationDate, o.validationDate, true);
773      }
774
775      public boolean isEmpty() {
776        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(organization, type, validationProcess
777          , validationStatus, validationDate, canPushUpdates, pushTypeAvailable);
778      }
779
780  public String fhirType() {
781    return "VerificationResult.primarySource";
782
783  }
784
785  }
786
787    @Block()
788    public static class VerificationResultAttestationComponent extends BackboneElement implements IBaseBackboneElement {
789        /**
790         * The individual attesting to information.
791         */
792        @Child(name = "source", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true)
793        @Description(shortDefinition="The individual attesting to information", formalDefinition="The individual attesting to information." )
794        protected Reference source;
795
796        /**
797         * The actual object that is the target of the reference (The individual attesting to information.)
798         */
799        protected Practitioner sourceTarget;
800
801        /**
802         * The organization attesting to information.
803         */
804        @Child(name = "organization", type = {Organization.class}, order=2, min=0, max=1, modifier=false, summary=true)
805        @Description(shortDefinition="The organization attesting to information", formalDefinition="The organization attesting to information." )
806        protected Reference organization;
807
808        /**
809         * The actual object that is the target of the reference (The organization attesting to information.)
810         */
811        protected Organization organizationTarget;
812
813        /**
814         * Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source).
815         */
816        @Child(name = "method", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
817        @Description(shortDefinition="Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source)", formalDefinition="Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source)." )
818        protected CodeableConcept method;
819
820        /**
821         * The date the information was attested to.
822         */
823        @Child(name = "date", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=true)
824        @Description(shortDefinition="The date the information was attested to", formalDefinition="The date the information was attested to." )
825        protected DateType date;
826
827        /**
828         * A digital identity certificate associated with the attestation source.
829         */
830        @Child(name = "sourceIdentityCertificate", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
831        @Description(shortDefinition="A digital identity certificate associated with the attestation source", formalDefinition="A digital identity certificate associated with the attestation source." )
832        protected StringType sourceIdentityCertificate;
833
834        /**
835         * A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.
836         */
837        @Child(name = "proxyIdentityCertificate", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
838        @Description(shortDefinition="A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source", formalDefinition="A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source." )
839        protected StringType proxyIdentityCertificate;
840
841        /**
842         * Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.
843         */
844        @Child(name = "signedProxyRight", type = {StringType.class, UriType.class}, order=7, min=0, max=1, modifier=false, summary=false)
845        @Description(shortDefinition="Proxy signature", formalDefinition="Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source." )
846        protected Type signedProxyRight;
847
848        /**
849         * Signed assertion by the attestation source that they have attested to the information.
850         */
851        @Child(name = "signedSourceAttestation", type = {StringType.class, UriType.class}, order=8, min=0, max=1, modifier=false, summary=false)
852        @Description(shortDefinition="Attester signature", formalDefinition="Signed assertion by the attestation source that they have attested to the information." )
853        protected Type signedSourceAttestation;
854
855        private static final long serialVersionUID = 1956485939L;
856
857    /**
858     * Constructor
859     */
860      public VerificationResultAttestationComponent() {
861        super();
862      }
863
864        /**
865         * @return {@link #source} (The individual attesting to information.)
866         */
867        public Reference getSource() { 
868          if (this.source == null)
869            if (Configuration.errorOnAutoCreate())
870              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.source");
871            else if (Configuration.doAutoCreate())
872              this.source = new Reference(); // cc
873          return this.source;
874        }
875
876        public boolean hasSource() { 
877          return this.source != null && !this.source.isEmpty();
878        }
879
880        /**
881         * @param value {@link #source} (The individual attesting to information.)
882         */
883        public VerificationResultAttestationComponent setSource(Reference value) { 
884          this.source = value;
885          return this;
886        }
887
888        /**
889         * @return {@link #source} 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 individual attesting to information.)
890         */
891        public Practitioner getSourceTarget() { 
892          if (this.sourceTarget == null)
893            if (Configuration.errorOnAutoCreate())
894              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.source");
895            else if (Configuration.doAutoCreate())
896              this.sourceTarget = new Practitioner(); // aa
897          return this.sourceTarget;
898        }
899
900        /**
901         * @param value {@link #source} 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 individual attesting to information.)
902         */
903        public VerificationResultAttestationComponent setSourceTarget(Practitioner value) { 
904          this.sourceTarget = value;
905          return this;
906        }
907
908        /**
909         * @return {@link #organization} (The organization attesting to information.)
910         */
911        public Reference getOrganization() { 
912          if (this.organization == null)
913            if (Configuration.errorOnAutoCreate())
914              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.organization");
915            else if (Configuration.doAutoCreate())
916              this.organization = new Reference(); // cc
917          return this.organization;
918        }
919
920        public boolean hasOrganization() { 
921          return this.organization != null && !this.organization.isEmpty();
922        }
923
924        /**
925         * @param value {@link #organization} (The organization attesting to information.)
926         */
927        public VerificationResultAttestationComponent setOrganization(Reference value) { 
928          this.organization = value;
929          return this;
930        }
931
932        /**
933         * @return {@link #organization} 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 organization attesting to information.)
934         */
935        public Organization getOrganizationTarget() { 
936          if (this.organizationTarget == null)
937            if (Configuration.errorOnAutoCreate())
938              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.organization");
939            else if (Configuration.doAutoCreate())
940              this.organizationTarget = new Organization(); // aa
941          return this.organizationTarget;
942        }
943
944        /**
945         * @param value {@link #organization} 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 organization attesting to information.)
946         */
947        public VerificationResultAttestationComponent setOrganizationTarget(Organization value) { 
948          this.organizationTarget = value;
949          return this;
950        }
951
952        /**
953         * @return {@link #method} (Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source).)
954         */
955        public CodeableConcept getMethod() { 
956          if (this.method == null)
957            if (Configuration.errorOnAutoCreate())
958              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.method");
959            else if (Configuration.doAutoCreate())
960              this.method = new CodeableConcept(); // cc
961          return this.method;
962        }
963
964        public boolean hasMethod() { 
965          return this.method != null && !this.method.isEmpty();
966        }
967
968        /**
969         * @param value {@link #method} (Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source).)
970         */
971        public VerificationResultAttestationComponent setMethod(CodeableConcept value) { 
972          this.method = value;
973          return this;
974        }
975
976        /**
977         * @return {@link #date} (The date the information was attested to.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
978         */
979        public DateType getDateElement() { 
980          if (this.date == null)
981            if (Configuration.errorOnAutoCreate())
982              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.date");
983            else if (Configuration.doAutoCreate())
984              this.date = new DateType(); // bb
985          return this.date;
986        }
987
988        public boolean hasDateElement() { 
989          return this.date != null && !this.date.isEmpty();
990        }
991
992        public boolean hasDate() { 
993          return this.date != null && !this.date.isEmpty();
994        }
995
996        /**
997         * @param value {@link #date} (The date the information was attested to.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
998         */
999        public VerificationResultAttestationComponent setDateElement(DateType value) { 
1000          this.date = value;
1001          return this;
1002        }
1003
1004        /**
1005         * @return The date the information was attested to.
1006         */
1007        public Date getDate() { 
1008          return this.date == null ? null : this.date.getValue();
1009        }
1010
1011        /**
1012         * @param value The date the information was attested to.
1013         */
1014        public VerificationResultAttestationComponent setDate(Date value) { 
1015          if (value == null)
1016            this.date = null;
1017          else {
1018            if (this.date == null)
1019              this.date = new DateType();
1020            this.date.setValue(value);
1021          }
1022          return this;
1023        }
1024
1025        /**
1026         * @return {@link #sourceIdentityCertificate} (A digital identity certificate associated with the attestation source.). This is the underlying object with id, value and extensions. The accessor "getSourceIdentityCertificate" gives direct access to the value
1027         */
1028        public StringType getSourceIdentityCertificateElement() { 
1029          if (this.sourceIdentityCertificate == null)
1030            if (Configuration.errorOnAutoCreate())
1031              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.sourceIdentityCertificate");
1032            else if (Configuration.doAutoCreate())
1033              this.sourceIdentityCertificate = new StringType(); // bb
1034          return this.sourceIdentityCertificate;
1035        }
1036
1037        public boolean hasSourceIdentityCertificateElement() { 
1038          return this.sourceIdentityCertificate != null && !this.sourceIdentityCertificate.isEmpty();
1039        }
1040
1041        public boolean hasSourceIdentityCertificate() { 
1042          return this.sourceIdentityCertificate != null && !this.sourceIdentityCertificate.isEmpty();
1043        }
1044
1045        /**
1046         * @param value {@link #sourceIdentityCertificate} (A digital identity certificate associated with the attestation source.). This is the underlying object with id, value and extensions. The accessor "getSourceIdentityCertificate" gives direct access to the value
1047         */
1048        public VerificationResultAttestationComponent setSourceIdentityCertificateElement(StringType value) { 
1049          this.sourceIdentityCertificate = value;
1050          return this;
1051        }
1052
1053        /**
1054         * @return A digital identity certificate associated with the attestation source.
1055         */
1056        public String getSourceIdentityCertificate() { 
1057          return this.sourceIdentityCertificate == null ? null : this.sourceIdentityCertificate.getValue();
1058        }
1059
1060        /**
1061         * @param value A digital identity certificate associated with the attestation source.
1062         */
1063        public VerificationResultAttestationComponent setSourceIdentityCertificate(String value) { 
1064          if (Utilities.noString(value))
1065            this.sourceIdentityCertificate = null;
1066          else {
1067            if (this.sourceIdentityCertificate == null)
1068              this.sourceIdentityCertificate = new StringType();
1069            this.sourceIdentityCertificate.setValue(value);
1070          }
1071          return this;
1072        }
1073
1074        /**
1075         * @return {@link #proxyIdentityCertificate} (A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.). This is the underlying object with id, value and extensions. The accessor "getProxyIdentityCertificate" gives direct access to the value
1076         */
1077        public StringType getProxyIdentityCertificateElement() { 
1078          if (this.proxyIdentityCertificate == null)
1079            if (Configuration.errorOnAutoCreate())
1080              throw new Error("Attempt to auto-create VerificationResultAttestationComponent.proxyIdentityCertificate");
1081            else if (Configuration.doAutoCreate())
1082              this.proxyIdentityCertificate = new StringType(); // bb
1083          return this.proxyIdentityCertificate;
1084        }
1085
1086        public boolean hasProxyIdentityCertificateElement() { 
1087          return this.proxyIdentityCertificate != null && !this.proxyIdentityCertificate.isEmpty();
1088        }
1089
1090        public boolean hasProxyIdentityCertificate() { 
1091          return this.proxyIdentityCertificate != null && !this.proxyIdentityCertificate.isEmpty();
1092        }
1093
1094        /**
1095         * @param value {@link #proxyIdentityCertificate} (A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.). This is the underlying object with id, value and extensions. The accessor "getProxyIdentityCertificate" gives direct access to the value
1096         */
1097        public VerificationResultAttestationComponent setProxyIdentityCertificateElement(StringType value) { 
1098          this.proxyIdentityCertificate = value;
1099          return this;
1100        }
1101
1102        /**
1103         * @return A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.
1104         */
1105        public String getProxyIdentityCertificate() { 
1106          return this.proxyIdentityCertificate == null ? null : this.proxyIdentityCertificate.getValue();
1107        }
1108
1109        /**
1110         * @param value A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.
1111         */
1112        public VerificationResultAttestationComponent setProxyIdentityCertificate(String value) { 
1113          if (Utilities.noString(value))
1114            this.proxyIdentityCertificate = null;
1115          else {
1116            if (this.proxyIdentityCertificate == null)
1117              this.proxyIdentityCertificate = new StringType();
1118            this.proxyIdentityCertificate.setValue(value);
1119          }
1120          return this;
1121        }
1122
1123        /**
1124         * @return {@link #signedProxyRight} (Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.)
1125         */
1126        public Type getSignedProxyRight() { 
1127          return this.signedProxyRight;
1128        }
1129
1130        /**
1131         * @return {@link #signedProxyRight} (Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.)
1132         */
1133        public StringType getSignedProxyRightStringType() throws FHIRException { 
1134          if (this.signedProxyRight == null)
1135            return null;
1136          if (!(this.signedProxyRight instanceof StringType))
1137            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.signedProxyRight.getClass().getName()+" was encountered");
1138          return (StringType) this.signedProxyRight;
1139        }
1140
1141        public boolean hasSignedProxyRightStringType() { 
1142          return this != null && this.signedProxyRight instanceof StringType;
1143        }
1144
1145        /**
1146         * @return {@link #signedProxyRight} (Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.)
1147         */
1148        public UriType getSignedProxyRightUriType() throws FHIRException { 
1149          if (this.signedProxyRight == null)
1150            return null;
1151          if (!(this.signedProxyRight instanceof UriType))
1152            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.signedProxyRight.getClass().getName()+" was encountered");
1153          return (UriType) this.signedProxyRight;
1154        }
1155
1156        public boolean hasSignedProxyRightUriType() { 
1157          return this != null && this.signedProxyRight instanceof UriType;
1158        }
1159
1160        public boolean hasSignedProxyRight() { 
1161          return this.signedProxyRight != null && !this.signedProxyRight.isEmpty();
1162        }
1163
1164        /**
1165         * @param value {@link #signedProxyRight} (Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.)
1166         */
1167        public VerificationResultAttestationComponent setSignedProxyRight(Type value) { 
1168          if (value != null && !(value instanceof StringType || value instanceof UriType))
1169            throw new Error("Not the right type for VerificationResult.attestation.signedProxyRight[x]: "+value.fhirType());
1170          this.signedProxyRight = value;
1171          return this;
1172        }
1173
1174        /**
1175         * @return {@link #signedSourceAttestation} (Signed assertion by the attestation source that they have attested to the information.)
1176         */
1177        public Type getSignedSourceAttestation() { 
1178          return this.signedSourceAttestation;
1179        }
1180
1181        /**
1182         * @return {@link #signedSourceAttestation} (Signed assertion by the attestation source that they have attested to the information.)
1183         */
1184        public StringType getSignedSourceAttestationStringType() throws FHIRException { 
1185          if (this.signedSourceAttestation == null)
1186            return null;
1187          if (!(this.signedSourceAttestation instanceof StringType))
1188            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.signedSourceAttestation.getClass().getName()+" was encountered");
1189          return (StringType) this.signedSourceAttestation;
1190        }
1191
1192        public boolean hasSignedSourceAttestationStringType() { 
1193          return this != null && this.signedSourceAttestation instanceof StringType;
1194        }
1195
1196        /**
1197         * @return {@link #signedSourceAttestation} (Signed assertion by the attestation source that they have attested to the information.)
1198         */
1199        public UriType getSignedSourceAttestationUriType() throws FHIRException { 
1200          if (this.signedSourceAttestation == null)
1201            return null;
1202          if (!(this.signedSourceAttestation instanceof UriType))
1203            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.signedSourceAttestation.getClass().getName()+" was encountered");
1204          return (UriType) this.signedSourceAttestation;
1205        }
1206
1207        public boolean hasSignedSourceAttestationUriType() { 
1208          return this != null && this.signedSourceAttestation instanceof UriType;
1209        }
1210
1211        public boolean hasSignedSourceAttestation() { 
1212          return this.signedSourceAttestation != null && !this.signedSourceAttestation.isEmpty();
1213        }
1214
1215        /**
1216         * @param value {@link #signedSourceAttestation} (Signed assertion by the attestation source that they have attested to the information.)
1217         */
1218        public VerificationResultAttestationComponent setSignedSourceAttestation(Type value) { 
1219          if (value != null && !(value instanceof StringType || value instanceof UriType))
1220            throw new Error("Not the right type for VerificationResult.attestation.signedSourceAttestation[x]: "+value.fhirType());
1221          this.signedSourceAttestation = value;
1222          return this;
1223        }
1224
1225        protected void listChildren(List<Property> children) {
1226          super.listChildren(children);
1227          children.add(new Property("source", "Reference(Practitioner)", "The individual attesting to information.", 0, 1, source));
1228          children.add(new Property("organization", "Reference(Organization)", "The organization attesting to information.", 0, 1, organization));
1229          children.add(new Property("method", "CodeableConcept", "Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source).", 0, 1, method));
1230          children.add(new Property("date", "date", "The date the information was attested to.", 0, 1, date));
1231          children.add(new Property("sourceIdentityCertificate", "string", "A digital identity certificate associated with the attestation source.", 0, 1, sourceIdentityCertificate));
1232          children.add(new Property("proxyIdentityCertificate", "string", "A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.", 0, 1, proxyIdentityCertificate));
1233          children.add(new Property("signedProxyRight[x]", "string|uri", "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 0, 1, signedProxyRight));
1234          children.add(new Property("signedSourceAttestation[x]", "string|uri", "Signed assertion by the attestation source that they have attested to the information.", 0, 1, signedSourceAttestation));
1235        }
1236
1237        @Override
1238        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1239          switch (_hash) {
1240          case -896505829: /*source*/  return new Property("source", "Reference(Practitioner)", "The individual attesting to information.", 0, 1, source);
1241          case 1178922291: /*organization*/  return new Property("organization", "Reference(Organization)", "The organization attesting to information.", 0, 1, organization);
1242          case -1077554975: /*method*/  return new Property("method", "CodeableConcept", "Who is providing the attested information (owner; authorized representative; authorized intermediary; non-authorized source).", 0, 1, method);
1243          case 3076014: /*date*/  return new Property("date", "date", "The date the information was attested to.", 0, 1, date);
1244          case -799067682: /*sourceIdentityCertificate*/  return new Property("sourceIdentityCertificate", "string", "A digital identity certificate associated with the attestation source.", 0, 1, sourceIdentityCertificate);
1245          case 431558827: /*proxyIdentityCertificate*/  return new Property("proxyIdentityCertificate", "string", "A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.", 0, 1, proxyIdentityCertificate);
1246          case -589878346: /*signedProxyRight[x]*/  return new Property("signedProxyRight[x]", "string|uri", "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 0, 1, signedProxyRight);
1247          case -979078006: /*signedProxyRight*/  return new Property("signedProxyRight[x]", "string|uri", "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 0, 1, signedProxyRight);
1248          case 1708372283: /*signedProxyRightString*/  return new Property("signedProxyRight[x]", "string|uri", "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 0, 1, signedProxyRight);
1249          case -589884286: /*signedProxyRightUri*/  return new Property("signedProxyRight[x]", "string|uri", "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 0, 1, signedProxyRight);
1250          case -1441752601: /*signedSourceAttestation[x]*/  return new Property("signedSourceAttestation[x]", "string|uri", "Signed assertion by the attestation source that they have attested to the information.", 0, 1, signedSourceAttestation);
1251          case 564665337: /*signedSourceAttestation*/  return new Property("signedSourceAttestation[x]", "string|uri", "Signed assertion by the attestation source that they have attested to the information.", 0, 1, signedSourceAttestation);
1252          case -1810773654: /*signedSourceAttestationString*/  return new Property("signedSourceAttestation[x]", "string|uri", "Signed assertion by the attestation source that they have attested to the information.", 0, 1, signedSourceAttestation);
1253          case -1441758541: /*signedSourceAttestationUri*/  return new Property("signedSourceAttestation[x]", "string|uri", "Signed assertion by the attestation source that they have attested to the information.", 0, 1, signedSourceAttestation);
1254          default: return super.getNamedProperty(_hash, _name, _checkValid);
1255          }
1256
1257        }
1258
1259      @Override
1260      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1261        switch (hash) {
1262        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
1263        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
1264        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept
1265        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType
1266        case -799067682: /*sourceIdentityCertificate*/ return this.sourceIdentityCertificate == null ? new Base[0] : new Base[] {this.sourceIdentityCertificate}; // StringType
1267        case 431558827: /*proxyIdentityCertificate*/ return this.proxyIdentityCertificate == null ? new Base[0] : new Base[] {this.proxyIdentityCertificate}; // StringType
1268        case -979078006: /*signedProxyRight*/ return this.signedProxyRight == null ? new Base[0] : new Base[] {this.signedProxyRight}; // Type
1269        case 564665337: /*signedSourceAttestation*/ return this.signedSourceAttestation == null ? new Base[0] : new Base[] {this.signedSourceAttestation}; // Type
1270        default: return super.getProperty(hash, name, checkValid);
1271        }
1272
1273      }
1274
1275      @Override
1276      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1277        switch (hash) {
1278        case -896505829: // source
1279          this.source = castToReference(value); // Reference
1280          return value;
1281        case 1178922291: // organization
1282          this.organization = castToReference(value); // Reference
1283          return value;
1284        case -1077554975: // method
1285          this.method = castToCodeableConcept(value); // CodeableConcept
1286          return value;
1287        case 3076014: // date
1288          this.date = castToDate(value); // DateType
1289          return value;
1290        case -799067682: // sourceIdentityCertificate
1291          this.sourceIdentityCertificate = castToString(value); // StringType
1292          return value;
1293        case 431558827: // proxyIdentityCertificate
1294          this.proxyIdentityCertificate = castToString(value); // StringType
1295          return value;
1296        case -979078006: // signedProxyRight
1297          this.signedProxyRight = castToType(value); // Type
1298          return value;
1299        case 564665337: // signedSourceAttestation
1300          this.signedSourceAttestation = castToType(value); // Type
1301          return value;
1302        default: return super.setProperty(hash, name, value);
1303        }
1304
1305      }
1306
1307      @Override
1308      public Base setProperty(String name, Base value) throws FHIRException {
1309        if (name.equals("source")) {
1310          this.source = castToReference(value); // Reference
1311        } else if (name.equals("organization")) {
1312          this.organization = castToReference(value); // Reference
1313        } else if (name.equals("method")) {
1314          this.method = castToCodeableConcept(value); // CodeableConcept
1315        } else if (name.equals("date")) {
1316          this.date = castToDate(value); // DateType
1317        } else if (name.equals("sourceIdentityCertificate")) {
1318          this.sourceIdentityCertificate = castToString(value); // StringType
1319        } else if (name.equals("proxyIdentityCertificate")) {
1320          this.proxyIdentityCertificate = castToString(value); // StringType
1321        } else if (name.equals("signedProxyRight[x]")) {
1322          this.signedProxyRight = castToType(value); // Type
1323        } else if (name.equals("signedSourceAttestation[x]")) {
1324          this.signedSourceAttestation = castToType(value); // Type
1325        } else
1326          return super.setProperty(name, value);
1327        return value;
1328      }
1329
1330      @Override
1331      public Base makeProperty(int hash, String name) throws FHIRException {
1332        switch (hash) {
1333        case -896505829:  return getSource(); 
1334        case 1178922291:  return getOrganization(); 
1335        case -1077554975:  return getMethod(); 
1336        case 3076014:  return getDateElement();
1337        case -799067682:  return getSourceIdentityCertificateElement();
1338        case 431558827:  return getProxyIdentityCertificateElement();
1339        case -589878346:  return getSignedProxyRight(); 
1340        case -979078006:  return getSignedProxyRight(); 
1341        case -1441752601:  return getSignedSourceAttestation(); 
1342        case 564665337:  return getSignedSourceAttestation(); 
1343        default: return super.makeProperty(hash, name);
1344        }
1345
1346      }
1347
1348      @Override
1349      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1350        switch (hash) {
1351        case -896505829: /*source*/ return new String[] {"Reference"};
1352        case 1178922291: /*organization*/ return new String[] {"Reference"};
1353        case -1077554975: /*method*/ return new String[] {"CodeableConcept"};
1354        case 3076014: /*date*/ return new String[] {"date"};
1355        case -799067682: /*sourceIdentityCertificate*/ return new String[] {"string"};
1356        case 431558827: /*proxyIdentityCertificate*/ return new String[] {"string"};
1357        case -979078006: /*signedProxyRight*/ return new String[] {"string", "uri"};
1358        case 564665337: /*signedSourceAttestation*/ return new String[] {"string", "uri"};
1359        default: return super.getTypesForProperty(hash, name);
1360        }
1361
1362      }
1363
1364      @Override
1365      public Base addChild(String name) throws FHIRException {
1366        if (name.equals("source")) {
1367          this.source = new Reference();
1368          return this.source;
1369        }
1370        else if (name.equals("organization")) {
1371          this.organization = new Reference();
1372          return this.organization;
1373        }
1374        else if (name.equals("method")) {
1375          this.method = new CodeableConcept();
1376          return this.method;
1377        }
1378        else if (name.equals("date")) {
1379          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.date");
1380        }
1381        else if (name.equals("sourceIdentityCertificate")) {
1382          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.sourceIdentityCertificate");
1383        }
1384        else if (name.equals("proxyIdentityCertificate")) {
1385          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.proxyIdentityCertificate");
1386        }
1387        else if (name.equals("signedProxyRightString")) {
1388          this.signedProxyRight = new StringType();
1389          return this.signedProxyRight;
1390        }
1391        else if (name.equals("signedProxyRightUri")) {
1392          this.signedProxyRight = new UriType();
1393          return this.signedProxyRight;
1394        }
1395        else if (name.equals("signedSourceAttestationString")) {
1396          this.signedSourceAttestation = new StringType();
1397          return this.signedSourceAttestation;
1398        }
1399        else if (name.equals("signedSourceAttestationUri")) {
1400          this.signedSourceAttestation = new UriType();
1401          return this.signedSourceAttestation;
1402        }
1403        else
1404          return super.addChild(name);
1405      }
1406
1407      public VerificationResultAttestationComponent copy() {
1408        VerificationResultAttestationComponent dst = new VerificationResultAttestationComponent();
1409        copyValues(dst);
1410        dst.source = source == null ? null : source.copy();
1411        dst.organization = organization == null ? null : organization.copy();
1412        dst.method = method == null ? null : method.copy();
1413        dst.date = date == null ? null : date.copy();
1414        dst.sourceIdentityCertificate = sourceIdentityCertificate == null ? null : sourceIdentityCertificate.copy();
1415        dst.proxyIdentityCertificate = proxyIdentityCertificate == null ? null : proxyIdentityCertificate.copy();
1416        dst.signedProxyRight = signedProxyRight == null ? null : signedProxyRight.copy();
1417        dst.signedSourceAttestation = signedSourceAttestation == null ? null : signedSourceAttestation.copy();
1418        return dst;
1419      }
1420
1421      @Override
1422      public boolean equalsDeep(Base other_) {
1423        if (!super.equalsDeep(other_))
1424          return false;
1425        if (!(other_ instanceof VerificationResultAttestationComponent))
1426          return false;
1427        VerificationResultAttestationComponent o = (VerificationResultAttestationComponent) other_;
1428        return compareDeep(source, o.source, true) && compareDeep(organization, o.organization, true) && compareDeep(method, o.method, true)
1429           && compareDeep(date, o.date, true) && compareDeep(sourceIdentityCertificate, o.sourceIdentityCertificate, true)
1430           && compareDeep(proxyIdentityCertificate, o.proxyIdentityCertificate, true) && compareDeep(signedProxyRight, o.signedProxyRight, true)
1431           && compareDeep(signedSourceAttestation, o.signedSourceAttestation, true);
1432      }
1433
1434      @Override
1435      public boolean equalsShallow(Base other_) {
1436        if (!super.equalsShallow(other_))
1437          return false;
1438        if (!(other_ instanceof VerificationResultAttestationComponent))
1439          return false;
1440        VerificationResultAttestationComponent o = (VerificationResultAttestationComponent) other_;
1441        return compareValues(date, o.date, true) && compareValues(sourceIdentityCertificate, o.sourceIdentityCertificate, true)
1442           && compareValues(proxyIdentityCertificate, o.proxyIdentityCertificate, true);
1443      }
1444
1445      public boolean isEmpty() {
1446        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(source, organization, method
1447          , date, sourceIdentityCertificate, proxyIdentityCertificate, signedProxyRight, signedSourceAttestation
1448          );
1449      }
1450
1451  public String fhirType() {
1452    return "VerificationResult.attestation";
1453
1454  }
1455
1456  }
1457
1458    @Block()
1459    public static class VerificationResultValidatorComponent extends BackboneElement implements IBaseBackboneElement {
1460        /**
1461         * Reference to the organization validating information.
1462         */
1463        @Child(name = "organization", type = {Organization.class}, order=1, min=1, max=1, modifier=false, summary=false)
1464        @Description(shortDefinition="Reference to the organization validating information", formalDefinition="Reference to the organization validating information." )
1465        protected Reference organization;
1466
1467        /**
1468         * The actual object that is the target of the reference (Reference to the organization validating information.)
1469         */
1470        protected Organization organizationTarget;
1471
1472        /**
1473         * A digital identity certificate associated with the validator.
1474         */
1475        @Child(name = "identityCertificate", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1476        @Description(shortDefinition="A digital identity certificate associated with the validator", formalDefinition="A digital identity certificate associated with the validator." )
1477        protected StringType identityCertificate;
1478
1479        /**
1480         * Signed assertion by the validator that they have validated the information.
1481         */
1482        @Child(name = "signedValidatorAttestation", type = {StringType.class, UriType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1483        @Description(shortDefinition="Validator signature", formalDefinition="Signed assertion by the validator that they have validated the information." )
1484        protected Type signedValidatorAttestation;
1485
1486        private static final long serialVersionUID = 394395029L;
1487
1488    /**
1489     * Constructor
1490     */
1491      public VerificationResultValidatorComponent() {
1492        super();
1493      }
1494
1495    /**
1496     * Constructor
1497     */
1498      public VerificationResultValidatorComponent(Reference organization) {
1499        super();
1500        this.organization = organization;
1501      }
1502
1503        /**
1504         * @return {@link #organization} (Reference to the organization validating information.)
1505         */
1506        public Reference getOrganization() { 
1507          if (this.organization == null)
1508            if (Configuration.errorOnAutoCreate())
1509              throw new Error("Attempt to auto-create VerificationResultValidatorComponent.organization");
1510            else if (Configuration.doAutoCreate())
1511              this.organization = new Reference(); // cc
1512          return this.organization;
1513        }
1514
1515        public boolean hasOrganization() { 
1516          return this.organization != null && !this.organization.isEmpty();
1517        }
1518
1519        /**
1520         * @param value {@link #organization} (Reference to the organization validating information.)
1521         */
1522        public VerificationResultValidatorComponent setOrganization(Reference value) { 
1523          this.organization = value;
1524          return this;
1525        }
1526
1527        /**
1528         * @return {@link #organization} 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. (Reference to the organization validating information.)
1529         */
1530        public Organization getOrganizationTarget() { 
1531          if (this.organizationTarget == null)
1532            if (Configuration.errorOnAutoCreate())
1533              throw new Error("Attempt to auto-create VerificationResultValidatorComponent.organization");
1534            else if (Configuration.doAutoCreate())
1535              this.organizationTarget = new Organization(); // aa
1536          return this.organizationTarget;
1537        }
1538
1539        /**
1540         * @param value {@link #organization} 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. (Reference to the organization validating information.)
1541         */
1542        public VerificationResultValidatorComponent setOrganizationTarget(Organization value) { 
1543          this.organizationTarget = value;
1544          return this;
1545        }
1546
1547        /**
1548         * @return {@link #identityCertificate} (A digital identity certificate associated with the validator.). This is the underlying object with id, value and extensions. The accessor "getIdentityCertificate" gives direct access to the value
1549         */
1550        public StringType getIdentityCertificateElement() { 
1551          if (this.identityCertificate == null)
1552            if (Configuration.errorOnAutoCreate())
1553              throw new Error("Attempt to auto-create VerificationResultValidatorComponent.identityCertificate");
1554            else if (Configuration.doAutoCreate())
1555              this.identityCertificate = new StringType(); // bb
1556          return this.identityCertificate;
1557        }
1558
1559        public boolean hasIdentityCertificateElement() { 
1560          return this.identityCertificate != null && !this.identityCertificate.isEmpty();
1561        }
1562
1563        public boolean hasIdentityCertificate() { 
1564          return this.identityCertificate != null && !this.identityCertificate.isEmpty();
1565        }
1566
1567        /**
1568         * @param value {@link #identityCertificate} (A digital identity certificate associated with the validator.). This is the underlying object with id, value and extensions. The accessor "getIdentityCertificate" gives direct access to the value
1569         */
1570        public VerificationResultValidatorComponent setIdentityCertificateElement(StringType value) { 
1571          this.identityCertificate = value;
1572          return this;
1573        }
1574
1575        /**
1576         * @return A digital identity certificate associated with the validator.
1577         */
1578        public String getIdentityCertificate() { 
1579          return this.identityCertificate == null ? null : this.identityCertificate.getValue();
1580        }
1581
1582        /**
1583         * @param value A digital identity certificate associated with the validator.
1584         */
1585        public VerificationResultValidatorComponent setIdentityCertificate(String value) { 
1586          if (Utilities.noString(value))
1587            this.identityCertificate = null;
1588          else {
1589            if (this.identityCertificate == null)
1590              this.identityCertificate = new StringType();
1591            this.identityCertificate.setValue(value);
1592          }
1593          return this;
1594        }
1595
1596        /**
1597         * @return {@link #signedValidatorAttestation} (Signed assertion by the validator that they have validated the information.)
1598         */
1599        public Type getSignedValidatorAttestation() { 
1600          return this.signedValidatorAttestation;
1601        }
1602
1603        /**
1604         * @return {@link #signedValidatorAttestation} (Signed assertion by the validator that they have validated the information.)
1605         */
1606        public StringType getSignedValidatorAttestationStringType() throws FHIRException { 
1607          if (this.signedValidatorAttestation == null)
1608            return null;
1609          if (!(this.signedValidatorAttestation instanceof StringType))
1610            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.signedValidatorAttestation.getClass().getName()+" was encountered");
1611          return (StringType) this.signedValidatorAttestation;
1612        }
1613
1614        public boolean hasSignedValidatorAttestationStringType() { 
1615          return this != null && this.signedValidatorAttestation instanceof StringType;
1616        }
1617
1618        /**
1619         * @return {@link #signedValidatorAttestation} (Signed assertion by the validator that they have validated the information.)
1620         */
1621        public UriType getSignedValidatorAttestationUriType() throws FHIRException { 
1622          if (this.signedValidatorAttestation == null)
1623            return null;
1624          if (!(this.signedValidatorAttestation instanceof UriType))
1625            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.signedValidatorAttestation.getClass().getName()+" was encountered");
1626          return (UriType) this.signedValidatorAttestation;
1627        }
1628
1629        public boolean hasSignedValidatorAttestationUriType() { 
1630          return this != null && this.signedValidatorAttestation instanceof UriType;
1631        }
1632
1633        public boolean hasSignedValidatorAttestation() { 
1634          return this.signedValidatorAttestation != null && !this.signedValidatorAttestation.isEmpty();
1635        }
1636
1637        /**
1638         * @param value {@link #signedValidatorAttestation} (Signed assertion by the validator that they have validated the information.)
1639         */
1640        public VerificationResultValidatorComponent setSignedValidatorAttestation(Type value) { 
1641          if (value != null && !(value instanceof StringType || value instanceof UriType))
1642            throw new Error("Not the right type for VerificationResult.validator.signedValidatorAttestation[x]: "+value.fhirType());
1643          this.signedValidatorAttestation = value;
1644          return this;
1645        }
1646
1647        protected void listChildren(List<Property> children) {
1648          super.listChildren(children);
1649          children.add(new Property("organization", "Reference(Organization)", "Reference to the organization validating information.", 0, 1, organization));
1650          children.add(new Property("identityCertificate", "string", "A digital identity certificate associated with the validator.", 0, 1, identityCertificate));
1651          children.add(new Property("signedValidatorAttestation[x]", "string|uri", "Signed assertion by the validator that they have validated the information.", 0, 1, signedValidatorAttestation));
1652        }
1653
1654        @Override
1655        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1656          switch (_hash) {
1657          case 1178922291: /*organization*/  return new Property("organization", "Reference(Organization)", "Reference to the organization validating information.", 0, 1, organization);
1658          case -854379015: /*identityCertificate*/  return new Property("identityCertificate", "string", "A digital identity certificate associated with the validator.", 0, 1, identityCertificate);
1659          case -791479066: /*signedValidatorAttestation[x]*/  return new Property("signedValidatorAttestation[x]", "string|uri", "Signed assertion by the validator that they have validated the information.", 0, 1, signedValidatorAttestation);
1660          case -1532120742: /*signedValidatorAttestation*/  return new Property("signedValidatorAttestation[x]", "string|uri", "Signed assertion by the validator that they have validated the information.", 0, 1, signedValidatorAttestation);
1661          case 185602571: /*signedValidatorAttestationString*/  return new Property("signedValidatorAttestation[x]", "string|uri", "Signed assertion by the validator that they have validated the information.", 0, 1, signedValidatorAttestation);
1662          case -791485006: /*signedValidatorAttestationUri*/  return new Property("signedValidatorAttestation[x]", "string|uri", "Signed assertion by the validator that they have validated the information.", 0, 1, signedValidatorAttestation);
1663          default: return super.getNamedProperty(_hash, _name, _checkValid);
1664          }
1665
1666        }
1667
1668      @Override
1669      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1670        switch (hash) {
1671        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Reference
1672        case -854379015: /*identityCertificate*/ return this.identityCertificate == null ? new Base[0] : new Base[] {this.identityCertificate}; // StringType
1673        case -1532120742: /*signedValidatorAttestation*/ return this.signedValidatorAttestation == null ? new Base[0] : new Base[] {this.signedValidatorAttestation}; // Type
1674        default: return super.getProperty(hash, name, checkValid);
1675        }
1676
1677      }
1678
1679      @Override
1680      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1681        switch (hash) {
1682        case 1178922291: // organization
1683          this.organization = castToReference(value); // Reference
1684          return value;
1685        case -854379015: // identityCertificate
1686          this.identityCertificate = castToString(value); // StringType
1687          return value;
1688        case -1532120742: // signedValidatorAttestation
1689          this.signedValidatorAttestation = castToType(value); // Type
1690          return value;
1691        default: return super.setProperty(hash, name, value);
1692        }
1693
1694      }
1695
1696      @Override
1697      public Base setProperty(String name, Base value) throws FHIRException {
1698        if (name.equals("organization")) {
1699          this.organization = castToReference(value); // Reference
1700        } else if (name.equals("identityCertificate")) {
1701          this.identityCertificate = castToString(value); // StringType
1702        } else if (name.equals("signedValidatorAttestation[x]")) {
1703          this.signedValidatorAttestation = castToType(value); // Type
1704        } else
1705          return super.setProperty(name, value);
1706        return value;
1707      }
1708
1709      @Override
1710      public Base makeProperty(int hash, String name) throws FHIRException {
1711        switch (hash) {
1712        case 1178922291:  return getOrganization(); 
1713        case -854379015:  return getIdentityCertificateElement();
1714        case -791479066:  return getSignedValidatorAttestation(); 
1715        case -1532120742:  return getSignedValidatorAttestation(); 
1716        default: return super.makeProperty(hash, name);
1717        }
1718
1719      }
1720
1721      @Override
1722      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1723        switch (hash) {
1724        case 1178922291: /*organization*/ return new String[] {"Reference"};
1725        case -854379015: /*identityCertificate*/ return new String[] {"string"};
1726        case -1532120742: /*signedValidatorAttestation*/ return new String[] {"string", "uri"};
1727        default: return super.getTypesForProperty(hash, name);
1728        }
1729
1730      }
1731
1732      @Override
1733      public Base addChild(String name) throws FHIRException {
1734        if (name.equals("organization")) {
1735          this.organization = new Reference();
1736          return this.organization;
1737        }
1738        else if (name.equals("identityCertificate")) {
1739          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.identityCertificate");
1740        }
1741        else if (name.equals("signedValidatorAttestationString")) {
1742          this.signedValidatorAttestation = new StringType();
1743          return this.signedValidatorAttestation;
1744        }
1745        else if (name.equals("signedValidatorAttestationUri")) {
1746          this.signedValidatorAttestation = new UriType();
1747          return this.signedValidatorAttestation;
1748        }
1749        else
1750          return super.addChild(name);
1751      }
1752
1753      public VerificationResultValidatorComponent copy() {
1754        VerificationResultValidatorComponent dst = new VerificationResultValidatorComponent();
1755        copyValues(dst);
1756        dst.organization = organization == null ? null : organization.copy();
1757        dst.identityCertificate = identityCertificate == null ? null : identityCertificate.copy();
1758        dst.signedValidatorAttestation = signedValidatorAttestation == null ? null : signedValidatorAttestation.copy();
1759        return dst;
1760      }
1761
1762      @Override
1763      public boolean equalsDeep(Base other_) {
1764        if (!super.equalsDeep(other_))
1765          return false;
1766        if (!(other_ instanceof VerificationResultValidatorComponent))
1767          return false;
1768        VerificationResultValidatorComponent o = (VerificationResultValidatorComponent) other_;
1769        return compareDeep(organization, o.organization, true) && compareDeep(identityCertificate, o.identityCertificate, true)
1770           && compareDeep(signedValidatorAttestation, o.signedValidatorAttestation, true);
1771      }
1772
1773      @Override
1774      public boolean equalsShallow(Base other_) {
1775        if (!super.equalsShallow(other_))
1776          return false;
1777        if (!(other_ instanceof VerificationResultValidatorComponent))
1778          return false;
1779        VerificationResultValidatorComponent o = (VerificationResultValidatorComponent) other_;
1780        return compareValues(identityCertificate, o.identityCertificate, true);
1781      }
1782
1783      public boolean isEmpty() {
1784        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(organization, identityCertificate
1785          , signedValidatorAttestation);
1786      }
1787
1788  public String fhirType() {
1789    return "VerificationResult.validator";
1790
1791  }
1792
1793  }
1794
1795    /**
1796     * A resource that was validated.
1797     */
1798    @Child(name = "target", type = {Reference.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1799    @Description(shortDefinition="A resource that was validated", formalDefinition="A resource that was validated." )
1800    protected List<Reference> target;
1801    /**
1802     * The actual objects that are the target of the reference (A resource that was validated.)
1803     */
1804    protected List<Resource> targetTarget;
1805
1806
1807    /**
1808     * The fhirpath location(s) within the resource that was validated.
1809     */
1810    @Child(name = "targetLocation", type = {StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1811    @Description(shortDefinition="The fhirpath location(s) within the resource that was validated", formalDefinition="The fhirpath location(s) within the resource that was validated." )
1812    protected List<StringType> targetLocation;
1813
1814    /**
1815     * The frequency with which the target must be validated (none; initial; periodic).
1816     */
1817    @Child(name = "need", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
1818    @Description(shortDefinition="none | initial | periodic", formalDefinition="The frequency with which the target must be validated (none; initial; periodic)." )
1819    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-need")
1820    protected CodeableConcept need;
1821
1822    /**
1823     * The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).
1824     */
1825    @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1826    @Description(shortDefinition="attested | validated | in-process | req-revalid | val-fail | reval-fail", formalDefinition="The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed)." )
1827    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-status")
1828    protected Enumeration<Status> status;
1829
1830    /**
1831     * When the validation status was updated.
1832     */
1833    @Child(name = "statusDate", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true)
1834    @Description(shortDefinition="When the validation status was updated", formalDefinition="When the validation status was updated." )
1835    protected DateTimeType statusDate;
1836
1837    /**
1838     * What the target is validated against (nothing; primary source; multiple sources).
1839     */
1840    @Child(name = "validationType", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true)
1841    @Description(shortDefinition="nothing | primary | multiple", formalDefinition="What the target is validated against (nothing; primary source; multiple sources)." )
1842    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-validation-type")
1843    protected CodeableConcept validationType;
1844
1845    /**
1846     * The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).
1847     */
1848    @Child(name = "validationProcess", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1849    @Description(shortDefinition="The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context)", formalDefinition="The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context)." )
1850    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-validation-process")
1851    protected List<CodeableConcept> validationProcess;
1852
1853    /**
1854     * Frequency of revalidation.
1855     */
1856    @Child(name = "frequency", type = {Timing.class}, order=7, min=0, max=1, modifier=false, summary=false)
1857    @Description(shortDefinition="Frequency of revalidation", formalDefinition="Frequency of revalidation." )
1858    protected Timing frequency;
1859
1860    /**
1861     * The date/time validation was last completed (incl. failed validations).
1862     */
1863    @Child(name = "lastPerformed", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false)
1864    @Description(shortDefinition="The date/time validation was last completed (incl. failed validations)", formalDefinition="The date/time validation was last completed (incl. failed validations)." )
1865    protected DateTimeType lastPerformed;
1866
1867    /**
1868     * The date when target is next validated, if appropriate.
1869     */
1870    @Child(name = "nextScheduled", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=false)
1871    @Description(shortDefinition="The date when target is next validated, if appropriate", formalDefinition="The date when target is next validated, if appropriate." )
1872    protected DateType nextScheduled;
1873
1874    /**
1875     * The result if validation fails (fatal; warning; record only; none).
1876     */
1877    @Child(name = "failureAction", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true)
1878    @Description(shortDefinition="fatal | warn | rec-only | none", formalDefinition="The result if validation fails (fatal; warning; record only; none)." )
1879    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/verificationresult-failure-action")
1880    protected CodeableConcept failureAction;
1881
1882    /**
1883     * Information about the primary source(s) involved in validation.
1884     */
1885    @Child(name = "primarySource", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1886    @Description(shortDefinition="Information about the primary source(s) involved in validation", formalDefinition="Information about the primary source(s) involved in validation." )
1887    protected List<VerificationResultPrimarySourceComponent> primarySource;
1888
1889    /**
1890     * Information about the entity attesting to information.
1891     */
1892    @Child(name = "attestation", type = {}, order=12, min=0, max=1, modifier=false, summary=false)
1893    @Description(shortDefinition="Information about the entity attesting to information", formalDefinition="Information about the entity attesting to information." )
1894    protected VerificationResultAttestationComponent attestation;
1895
1896    /**
1897     * Information about the entity validating information.
1898     */
1899    @Child(name = "validator", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1900    @Description(shortDefinition="Information about the entity validating information", formalDefinition="Information about the entity validating information." )
1901    protected List<VerificationResultValidatorComponent> validator;
1902
1903    private static final long serialVersionUID = -284059204L;
1904
1905  /**
1906   * Constructor
1907   */
1908    public VerificationResult() {
1909      super();
1910    }
1911
1912  /**
1913   * Constructor
1914   */
1915    public VerificationResult(Enumeration<Status> status) {
1916      super();
1917      this.status = status;
1918    }
1919
1920    /**
1921     * @return {@link #target} (A resource that was validated.)
1922     */
1923    public List<Reference> getTarget() { 
1924      if (this.target == null)
1925        this.target = new ArrayList<Reference>();
1926      return this.target;
1927    }
1928
1929    /**
1930     * @return Returns a reference to <code>this</code> for easy method chaining
1931     */
1932    public VerificationResult setTarget(List<Reference> theTarget) { 
1933      this.target = theTarget;
1934      return this;
1935    }
1936
1937    public boolean hasTarget() { 
1938      if (this.target == null)
1939        return false;
1940      for (Reference item : this.target)
1941        if (!item.isEmpty())
1942          return true;
1943      return false;
1944    }
1945
1946    public Reference addTarget() { //3
1947      Reference t = new Reference();
1948      if (this.target == null)
1949        this.target = new ArrayList<Reference>();
1950      this.target.add(t);
1951      return t;
1952    }
1953
1954    public VerificationResult addTarget(Reference t) { //3
1955      if (t == null)
1956        return this;
1957      if (this.target == null)
1958        this.target = new ArrayList<Reference>();
1959      this.target.add(t);
1960      return this;
1961    }
1962
1963    /**
1964     * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist
1965     */
1966    public Reference getTargetFirstRep() { 
1967      if (getTarget().isEmpty()) {
1968        addTarget();
1969      }
1970      return getTarget().get(0);
1971    }
1972
1973    /**
1974     * @deprecated Use Reference#setResource(IBaseResource) instead
1975     */
1976    @Deprecated
1977    public List<Resource> getTargetTarget() { 
1978      if (this.targetTarget == null)
1979        this.targetTarget = new ArrayList<Resource>();
1980      return this.targetTarget;
1981    }
1982
1983    /**
1984     * @return {@link #targetLocation} (The fhirpath location(s) within the resource that was validated.)
1985     */
1986    public List<StringType> getTargetLocation() { 
1987      if (this.targetLocation == null)
1988        this.targetLocation = new ArrayList<StringType>();
1989      return this.targetLocation;
1990    }
1991
1992    /**
1993     * @return Returns a reference to <code>this</code> for easy method chaining
1994     */
1995    public VerificationResult setTargetLocation(List<StringType> theTargetLocation) { 
1996      this.targetLocation = theTargetLocation;
1997      return this;
1998    }
1999
2000    public boolean hasTargetLocation() { 
2001      if (this.targetLocation == null)
2002        return false;
2003      for (StringType item : this.targetLocation)
2004        if (!item.isEmpty())
2005          return true;
2006      return false;
2007    }
2008
2009    /**
2010     * @return {@link #targetLocation} (The fhirpath location(s) within the resource that was validated.)
2011     */
2012    public StringType addTargetLocationElement() {//2 
2013      StringType t = new StringType();
2014      if (this.targetLocation == null)
2015        this.targetLocation = new ArrayList<StringType>();
2016      this.targetLocation.add(t);
2017      return t;
2018    }
2019
2020    /**
2021     * @param value {@link #targetLocation} (The fhirpath location(s) within the resource that was validated.)
2022     */
2023    public VerificationResult addTargetLocation(String value) { //1
2024      StringType t = new StringType();
2025      t.setValue(value);
2026      if (this.targetLocation == null)
2027        this.targetLocation = new ArrayList<StringType>();
2028      this.targetLocation.add(t);
2029      return this;
2030    }
2031
2032    /**
2033     * @param value {@link #targetLocation} (The fhirpath location(s) within the resource that was validated.)
2034     */
2035    public boolean hasTargetLocation(String value) { 
2036      if (this.targetLocation == null)
2037        return false;
2038      for (StringType v : this.targetLocation)
2039        if (v.getValue().equals(value)) // string
2040          return true;
2041      return false;
2042    }
2043
2044    /**
2045     * @return {@link #need} (The frequency with which the target must be validated (none; initial; periodic).)
2046     */
2047    public CodeableConcept getNeed() { 
2048      if (this.need == null)
2049        if (Configuration.errorOnAutoCreate())
2050          throw new Error("Attempt to auto-create VerificationResult.need");
2051        else if (Configuration.doAutoCreate())
2052          this.need = new CodeableConcept(); // cc
2053      return this.need;
2054    }
2055
2056    public boolean hasNeed() { 
2057      return this.need != null && !this.need.isEmpty();
2058    }
2059
2060    /**
2061     * @param value {@link #need} (The frequency with which the target must be validated (none; initial; periodic).)
2062     */
2063    public VerificationResult setNeed(CodeableConcept value) { 
2064      this.need = value;
2065      return this;
2066    }
2067
2068    /**
2069     * @return {@link #status} (The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2070     */
2071    public Enumeration<Status> getStatusElement() { 
2072      if (this.status == null)
2073        if (Configuration.errorOnAutoCreate())
2074          throw new Error("Attempt to auto-create VerificationResult.status");
2075        else if (Configuration.doAutoCreate())
2076          this.status = new Enumeration<Status>(new StatusEnumFactory()); // bb
2077      return this.status;
2078    }
2079
2080    public boolean hasStatusElement() { 
2081      return this.status != null && !this.status.isEmpty();
2082    }
2083
2084    public boolean hasStatus() { 
2085      return this.status != null && !this.status.isEmpty();
2086    }
2087
2088    /**
2089     * @param value {@link #status} (The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2090     */
2091    public VerificationResult setStatusElement(Enumeration<Status> value) { 
2092      this.status = value;
2093      return this;
2094    }
2095
2096    /**
2097     * @return The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).
2098     */
2099    public Status getStatus() { 
2100      return this.status == null ? null : this.status.getValue();
2101    }
2102
2103    /**
2104     * @param value The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).
2105     */
2106    public VerificationResult setStatus(Status value) { 
2107        if (this.status == null)
2108          this.status = new Enumeration<Status>(new StatusEnumFactory());
2109        this.status.setValue(value);
2110      return this;
2111    }
2112
2113    /**
2114     * @return {@link #statusDate} (When the validation status was updated.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value
2115     */
2116    public DateTimeType getStatusDateElement() { 
2117      if (this.statusDate == null)
2118        if (Configuration.errorOnAutoCreate())
2119          throw new Error("Attempt to auto-create VerificationResult.statusDate");
2120        else if (Configuration.doAutoCreate())
2121          this.statusDate = new DateTimeType(); // bb
2122      return this.statusDate;
2123    }
2124
2125    public boolean hasStatusDateElement() { 
2126      return this.statusDate != null && !this.statusDate.isEmpty();
2127    }
2128
2129    public boolean hasStatusDate() { 
2130      return this.statusDate != null && !this.statusDate.isEmpty();
2131    }
2132
2133    /**
2134     * @param value {@link #statusDate} (When the validation status was updated.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value
2135     */
2136    public VerificationResult setStatusDateElement(DateTimeType value) { 
2137      this.statusDate = value;
2138      return this;
2139    }
2140
2141    /**
2142     * @return When the validation status was updated.
2143     */
2144    public Date getStatusDate() { 
2145      return this.statusDate == null ? null : this.statusDate.getValue();
2146    }
2147
2148    /**
2149     * @param value When the validation status was updated.
2150     */
2151    public VerificationResult setStatusDate(Date value) { 
2152      if (value == null)
2153        this.statusDate = null;
2154      else {
2155        if (this.statusDate == null)
2156          this.statusDate = new DateTimeType();
2157        this.statusDate.setValue(value);
2158      }
2159      return this;
2160    }
2161
2162    /**
2163     * @return {@link #validationType} (What the target is validated against (nothing; primary source; multiple sources).)
2164     */
2165    public CodeableConcept getValidationType() { 
2166      if (this.validationType == null)
2167        if (Configuration.errorOnAutoCreate())
2168          throw new Error("Attempt to auto-create VerificationResult.validationType");
2169        else if (Configuration.doAutoCreate())
2170          this.validationType = new CodeableConcept(); // cc
2171      return this.validationType;
2172    }
2173
2174    public boolean hasValidationType() { 
2175      return this.validationType != null && !this.validationType.isEmpty();
2176    }
2177
2178    /**
2179     * @param value {@link #validationType} (What the target is validated against (nothing; primary source; multiple sources).)
2180     */
2181    public VerificationResult setValidationType(CodeableConcept value) { 
2182      this.validationType = value;
2183      return this;
2184    }
2185
2186    /**
2187     * @return {@link #validationProcess} (The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).)
2188     */
2189    public List<CodeableConcept> getValidationProcess() { 
2190      if (this.validationProcess == null)
2191        this.validationProcess = new ArrayList<CodeableConcept>();
2192      return this.validationProcess;
2193    }
2194
2195    /**
2196     * @return Returns a reference to <code>this</code> for easy method chaining
2197     */
2198    public VerificationResult setValidationProcess(List<CodeableConcept> theValidationProcess) { 
2199      this.validationProcess = theValidationProcess;
2200      return this;
2201    }
2202
2203    public boolean hasValidationProcess() { 
2204      if (this.validationProcess == null)
2205        return false;
2206      for (CodeableConcept item : this.validationProcess)
2207        if (!item.isEmpty())
2208          return true;
2209      return false;
2210    }
2211
2212    public CodeableConcept addValidationProcess() { //3
2213      CodeableConcept t = new CodeableConcept();
2214      if (this.validationProcess == null)
2215        this.validationProcess = new ArrayList<CodeableConcept>();
2216      this.validationProcess.add(t);
2217      return t;
2218    }
2219
2220    public VerificationResult addValidationProcess(CodeableConcept t) { //3
2221      if (t == null)
2222        return this;
2223      if (this.validationProcess == null)
2224        this.validationProcess = new ArrayList<CodeableConcept>();
2225      this.validationProcess.add(t);
2226      return this;
2227    }
2228
2229    /**
2230     * @return The first repetition of repeating field {@link #validationProcess}, creating it if it does not already exist
2231     */
2232    public CodeableConcept getValidationProcessFirstRep() { 
2233      if (getValidationProcess().isEmpty()) {
2234        addValidationProcess();
2235      }
2236      return getValidationProcess().get(0);
2237    }
2238
2239    /**
2240     * @return {@link #frequency} (Frequency of revalidation.)
2241     */
2242    public Timing getFrequency() { 
2243      if (this.frequency == null)
2244        if (Configuration.errorOnAutoCreate())
2245          throw new Error("Attempt to auto-create VerificationResult.frequency");
2246        else if (Configuration.doAutoCreate())
2247          this.frequency = new Timing(); // cc
2248      return this.frequency;
2249    }
2250
2251    public boolean hasFrequency() { 
2252      return this.frequency != null && !this.frequency.isEmpty();
2253    }
2254
2255    /**
2256     * @param value {@link #frequency} (Frequency of revalidation.)
2257     */
2258    public VerificationResult setFrequency(Timing value) { 
2259      this.frequency = value;
2260      return this;
2261    }
2262
2263    /**
2264     * @return {@link #lastPerformed} (The date/time validation was last completed (incl. failed validations).). This is the underlying object with id, value and extensions. The accessor "getLastPerformed" gives direct access to the value
2265     */
2266    public DateTimeType getLastPerformedElement() { 
2267      if (this.lastPerformed == null)
2268        if (Configuration.errorOnAutoCreate())
2269          throw new Error("Attempt to auto-create VerificationResult.lastPerformed");
2270        else if (Configuration.doAutoCreate())
2271          this.lastPerformed = new DateTimeType(); // bb
2272      return this.lastPerformed;
2273    }
2274
2275    public boolean hasLastPerformedElement() { 
2276      return this.lastPerformed != null && !this.lastPerformed.isEmpty();
2277    }
2278
2279    public boolean hasLastPerformed() { 
2280      return this.lastPerformed != null && !this.lastPerformed.isEmpty();
2281    }
2282
2283    /**
2284     * @param value {@link #lastPerformed} (The date/time validation was last completed (incl. failed validations).). This is the underlying object with id, value and extensions. The accessor "getLastPerformed" gives direct access to the value
2285     */
2286    public VerificationResult setLastPerformedElement(DateTimeType value) { 
2287      this.lastPerformed = value;
2288      return this;
2289    }
2290
2291    /**
2292     * @return The date/time validation was last completed (incl. failed validations).
2293     */
2294    public Date getLastPerformed() { 
2295      return this.lastPerformed == null ? null : this.lastPerformed.getValue();
2296    }
2297
2298    /**
2299     * @param value The date/time validation was last completed (incl. failed validations).
2300     */
2301    public VerificationResult setLastPerformed(Date value) { 
2302      if (value == null)
2303        this.lastPerformed = null;
2304      else {
2305        if (this.lastPerformed == null)
2306          this.lastPerformed = new DateTimeType();
2307        this.lastPerformed.setValue(value);
2308      }
2309      return this;
2310    }
2311
2312    /**
2313     * @return {@link #nextScheduled} (The date when target is next validated, if appropriate.). This is the underlying object with id, value and extensions. The accessor "getNextScheduled" gives direct access to the value
2314     */
2315    public DateType getNextScheduledElement() { 
2316      if (this.nextScheduled == null)
2317        if (Configuration.errorOnAutoCreate())
2318          throw new Error("Attempt to auto-create VerificationResult.nextScheduled");
2319        else if (Configuration.doAutoCreate())
2320          this.nextScheduled = new DateType(); // bb
2321      return this.nextScheduled;
2322    }
2323
2324    public boolean hasNextScheduledElement() { 
2325      return this.nextScheduled != null && !this.nextScheduled.isEmpty();
2326    }
2327
2328    public boolean hasNextScheduled() { 
2329      return this.nextScheduled != null && !this.nextScheduled.isEmpty();
2330    }
2331
2332    /**
2333     * @param value {@link #nextScheduled} (The date when target is next validated, if appropriate.). This is the underlying object with id, value and extensions. The accessor "getNextScheduled" gives direct access to the value
2334     */
2335    public VerificationResult setNextScheduledElement(DateType value) { 
2336      this.nextScheduled = value;
2337      return this;
2338    }
2339
2340    /**
2341     * @return The date when target is next validated, if appropriate.
2342     */
2343    public Date getNextScheduled() { 
2344      return this.nextScheduled == null ? null : this.nextScheduled.getValue();
2345    }
2346
2347    /**
2348     * @param value The date when target is next validated, if appropriate.
2349     */
2350    public VerificationResult setNextScheduled(Date value) { 
2351      if (value == null)
2352        this.nextScheduled = null;
2353      else {
2354        if (this.nextScheduled == null)
2355          this.nextScheduled = new DateType();
2356        this.nextScheduled.setValue(value);
2357      }
2358      return this;
2359    }
2360
2361    /**
2362     * @return {@link #failureAction} (The result if validation fails (fatal; warning; record only; none).)
2363     */
2364    public CodeableConcept getFailureAction() { 
2365      if (this.failureAction == null)
2366        if (Configuration.errorOnAutoCreate())
2367          throw new Error("Attempt to auto-create VerificationResult.failureAction");
2368        else if (Configuration.doAutoCreate())
2369          this.failureAction = new CodeableConcept(); // cc
2370      return this.failureAction;
2371    }
2372
2373    public boolean hasFailureAction() { 
2374      return this.failureAction != null && !this.failureAction.isEmpty();
2375    }
2376
2377    /**
2378     * @param value {@link #failureAction} (The result if validation fails (fatal; warning; record only; none).)
2379     */
2380    public VerificationResult setFailureAction(CodeableConcept value) { 
2381      this.failureAction = value;
2382      return this;
2383    }
2384
2385    /**
2386     * @return {@link #primarySource} (Information about the primary source(s) involved in validation.)
2387     */
2388    public List<VerificationResultPrimarySourceComponent> getPrimarySource() { 
2389      if (this.primarySource == null)
2390        this.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>();
2391      return this.primarySource;
2392    }
2393
2394    /**
2395     * @return Returns a reference to <code>this</code> for easy method chaining
2396     */
2397    public VerificationResult setPrimarySource(List<VerificationResultPrimarySourceComponent> thePrimarySource) { 
2398      this.primarySource = thePrimarySource;
2399      return this;
2400    }
2401
2402    public boolean hasPrimarySource() { 
2403      if (this.primarySource == null)
2404        return false;
2405      for (VerificationResultPrimarySourceComponent item : this.primarySource)
2406        if (!item.isEmpty())
2407          return true;
2408      return false;
2409    }
2410
2411    public VerificationResultPrimarySourceComponent addPrimarySource() { //3
2412      VerificationResultPrimarySourceComponent t = new VerificationResultPrimarySourceComponent();
2413      if (this.primarySource == null)
2414        this.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>();
2415      this.primarySource.add(t);
2416      return t;
2417    }
2418
2419    public VerificationResult addPrimarySource(VerificationResultPrimarySourceComponent t) { //3
2420      if (t == null)
2421        return this;
2422      if (this.primarySource == null)
2423        this.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>();
2424      this.primarySource.add(t);
2425      return this;
2426    }
2427
2428    /**
2429     * @return The first repetition of repeating field {@link #primarySource}, creating it if it does not already exist
2430     */
2431    public VerificationResultPrimarySourceComponent getPrimarySourceFirstRep() { 
2432      if (getPrimarySource().isEmpty()) {
2433        addPrimarySource();
2434      }
2435      return getPrimarySource().get(0);
2436    }
2437
2438    /**
2439     * @return {@link #attestation} (Information about the entity attesting to information.)
2440     */
2441    public VerificationResultAttestationComponent getAttestation() { 
2442      if (this.attestation == null)
2443        if (Configuration.errorOnAutoCreate())
2444          throw new Error("Attempt to auto-create VerificationResult.attestation");
2445        else if (Configuration.doAutoCreate())
2446          this.attestation = new VerificationResultAttestationComponent(); // cc
2447      return this.attestation;
2448    }
2449
2450    public boolean hasAttestation() { 
2451      return this.attestation != null && !this.attestation.isEmpty();
2452    }
2453
2454    /**
2455     * @param value {@link #attestation} (Information about the entity attesting to information.)
2456     */
2457    public VerificationResult setAttestation(VerificationResultAttestationComponent value) { 
2458      this.attestation = value;
2459      return this;
2460    }
2461
2462    /**
2463     * @return {@link #validator} (Information about the entity validating information.)
2464     */
2465    public List<VerificationResultValidatorComponent> getValidator() { 
2466      if (this.validator == null)
2467        this.validator = new ArrayList<VerificationResultValidatorComponent>();
2468      return this.validator;
2469    }
2470
2471    /**
2472     * @return Returns a reference to <code>this</code> for easy method chaining
2473     */
2474    public VerificationResult setValidator(List<VerificationResultValidatorComponent> theValidator) { 
2475      this.validator = theValidator;
2476      return this;
2477    }
2478
2479    public boolean hasValidator() { 
2480      if (this.validator == null)
2481        return false;
2482      for (VerificationResultValidatorComponent item : this.validator)
2483        if (!item.isEmpty())
2484          return true;
2485      return false;
2486    }
2487
2488    public VerificationResultValidatorComponent addValidator() { //3
2489      VerificationResultValidatorComponent t = new VerificationResultValidatorComponent();
2490      if (this.validator == null)
2491        this.validator = new ArrayList<VerificationResultValidatorComponent>();
2492      this.validator.add(t);
2493      return t;
2494    }
2495
2496    public VerificationResult addValidator(VerificationResultValidatorComponent t) { //3
2497      if (t == null)
2498        return this;
2499      if (this.validator == null)
2500        this.validator = new ArrayList<VerificationResultValidatorComponent>();
2501      this.validator.add(t);
2502      return this;
2503    }
2504
2505    /**
2506     * @return The first repetition of repeating field {@link #validator}, creating it if it does not already exist
2507     */
2508    public VerificationResultValidatorComponent getValidatorFirstRep() { 
2509      if (getValidator().isEmpty()) {
2510        addValidator();
2511      }
2512      return getValidator().get(0);
2513    }
2514
2515      protected void listChildren(List<Property> children) {
2516        super.listChildren(children);
2517        children.add(new Property("target", "Reference(Any)", "A resource that was validated.", 0, java.lang.Integer.MAX_VALUE, target));
2518        children.add(new Property("targetLocation", "string", "The fhirpath location(s) within the resource that was validated.", 0, java.lang.Integer.MAX_VALUE, targetLocation));
2519        children.add(new Property("need", "CodeableConcept", "The frequency with which the target must be validated (none; initial; periodic).", 0, 1, need));
2520        children.add(new Property("status", "code", "The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).", 0, 1, status));
2521        children.add(new Property("statusDate", "dateTime", "When the validation status was updated.", 0, 1, statusDate));
2522        children.add(new Property("validationType", "CodeableConcept", "What the target is validated against (nothing; primary source; multiple sources).", 0, 1, validationType));
2523        children.add(new Property("validationProcess", "CodeableConcept", "The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).", 0, java.lang.Integer.MAX_VALUE, validationProcess));
2524        children.add(new Property("frequency", "Timing", "Frequency of revalidation.", 0, 1, frequency));
2525        children.add(new Property("lastPerformed", "dateTime", "The date/time validation was last completed (incl. failed validations).", 0, 1, lastPerformed));
2526        children.add(new Property("nextScheduled", "date", "The date when target is next validated, if appropriate.", 0, 1, nextScheduled));
2527        children.add(new Property("failureAction", "CodeableConcept", "The result if validation fails (fatal; warning; record only; none).", 0, 1, failureAction));
2528        children.add(new Property("primarySource", "", "Information about the primary source(s) involved in validation.", 0, java.lang.Integer.MAX_VALUE, primarySource));
2529        children.add(new Property("attestation", "", "Information about the entity attesting to information.", 0, 1, attestation));
2530        children.add(new Property("validator", "", "Information about the entity validating information.", 0, java.lang.Integer.MAX_VALUE, validator));
2531      }
2532
2533      @Override
2534      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2535        switch (_hash) {
2536        case -880905839: /*target*/  return new Property("target", "Reference(Any)", "A resource that was validated.", 0, java.lang.Integer.MAX_VALUE, target);
2537        case 308958310: /*targetLocation*/  return new Property("targetLocation", "string", "The fhirpath location(s) within the resource that was validated.", 0, java.lang.Integer.MAX_VALUE, targetLocation);
2538        case 3377302: /*need*/  return new Property("need", "CodeableConcept", "The frequency with which the target must be validated (none; initial; periodic).", 0, 1, need);
2539        case -892481550: /*status*/  return new Property("status", "code", "The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).", 0, 1, status);
2540        case 247524032: /*statusDate*/  return new Property("statusDate", "dateTime", "When the validation status was updated.", 0, 1, statusDate);
2541        case -279681197: /*validationType*/  return new Property("validationType", "CodeableConcept", "What the target is validated against (nothing; primary source; multiple sources).", 0, 1, validationType);
2542        case 797680566: /*validationProcess*/  return new Property("validationProcess", "CodeableConcept", "The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).", 0, java.lang.Integer.MAX_VALUE, validationProcess);
2543        case -70023844: /*frequency*/  return new Property("frequency", "Timing", "Frequency of revalidation.", 0, 1, frequency);
2544        case -1313229366: /*lastPerformed*/  return new Property("lastPerformed", "dateTime", "The date/time validation was last completed (incl. failed validations).", 0, 1, lastPerformed);
2545        case 1874589434: /*nextScheduled*/  return new Property("nextScheduled", "date", "The date when target is next validated, if appropriate.", 0, 1, nextScheduled);
2546        case 1816382560: /*failureAction*/  return new Property("failureAction", "CodeableConcept", "The result if validation fails (fatal; warning; record only; none).", 0, 1, failureAction);
2547        case -528721731: /*primarySource*/  return new Property("primarySource", "", "Information about the primary source(s) involved in validation.", 0, java.lang.Integer.MAX_VALUE, primarySource);
2548        case -709624112: /*attestation*/  return new Property("attestation", "", "Information about the entity attesting to information.", 0, 1, attestation);
2549        case -1109783726: /*validator*/  return new Property("validator", "", "Information about the entity validating information.", 0, java.lang.Integer.MAX_VALUE, validator);
2550        default: return super.getNamedProperty(_hash, _name, _checkValid);
2551        }
2552
2553      }
2554
2555      @Override
2556      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2557        switch (hash) {
2558        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // Reference
2559        case 308958310: /*targetLocation*/ return this.targetLocation == null ? new Base[0] : this.targetLocation.toArray(new Base[this.targetLocation.size()]); // StringType
2560        case 3377302: /*need*/ return this.need == null ? new Base[0] : new Base[] {this.need}; // CodeableConcept
2561        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<Status>
2562        case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateTimeType
2563        case -279681197: /*validationType*/ return this.validationType == null ? new Base[0] : new Base[] {this.validationType}; // CodeableConcept
2564        case 797680566: /*validationProcess*/ return this.validationProcess == null ? new Base[0] : this.validationProcess.toArray(new Base[this.validationProcess.size()]); // CodeableConcept
2565        case -70023844: /*frequency*/ return this.frequency == null ? new Base[0] : new Base[] {this.frequency}; // Timing
2566        case -1313229366: /*lastPerformed*/ return this.lastPerformed == null ? new Base[0] : new Base[] {this.lastPerformed}; // DateTimeType
2567        case 1874589434: /*nextScheduled*/ return this.nextScheduled == null ? new Base[0] : new Base[] {this.nextScheduled}; // DateType
2568        case 1816382560: /*failureAction*/ return this.failureAction == null ? new Base[0] : new Base[] {this.failureAction}; // CodeableConcept
2569        case -528721731: /*primarySource*/ return this.primarySource == null ? new Base[0] : this.primarySource.toArray(new Base[this.primarySource.size()]); // VerificationResultPrimarySourceComponent
2570        case -709624112: /*attestation*/ return this.attestation == null ? new Base[0] : new Base[] {this.attestation}; // VerificationResultAttestationComponent
2571        case -1109783726: /*validator*/ return this.validator == null ? new Base[0] : this.validator.toArray(new Base[this.validator.size()]); // VerificationResultValidatorComponent
2572        default: return super.getProperty(hash, name, checkValid);
2573        }
2574
2575      }
2576
2577      @Override
2578      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2579        switch (hash) {
2580        case -880905839: // target
2581          this.getTarget().add(castToReference(value)); // Reference
2582          return value;
2583        case 308958310: // targetLocation
2584          this.getTargetLocation().add(castToString(value)); // StringType
2585          return value;
2586        case 3377302: // need
2587          this.need = castToCodeableConcept(value); // CodeableConcept
2588          return value;
2589        case -892481550: // status
2590          value = new StatusEnumFactory().fromType(castToCode(value));
2591          this.status = (Enumeration) value; // Enumeration<Status>
2592          return value;
2593        case 247524032: // statusDate
2594          this.statusDate = castToDateTime(value); // DateTimeType
2595          return value;
2596        case -279681197: // validationType
2597          this.validationType = castToCodeableConcept(value); // CodeableConcept
2598          return value;
2599        case 797680566: // validationProcess
2600          this.getValidationProcess().add(castToCodeableConcept(value)); // CodeableConcept
2601          return value;
2602        case -70023844: // frequency
2603          this.frequency = castToTiming(value); // Timing
2604          return value;
2605        case -1313229366: // lastPerformed
2606          this.lastPerformed = castToDateTime(value); // DateTimeType
2607          return value;
2608        case 1874589434: // nextScheduled
2609          this.nextScheduled = castToDate(value); // DateType
2610          return value;
2611        case 1816382560: // failureAction
2612          this.failureAction = castToCodeableConcept(value); // CodeableConcept
2613          return value;
2614        case -528721731: // primarySource
2615          this.getPrimarySource().add((VerificationResultPrimarySourceComponent) value); // VerificationResultPrimarySourceComponent
2616          return value;
2617        case -709624112: // attestation
2618          this.attestation = (VerificationResultAttestationComponent) value; // VerificationResultAttestationComponent
2619          return value;
2620        case -1109783726: // validator
2621          this.getValidator().add((VerificationResultValidatorComponent) value); // VerificationResultValidatorComponent
2622          return value;
2623        default: return super.setProperty(hash, name, value);
2624        }
2625
2626      }
2627
2628      @Override
2629      public Base setProperty(String name, Base value) throws FHIRException {
2630        if (name.equals("target")) {
2631          this.getTarget().add(castToReference(value));
2632        } else if (name.equals("targetLocation")) {
2633          this.getTargetLocation().add(castToString(value));
2634        } else if (name.equals("need")) {
2635          this.need = castToCodeableConcept(value); // CodeableConcept
2636        } else if (name.equals("status")) {
2637          value = new StatusEnumFactory().fromType(castToCode(value));
2638          this.status = (Enumeration) value; // Enumeration<Status>
2639        } else if (name.equals("statusDate")) {
2640          this.statusDate = castToDateTime(value); // DateTimeType
2641        } else if (name.equals("validationType")) {
2642          this.validationType = castToCodeableConcept(value); // CodeableConcept
2643        } else if (name.equals("validationProcess")) {
2644          this.getValidationProcess().add(castToCodeableConcept(value));
2645        } else if (name.equals("frequency")) {
2646          this.frequency = castToTiming(value); // Timing
2647        } else if (name.equals("lastPerformed")) {
2648          this.lastPerformed = castToDateTime(value); // DateTimeType
2649        } else if (name.equals("nextScheduled")) {
2650          this.nextScheduled = castToDate(value); // DateType
2651        } else if (name.equals("failureAction")) {
2652          this.failureAction = castToCodeableConcept(value); // CodeableConcept
2653        } else if (name.equals("primarySource")) {
2654          this.getPrimarySource().add((VerificationResultPrimarySourceComponent) value);
2655        } else if (name.equals("attestation")) {
2656          this.attestation = (VerificationResultAttestationComponent) value; // VerificationResultAttestationComponent
2657        } else if (name.equals("validator")) {
2658          this.getValidator().add((VerificationResultValidatorComponent) value);
2659        } else
2660          return super.setProperty(name, value);
2661        return value;
2662      }
2663
2664      @Override
2665      public Base makeProperty(int hash, String name) throws FHIRException {
2666        switch (hash) {
2667        case -880905839:  return addTarget(); 
2668        case 308958310:  return addTargetLocationElement();
2669        case 3377302:  return getNeed(); 
2670        case -892481550:  return getStatusElement();
2671        case 247524032:  return getStatusDateElement();
2672        case -279681197:  return getValidationType(); 
2673        case 797680566:  return addValidationProcess(); 
2674        case -70023844:  return getFrequency(); 
2675        case -1313229366:  return getLastPerformedElement();
2676        case 1874589434:  return getNextScheduledElement();
2677        case 1816382560:  return getFailureAction(); 
2678        case -528721731:  return addPrimarySource(); 
2679        case -709624112:  return getAttestation(); 
2680        case -1109783726:  return addValidator(); 
2681        default: return super.makeProperty(hash, name);
2682        }
2683
2684      }
2685
2686      @Override
2687      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2688        switch (hash) {
2689        case -880905839: /*target*/ return new String[] {"Reference"};
2690        case 308958310: /*targetLocation*/ return new String[] {"string"};
2691        case 3377302: /*need*/ return new String[] {"CodeableConcept"};
2692        case -892481550: /*status*/ return new String[] {"code"};
2693        case 247524032: /*statusDate*/ return new String[] {"dateTime"};
2694        case -279681197: /*validationType*/ return new String[] {"CodeableConcept"};
2695        case 797680566: /*validationProcess*/ return new String[] {"CodeableConcept"};
2696        case -70023844: /*frequency*/ return new String[] {"Timing"};
2697        case -1313229366: /*lastPerformed*/ return new String[] {"dateTime"};
2698        case 1874589434: /*nextScheduled*/ return new String[] {"date"};
2699        case 1816382560: /*failureAction*/ return new String[] {"CodeableConcept"};
2700        case -528721731: /*primarySource*/ return new String[] {};
2701        case -709624112: /*attestation*/ return new String[] {};
2702        case -1109783726: /*validator*/ return new String[] {};
2703        default: return super.getTypesForProperty(hash, name);
2704        }
2705
2706      }
2707
2708      @Override
2709      public Base addChild(String name) throws FHIRException {
2710        if (name.equals("target")) {
2711          return addTarget();
2712        }
2713        else if (name.equals("targetLocation")) {
2714          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.targetLocation");
2715        }
2716        else if (name.equals("need")) {
2717          this.need = new CodeableConcept();
2718          return this.need;
2719        }
2720        else if (name.equals("status")) {
2721          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.status");
2722        }
2723        else if (name.equals("statusDate")) {
2724          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.statusDate");
2725        }
2726        else if (name.equals("validationType")) {
2727          this.validationType = new CodeableConcept();
2728          return this.validationType;
2729        }
2730        else if (name.equals("validationProcess")) {
2731          return addValidationProcess();
2732        }
2733        else if (name.equals("frequency")) {
2734          this.frequency = new Timing();
2735          return this.frequency;
2736        }
2737        else if (name.equals("lastPerformed")) {
2738          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.lastPerformed");
2739        }
2740        else if (name.equals("nextScheduled")) {
2741          throw new FHIRException("Cannot call addChild on a primitive type VerificationResult.nextScheduled");
2742        }
2743        else if (name.equals("failureAction")) {
2744          this.failureAction = new CodeableConcept();
2745          return this.failureAction;
2746        }
2747        else if (name.equals("primarySource")) {
2748          return addPrimarySource();
2749        }
2750        else if (name.equals("attestation")) {
2751          this.attestation = new VerificationResultAttestationComponent();
2752          return this.attestation;
2753        }
2754        else if (name.equals("validator")) {
2755          return addValidator();
2756        }
2757        else
2758          return super.addChild(name);
2759      }
2760
2761  public String fhirType() {
2762    return "VerificationResult";
2763
2764  }
2765
2766      public VerificationResult copy() {
2767        VerificationResult dst = new VerificationResult();
2768        copyValues(dst);
2769        if (target != null) {
2770          dst.target = new ArrayList<Reference>();
2771          for (Reference i : target)
2772            dst.target.add(i.copy());
2773        };
2774        if (targetLocation != null) {
2775          dst.targetLocation = new ArrayList<StringType>();
2776          for (StringType i : targetLocation)
2777            dst.targetLocation.add(i.copy());
2778        };
2779        dst.need = need == null ? null : need.copy();
2780        dst.status = status == null ? null : status.copy();
2781        dst.statusDate = statusDate == null ? null : statusDate.copy();
2782        dst.validationType = validationType == null ? null : validationType.copy();
2783        if (validationProcess != null) {
2784          dst.validationProcess = new ArrayList<CodeableConcept>();
2785          for (CodeableConcept i : validationProcess)
2786            dst.validationProcess.add(i.copy());
2787        };
2788        dst.frequency = frequency == null ? null : frequency.copy();
2789        dst.lastPerformed = lastPerformed == null ? null : lastPerformed.copy();
2790        dst.nextScheduled = nextScheduled == null ? null : nextScheduled.copy();
2791        dst.failureAction = failureAction == null ? null : failureAction.copy();
2792        if (primarySource != null) {
2793          dst.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>();
2794          for (VerificationResultPrimarySourceComponent i : primarySource)
2795            dst.primarySource.add(i.copy());
2796        };
2797        dst.attestation = attestation == null ? null : attestation.copy();
2798        if (validator != null) {
2799          dst.validator = new ArrayList<VerificationResultValidatorComponent>();
2800          for (VerificationResultValidatorComponent i : validator)
2801            dst.validator.add(i.copy());
2802        };
2803        return dst;
2804      }
2805
2806      protected VerificationResult typedCopy() {
2807        return copy();
2808      }
2809
2810      @Override
2811      public boolean equalsDeep(Base other_) {
2812        if (!super.equalsDeep(other_))
2813          return false;
2814        if (!(other_ instanceof VerificationResult))
2815          return false;
2816        VerificationResult o = (VerificationResult) other_;
2817        return compareDeep(target, o.target, true) && compareDeep(targetLocation, o.targetLocation, true)
2818           && compareDeep(need, o.need, true) && compareDeep(status, o.status, true) && compareDeep(statusDate, o.statusDate, true)
2819           && compareDeep(validationType, o.validationType, true) && compareDeep(validationProcess, o.validationProcess, true)
2820           && compareDeep(frequency, o.frequency, true) && compareDeep(lastPerformed, o.lastPerformed, true)
2821           && compareDeep(nextScheduled, o.nextScheduled, true) && compareDeep(failureAction, o.failureAction, true)
2822           && compareDeep(primarySource, o.primarySource, true) && compareDeep(attestation, o.attestation, true)
2823           && compareDeep(validator, o.validator, true);
2824      }
2825
2826      @Override
2827      public boolean equalsShallow(Base other_) {
2828        if (!super.equalsShallow(other_))
2829          return false;
2830        if (!(other_ instanceof VerificationResult))
2831          return false;
2832        VerificationResult o = (VerificationResult) other_;
2833        return compareValues(targetLocation, o.targetLocation, true) && compareValues(status, o.status, true)
2834           && compareValues(statusDate, o.statusDate, true) && compareValues(lastPerformed, o.lastPerformed, true)
2835           && compareValues(nextScheduled, o.nextScheduled, true);
2836      }
2837
2838      public boolean isEmpty() {
2839        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(target, targetLocation, need
2840          , status, statusDate, validationType, validationProcess, frequency, lastPerformed
2841          , nextScheduled, failureAction, primarySource, attestation, validator);
2842      }
2843
2844  @Override
2845  public ResourceType getResourceType() {
2846    return ResourceType.VerificationResult;
2847   }
2848
2849 /**
2850   * Search parameter: <b>target</b>
2851   * <p>
2852   * Description: <b>A resource that was validated</b><br>
2853   * Type: <b>reference</b><br>
2854   * Path: <b>VerificationResult.target</b><br>
2855   * </p>
2856   */
2857  @SearchParamDefinition(name="target", path="VerificationResult.target", description="A resource that was validated", type="reference" )
2858  public static final String SP_TARGET = "target";
2859 /**
2860   * <b>Fluent Client</b> search parameter constant for <b>target</b>
2861   * <p>
2862   * Description: <b>A resource that was validated</b><br>
2863   * Type: <b>reference</b><br>
2864   * Path: <b>VerificationResult.target</b><br>
2865   * </p>
2866   */
2867  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET);
2868
2869/**
2870   * Constant for fluent queries to be used to add include statements. Specifies
2871   * the path value of "<b>VerificationResult:target</b>".
2872   */
2873  public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("VerificationResult:target").toLocked();
2874
2875
2876}
2877