001package org.hl7.fhir.r4.model;
002
003
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034
035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
036
037import java.util.*;
038
039import org.hl7.fhir.utilities.Utilities;
040import org.hl7.fhir.r4.model.Enumerations.*;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import ca.uhn.fhir.model.api.annotation.Child;
044import ca.uhn.fhir.model.api.annotation.ChildOrder;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047import org.hl7.fhir.instance.model.api.*;
048import org.hl7.fhir.exceptions.FHIRException;
049/**
050 * This resource provides the details including amount of a payment and allocates the payment items being paid.
051 */
052@ResourceDef(name="PaymentReconciliation", profile="http://hl7.org/fhir/StructureDefinition/PaymentReconciliation")
053public class PaymentReconciliation extends DomainResource {
054
055    public enum PaymentReconciliationStatus {
056        /**
057         * The instance is currently in-force.
058         */
059        ACTIVE, 
060        /**
061         * The instance is withdrawn, rescinded or reversed.
062         */
063        CANCELLED, 
064        /**
065         * A new instance the contents of which is not complete.
066         */
067        DRAFT, 
068        /**
069         * The instance was entered in error.
070         */
071        ENTEREDINERROR, 
072        /**
073         * added to help the parsers with the generic types
074         */
075        NULL;
076        public static PaymentReconciliationStatus fromCode(String codeString) throws FHIRException {
077            if (codeString == null || "".equals(codeString))
078                return null;
079        if ("active".equals(codeString))
080          return ACTIVE;
081        if ("cancelled".equals(codeString))
082          return CANCELLED;
083        if ("draft".equals(codeString))
084          return DRAFT;
085        if ("entered-in-error".equals(codeString))
086          return ENTEREDINERROR;
087        if (Configuration.isAcceptInvalidEnums())
088          return null;
089        else
090          throw new FHIRException("Unknown PaymentReconciliationStatus code '"+codeString+"'");
091        }
092        public String toCode() {
093          switch (this) {
094            case ACTIVE: return "active";
095            case CANCELLED: return "cancelled";
096            case DRAFT: return "draft";
097            case ENTEREDINERROR: return "entered-in-error";
098            default: return "?";
099          }
100        }
101        public String getSystem() {
102          switch (this) {
103            case ACTIVE: return "http://hl7.org/fhir/fm-status";
104            case CANCELLED: return "http://hl7.org/fhir/fm-status";
105            case DRAFT: return "http://hl7.org/fhir/fm-status";
106            case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status";
107            default: return "?";
108          }
109        }
110        public String getDefinition() {
111          switch (this) {
112            case ACTIVE: return "The instance is currently in-force.";
113            case CANCELLED: return "The instance is withdrawn, rescinded or reversed.";
114            case DRAFT: return "A new instance the contents of which is not complete.";
115            case ENTEREDINERROR: return "The instance was entered in error.";
116            default: return "?";
117          }
118        }
119        public String getDisplay() {
120          switch (this) {
121            case ACTIVE: return "Active";
122            case CANCELLED: return "Cancelled";
123            case DRAFT: return "Draft";
124            case ENTEREDINERROR: return "Entered in Error";
125            default: return "?";
126          }
127        }
128    }
129
130  public static class PaymentReconciliationStatusEnumFactory implements EnumFactory<PaymentReconciliationStatus> {
131    public PaymentReconciliationStatus fromCode(String codeString) throws IllegalArgumentException {
132      if (codeString == null || "".equals(codeString))
133            if (codeString == null || "".equals(codeString))
134                return null;
135        if ("active".equals(codeString))
136          return PaymentReconciliationStatus.ACTIVE;
137        if ("cancelled".equals(codeString))
138          return PaymentReconciliationStatus.CANCELLED;
139        if ("draft".equals(codeString))
140          return PaymentReconciliationStatus.DRAFT;
141        if ("entered-in-error".equals(codeString))
142          return PaymentReconciliationStatus.ENTEREDINERROR;
143        throw new IllegalArgumentException("Unknown PaymentReconciliationStatus code '"+codeString+"'");
144        }
145        public Enumeration<PaymentReconciliationStatus> fromType(Base code) throws FHIRException {
146          if (code == null)
147            return null;
148          if (code.isEmpty())
149            return new Enumeration<PaymentReconciliationStatus>(this);
150          String codeString = ((PrimitiveType) code).asStringValue();
151          if (codeString == null || "".equals(codeString))
152            return null;
153        if ("active".equals(codeString))
154          return new Enumeration<PaymentReconciliationStatus>(this, PaymentReconciliationStatus.ACTIVE);
155        if ("cancelled".equals(codeString))
156          return new Enumeration<PaymentReconciliationStatus>(this, PaymentReconciliationStatus.CANCELLED);
157        if ("draft".equals(codeString))
158          return new Enumeration<PaymentReconciliationStatus>(this, PaymentReconciliationStatus.DRAFT);
159        if ("entered-in-error".equals(codeString))
160          return new Enumeration<PaymentReconciliationStatus>(this, PaymentReconciliationStatus.ENTEREDINERROR);
161        throw new FHIRException("Unknown PaymentReconciliationStatus code '"+codeString+"'");
162        }
163    public String toCode(PaymentReconciliationStatus code) {
164      if (code == PaymentReconciliationStatus.ACTIVE)
165        return "active";
166      if (code == PaymentReconciliationStatus.CANCELLED)
167        return "cancelled";
168      if (code == PaymentReconciliationStatus.DRAFT)
169        return "draft";
170      if (code == PaymentReconciliationStatus.ENTEREDINERROR)
171        return "entered-in-error";
172      return "?";
173      }
174    public String toSystem(PaymentReconciliationStatus code) {
175      return code.getSystem();
176      }
177    }
178
179    @Block()
180    public static class DetailsComponent extends BackboneElement implements IBaseBackboneElement {
181        /**
182         * Unique identifier for the current payment item for the referenced payable.
183         */
184        @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false)
185        @Description(shortDefinition="Business identifier of the payment detail", formalDefinition="Unique identifier for the current payment item for the referenced payable." )
186        protected Identifier identifier;
187
188        /**
189         * Unique identifier for the prior payment item for the referenced payable.
190         */
191        @Child(name = "predecessor", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false)
192        @Description(shortDefinition="Business identifier of the prior payment detail", formalDefinition="Unique identifier for the prior payment item for the referenced payable." )
193        protected Identifier predecessor;
194
195        /**
196         * Code to indicate the nature of the payment.
197         */
198        @Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=false)
199        @Description(shortDefinition="Category of payment", formalDefinition="Code to indicate the nature of the payment." )
200        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-type")
201        protected CodeableConcept type;
202
203        /**
204         * A resource, such as a Claim, the evaluation of which could lead to payment.
205         */
206        @Child(name = "request", type = {Reference.class}, order=4, min=0, max=1, modifier=false, summary=false)
207        @Description(shortDefinition="Request giving rise to the payment", formalDefinition="A resource, such as a Claim, the evaluation of which could lead to payment." )
208        protected Reference request;
209
210        /**
211         * The actual object that is the target of the reference (A resource, such as a Claim, the evaluation of which could lead to payment.)
212         */
213        protected Resource requestTarget;
214
215        /**
216         * The party which submitted the claim or financial transaction.
217         */
218        @Child(name = "submitter", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=false)
219        @Description(shortDefinition="Submitter of the request", formalDefinition="The party which submitted the claim or financial transaction." )
220        protected Reference submitter;
221
222        /**
223         * The actual object that is the target of the reference (The party which submitted the claim or financial transaction.)
224         */
225        protected Resource submitterTarget;
226
227        /**
228         * A resource, such as a ClaimResponse, which contains a commitment to payment.
229         */
230        @Child(name = "response", type = {Reference.class}, order=6, min=0, max=1, modifier=false, summary=false)
231        @Description(shortDefinition="Response committing to a payment", formalDefinition="A resource, such as a ClaimResponse, which contains a commitment to payment." )
232        protected Reference response;
233
234        /**
235         * The actual object that is the target of the reference (A resource, such as a ClaimResponse, which contains a commitment to payment.)
236         */
237        protected Resource responseTarget;
238
239        /**
240         * The date from the response resource containing a commitment to pay.
241         */
242        @Child(name = "date", type = {DateType.class}, order=7, min=0, max=1, modifier=false, summary=false)
243        @Description(shortDefinition="Date of commitment to pay", formalDefinition="The date from the response resource containing a commitment to pay." )
244        protected DateType date;
245
246        /**
247         * A reference to the individual who is responsible for inquiries regarding the response and its payment.
248         */
249        @Child(name = "responsible", type = {PractitionerRole.class}, order=8, min=0, max=1, modifier=false, summary=false)
250        @Description(shortDefinition="Contact for the response", formalDefinition="A reference to the individual who is responsible for inquiries regarding the response and its payment." )
251        protected Reference responsible;
252
253        /**
254         * The actual object that is the target of the reference (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
255         */
256        protected PractitionerRole responsibleTarget;
257
258        /**
259         * The party which is receiving the payment.
260         */
261        @Child(name = "payee", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=false)
262        @Description(shortDefinition="Recipient of the payment", formalDefinition="The party which is receiving the payment." )
263        protected Reference payee;
264
265        /**
266         * The actual object that is the target of the reference (The party which is receiving the payment.)
267         */
268        protected Resource payeeTarget;
269
270        /**
271         * The monetary amount allocated from the total payment to the payable.
272         */
273        @Child(name = "amount", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false)
274        @Description(shortDefinition="Amount allocated to this payable", formalDefinition="The monetary amount allocated from the total payment to the payable." )
275        protected Money amount;
276
277        private static final long serialVersionUID = -1361848619L;
278
279    /**
280     * Constructor
281     */
282      public DetailsComponent() {
283        super();
284      }
285
286    /**
287     * Constructor
288     */
289      public DetailsComponent(CodeableConcept type) {
290        super();
291        this.type = type;
292      }
293
294        /**
295         * @return {@link #identifier} (Unique identifier for the current payment item for the referenced payable.)
296         */
297        public Identifier getIdentifier() { 
298          if (this.identifier == null)
299            if (Configuration.errorOnAutoCreate())
300              throw new Error("Attempt to auto-create DetailsComponent.identifier");
301            else if (Configuration.doAutoCreate())
302              this.identifier = new Identifier(); // cc
303          return this.identifier;
304        }
305
306        public boolean hasIdentifier() { 
307          return this.identifier != null && !this.identifier.isEmpty();
308        }
309
310        /**
311         * @param value {@link #identifier} (Unique identifier for the current payment item for the referenced payable.)
312         */
313        public DetailsComponent setIdentifier(Identifier value) { 
314          this.identifier = value;
315          return this;
316        }
317
318        /**
319         * @return {@link #predecessor} (Unique identifier for the prior payment item for the referenced payable.)
320         */
321        public Identifier getPredecessor() { 
322          if (this.predecessor == null)
323            if (Configuration.errorOnAutoCreate())
324              throw new Error("Attempt to auto-create DetailsComponent.predecessor");
325            else if (Configuration.doAutoCreate())
326              this.predecessor = new Identifier(); // cc
327          return this.predecessor;
328        }
329
330        public boolean hasPredecessor() { 
331          return this.predecessor != null && !this.predecessor.isEmpty();
332        }
333
334        /**
335         * @param value {@link #predecessor} (Unique identifier for the prior payment item for the referenced payable.)
336         */
337        public DetailsComponent setPredecessor(Identifier value) { 
338          this.predecessor = value;
339          return this;
340        }
341
342        /**
343         * @return {@link #type} (Code to indicate the nature of the payment.)
344         */
345        public CodeableConcept getType() { 
346          if (this.type == null)
347            if (Configuration.errorOnAutoCreate())
348              throw new Error("Attempt to auto-create DetailsComponent.type");
349            else if (Configuration.doAutoCreate())
350              this.type = new CodeableConcept(); // cc
351          return this.type;
352        }
353
354        public boolean hasType() { 
355          return this.type != null && !this.type.isEmpty();
356        }
357
358        /**
359         * @param value {@link #type} (Code to indicate the nature of the payment.)
360         */
361        public DetailsComponent setType(CodeableConcept value) { 
362          this.type = value;
363          return this;
364        }
365
366        /**
367         * @return {@link #request} (A resource, such as a Claim, the evaluation of which could lead to payment.)
368         */
369        public Reference getRequest() { 
370          if (this.request == null)
371            if (Configuration.errorOnAutoCreate())
372              throw new Error("Attempt to auto-create DetailsComponent.request");
373            else if (Configuration.doAutoCreate())
374              this.request = new Reference(); // cc
375          return this.request;
376        }
377
378        public boolean hasRequest() { 
379          return this.request != null && !this.request.isEmpty();
380        }
381
382        /**
383         * @param value {@link #request} (A resource, such as a Claim, the evaluation of which could lead to payment.)
384         */
385        public DetailsComponent setRequest(Reference value) { 
386          this.request = value;
387          return this;
388        }
389
390        /**
391         * @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. (A resource, such as a Claim, the evaluation of which could lead to payment.)
392         */
393        public Resource getRequestTarget() { 
394          return this.requestTarget;
395        }
396
397        /**
398         * @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. (A resource, such as a Claim, the evaluation of which could lead to payment.)
399         */
400        public DetailsComponent setRequestTarget(Resource value) { 
401          this.requestTarget = value;
402          return this;
403        }
404
405        /**
406         * @return {@link #submitter} (The party which submitted the claim or financial transaction.)
407         */
408        public Reference getSubmitter() { 
409          if (this.submitter == null)
410            if (Configuration.errorOnAutoCreate())
411              throw new Error("Attempt to auto-create DetailsComponent.submitter");
412            else if (Configuration.doAutoCreate())
413              this.submitter = new Reference(); // cc
414          return this.submitter;
415        }
416
417        public boolean hasSubmitter() { 
418          return this.submitter != null && !this.submitter.isEmpty();
419        }
420
421        /**
422         * @param value {@link #submitter} (The party which submitted the claim or financial transaction.)
423         */
424        public DetailsComponent setSubmitter(Reference value) { 
425          this.submitter = value;
426          return this;
427        }
428
429        /**
430         * @return {@link #submitter} 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 party which submitted the claim or financial transaction.)
431         */
432        public Resource getSubmitterTarget() { 
433          return this.submitterTarget;
434        }
435
436        /**
437         * @param value {@link #submitter} 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 party which submitted the claim or financial transaction.)
438         */
439        public DetailsComponent setSubmitterTarget(Resource value) { 
440          this.submitterTarget = value;
441          return this;
442        }
443
444        /**
445         * @return {@link #response} (A resource, such as a ClaimResponse, which contains a commitment to payment.)
446         */
447        public Reference getResponse() { 
448          if (this.response == null)
449            if (Configuration.errorOnAutoCreate())
450              throw new Error("Attempt to auto-create DetailsComponent.response");
451            else if (Configuration.doAutoCreate())
452              this.response = new Reference(); // cc
453          return this.response;
454        }
455
456        public boolean hasResponse() { 
457          return this.response != null && !this.response.isEmpty();
458        }
459
460        /**
461         * @param value {@link #response} (A resource, such as a ClaimResponse, which contains a commitment to payment.)
462         */
463        public DetailsComponent setResponse(Reference value) { 
464          this.response = value;
465          return this;
466        }
467
468        /**
469         * @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. (A resource, such as a ClaimResponse, which contains a commitment to payment.)
470         */
471        public Resource getResponseTarget() { 
472          return this.responseTarget;
473        }
474
475        /**
476         * @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. (A resource, such as a ClaimResponse, which contains a commitment to payment.)
477         */
478        public DetailsComponent setResponseTarget(Resource value) { 
479          this.responseTarget = value;
480          return this;
481        }
482
483        /**
484         * @return {@link #date} (The date from the response resource containing a commitment to pay.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
485         */
486        public DateType getDateElement() { 
487          if (this.date == null)
488            if (Configuration.errorOnAutoCreate())
489              throw new Error("Attempt to auto-create DetailsComponent.date");
490            else if (Configuration.doAutoCreate())
491              this.date = new DateType(); // bb
492          return this.date;
493        }
494
495        public boolean hasDateElement() { 
496          return this.date != null && !this.date.isEmpty();
497        }
498
499        public boolean hasDate() { 
500          return this.date != null && !this.date.isEmpty();
501        }
502
503        /**
504         * @param value {@link #date} (The date from the response resource containing a commitment to pay.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
505         */
506        public DetailsComponent setDateElement(DateType value) { 
507          this.date = value;
508          return this;
509        }
510
511        /**
512         * @return The date from the response resource containing a commitment to pay.
513         */
514        public Date getDate() { 
515          return this.date == null ? null : this.date.getValue();
516        }
517
518        /**
519         * @param value The date from the response resource containing a commitment to pay.
520         */
521        public DetailsComponent setDate(Date value) { 
522          if (value == null)
523            this.date = null;
524          else {
525            if (this.date == null)
526              this.date = new DateType();
527            this.date.setValue(value);
528          }
529          return this;
530        }
531
532        /**
533         * @return {@link #responsible} (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
534         */
535        public Reference getResponsible() { 
536          if (this.responsible == null)
537            if (Configuration.errorOnAutoCreate())
538              throw new Error("Attempt to auto-create DetailsComponent.responsible");
539            else if (Configuration.doAutoCreate())
540              this.responsible = new Reference(); // cc
541          return this.responsible;
542        }
543
544        public boolean hasResponsible() { 
545          return this.responsible != null && !this.responsible.isEmpty();
546        }
547
548        /**
549         * @param value {@link #responsible} (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
550         */
551        public DetailsComponent setResponsible(Reference value) { 
552          this.responsible = value;
553          return this;
554        }
555
556        /**
557         * @return {@link #responsible} 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. (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
558         */
559        public PractitionerRole getResponsibleTarget() { 
560          if (this.responsibleTarget == null)
561            if (Configuration.errorOnAutoCreate())
562              throw new Error("Attempt to auto-create DetailsComponent.responsible");
563            else if (Configuration.doAutoCreate())
564              this.responsibleTarget = new PractitionerRole(); // aa
565          return this.responsibleTarget;
566        }
567
568        /**
569         * @param value {@link #responsible} 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. (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
570         */
571        public DetailsComponent setResponsibleTarget(PractitionerRole value) { 
572          this.responsibleTarget = value;
573          return this;
574        }
575
576        /**
577         * @return {@link #payee} (The party which is receiving the payment.)
578         */
579        public Reference getPayee() { 
580          if (this.payee == null)
581            if (Configuration.errorOnAutoCreate())
582              throw new Error("Attempt to auto-create DetailsComponent.payee");
583            else if (Configuration.doAutoCreate())
584              this.payee = new Reference(); // cc
585          return this.payee;
586        }
587
588        public boolean hasPayee() { 
589          return this.payee != null && !this.payee.isEmpty();
590        }
591
592        /**
593         * @param value {@link #payee} (The party which is receiving the payment.)
594         */
595        public DetailsComponent setPayee(Reference value) { 
596          this.payee = value;
597          return this;
598        }
599
600        /**
601         * @return {@link #payee} 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 party which is receiving the payment.)
602         */
603        public Resource getPayeeTarget() { 
604          return this.payeeTarget;
605        }
606
607        /**
608         * @param value {@link #payee} 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 party which is receiving the payment.)
609         */
610        public DetailsComponent setPayeeTarget(Resource value) { 
611          this.payeeTarget = value;
612          return this;
613        }
614
615        /**
616         * @return {@link #amount} (The monetary amount allocated from the total payment to the payable.)
617         */
618        public Money getAmount() { 
619          if (this.amount == null)
620            if (Configuration.errorOnAutoCreate())
621              throw new Error("Attempt to auto-create DetailsComponent.amount");
622            else if (Configuration.doAutoCreate())
623              this.amount = new Money(); // cc
624          return this.amount;
625        }
626
627        public boolean hasAmount() { 
628          return this.amount != null && !this.amount.isEmpty();
629        }
630
631        /**
632         * @param value {@link #amount} (The monetary amount allocated from the total payment to the payable.)
633         */
634        public DetailsComponent setAmount(Money value) { 
635          this.amount = value;
636          return this;
637        }
638
639        protected void listChildren(List<Property> children) {
640          super.listChildren(children);
641          children.add(new Property("identifier", "Identifier", "Unique identifier for the current payment item for the referenced payable.", 0, 1, identifier));
642          children.add(new Property("predecessor", "Identifier", "Unique identifier for the prior payment item for the referenced payable.", 0, 1, predecessor));
643          children.add(new Property("type", "CodeableConcept", "Code to indicate the nature of the payment.", 0, 1, type));
644          children.add(new Property("request", "Reference(Any)", "A resource, such as a Claim, the evaluation of which could lead to payment.", 0, 1, request));
645          children.add(new Property("submitter", "Reference(Practitioner|PractitionerRole|Organization)", "The party which submitted the claim or financial transaction.", 0, 1, submitter));
646          children.add(new Property("response", "Reference(Any)", "A resource, such as a ClaimResponse, which contains a commitment to payment.", 0, 1, response));
647          children.add(new Property("date", "date", "The date from the response resource containing a commitment to pay.", 0, 1, date));
648          children.add(new Property("responsible", "Reference(PractitionerRole)", "A reference to the individual who is responsible for inquiries regarding the response and its payment.", 0, 1, responsible));
649          children.add(new Property("payee", "Reference(Practitioner|PractitionerRole|Organization)", "The party which is receiving the payment.", 0, 1, payee));
650          children.add(new Property("amount", "Money", "The monetary amount allocated from the total payment to the payable.", 0, 1, amount));
651        }
652
653        @Override
654        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
655          switch (_hash) {
656          case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Unique identifier for the current payment item for the referenced payable.", 0, 1, identifier);
657          case -1925032183: /*predecessor*/  return new Property("predecessor", "Identifier", "Unique identifier for the prior payment item for the referenced payable.", 0, 1, predecessor);
658          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Code to indicate the nature of the payment.", 0, 1, type);
659          case 1095692943: /*request*/  return new Property("request", "Reference(Any)", "A resource, such as a Claim, the evaluation of which could lead to payment.", 0, 1, request);
660          case 348678409: /*submitter*/  return new Property("submitter", "Reference(Practitioner|PractitionerRole|Organization)", "The party which submitted the claim or financial transaction.", 0, 1, submitter);
661          case -340323263: /*response*/  return new Property("response", "Reference(Any)", "A resource, such as a ClaimResponse, which contains a commitment to payment.", 0, 1, response);
662          case 3076014: /*date*/  return new Property("date", "date", "The date from the response resource containing a commitment to pay.", 0, 1, date);
663          case 1847674614: /*responsible*/  return new Property("responsible", "Reference(PractitionerRole)", "A reference to the individual who is responsible for inquiries regarding the response and its payment.", 0, 1, responsible);
664          case 106443592: /*payee*/  return new Property("payee", "Reference(Practitioner|PractitionerRole|Organization)", "The party which is receiving the payment.", 0, 1, payee);
665          case -1413853096: /*amount*/  return new Property("amount", "Money", "The monetary amount allocated from the total payment to the payable.", 0, 1, amount);
666          default: return super.getNamedProperty(_hash, _name, _checkValid);
667          }
668
669        }
670
671      @Override
672      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
673        switch (hash) {
674        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
675        case -1925032183: /*predecessor*/ return this.predecessor == null ? new Base[0] : new Base[] {this.predecessor}; // Identifier
676        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
677        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference
678        case 348678409: /*submitter*/ return this.submitter == null ? new Base[0] : new Base[] {this.submitter}; // Reference
679        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Reference
680        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType
681        case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // Reference
682        case 106443592: /*payee*/ return this.payee == null ? new Base[0] : new Base[] {this.payee}; // Reference
683        case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money
684        default: return super.getProperty(hash, name, checkValid);
685        }
686
687      }
688
689      @Override
690      public Base setProperty(int hash, String name, Base value) throws FHIRException {
691        switch (hash) {
692        case -1618432855: // identifier
693          this.identifier = castToIdentifier(value); // Identifier
694          return value;
695        case -1925032183: // predecessor
696          this.predecessor = castToIdentifier(value); // Identifier
697          return value;
698        case 3575610: // type
699          this.type = castToCodeableConcept(value); // CodeableConcept
700          return value;
701        case 1095692943: // request
702          this.request = castToReference(value); // Reference
703          return value;
704        case 348678409: // submitter
705          this.submitter = castToReference(value); // Reference
706          return value;
707        case -340323263: // response
708          this.response = castToReference(value); // Reference
709          return value;
710        case 3076014: // date
711          this.date = castToDate(value); // DateType
712          return value;
713        case 1847674614: // responsible
714          this.responsible = castToReference(value); // Reference
715          return value;
716        case 106443592: // payee
717          this.payee = castToReference(value); // Reference
718          return value;
719        case -1413853096: // amount
720          this.amount = castToMoney(value); // Money
721          return value;
722        default: return super.setProperty(hash, name, value);
723        }
724
725      }
726
727      @Override
728      public Base setProperty(String name, Base value) throws FHIRException {
729        if (name.equals("identifier")) {
730          this.identifier = castToIdentifier(value); // Identifier
731        } else if (name.equals("predecessor")) {
732          this.predecessor = castToIdentifier(value); // Identifier
733        } else if (name.equals("type")) {
734          this.type = castToCodeableConcept(value); // CodeableConcept
735        } else if (name.equals("request")) {
736          this.request = castToReference(value); // Reference
737        } else if (name.equals("submitter")) {
738          this.submitter = castToReference(value); // Reference
739        } else if (name.equals("response")) {
740          this.response = castToReference(value); // Reference
741        } else if (name.equals("date")) {
742          this.date = castToDate(value); // DateType
743        } else if (name.equals("responsible")) {
744          this.responsible = castToReference(value); // Reference
745        } else if (name.equals("payee")) {
746          this.payee = castToReference(value); // Reference
747        } else if (name.equals("amount")) {
748          this.amount = castToMoney(value); // Money
749        } else
750          return super.setProperty(name, value);
751        return value;
752      }
753
754      @Override
755      public Base makeProperty(int hash, String name) throws FHIRException {
756        switch (hash) {
757        case -1618432855:  return getIdentifier(); 
758        case -1925032183:  return getPredecessor(); 
759        case 3575610:  return getType(); 
760        case 1095692943:  return getRequest(); 
761        case 348678409:  return getSubmitter(); 
762        case -340323263:  return getResponse(); 
763        case 3076014:  return getDateElement();
764        case 1847674614:  return getResponsible(); 
765        case 106443592:  return getPayee(); 
766        case -1413853096:  return getAmount(); 
767        default: return super.makeProperty(hash, name);
768        }
769
770      }
771
772      @Override
773      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
774        switch (hash) {
775        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
776        case -1925032183: /*predecessor*/ return new String[] {"Identifier"};
777        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
778        case 1095692943: /*request*/ return new String[] {"Reference"};
779        case 348678409: /*submitter*/ return new String[] {"Reference"};
780        case -340323263: /*response*/ return new String[] {"Reference"};
781        case 3076014: /*date*/ return new String[] {"date"};
782        case 1847674614: /*responsible*/ return new String[] {"Reference"};
783        case 106443592: /*payee*/ return new String[] {"Reference"};
784        case -1413853096: /*amount*/ return new String[] {"Money"};
785        default: return super.getTypesForProperty(hash, name);
786        }
787
788      }
789
790      @Override
791      public Base addChild(String name) throws FHIRException {
792        if (name.equals("identifier")) {
793          this.identifier = new Identifier();
794          return this.identifier;
795        }
796        else if (name.equals("predecessor")) {
797          this.predecessor = new Identifier();
798          return this.predecessor;
799        }
800        else if (name.equals("type")) {
801          this.type = new CodeableConcept();
802          return this.type;
803        }
804        else if (name.equals("request")) {
805          this.request = new Reference();
806          return this.request;
807        }
808        else if (name.equals("submitter")) {
809          this.submitter = new Reference();
810          return this.submitter;
811        }
812        else if (name.equals("response")) {
813          this.response = new Reference();
814          return this.response;
815        }
816        else if (name.equals("date")) {
817          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.date");
818        }
819        else if (name.equals("responsible")) {
820          this.responsible = new Reference();
821          return this.responsible;
822        }
823        else if (name.equals("payee")) {
824          this.payee = new Reference();
825          return this.payee;
826        }
827        else if (name.equals("amount")) {
828          this.amount = new Money();
829          return this.amount;
830        }
831        else
832          return super.addChild(name);
833      }
834
835      public DetailsComponent copy() {
836        DetailsComponent dst = new DetailsComponent();
837        copyValues(dst);
838        return dst;
839      }
840
841      public void copyValues(DetailsComponent dst) {
842        super.copyValues(dst);
843        dst.identifier = identifier == null ? null : identifier.copy();
844        dst.predecessor = predecessor == null ? null : predecessor.copy();
845        dst.type = type == null ? null : type.copy();
846        dst.request = request == null ? null : request.copy();
847        dst.submitter = submitter == null ? null : submitter.copy();
848        dst.response = response == null ? null : response.copy();
849        dst.date = date == null ? null : date.copy();
850        dst.responsible = responsible == null ? null : responsible.copy();
851        dst.payee = payee == null ? null : payee.copy();
852        dst.amount = amount == null ? null : amount.copy();
853      }
854
855      @Override
856      public boolean equalsDeep(Base other_) {
857        if (!super.equalsDeep(other_))
858          return false;
859        if (!(other_ instanceof DetailsComponent))
860          return false;
861        DetailsComponent o = (DetailsComponent) other_;
862        return compareDeep(identifier, o.identifier, true) && compareDeep(predecessor, o.predecessor, true)
863           && compareDeep(type, o.type, true) && compareDeep(request, o.request, true) && compareDeep(submitter, o.submitter, true)
864           && compareDeep(response, o.response, true) && compareDeep(date, o.date, true) && compareDeep(responsible, o.responsible, true)
865           && compareDeep(payee, o.payee, true) && compareDeep(amount, o.amount, true);
866      }
867
868      @Override
869      public boolean equalsShallow(Base other_) {
870        if (!super.equalsShallow(other_))
871          return false;
872        if (!(other_ instanceof DetailsComponent))
873          return false;
874        DetailsComponent o = (DetailsComponent) other_;
875        return compareValues(date, o.date, true);
876      }
877
878      public boolean isEmpty() {
879        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, predecessor, type
880          , request, submitter, response, date, responsible, payee, amount);
881      }
882
883  public String fhirType() {
884    return "PaymentReconciliation.detail";
885
886  }
887
888  }
889
890    @Block()
891    public static class NotesComponent extends BackboneElement implements IBaseBackboneElement {
892        /**
893         * The business purpose of the note text.
894         */
895        @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
896        @Description(shortDefinition="display | print | printoper", formalDefinition="The business purpose of the note text." )
897        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type")
898        protected Enumeration<NoteType> type;
899
900        /**
901         * The explanation or description associated with the processing.
902         */
903        @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
904        @Description(shortDefinition="Note explanatory text", formalDefinition="The explanation or description associated with the processing." )
905        protected StringType text;
906
907        private static final long serialVersionUID = 529250161L;
908
909    /**
910     * Constructor
911     */
912      public NotesComponent() {
913        super();
914      }
915
916        /**
917         * @return {@link #type} (The business purpose of the note text.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
918         */
919        public Enumeration<NoteType> getTypeElement() { 
920          if (this.type == null)
921            if (Configuration.errorOnAutoCreate())
922              throw new Error("Attempt to auto-create NotesComponent.type");
923            else if (Configuration.doAutoCreate())
924              this.type = new Enumeration<NoteType>(new NoteTypeEnumFactory()); // bb
925          return this.type;
926        }
927
928        public boolean hasTypeElement() { 
929          return this.type != null && !this.type.isEmpty();
930        }
931
932        public boolean hasType() { 
933          return this.type != null && !this.type.isEmpty();
934        }
935
936        /**
937         * @param value {@link #type} (The business purpose of the note text.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
938         */
939        public NotesComponent setTypeElement(Enumeration<NoteType> value) { 
940          this.type = value;
941          return this;
942        }
943
944        /**
945         * @return The business purpose of the note text.
946         */
947        public NoteType getType() { 
948          return this.type == null ? null : this.type.getValue();
949        }
950
951        /**
952         * @param value The business purpose of the note text.
953         */
954        public NotesComponent setType(NoteType value) { 
955          if (value == null)
956            this.type = null;
957          else {
958            if (this.type == null)
959              this.type = new Enumeration<NoteType>(new NoteTypeEnumFactory());
960            this.type.setValue(value);
961          }
962          return this;
963        }
964
965        /**
966         * @return {@link #text} (The explanation or description associated with the processing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
967         */
968        public StringType getTextElement() { 
969          if (this.text == null)
970            if (Configuration.errorOnAutoCreate())
971              throw new Error("Attempt to auto-create NotesComponent.text");
972            else if (Configuration.doAutoCreate())
973              this.text = new StringType(); // bb
974          return this.text;
975        }
976
977        public boolean hasTextElement() { 
978          return this.text != null && !this.text.isEmpty();
979        }
980
981        public boolean hasText() { 
982          return this.text != null && !this.text.isEmpty();
983        }
984
985        /**
986         * @param value {@link #text} (The explanation or description associated with the processing.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
987         */
988        public NotesComponent setTextElement(StringType value) { 
989          this.text = value;
990          return this;
991        }
992
993        /**
994         * @return The explanation or description associated with the processing.
995         */
996        public String getText() { 
997          return this.text == null ? null : this.text.getValue();
998        }
999
1000        /**
1001         * @param value The explanation or description associated with the processing.
1002         */
1003        public NotesComponent setText(String value) { 
1004          if (Utilities.noString(value))
1005            this.text = null;
1006          else {
1007            if (this.text == null)
1008              this.text = new StringType();
1009            this.text.setValue(value);
1010          }
1011          return this;
1012        }
1013
1014        protected void listChildren(List<Property> children) {
1015          super.listChildren(children);
1016          children.add(new Property("type", "code", "The business purpose of the note text.", 0, 1, type));
1017          children.add(new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text));
1018        }
1019
1020        @Override
1021        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1022          switch (_hash) {
1023          case 3575610: /*type*/  return new Property("type", "code", "The business purpose of the note text.", 0, 1, type);
1024          case 3556653: /*text*/  return new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text);
1025          default: return super.getNamedProperty(_hash, _name, _checkValid);
1026          }
1027
1028        }
1029
1030      @Override
1031      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1032        switch (hash) {
1033        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<NoteType>
1034        case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
1035        default: return super.getProperty(hash, name, checkValid);
1036        }
1037
1038      }
1039
1040      @Override
1041      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1042        switch (hash) {
1043        case 3575610: // type
1044          value = new NoteTypeEnumFactory().fromType(castToCode(value));
1045          this.type = (Enumeration) value; // Enumeration<NoteType>
1046          return value;
1047        case 3556653: // text
1048          this.text = castToString(value); // StringType
1049          return value;
1050        default: return super.setProperty(hash, name, value);
1051        }
1052
1053      }
1054
1055      @Override
1056      public Base setProperty(String name, Base value) throws FHIRException {
1057        if (name.equals("type")) {
1058          value = new NoteTypeEnumFactory().fromType(castToCode(value));
1059          this.type = (Enumeration) value; // Enumeration<NoteType>
1060        } else if (name.equals("text")) {
1061          this.text = castToString(value); // StringType
1062        } else
1063          return super.setProperty(name, value);
1064        return value;
1065      }
1066
1067      @Override
1068      public Base makeProperty(int hash, String name) throws FHIRException {
1069        switch (hash) {
1070        case 3575610:  return getTypeElement();
1071        case 3556653:  return getTextElement();
1072        default: return super.makeProperty(hash, name);
1073        }
1074
1075      }
1076
1077      @Override
1078      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1079        switch (hash) {
1080        case 3575610: /*type*/ return new String[] {"code"};
1081        case 3556653: /*text*/ return new String[] {"string"};
1082        default: return super.getTypesForProperty(hash, name);
1083        }
1084
1085      }
1086
1087      @Override
1088      public Base addChild(String name) throws FHIRException {
1089        if (name.equals("type")) {
1090          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.type");
1091        }
1092        else if (name.equals("text")) {
1093          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.text");
1094        }
1095        else
1096          return super.addChild(name);
1097      }
1098
1099      public NotesComponent copy() {
1100        NotesComponent dst = new NotesComponent();
1101        copyValues(dst);
1102        return dst;
1103      }
1104
1105      public void copyValues(NotesComponent dst) {
1106        super.copyValues(dst);
1107        dst.type = type == null ? null : type.copy();
1108        dst.text = text == null ? null : text.copy();
1109      }
1110
1111      @Override
1112      public boolean equalsDeep(Base other_) {
1113        if (!super.equalsDeep(other_))
1114          return false;
1115        if (!(other_ instanceof NotesComponent))
1116          return false;
1117        NotesComponent o = (NotesComponent) other_;
1118        return compareDeep(type, o.type, true) && compareDeep(text, o.text, true);
1119      }
1120
1121      @Override
1122      public boolean equalsShallow(Base other_) {
1123        if (!super.equalsShallow(other_))
1124          return false;
1125        if (!(other_ instanceof NotesComponent))
1126          return false;
1127        NotesComponent o = (NotesComponent) other_;
1128        return compareValues(type, o.type, true) && compareValues(text, o.text, true);
1129      }
1130
1131      public boolean isEmpty() {
1132        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, text);
1133      }
1134
1135  public String fhirType() {
1136    return "PaymentReconciliation.processNote";
1137
1138  }
1139
1140  }
1141
1142    /**
1143     * A unique identifier assigned to this payment reconciliation.
1144     */
1145    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1146    @Description(shortDefinition="Business Identifier for a payment reconciliation", formalDefinition="A unique identifier assigned to this payment reconciliation." )
1147    protected List<Identifier> identifier;
1148
1149    /**
1150     * The status of the resource instance.
1151     */
1152    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
1153    @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." )
1154    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status")
1155    protected Enumeration<PaymentReconciliationStatus> status;
1156
1157    /**
1158     * The period of time for which payments have been gathered into this bulk payment for settlement.
1159     */
1160    @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true)
1161    @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." )
1162    protected Period period;
1163
1164    /**
1165     * The date when the resource was created.
1166     */
1167    @Child(name = "created", type = {DateTimeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1168    @Description(shortDefinition="Creation date", formalDefinition="The date when the resource was created." )
1169    protected DateTimeType created;
1170
1171    /**
1172     * The party who generated the payment.
1173     */
1174    @Child(name = "paymentIssuer", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true)
1175    @Description(shortDefinition="Party generating payment", formalDefinition="The party who generated the payment." )
1176    protected Reference paymentIssuer;
1177
1178    /**
1179     * The actual object that is the target of the reference (The party who generated the payment.)
1180     */
1181    protected Organization paymentIssuerTarget;
1182
1183    /**
1184     * Original request resource reference.
1185     */
1186    @Child(name = "request", type = {Task.class}, order=5, min=0, max=1, modifier=false, summary=false)
1187    @Description(shortDefinition="Reference to requesting resource", formalDefinition="Original request resource reference." )
1188    protected Reference request;
1189
1190    /**
1191     * The actual object that is the target of the reference (Original request resource reference.)
1192     */
1193    protected Task requestTarget;
1194
1195    /**
1196     * The practitioner who is responsible for the services rendered to the patient.
1197     */
1198    @Child(name = "requestor", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=false)
1199    @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." )
1200    protected Reference requestor;
1201
1202    /**
1203     * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.)
1204     */
1205    protected Resource requestorTarget;
1206
1207    /**
1208     * The outcome of a request for a reconciliation.
1209     */
1210    @Child(name = "outcome", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
1211    @Description(shortDefinition="queued | complete | error | partial", formalDefinition="The outcome of a request for a reconciliation." )
1212    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/remittance-outcome")
1213    protected Enumeration<RemittanceOutcome> outcome;
1214
1215    /**
1216     * A human readable description of the status of the request for the reconciliation.
1217     */
1218    @Child(name = "disposition", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
1219    @Description(shortDefinition="Disposition message", formalDefinition="A human readable description of the status of the request for the reconciliation." )
1220    protected StringType disposition;
1221
1222    /**
1223     * The date of payment as indicated on the financial instrument.
1224     */
1225    @Child(name = "paymentDate", type = {DateType.class}, order=9, min=1, max=1, modifier=false, summary=true)
1226    @Description(shortDefinition="When payment issued", formalDefinition="The date of payment as indicated on the financial instrument." )
1227    protected DateType paymentDate;
1228
1229    /**
1230     * Total payment amount as indicated on the financial instrument.
1231     */
1232    @Child(name = "paymentAmount", type = {Money.class}, order=10, min=1, max=1, modifier=false, summary=true)
1233    @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount as indicated on the financial instrument." )
1234    protected Money paymentAmount;
1235
1236    /**
1237     * Issuer's unique identifier for the payment instrument.
1238     */
1239    @Child(name = "paymentIdentifier", type = {Identifier.class}, order=11, min=0, max=1, modifier=false, summary=false)
1240    @Description(shortDefinition="Business identifier for the payment", formalDefinition="Issuer's unique identifier for the payment instrument." )
1241    protected Identifier paymentIdentifier;
1242
1243    /**
1244     * Distribution of the payment amount for a previously acknowledged payable.
1245     */
1246    @Child(name = "detail", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1247    @Description(shortDefinition="Settlement particulars", formalDefinition="Distribution of the payment amount for a previously acknowledged payable." )
1248    protected List<DetailsComponent> detail;
1249
1250    /**
1251     * A code for the form to be used for printing the content.
1252     */
1253    @Child(name = "formCode", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false)
1254    @Description(shortDefinition="Printed form identifier", formalDefinition="A code for the form to be used for printing the content." )
1255    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms")
1256    protected CodeableConcept formCode;
1257
1258    /**
1259     * A note that describes or explains the processing in a human readable form.
1260     */
1261    @Child(name = "processNote", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1262    @Description(shortDefinition="Note concerning processing", formalDefinition="A note that describes or explains the processing in a human readable form." )
1263    protected List<NotesComponent> processNote;
1264
1265    private static final long serialVersionUID = -1620965037L;
1266
1267  /**
1268   * Constructor
1269   */
1270    public PaymentReconciliation() {
1271      super();
1272    }
1273
1274  /**
1275   * Constructor
1276   */
1277    public PaymentReconciliation(Enumeration<PaymentReconciliationStatus> status, DateTimeType created, DateType paymentDate, Money paymentAmount) {
1278      super();
1279      this.status = status;
1280      this.created = created;
1281      this.paymentDate = paymentDate;
1282      this.paymentAmount = paymentAmount;
1283    }
1284
1285    /**
1286     * @return {@link #identifier} (A unique identifier assigned to this payment reconciliation.)
1287     */
1288    public List<Identifier> getIdentifier() { 
1289      if (this.identifier == null)
1290        this.identifier = new ArrayList<Identifier>();
1291      return this.identifier;
1292    }
1293
1294    /**
1295     * @return Returns a reference to <code>this</code> for easy method chaining
1296     */
1297    public PaymentReconciliation setIdentifier(List<Identifier> theIdentifier) { 
1298      this.identifier = theIdentifier;
1299      return this;
1300    }
1301
1302    public boolean hasIdentifier() { 
1303      if (this.identifier == null)
1304        return false;
1305      for (Identifier item : this.identifier)
1306        if (!item.isEmpty())
1307          return true;
1308      return false;
1309    }
1310
1311    public Identifier addIdentifier() { //3
1312      Identifier t = new Identifier();
1313      if (this.identifier == null)
1314        this.identifier = new ArrayList<Identifier>();
1315      this.identifier.add(t);
1316      return t;
1317    }
1318
1319    public PaymentReconciliation addIdentifier(Identifier t) { //3
1320      if (t == null)
1321        return this;
1322      if (this.identifier == null)
1323        this.identifier = new ArrayList<Identifier>();
1324      this.identifier.add(t);
1325      return this;
1326    }
1327
1328    /**
1329     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
1330     */
1331    public Identifier getIdentifierFirstRep() { 
1332      if (getIdentifier().isEmpty()) {
1333        addIdentifier();
1334      }
1335      return getIdentifier().get(0);
1336    }
1337
1338    /**
1339     * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1340     */
1341    public Enumeration<PaymentReconciliationStatus> getStatusElement() { 
1342      if (this.status == null)
1343        if (Configuration.errorOnAutoCreate())
1344          throw new Error("Attempt to auto-create PaymentReconciliation.status");
1345        else if (Configuration.doAutoCreate())
1346          this.status = new Enumeration<PaymentReconciliationStatus>(new PaymentReconciliationStatusEnumFactory()); // bb
1347      return this.status;
1348    }
1349
1350    public boolean hasStatusElement() { 
1351      return this.status != null && !this.status.isEmpty();
1352    }
1353
1354    public boolean hasStatus() { 
1355      return this.status != null && !this.status.isEmpty();
1356    }
1357
1358    /**
1359     * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1360     */
1361    public PaymentReconciliation setStatusElement(Enumeration<PaymentReconciliationStatus> value) { 
1362      this.status = value;
1363      return this;
1364    }
1365
1366    /**
1367     * @return The status of the resource instance.
1368     */
1369    public PaymentReconciliationStatus getStatus() { 
1370      return this.status == null ? null : this.status.getValue();
1371    }
1372
1373    /**
1374     * @param value The status of the resource instance.
1375     */
1376    public PaymentReconciliation setStatus(PaymentReconciliationStatus value) { 
1377        if (this.status == null)
1378          this.status = new Enumeration<PaymentReconciliationStatus>(new PaymentReconciliationStatusEnumFactory());
1379        this.status.setValue(value);
1380      return this;
1381    }
1382
1383    /**
1384     * @return {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.)
1385     */
1386    public Period getPeriod() { 
1387      if (this.period == null)
1388        if (Configuration.errorOnAutoCreate())
1389          throw new Error("Attempt to auto-create PaymentReconciliation.period");
1390        else if (Configuration.doAutoCreate())
1391          this.period = new Period(); // cc
1392      return this.period;
1393    }
1394
1395    public boolean hasPeriod() { 
1396      return this.period != null && !this.period.isEmpty();
1397    }
1398
1399    /**
1400     * @param value {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.)
1401     */
1402    public PaymentReconciliation setPeriod(Period value) { 
1403      this.period = value;
1404      return this;
1405    }
1406
1407    /**
1408     * @return {@link #created} (The date when the resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1409     */
1410    public DateTimeType getCreatedElement() { 
1411      if (this.created == null)
1412        if (Configuration.errorOnAutoCreate())
1413          throw new Error("Attempt to auto-create PaymentReconciliation.created");
1414        else if (Configuration.doAutoCreate())
1415          this.created = new DateTimeType(); // bb
1416      return this.created;
1417    }
1418
1419    public boolean hasCreatedElement() { 
1420      return this.created != null && !this.created.isEmpty();
1421    }
1422
1423    public boolean hasCreated() { 
1424      return this.created != null && !this.created.isEmpty();
1425    }
1426
1427    /**
1428     * @param value {@link #created} (The date when the resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1429     */
1430    public PaymentReconciliation setCreatedElement(DateTimeType value) { 
1431      this.created = value;
1432      return this;
1433    }
1434
1435    /**
1436     * @return The date when the resource was created.
1437     */
1438    public Date getCreated() { 
1439      return this.created == null ? null : this.created.getValue();
1440    }
1441
1442    /**
1443     * @param value The date when the resource was created.
1444     */
1445    public PaymentReconciliation setCreated(Date value) { 
1446        if (this.created == null)
1447          this.created = new DateTimeType();
1448        this.created.setValue(value);
1449      return this;
1450    }
1451
1452    /**
1453     * @return {@link #paymentIssuer} (The party who generated the payment.)
1454     */
1455    public Reference getPaymentIssuer() { 
1456      if (this.paymentIssuer == null)
1457        if (Configuration.errorOnAutoCreate())
1458          throw new Error("Attempt to auto-create PaymentReconciliation.paymentIssuer");
1459        else if (Configuration.doAutoCreate())
1460          this.paymentIssuer = new Reference(); // cc
1461      return this.paymentIssuer;
1462    }
1463
1464    public boolean hasPaymentIssuer() { 
1465      return this.paymentIssuer != null && !this.paymentIssuer.isEmpty();
1466    }
1467
1468    /**
1469     * @param value {@link #paymentIssuer} (The party who generated the payment.)
1470     */
1471    public PaymentReconciliation setPaymentIssuer(Reference value) { 
1472      this.paymentIssuer = value;
1473      return this;
1474    }
1475
1476    /**
1477     * @return {@link #paymentIssuer} 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 party who generated the payment.)
1478     */
1479    public Organization getPaymentIssuerTarget() { 
1480      if (this.paymentIssuerTarget == null)
1481        if (Configuration.errorOnAutoCreate())
1482          throw new Error("Attempt to auto-create PaymentReconciliation.paymentIssuer");
1483        else if (Configuration.doAutoCreate())
1484          this.paymentIssuerTarget = new Organization(); // aa
1485      return this.paymentIssuerTarget;
1486    }
1487
1488    /**
1489     * @param value {@link #paymentIssuer} 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 party who generated the payment.)
1490     */
1491    public PaymentReconciliation setPaymentIssuerTarget(Organization value) { 
1492      this.paymentIssuerTarget = value;
1493      return this;
1494    }
1495
1496    /**
1497     * @return {@link #request} (Original request resource reference.)
1498     */
1499    public Reference getRequest() { 
1500      if (this.request == null)
1501        if (Configuration.errorOnAutoCreate())
1502          throw new Error("Attempt to auto-create PaymentReconciliation.request");
1503        else if (Configuration.doAutoCreate())
1504          this.request = new Reference(); // cc
1505      return this.request;
1506    }
1507
1508    public boolean hasRequest() { 
1509      return this.request != null && !this.request.isEmpty();
1510    }
1511
1512    /**
1513     * @param value {@link #request} (Original request resource reference.)
1514     */
1515    public PaymentReconciliation setRequest(Reference value) { 
1516      this.request = value;
1517      return this;
1518    }
1519
1520    /**
1521     * @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. (Original request resource reference.)
1522     */
1523    public Task getRequestTarget() { 
1524      if (this.requestTarget == null)
1525        if (Configuration.errorOnAutoCreate())
1526          throw new Error("Attempt to auto-create PaymentReconciliation.request");
1527        else if (Configuration.doAutoCreate())
1528          this.requestTarget = new Task(); // aa
1529      return this.requestTarget;
1530    }
1531
1532    /**
1533     * @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. (Original request resource reference.)
1534     */
1535    public PaymentReconciliation setRequestTarget(Task value) { 
1536      this.requestTarget = value;
1537      return this;
1538    }
1539
1540    /**
1541     * @return {@link #requestor} (The practitioner who is responsible for the services rendered to the patient.)
1542     */
1543    public Reference getRequestor() { 
1544      if (this.requestor == null)
1545        if (Configuration.errorOnAutoCreate())
1546          throw new Error("Attempt to auto-create PaymentReconciliation.requestor");
1547        else if (Configuration.doAutoCreate())
1548          this.requestor = new Reference(); // cc
1549      return this.requestor;
1550    }
1551
1552    public boolean hasRequestor() { 
1553      return this.requestor != null && !this.requestor.isEmpty();
1554    }
1555
1556    /**
1557     * @param value {@link #requestor} (The practitioner who is responsible for the services rendered to the patient.)
1558     */
1559    public PaymentReconciliation setRequestor(Reference value) { 
1560      this.requestor = value;
1561      return this;
1562    }
1563
1564    /**
1565     * @return {@link #requestor} 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.)
1566     */
1567    public Resource getRequestorTarget() { 
1568      return this.requestorTarget;
1569    }
1570
1571    /**
1572     * @param value {@link #requestor} 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.)
1573     */
1574    public PaymentReconciliation setRequestorTarget(Resource value) { 
1575      this.requestorTarget = value;
1576      return this;
1577    }
1578
1579    /**
1580     * @return {@link #outcome} (The outcome of a request for a reconciliation.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
1581     */
1582    public Enumeration<RemittanceOutcome> getOutcomeElement() { 
1583      if (this.outcome == null)
1584        if (Configuration.errorOnAutoCreate())
1585          throw new Error("Attempt to auto-create PaymentReconciliation.outcome");
1586        else if (Configuration.doAutoCreate())
1587          this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); // bb
1588      return this.outcome;
1589    }
1590
1591    public boolean hasOutcomeElement() { 
1592      return this.outcome != null && !this.outcome.isEmpty();
1593    }
1594
1595    public boolean hasOutcome() { 
1596      return this.outcome != null && !this.outcome.isEmpty();
1597    }
1598
1599    /**
1600     * @param value {@link #outcome} (The outcome of a request for a reconciliation.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
1601     */
1602    public PaymentReconciliation setOutcomeElement(Enumeration<RemittanceOutcome> value) { 
1603      this.outcome = value;
1604      return this;
1605    }
1606
1607    /**
1608     * @return The outcome of a request for a reconciliation.
1609     */
1610    public RemittanceOutcome getOutcome() { 
1611      return this.outcome == null ? null : this.outcome.getValue();
1612    }
1613
1614    /**
1615     * @param value The outcome of a request for a reconciliation.
1616     */
1617    public PaymentReconciliation setOutcome(RemittanceOutcome value) { 
1618      if (value == null)
1619        this.outcome = null;
1620      else {
1621        if (this.outcome == null)
1622          this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory());
1623        this.outcome.setValue(value);
1624      }
1625      return this;
1626    }
1627
1628    /**
1629     * @return {@link #disposition} (A human readable description of the status of the request for the reconciliation.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1630     */
1631    public StringType getDispositionElement() { 
1632      if (this.disposition == null)
1633        if (Configuration.errorOnAutoCreate())
1634          throw new Error("Attempt to auto-create PaymentReconciliation.disposition");
1635        else if (Configuration.doAutoCreate())
1636          this.disposition = new StringType(); // bb
1637      return this.disposition;
1638    }
1639
1640    public boolean hasDispositionElement() { 
1641      return this.disposition != null && !this.disposition.isEmpty();
1642    }
1643
1644    public boolean hasDisposition() { 
1645      return this.disposition != null && !this.disposition.isEmpty();
1646    }
1647
1648    /**
1649     * @param value {@link #disposition} (A human readable description of the status of the request for the reconciliation.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1650     */
1651    public PaymentReconciliation setDispositionElement(StringType value) { 
1652      this.disposition = value;
1653      return this;
1654    }
1655
1656    /**
1657     * @return A human readable description of the status of the request for the reconciliation.
1658     */
1659    public String getDisposition() { 
1660      return this.disposition == null ? null : this.disposition.getValue();
1661    }
1662
1663    /**
1664     * @param value A human readable description of the status of the request for the reconciliation.
1665     */
1666    public PaymentReconciliation setDisposition(String value) { 
1667      if (Utilities.noString(value))
1668        this.disposition = null;
1669      else {
1670        if (this.disposition == null)
1671          this.disposition = new StringType();
1672        this.disposition.setValue(value);
1673      }
1674      return this;
1675    }
1676
1677    /**
1678     * @return {@link #paymentDate} (The date of payment as indicated on the financial instrument.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value
1679     */
1680    public DateType getPaymentDateElement() { 
1681      if (this.paymentDate == null)
1682        if (Configuration.errorOnAutoCreate())
1683          throw new Error("Attempt to auto-create PaymentReconciliation.paymentDate");
1684        else if (Configuration.doAutoCreate())
1685          this.paymentDate = new DateType(); // bb
1686      return this.paymentDate;
1687    }
1688
1689    public boolean hasPaymentDateElement() { 
1690      return this.paymentDate != null && !this.paymentDate.isEmpty();
1691    }
1692
1693    public boolean hasPaymentDate() { 
1694      return this.paymentDate != null && !this.paymentDate.isEmpty();
1695    }
1696
1697    /**
1698     * @param value {@link #paymentDate} (The date of payment as indicated on the financial instrument.). This is the underlying object with id, value and extensions. The accessor "getPaymentDate" gives direct access to the value
1699     */
1700    public PaymentReconciliation setPaymentDateElement(DateType value) { 
1701      this.paymentDate = value;
1702      return this;
1703    }
1704
1705    /**
1706     * @return The date of payment as indicated on the financial instrument.
1707     */
1708    public Date getPaymentDate() { 
1709      return this.paymentDate == null ? null : this.paymentDate.getValue();
1710    }
1711
1712    /**
1713     * @param value The date of payment as indicated on the financial instrument.
1714     */
1715    public PaymentReconciliation setPaymentDate(Date value) { 
1716        if (this.paymentDate == null)
1717          this.paymentDate = new DateType();
1718        this.paymentDate.setValue(value);
1719      return this;
1720    }
1721
1722    /**
1723     * @return {@link #paymentAmount} (Total payment amount as indicated on the financial instrument.)
1724     */
1725    public Money getPaymentAmount() { 
1726      if (this.paymentAmount == null)
1727        if (Configuration.errorOnAutoCreate())
1728          throw new Error("Attempt to auto-create PaymentReconciliation.paymentAmount");
1729        else if (Configuration.doAutoCreate())
1730          this.paymentAmount = new Money(); // cc
1731      return this.paymentAmount;
1732    }
1733
1734    public boolean hasPaymentAmount() { 
1735      return this.paymentAmount != null && !this.paymentAmount.isEmpty();
1736    }
1737
1738    /**
1739     * @param value {@link #paymentAmount} (Total payment amount as indicated on the financial instrument.)
1740     */
1741    public PaymentReconciliation setPaymentAmount(Money value) { 
1742      this.paymentAmount = value;
1743      return this;
1744    }
1745
1746    /**
1747     * @return {@link #paymentIdentifier} (Issuer's unique identifier for the payment instrument.)
1748     */
1749    public Identifier getPaymentIdentifier() { 
1750      if (this.paymentIdentifier == null)
1751        if (Configuration.errorOnAutoCreate())
1752          throw new Error("Attempt to auto-create PaymentReconciliation.paymentIdentifier");
1753        else if (Configuration.doAutoCreate())
1754          this.paymentIdentifier = new Identifier(); // cc
1755      return this.paymentIdentifier;
1756    }
1757
1758    public boolean hasPaymentIdentifier() { 
1759      return this.paymentIdentifier != null && !this.paymentIdentifier.isEmpty();
1760    }
1761
1762    /**
1763     * @param value {@link #paymentIdentifier} (Issuer's unique identifier for the payment instrument.)
1764     */
1765    public PaymentReconciliation setPaymentIdentifier(Identifier value) { 
1766      this.paymentIdentifier = value;
1767      return this;
1768    }
1769
1770    /**
1771     * @return {@link #detail} (Distribution of the payment amount for a previously acknowledged payable.)
1772     */
1773    public List<DetailsComponent> getDetail() { 
1774      if (this.detail == null)
1775        this.detail = new ArrayList<DetailsComponent>();
1776      return this.detail;
1777    }
1778
1779    /**
1780     * @return Returns a reference to <code>this</code> for easy method chaining
1781     */
1782    public PaymentReconciliation setDetail(List<DetailsComponent> theDetail) { 
1783      this.detail = theDetail;
1784      return this;
1785    }
1786
1787    public boolean hasDetail() { 
1788      if (this.detail == null)
1789        return false;
1790      for (DetailsComponent item : this.detail)
1791        if (!item.isEmpty())
1792          return true;
1793      return false;
1794    }
1795
1796    public DetailsComponent addDetail() { //3
1797      DetailsComponent t = new DetailsComponent();
1798      if (this.detail == null)
1799        this.detail = new ArrayList<DetailsComponent>();
1800      this.detail.add(t);
1801      return t;
1802    }
1803
1804    public PaymentReconciliation addDetail(DetailsComponent t) { //3
1805      if (t == null)
1806        return this;
1807      if (this.detail == null)
1808        this.detail = new ArrayList<DetailsComponent>();
1809      this.detail.add(t);
1810      return this;
1811    }
1812
1813    /**
1814     * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist
1815     */
1816    public DetailsComponent getDetailFirstRep() { 
1817      if (getDetail().isEmpty()) {
1818        addDetail();
1819      }
1820      return getDetail().get(0);
1821    }
1822
1823    /**
1824     * @return {@link #formCode} (A code for the form to be used for printing the content.)
1825     */
1826    public CodeableConcept getFormCode() { 
1827      if (this.formCode == null)
1828        if (Configuration.errorOnAutoCreate())
1829          throw new Error("Attempt to auto-create PaymentReconciliation.formCode");
1830        else if (Configuration.doAutoCreate())
1831          this.formCode = new CodeableConcept(); // cc
1832      return this.formCode;
1833    }
1834
1835    public boolean hasFormCode() { 
1836      return this.formCode != null && !this.formCode.isEmpty();
1837    }
1838
1839    /**
1840     * @param value {@link #formCode} (A code for the form to be used for printing the content.)
1841     */
1842    public PaymentReconciliation setFormCode(CodeableConcept value) { 
1843      this.formCode = value;
1844      return this;
1845    }
1846
1847    /**
1848     * @return {@link #processNote} (A note that describes or explains the processing in a human readable form.)
1849     */
1850    public List<NotesComponent> getProcessNote() { 
1851      if (this.processNote == null)
1852        this.processNote = new ArrayList<NotesComponent>();
1853      return this.processNote;
1854    }
1855
1856    /**
1857     * @return Returns a reference to <code>this</code> for easy method chaining
1858     */
1859    public PaymentReconciliation setProcessNote(List<NotesComponent> theProcessNote) { 
1860      this.processNote = theProcessNote;
1861      return this;
1862    }
1863
1864    public boolean hasProcessNote() { 
1865      if (this.processNote == null)
1866        return false;
1867      for (NotesComponent item : this.processNote)
1868        if (!item.isEmpty())
1869          return true;
1870      return false;
1871    }
1872
1873    public NotesComponent addProcessNote() { //3
1874      NotesComponent t = new NotesComponent();
1875      if (this.processNote == null)
1876        this.processNote = new ArrayList<NotesComponent>();
1877      this.processNote.add(t);
1878      return t;
1879    }
1880
1881    public PaymentReconciliation addProcessNote(NotesComponent t) { //3
1882      if (t == null)
1883        return this;
1884      if (this.processNote == null)
1885        this.processNote = new ArrayList<NotesComponent>();
1886      this.processNote.add(t);
1887      return this;
1888    }
1889
1890    /**
1891     * @return The first repetition of repeating field {@link #processNote}, creating it if it does not already exist
1892     */
1893    public NotesComponent getProcessNoteFirstRep() { 
1894      if (getProcessNote().isEmpty()) {
1895        addProcessNote();
1896      }
1897      return getProcessNote().get(0);
1898    }
1899
1900      protected void listChildren(List<Property> children) {
1901        super.listChildren(children);
1902        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this payment reconciliation.", 0, java.lang.Integer.MAX_VALUE, identifier));
1903        children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status));
1904        children.add(new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, 1, period));
1905        children.add(new Property("created", "dateTime", "The date when the resource was created.", 0, 1, created));
1906        children.add(new Property("paymentIssuer", "Reference(Organization)", "The party who generated the payment.", 0, 1, paymentIssuer));
1907        children.add(new Property("request", "Reference(Task)", "Original request resource reference.", 0, 1, request));
1908        children.add(new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestor));
1909        children.add(new Property("outcome", "code", "The outcome of a request for a reconciliation.", 0, 1, outcome));
1910        children.add(new Property("disposition", "string", "A human readable description of the status of the request for the reconciliation.", 0, 1, disposition));
1911        children.add(new Property("paymentDate", "date", "The date of payment as indicated on the financial instrument.", 0, 1, paymentDate));
1912        children.add(new Property("paymentAmount", "Money", "Total payment amount as indicated on the financial instrument.", 0, 1, paymentAmount));
1913        children.add(new Property("paymentIdentifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, paymentIdentifier));
1914        children.add(new Property("detail", "", "Distribution of the payment amount for a previously acknowledged payable.", 0, java.lang.Integer.MAX_VALUE, detail));
1915        children.add(new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode));
1916        children.add(new Property("processNote", "", "A note that describes or explains the processing in a human readable form.", 0, java.lang.Integer.MAX_VALUE, processNote));
1917      }
1918
1919      @Override
1920      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1921        switch (_hash) {
1922        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this payment reconciliation.", 0, java.lang.Integer.MAX_VALUE, identifier);
1923        case -892481550: /*status*/  return new Property("status", "code", "The status of the resource instance.", 0, 1, status);
1924        case -991726143: /*period*/  return new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, 1, period);
1925        case 1028554472: /*created*/  return new Property("created", "dateTime", "The date when the resource was created.", 0, 1, created);
1926        case 1144026207: /*paymentIssuer*/  return new Property("paymentIssuer", "Reference(Organization)", "The party who generated the payment.", 0, 1, paymentIssuer);
1927        case 1095692943: /*request*/  return new Property("request", "Reference(Task)", "Original request resource reference.", 0, 1, request);
1928        case 693934258: /*requestor*/  return new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestor);
1929        case -1106507950: /*outcome*/  return new Property("outcome", "code", "The outcome of a request for a reconciliation.", 0, 1, outcome);
1930        case 583380919: /*disposition*/  return new Property("disposition", "string", "A human readable description of the status of the request for the reconciliation.", 0, 1, disposition);
1931        case -1540873516: /*paymentDate*/  return new Property("paymentDate", "date", "The date of payment as indicated on the financial instrument.", 0, 1, paymentDate);
1932        case 909332990: /*paymentAmount*/  return new Property("paymentAmount", "Money", "Total payment amount as indicated on the financial instrument.", 0, 1, paymentAmount);
1933        case 1555852111: /*paymentIdentifier*/  return new Property("paymentIdentifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, paymentIdentifier);
1934        case -1335224239: /*detail*/  return new Property("detail", "", "Distribution of the payment amount for a previously acknowledged payable.", 0, java.lang.Integer.MAX_VALUE, detail);
1935        case 473181393: /*formCode*/  return new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode);
1936        case 202339073: /*processNote*/  return new Property("processNote", "", "A note that describes or explains the processing in a human readable form.", 0, java.lang.Integer.MAX_VALUE, processNote);
1937        default: return super.getNamedProperty(_hash, _name, _checkValid);
1938        }
1939
1940      }
1941
1942      @Override
1943      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1944        switch (hash) {
1945        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1946        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PaymentReconciliationStatus>
1947        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1948        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
1949        case 1144026207: /*paymentIssuer*/ return this.paymentIssuer == null ? new Base[0] : new Base[] {this.paymentIssuer}; // Reference
1950        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference
1951        case 693934258: /*requestor*/ return this.requestor == null ? new Base[0] : new Base[] {this.requestor}; // Reference
1952        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<RemittanceOutcome>
1953        case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
1954        case -1540873516: /*paymentDate*/ return this.paymentDate == null ? new Base[0] : new Base[] {this.paymentDate}; // DateType
1955        case 909332990: /*paymentAmount*/ return this.paymentAmount == null ? new Base[0] : new Base[] {this.paymentAmount}; // Money
1956        case 1555852111: /*paymentIdentifier*/ return this.paymentIdentifier == null ? new Base[0] : new Base[] {this.paymentIdentifier}; // Identifier
1957        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // DetailsComponent
1958        case 473181393: /*formCode*/ return this.formCode == null ? new Base[0] : new Base[] {this.formCode}; // CodeableConcept
1959        case 202339073: /*processNote*/ return this.processNote == null ? new Base[0] : this.processNote.toArray(new Base[this.processNote.size()]); // NotesComponent
1960        default: return super.getProperty(hash, name, checkValid);
1961        }
1962
1963      }
1964
1965      @Override
1966      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1967        switch (hash) {
1968        case -1618432855: // identifier
1969          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1970          return value;
1971        case -892481550: // status
1972          value = new PaymentReconciliationStatusEnumFactory().fromType(castToCode(value));
1973          this.status = (Enumeration) value; // Enumeration<PaymentReconciliationStatus>
1974          return value;
1975        case -991726143: // period
1976          this.period = castToPeriod(value); // Period
1977          return value;
1978        case 1028554472: // created
1979          this.created = castToDateTime(value); // DateTimeType
1980          return value;
1981        case 1144026207: // paymentIssuer
1982          this.paymentIssuer = castToReference(value); // Reference
1983          return value;
1984        case 1095692943: // request
1985          this.request = castToReference(value); // Reference
1986          return value;
1987        case 693934258: // requestor
1988          this.requestor = castToReference(value); // Reference
1989          return value;
1990        case -1106507950: // outcome
1991          value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value));
1992          this.outcome = (Enumeration) value; // Enumeration<RemittanceOutcome>
1993          return value;
1994        case 583380919: // disposition
1995          this.disposition = castToString(value); // StringType
1996          return value;
1997        case -1540873516: // paymentDate
1998          this.paymentDate = castToDate(value); // DateType
1999          return value;
2000        case 909332990: // paymentAmount
2001          this.paymentAmount = castToMoney(value); // Money
2002          return value;
2003        case 1555852111: // paymentIdentifier
2004          this.paymentIdentifier = castToIdentifier(value); // Identifier
2005          return value;
2006        case -1335224239: // detail
2007          this.getDetail().add((DetailsComponent) value); // DetailsComponent
2008          return value;
2009        case 473181393: // formCode
2010          this.formCode = castToCodeableConcept(value); // CodeableConcept
2011          return value;
2012        case 202339073: // processNote
2013          this.getProcessNote().add((NotesComponent) value); // NotesComponent
2014          return value;
2015        default: return super.setProperty(hash, name, value);
2016        }
2017
2018      }
2019
2020      @Override
2021      public Base setProperty(String name, Base value) throws FHIRException {
2022        if (name.equals("identifier")) {
2023          this.getIdentifier().add(castToIdentifier(value));
2024        } else if (name.equals("status")) {
2025          value = new PaymentReconciliationStatusEnumFactory().fromType(castToCode(value));
2026          this.status = (Enumeration) value; // Enumeration<PaymentReconciliationStatus>
2027        } else if (name.equals("period")) {
2028          this.period = castToPeriod(value); // Period
2029        } else if (name.equals("created")) {
2030          this.created = castToDateTime(value); // DateTimeType
2031        } else if (name.equals("paymentIssuer")) {
2032          this.paymentIssuer = castToReference(value); // Reference
2033        } else if (name.equals("request")) {
2034          this.request = castToReference(value); // Reference
2035        } else if (name.equals("requestor")) {
2036          this.requestor = castToReference(value); // Reference
2037        } else if (name.equals("outcome")) {
2038          value = new RemittanceOutcomeEnumFactory().fromType(castToCode(value));
2039          this.outcome = (Enumeration) value; // Enumeration<RemittanceOutcome>
2040        } else if (name.equals("disposition")) {
2041          this.disposition = castToString(value); // StringType
2042        } else if (name.equals("paymentDate")) {
2043          this.paymentDate = castToDate(value); // DateType
2044        } else if (name.equals("paymentAmount")) {
2045          this.paymentAmount = castToMoney(value); // Money
2046        } else if (name.equals("paymentIdentifier")) {
2047          this.paymentIdentifier = castToIdentifier(value); // Identifier
2048        } else if (name.equals("detail")) {
2049          this.getDetail().add((DetailsComponent) value);
2050        } else if (name.equals("formCode")) {
2051          this.formCode = castToCodeableConcept(value); // CodeableConcept
2052        } else if (name.equals("processNote")) {
2053          this.getProcessNote().add((NotesComponent) value);
2054        } else
2055          return super.setProperty(name, value);
2056        return value;
2057      }
2058
2059      @Override
2060      public Base makeProperty(int hash, String name) throws FHIRException {
2061        switch (hash) {
2062        case -1618432855:  return addIdentifier(); 
2063        case -892481550:  return getStatusElement();
2064        case -991726143:  return getPeriod(); 
2065        case 1028554472:  return getCreatedElement();
2066        case 1144026207:  return getPaymentIssuer(); 
2067        case 1095692943:  return getRequest(); 
2068        case 693934258:  return getRequestor(); 
2069        case -1106507950:  return getOutcomeElement();
2070        case 583380919:  return getDispositionElement();
2071        case -1540873516:  return getPaymentDateElement();
2072        case 909332990:  return getPaymentAmount(); 
2073        case 1555852111:  return getPaymentIdentifier(); 
2074        case -1335224239:  return addDetail(); 
2075        case 473181393:  return getFormCode(); 
2076        case 202339073:  return addProcessNote(); 
2077        default: return super.makeProperty(hash, name);
2078        }
2079
2080      }
2081
2082      @Override
2083      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2084        switch (hash) {
2085        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2086        case -892481550: /*status*/ return new String[] {"code"};
2087        case -991726143: /*period*/ return new String[] {"Period"};
2088        case 1028554472: /*created*/ return new String[] {"dateTime"};
2089        case 1144026207: /*paymentIssuer*/ return new String[] {"Reference"};
2090        case 1095692943: /*request*/ return new String[] {"Reference"};
2091        case 693934258: /*requestor*/ return new String[] {"Reference"};
2092        case -1106507950: /*outcome*/ return new String[] {"code"};
2093        case 583380919: /*disposition*/ return new String[] {"string"};
2094        case -1540873516: /*paymentDate*/ return new String[] {"date"};
2095        case 909332990: /*paymentAmount*/ return new String[] {"Money"};
2096        case 1555852111: /*paymentIdentifier*/ return new String[] {"Identifier"};
2097        case -1335224239: /*detail*/ return new String[] {};
2098        case 473181393: /*formCode*/ return new String[] {"CodeableConcept"};
2099        case 202339073: /*processNote*/ return new String[] {};
2100        default: return super.getTypesForProperty(hash, name);
2101        }
2102
2103      }
2104
2105      @Override
2106      public Base addChild(String name) throws FHIRException {
2107        if (name.equals("identifier")) {
2108          return addIdentifier();
2109        }
2110        else if (name.equals("status")) {
2111          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.status");
2112        }
2113        else if (name.equals("period")) {
2114          this.period = new Period();
2115          return this.period;
2116        }
2117        else if (name.equals("created")) {
2118          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.created");
2119        }
2120        else if (name.equals("paymentIssuer")) {
2121          this.paymentIssuer = new Reference();
2122          return this.paymentIssuer;
2123        }
2124        else if (name.equals("request")) {
2125          this.request = new Reference();
2126          return this.request;
2127        }
2128        else if (name.equals("requestor")) {
2129          this.requestor = new Reference();
2130          return this.requestor;
2131        }
2132        else if (name.equals("outcome")) {
2133          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome");
2134        }
2135        else if (name.equals("disposition")) {
2136          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition");
2137        }
2138        else if (name.equals("paymentDate")) {
2139          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.paymentDate");
2140        }
2141        else if (name.equals("paymentAmount")) {
2142          this.paymentAmount = new Money();
2143          return this.paymentAmount;
2144        }
2145        else if (name.equals("paymentIdentifier")) {
2146          this.paymentIdentifier = new Identifier();
2147          return this.paymentIdentifier;
2148        }
2149        else if (name.equals("detail")) {
2150          return addDetail();
2151        }
2152        else if (name.equals("formCode")) {
2153          this.formCode = new CodeableConcept();
2154          return this.formCode;
2155        }
2156        else if (name.equals("processNote")) {
2157          return addProcessNote();
2158        }
2159        else
2160          return super.addChild(name);
2161      }
2162
2163  public String fhirType() {
2164    return "PaymentReconciliation";
2165
2166  }
2167
2168      public PaymentReconciliation copy() {
2169        PaymentReconciliation dst = new PaymentReconciliation();
2170        copyValues(dst);
2171        return dst;
2172      }
2173
2174      public void copyValues(PaymentReconciliation dst) {
2175        super.copyValues(dst);
2176        if (identifier != null) {
2177          dst.identifier = new ArrayList<Identifier>();
2178          for (Identifier i : identifier)
2179            dst.identifier.add(i.copy());
2180        };
2181        dst.status = status == null ? null : status.copy();
2182        dst.period = period == null ? null : period.copy();
2183        dst.created = created == null ? null : created.copy();
2184        dst.paymentIssuer = paymentIssuer == null ? null : paymentIssuer.copy();
2185        dst.request = request == null ? null : request.copy();
2186        dst.requestor = requestor == null ? null : requestor.copy();
2187        dst.outcome = outcome == null ? null : outcome.copy();
2188        dst.disposition = disposition == null ? null : disposition.copy();
2189        dst.paymentDate = paymentDate == null ? null : paymentDate.copy();
2190        dst.paymentAmount = paymentAmount == null ? null : paymentAmount.copy();
2191        dst.paymentIdentifier = paymentIdentifier == null ? null : paymentIdentifier.copy();
2192        if (detail != null) {
2193          dst.detail = new ArrayList<DetailsComponent>();
2194          for (DetailsComponent i : detail)
2195            dst.detail.add(i.copy());
2196        };
2197        dst.formCode = formCode == null ? null : formCode.copy();
2198        if (processNote != null) {
2199          dst.processNote = new ArrayList<NotesComponent>();
2200          for (NotesComponent i : processNote)
2201            dst.processNote.add(i.copy());
2202        };
2203      }
2204
2205      protected PaymentReconciliation typedCopy() {
2206        return copy();
2207      }
2208
2209      @Override
2210      public boolean equalsDeep(Base other_) {
2211        if (!super.equalsDeep(other_))
2212          return false;
2213        if (!(other_ instanceof PaymentReconciliation))
2214          return false;
2215        PaymentReconciliation o = (PaymentReconciliation) other_;
2216        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(period, o.period, true)
2217           && compareDeep(created, o.created, true) && compareDeep(paymentIssuer, o.paymentIssuer, true) && compareDeep(request, o.request, true)
2218           && compareDeep(requestor, o.requestor, true) && compareDeep(outcome, o.outcome, true) && compareDeep(disposition, o.disposition, true)
2219           && compareDeep(paymentDate, o.paymentDate, true) && compareDeep(paymentAmount, o.paymentAmount, true)
2220           && compareDeep(paymentIdentifier, o.paymentIdentifier, true) && compareDeep(detail, o.detail, true)
2221           && compareDeep(formCode, o.formCode, true) && compareDeep(processNote, o.processNote, true);
2222      }
2223
2224      @Override
2225      public boolean equalsShallow(Base other_) {
2226        if (!super.equalsShallow(other_))
2227          return false;
2228        if (!(other_ instanceof PaymentReconciliation))
2229          return false;
2230        PaymentReconciliation o = (PaymentReconciliation) other_;
2231        return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true)
2232           && compareValues(disposition, o.disposition, true) && compareValues(paymentDate, o.paymentDate, true)
2233          ;
2234      }
2235
2236      public boolean isEmpty() {
2237        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, period
2238          , created, paymentIssuer, request, requestor, outcome, disposition, paymentDate
2239          , paymentAmount, paymentIdentifier, detail, formCode, processNote);
2240      }
2241
2242  @Override
2243  public ResourceType getResourceType() {
2244    return ResourceType.PaymentReconciliation;
2245   }
2246
2247 /**
2248   * Search parameter: <b>identifier</b>
2249   * <p>
2250   * Description: <b>The business identifier of the ExplanationOfBenefit</b><br>
2251   * Type: <b>token</b><br>
2252   * Path: <b>PaymentReconciliation.identifier</b><br>
2253   * </p>
2254   */
2255  @SearchParamDefinition(name="identifier", path="PaymentReconciliation.identifier", description="The business identifier of the ExplanationOfBenefit", type="token" )
2256  public static final String SP_IDENTIFIER = "identifier";
2257 /**
2258   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2259   * <p>
2260   * Description: <b>The business identifier of the ExplanationOfBenefit</b><br>
2261   * Type: <b>token</b><br>
2262   * Path: <b>PaymentReconciliation.identifier</b><br>
2263   * </p>
2264   */
2265  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2266
2267 /**
2268   * Search parameter: <b>request</b>
2269   * <p>
2270   * Description: <b>The reference to the claim</b><br>
2271   * Type: <b>reference</b><br>
2272   * Path: <b>PaymentReconciliation.request</b><br>
2273   * </p>
2274   */
2275  @SearchParamDefinition(name="request", path="PaymentReconciliation.request", description="The reference to the claim", type="reference", target={Task.class } )
2276  public static final String SP_REQUEST = "request";
2277 /**
2278   * <b>Fluent Client</b> search parameter constant for <b>request</b>
2279   * <p>
2280   * Description: <b>The reference to the claim</b><br>
2281   * Type: <b>reference</b><br>
2282   * Path: <b>PaymentReconciliation.request</b><br>
2283   * </p>
2284   */
2285  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST);
2286
2287/**
2288   * Constant for fluent queries to be used to add include statements. Specifies
2289   * the path value of "<b>PaymentReconciliation:request</b>".
2290   */
2291  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:request").toLocked();
2292
2293 /**
2294   * Search parameter: <b>disposition</b>
2295   * <p>
2296   * Description: <b>The contents of the disposition message</b><br>
2297   * Type: <b>string</b><br>
2298   * Path: <b>PaymentReconciliation.disposition</b><br>
2299   * </p>
2300   */
2301  @SearchParamDefinition(name="disposition", path="PaymentReconciliation.disposition", description="The contents of the disposition message", type="string" )
2302  public static final String SP_DISPOSITION = "disposition";
2303 /**
2304   * <b>Fluent Client</b> search parameter constant for <b>disposition</b>
2305   * <p>
2306   * Description: <b>The contents of the disposition message</b><br>
2307   * Type: <b>string</b><br>
2308   * Path: <b>PaymentReconciliation.disposition</b><br>
2309   * </p>
2310   */
2311  public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION);
2312
2313 /**
2314   * Search parameter: <b>created</b>
2315   * <p>
2316   * Description: <b>The creation date</b><br>
2317   * Type: <b>date</b><br>
2318   * Path: <b>PaymentReconciliation.created</b><br>
2319   * </p>
2320   */
2321  @SearchParamDefinition(name="created", path="PaymentReconciliation.created", description="The creation date", type="date" )
2322  public static final String SP_CREATED = "created";
2323 /**
2324   * <b>Fluent Client</b> search parameter constant for <b>created</b>
2325   * <p>
2326   * Description: <b>The creation date</b><br>
2327   * Type: <b>date</b><br>
2328   * Path: <b>PaymentReconciliation.created</b><br>
2329   * </p>
2330   */
2331  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
2332
2333 /**
2334   * Search parameter: <b>payment-issuer</b>
2335   * <p>
2336   * Description: <b>The organization which generated this resource</b><br>
2337   * Type: <b>reference</b><br>
2338   * Path: <b>PaymentReconciliation.paymentIssuer</b><br>
2339   * </p>
2340   */
2341  @SearchParamDefinition(name="payment-issuer", path="PaymentReconciliation.paymentIssuer", description="The organization which generated this resource", type="reference", target={Organization.class } )
2342  public static final String SP_PAYMENT_ISSUER = "payment-issuer";
2343 /**
2344   * <b>Fluent Client</b> search parameter constant for <b>payment-issuer</b>
2345   * <p>
2346   * Description: <b>The organization which generated this resource</b><br>
2347   * Type: <b>reference</b><br>
2348   * Path: <b>PaymentReconciliation.paymentIssuer</b><br>
2349   * </p>
2350   */
2351  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PAYMENT_ISSUER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PAYMENT_ISSUER);
2352
2353/**
2354   * Constant for fluent queries to be used to add include statements. Specifies
2355   * the path value of "<b>PaymentReconciliation:payment-issuer</b>".
2356   */
2357  public static final ca.uhn.fhir.model.api.Include INCLUDE_PAYMENT_ISSUER = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:payment-issuer").toLocked();
2358
2359 /**
2360   * Search parameter: <b>outcome</b>
2361   * <p>
2362   * Description: <b>The processing outcome</b><br>
2363   * Type: <b>token</b><br>
2364   * Path: <b>PaymentReconciliation.outcome</b><br>
2365   * </p>
2366   */
2367  @SearchParamDefinition(name="outcome", path="PaymentReconciliation.outcome", description="The processing outcome", type="token" )
2368  public static final String SP_OUTCOME = "outcome";
2369 /**
2370   * <b>Fluent Client</b> search parameter constant for <b>outcome</b>
2371   * <p>
2372   * Description: <b>The processing outcome</b><br>
2373   * Type: <b>token</b><br>
2374   * Path: <b>PaymentReconciliation.outcome</b><br>
2375   * </p>
2376   */
2377  public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME);
2378
2379 /**
2380   * Search parameter: <b>requestor</b>
2381   * <p>
2382   * Description: <b>The reference to the provider who submitted the claim</b><br>
2383   * Type: <b>reference</b><br>
2384   * Path: <b>PaymentReconciliation.requestor</b><br>
2385   * </p>
2386   */
2387  @SearchParamDefinition(name="requestor", path="PaymentReconciliation.requestor", description="The reference to the provider who submitted the claim", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } )
2388  public static final String SP_REQUESTOR = "requestor";
2389 /**
2390   * <b>Fluent Client</b> search parameter constant for <b>requestor</b>
2391   * <p>
2392   * Description: <b>The reference to the provider who submitted the claim</b><br>
2393   * Type: <b>reference</b><br>
2394   * Path: <b>PaymentReconciliation.requestor</b><br>
2395   * </p>
2396   */
2397  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTOR);
2398
2399/**
2400   * Constant for fluent queries to be used to add include statements. Specifies
2401   * the path value of "<b>PaymentReconciliation:requestor</b>".
2402   */
2403  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTOR = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestor").toLocked();
2404
2405 /**
2406   * Search parameter: <b>status</b>
2407   * <p>
2408   * Description: <b>The status of the payment reconciliation</b><br>
2409   * Type: <b>token</b><br>
2410   * Path: <b>PaymentReconciliation.status</b><br>
2411   * </p>
2412   */
2413  @SearchParamDefinition(name="status", path="PaymentReconciliation.status", description="The status of the payment reconciliation", type="token" )
2414  public static final String SP_STATUS = "status";
2415 /**
2416   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2417   * <p>
2418   * Description: <b>The status of the payment reconciliation</b><br>
2419   * Type: <b>token</b><br>
2420   * Path: <b>PaymentReconciliation.status</b><br>
2421   * </p>
2422   */
2423  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2424
2425
2426}