001package org.hl7.fhir.instance.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 Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2
033import java.util.*;
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037import ca.uhn.fhir.model.api.annotation.*;
038/**
039 * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
040 */
041@ResourceDef(name="PaymentNotice", profile="http://hl7.org/fhir/Profile/PaymentNotice")
042public class PaymentNotice extends DomainResource {
043
044    /**
045     * The Response business identifier.
046     */
047    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
048    @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." )
049    protected List<Identifier> identifier;
050
051    /**
052     * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.
053     */
054    @Child(name = "ruleset", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true)
055    @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." )
056    protected Coding ruleset;
057
058    /**
059     * The style (standard) and version of the original material which was converted into this resource.
060     */
061    @Child(name = "originalRuleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true)
062    @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." )
063    protected Coding originalRuleset;
064
065    /**
066     * The date when this resource was created.
067     */
068    @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
069    @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." )
070    protected DateTimeType created;
071
072    /**
073     * The Insurer who is target  of the request.
074     */
075    @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true)
076    @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target  of the request." )
077    protected Reference target;
078
079    /**
080     * The actual object that is the target of the reference (The Insurer who is target  of the request.)
081     */
082    protected Organization targetTarget;
083
084    /**
085     * The practitioner who is responsible for the services rendered to the patient.
086     */
087    @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true)
088    @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." )
089    protected Reference provider;
090
091    /**
092     * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.)
093     */
094    protected Practitioner providerTarget;
095
096    /**
097     * The organization which is responsible for the services rendered to the patient.
098     */
099    @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true)
100    @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." )
101    protected Reference organization;
102
103    /**
104     * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.)
105     */
106    protected Organization organizationTarget;
107
108    /**
109     * Reference of resource to reverse.
110     */
111    @Child(name = "request", type = {}, order=7, min=0, max=1, modifier=false, summary=true)
112    @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." )
113    protected Reference request;
114
115    /**
116     * The actual object that is the target of the reference (Reference of resource to reverse.)
117     */
118    protected Resource requestTarget;
119
120    /**
121     * Reference of response to resource to reverse.
122     */
123    @Child(name = "response", type = {}, order=8, min=0, max=1, modifier=false, summary=true)
124    @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." )
125    protected Reference response;
126
127    /**
128     * The actual object that is the target of the reference (Reference of response to resource to reverse.)
129     */
130    protected Resource responseTarget;
131
132    /**
133     * The payment status, typically paid: payment sent, cleared: payment received.
134     */
135    @Child(name = "paymentStatus", type = {Coding.class}, order=9, min=1, max=1, modifier=false, summary=true)
136    @Description(shortDefinition="Status of the payment", formalDefinition="The payment status, typically paid: payment sent, cleared: payment received." )
137    protected Coding paymentStatus;
138
139    private static final long serialVersionUID = -394826458L;
140
141  /*
142   * Constructor
143   */
144    public PaymentNotice() {
145      super();
146    }
147
148  /*
149   * Constructor
150   */
151    public PaymentNotice(Coding paymentStatus) {
152      super();
153      this.paymentStatus = paymentStatus;
154    }
155
156    /**
157     * @return {@link #identifier} (The Response business identifier.)
158     */
159    public List<Identifier> getIdentifier() { 
160      if (this.identifier == null)
161        this.identifier = new ArrayList<Identifier>();
162      return this.identifier;
163    }
164
165    public boolean hasIdentifier() { 
166      if (this.identifier == null)
167        return false;
168      for (Identifier item : this.identifier)
169        if (!item.isEmpty())
170          return true;
171      return false;
172    }
173
174    /**
175     * @return {@link #identifier} (The Response business identifier.)
176     */
177    // syntactic sugar
178    public Identifier addIdentifier() { //3
179      Identifier t = new Identifier();
180      if (this.identifier == null)
181        this.identifier = new ArrayList<Identifier>();
182      this.identifier.add(t);
183      return t;
184    }
185
186    // syntactic sugar
187    public PaymentNotice addIdentifier(Identifier t) { //3
188      if (t == null)
189        return this;
190      if (this.identifier == null)
191        this.identifier = new ArrayList<Identifier>();
192      this.identifier.add(t);
193      return this;
194    }
195
196    /**
197     * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.)
198     */
199    public Coding getRuleset() { 
200      if (this.ruleset == null)
201        if (Configuration.errorOnAutoCreate())
202          throw new Error("Attempt to auto-create PaymentNotice.ruleset");
203        else if (Configuration.doAutoCreate())
204          this.ruleset = new Coding(); // cc
205      return this.ruleset;
206    }
207
208    public boolean hasRuleset() { 
209      return this.ruleset != null && !this.ruleset.isEmpty();
210    }
211
212    /**
213     * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.)
214     */
215    public PaymentNotice setRuleset(Coding value) { 
216      this.ruleset = value;
217      return this;
218    }
219
220    /**
221     * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.)
222     */
223    public Coding getOriginalRuleset() { 
224      if (this.originalRuleset == null)
225        if (Configuration.errorOnAutoCreate())
226          throw new Error("Attempt to auto-create PaymentNotice.originalRuleset");
227        else if (Configuration.doAutoCreate())
228          this.originalRuleset = new Coding(); // cc
229      return this.originalRuleset;
230    }
231
232    public boolean hasOriginalRuleset() { 
233      return this.originalRuleset != null && !this.originalRuleset.isEmpty();
234    }
235
236    /**
237     * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.)
238     */
239    public PaymentNotice setOriginalRuleset(Coding value) { 
240      this.originalRuleset = value;
241      return this;
242    }
243
244    /**
245     * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
246     */
247    public DateTimeType getCreatedElement() { 
248      if (this.created == null)
249        if (Configuration.errorOnAutoCreate())
250          throw new Error("Attempt to auto-create PaymentNotice.created");
251        else if (Configuration.doAutoCreate())
252          this.created = new DateTimeType(); // bb
253      return this.created;
254    }
255
256    public boolean hasCreatedElement() { 
257      return this.created != null && !this.created.isEmpty();
258    }
259
260    public boolean hasCreated() { 
261      return this.created != null && !this.created.isEmpty();
262    }
263
264    /**
265     * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
266     */
267    public PaymentNotice setCreatedElement(DateTimeType value) { 
268      this.created = value;
269      return this;
270    }
271
272    /**
273     * @return The date when this resource was created.
274     */
275    public Date getCreated() { 
276      return this.created == null ? null : this.created.getValue();
277    }
278
279    /**
280     * @param value The date when this resource was created.
281     */
282    public PaymentNotice setCreated(Date value) { 
283      if (value == null)
284        this.created = null;
285      else {
286        if (this.created == null)
287          this.created = new DateTimeType();
288        this.created.setValue(value);
289      }
290      return this;
291    }
292
293    /**
294     * @return {@link #target} (The Insurer who is target  of the request.)
295     */
296    public Reference getTarget() { 
297      if (this.target == null)
298        if (Configuration.errorOnAutoCreate())
299          throw new Error("Attempt to auto-create PaymentNotice.target");
300        else if (Configuration.doAutoCreate())
301          this.target = new Reference(); // cc
302      return this.target;
303    }
304
305    public boolean hasTarget() { 
306      return this.target != null && !this.target.isEmpty();
307    }
308
309    /**
310     * @param value {@link #target} (The Insurer who is target  of the request.)
311     */
312    public PaymentNotice setTarget(Reference value) { 
313      this.target = value;
314      return this;
315    }
316
317    /**
318     * @return {@link #target} 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 Insurer who is target  of the request.)
319     */
320    public Organization getTargetTarget() { 
321      if (this.targetTarget == null)
322        if (Configuration.errorOnAutoCreate())
323          throw new Error("Attempt to auto-create PaymentNotice.target");
324        else if (Configuration.doAutoCreate())
325          this.targetTarget = new Organization(); // aa
326      return this.targetTarget;
327    }
328
329    /**
330     * @param value {@link #target} 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 Insurer who is target  of the request.)
331     */
332    public PaymentNotice setTargetTarget(Organization value) { 
333      this.targetTarget = value;
334      return this;
335    }
336
337    /**
338     * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.)
339     */
340    public Reference getProvider() { 
341      if (this.provider == null)
342        if (Configuration.errorOnAutoCreate())
343          throw new Error("Attempt to auto-create PaymentNotice.provider");
344        else if (Configuration.doAutoCreate())
345          this.provider = new Reference(); // cc
346      return this.provider;
347    }
348
349    public boolean hasProvider() { 
350      return this.provider != null && !this.provider.isEmpty();
351    }
352
353    /**
354     * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.)
355     */
356    public PaymentNotice setProvider(Reference value) { 
357      this.provider = value;
358      return this;
359    }
360
361    /**
362     * @return {@link #provider} 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 practitioner who is responsible for the services rendered to the patient.)
363     */
364    public Practitioner getProviderTarget() { 
365      if (this.providerTarget == null)
366        if (Configuration.errorOnAutoCreate())
367          throw new Error("Attempt to auto-create PaymentNotice.provider");
368        else if (Configuration.doAutoCreate())
369          this.providerTarget = new Practitioner(); // aa
370      return this.providerTarget;
371    }
372
373    /**
374     * @param value {@link #provider} 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 practitioner who is responsible for the services rendered to the patient.)
375     */
376    public PaymentNotice setProviderTarget(Practitioner value) { 
377      this.providerTarget = value;
378      return this;
379    }
380
381    /**
382     * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.)
383     */
384    public Reference getOrganization() { 
385      if (this.organization == null)
386        if (Configuration.errorOnAutoCreate())
387          throw new Error("Attempt to auto-create PaymentNotice.organization");
388        else if (Configuration.doAutoCreate())
389          this.organization = new Reference(); // cc
390      return this.organization;
391    }
392
393    public boolean hasOrganization() { 
394      return this.organization != null && !this.organization.isEmpty();
395    }
396
397    /**
398     * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.)
399     */
400    public PaymentNotice setOrganization(Reference value) { 
401      this.organization = value;
402      return this;
403    }
404
405    /**
406     * @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 which is responsible for the services rendered to the patient.)
407     */
408    public Organization getOrganizationTarget() { 
409      if (this.organizationTarget == null)
410        if (Configuration.errorOnAutoCreate())
411          throw new Error("Attempt to auto-create PaymentNotice.organization");
412        else if (Configuration.doAutoCreate())
413          this.organizationTarget = new Organization(); // aa
414      return this.organizationTarget;
415    }
416
417    /**
418     * @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 which is responsible for the services rendered to the patient.)
419     */
420    public PaymentNotice setOrganizationTarget(Organization value) { 
421      this.organizationTarget = value;
422      return this;
423    }
424
425    /**
426     * @return {@link #request} (Reference of resource to reverse.)
427     */
428    public Reference getRequest() { 
429      if (this.request == null)
430        if (Configuration.errorOnAutoCreate())
431          throw new Error("Attempt to auto-create PaymentNotice.request");
432        else if (Configuration.doAutoCreate())
433          this.request = new Reference(); // cc
434      return this.request;
435    }
436
437    public boolean hasRequest() { 
438      return this.request != null && !this.request.isEmpty();
439    }
440
441    /**
442     * @param value {@link #request} (Reference of resource to reverse.)
443     */
444    public PaymentNotice setRequest(Reference value) { 
445      this.request = value;
446      return this;
447    }
448
449    /**
450     * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.)
451     */
452    public Resource getRequestTarget() { 
453      return this.requestTarget;
454    }
455
456    /**
457     * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.)
458     */
459    public PaymentNotice setRequestTarget(Resource value) { 
460      this.requestTarget = value;
461      return this;
462    }
463
464    /**
465     * @return {@link #response} (Reference of response to resource to reverse.)
466     */
467    public Reference getResponse() { 
468      if (this.response == null)
469        if (Configuration.errorOnAutoCreate())
470          throw new Error("Attempt to auto-create PaymentNotice.response");
471        else if (Configuration.doAutoCreate())
472          this.response = new Reference(); // cc
473      return this.response;
474    }
475
476    public boolean hasResponse() { 
477      return this.response != null && !this.response.isEmpty();
478    }
479
480    /**
481     * @param value {@link #response} (Reference of response to resource to reverse.)
482     */
483    public PaymentNotice setResponse(Reference value) { 
484      this.response = value;
485      return this;
486    }
487
488    /**
489     * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.)
490     */
491    public Resource getResponseTarget() { 
492      return this.responseTarget;
493    }
494
495    /**
496     * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.)
497     */
498    public PaymentNotice setResponseTarget(Resource value) { 
499      this.responseTarget = value;
500      return this;
501    }
502
503    /**
504     * @return {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.)
505     */
506    public Coding getPaymentStatus() { 
507      if (this.paymentStatus == null)
508        if (Configuration.errorOnAutoCreate())
509          throw new Error("Attempt to auto-create PaymentNotice.paymentStatus");
510        else if (Configuration.doAutoCreate())
511          this.paymentStatus = new Coding(); // cc
512      return this.paymentStatus;
513    }
514
515    public boolean hasPaymentStatus() { 
516      return this.paymentStatus != null && !this.paymentStatus.isEmpty();
517    }
518
519    /**
520     * @param value {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.)
521     */
522    public PaymentNotice setPaymentStatus(Coding value) { 
523      this.paymentStatus = value;
524      return this;
525    }
526
527      protected void listChildren(List<Property> childrenList) {
528        super.listChildren(childrenList);
529        childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier));
530        childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset));
531        childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset));
532        childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created));
533        childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target  of the request.", 0, java.lang.Integer.MAX_VALUE, target));
534        childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider));
535        childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization));
536        childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request));
537        childrenList.add(new Property("response", "Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response));
538        childrenList.add(new Property("paymentStatus", "Coding", "The payment status, typically paid: payment sent, cleared: payment received.", 0, java.lang.Integer.MAX_VALUE, paymentStatus));
539      }
540
541      @Override
542      public void setProperty(String name, Base value) throws FHIRException {
543        if (name.equals("identifier"))
544          this.getIdentifier().add(castToIdentifier(value));
545        else if (name.equals("ruleset"))
546          this.ruleset = castToCoding(value); // Coding
547        else if (name.equals("originalRuleset"))
548          this.originalRuleset = castToCoding(value); // Coding
549        else if (name.equals("created"))
550          this.created = castToDateTime(value); // DateTimeType
551        else if (name.equals("target"))
552          this.target = castToReference(value); // Reference
553        else if (name.equals("provider"))
554          this.provider = castToReference(value); // Reference
555        else if (name.equals("organization"))
556          this.organization = castToReference(value); // Reference
557        else if (name.equals("request"))
558          this.request = castToReference(value); // Reference
559        else if (name.equals("response"))
560          this.response = castToReference(value); // Reference
561        else if (name.equals("paymentStatus"))
562          this.paymentStatus = castToCoding(value); // Coding
563        else
564          super.setProperty(name, value);
565      }
566
567      @Override
568      public Base addChild(String name) throws FHIRException {
569        if (name.equals("identifier")) {
570          return addIdentifier();
571        }
572        else if (name.equals("ruleset")) {
573          this.ruleset = new Coding();
574          return this.ruleset;
575        }
576        else if (name.equals("originalRuleset")) {
577          this.originalRuleset = new Coding();
578          return this.originalRuleset;
579        }
580        else if (name.equals("created")) {
581          throw new FHIRException("Cannot call addChild on a primitive type PaymentNotice.created");
582        }
583        else if (name.equals("target")) {
584          this.target = new Reference();
585          return this.target;
586        }
587        else if (name.equals("provider")) {
588          this.provider = new Reference();
589          return this.provider;
590        }
591        else if (name.equals("organization")) {
592          this.organization = new Reference();
593          return this.organization;
594        }
595        else if (name.equals("request")) {
596          this.request = new Reference();
597          return this.request;
598        }
599        else if (name.equals("response")) {
600          this.response = new Reference();
601          return this.response;
602        }
603        else if (name.equals("paymentStatus")) {
604          this.paymentStatus = new Coding();
605          return this.paymentStatus;
606        }
607        else
608          return super.addChild(name);
609      }
610
611  public String fhirType() {
612    return "PaymentNotice";
613
614  }
615
616      public PaymentNotice copy() {
617        PaymentNotice dst = new PaymentNotice();
618        copyValues(dst);
619        if (identifier != null) {
620          dst.identifier = new ArrayList<Identifier>();
621          for (Identifier i : identifier)
622            dst.identifier.add(i.copy());
623        };
624        dst.ruleset = ruleset == null ? null : ruleset.copy();
625        dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
626        dst.created = created == null ? null : created.copy();
627        dst.target = target == null ? null : target.copy();
628        dst.provider = provider == null ? null : provider.copy();
629        dst.organization = organization == null ? null : organization.copy();
630        dst.request = request == null ? null : request.copy();
631        dst.response = response == null ? null : response.copy();
632        dst.paymentStatus = paymentStatus == null ? null : paymentStatus.copy();
633        return dst;
634      }
635
636      protected PaymentNotice typedCopy() {
637        return copy();
638      }
639
640      @Override
641      public boolean equalsDeep(Base other) {
642        if (!super.equalsDeep(other))
643          return false;
644        if (!(other instanceof PaymentNotice))
645          return false;
646        PaymentNotice o = (PaymentNotice) other;
647        return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true)
648           && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true)
649           && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true)
650           && compareDeep(paymentStatus, o.paymentStatus, true);
651      }
652
653      @Override
654      public boolean equalsShallow(Base other) {
655        if (!super.equalsShallow(other))
656          return false;
657        if (!(other instanceof PaymentNotice))
658          return false;
659        PaymentNotice o = (PaymentNotice) other;
660        return compareValues(created, o.created, true);
661      }
662
663      public boolean isEmpty() {
664        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty())
665           && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty())
666           && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty())
667           && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (paymentStatus == null || paymentStatus.isEmpty())
668          ;
669      }
670
671  @Override
672  public ResourceType getResourceType() {
673    return ResourceType.PaymentNotice;
674   }
675
676  @SearchParamDefinition(name="identifier", path="PaymentNotice.identifier", description="The business identifier of the Eligibility", type="token" )
677  public static final String SP_IDENTIFIER = "identifier";
678
679}
680