001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Tue, Dec 13, 2022 17:53+1100 for FHIR vcurrent
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * This resource provides the details including amount of a payment and allocates the payment items being paid.
052 */
053@ResourceDef(name="PaymentReconciliation", profile="http://hl7.org/fhir/StructureDefinition/PaymentReconciliation")
054public class PaymentReconciliation extends DomainResource {
055
056    public enum PaymentOutcome {
057        /**
058         * The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.
059         */
060        QUEUED, 
061        /**
062         * The processing has completed without errors
063         */
064        COMPLETE, 
065        /**
066         * One or more errors have been detected in the Claim
067         */
068        ERROR, 
069        /**
070         * No errors have been detected in the Claim and some of the adjudication has been performed.
071         */
072        PARTIAL, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static PaymentOutcome fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("queued".equals(codeString))
081          return QUEUED;
082        if ("complete".equals(codeString))
083          return COMPLETE;
084        if ("error".equals(codeString))
085          return ERROR;
086        if ("partial".equals(codeString))
087          return PARTIAL;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown PaymentOutcome code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case QUEUED: return "queued";
096            case COMPLETE: return "complete";
097            case ERROR: return "error";
098            case PARTIAL: return "partial";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case QUEUED: return "http://hl7.org/fhir/payment-outcome";
106            case COMPLETE: return "http://hl7.org/fhir/payment-outcome";
107            case ERROR: return "http://hl7.org/fhir/payment-outcome";
108            case PARTIAL: return "http://hl7.org/fhir/payment-outcome";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case QUEUED: return "The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.";
116            case COMPLETE: return "The processing has completed without errors";
117            case ERROR: return "One or more errors have been detected in the Claim";
118            case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case QUEUED: return "Queued";
126            case COMPLETE: return "Processing Complete";
127            case ERROR: return "Error";
128            case PARTIAL: return "Partial Processing";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class PaymentOutcomeEnumFactory implements EnumFactory<PaymentOutcome> {
136    public PaymentOutcome fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("queued".equals(codeString))
141          return PaymentOutcome.QUEUED;
142        if ("complete".equals(codeString))
143          return PaymentOutcome.COMPLETE;
144        if ("error".equals(codeString))
145          return PaymentOutcome.ERROR;
146        if ("partial".equals(codeString))
147          return PaymentOutcome.PARTIAL;
148        throw new IllegalArgumentException("Unknown PaymentOutcome code '"+codeString+"'");
149        }
150        public Enumeration<PaymentOutcome> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<PaymentOutcome>(this, PaymentOutcome.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<PaymentOutcome>(this, PaymentOutcome.NULL, code);
158        if ("queued".equals(codeString))
159          return new Enumeration<PaymentOutcome>(this, PaymentOutcome.QUEUED, code);
160        if ("complete".equals(codeString))
161          return new Enumeration<PaymentOutcome>(this, PaymentOutcome.COMPLETE, code);
162        if ("error".equals(codeString))
163          return new Enumeration<PaymentOutcome>(this, PaymentOutcome.ERROR, code);
164        if ("partial".equals(codeString))
165          return new Enumeration<PaymentOutcome>(this, PaymentOutcome.PARTIAL, code);
166        throw new FHIRException("Unknown PaymentOutcome code '"+codeString+"'");
167        }
168    public String toCode(PaymentOutcome code) {
169      if (code == PaymentOutcome.QUEUED)
170        return "queued";
171      if (code == PaymentOutcome.COMPLETE)
172        return "complete";
173      if (code == PaymentOutcome.ERROR)
174        return "error";
175      if (code == PaymentOutcome.PARTIAL)
176        return "partial";
177      return "?";
178      }
179    public String toSystem(PaymentOutcome code) {
180      return code.getSystem();
181      }
182    }
183
184    @Block()
185    public static class PaymentReconciliationAllocationComponent extends BackboneElement implements IBaseBackboneElement {
186        /**
187         * Unique identifier for the current payment item for the referenced payable.
188         */
189        @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false)
190        @Description(shortDefinition="Business identifier of the payment detail", formalDefinition="Unique identifier for the current payment item for the referenced payable." )
191        protected Identifier identifier;
192
193        /**
194         * Unique identifier for the prior payment item for the referenced payable.
195         */
196        @Child(name = "predecessor", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false)
197        @Description(shortDefinition="Business identifier of the prior payment detail", formalDefinition="Unique identifier for the prior payment item for the referenced payable." )
198        protected Identifier predecessor;
199
200        /**
201         * Specific resource to which the payment/adjustment/advance applies.
202         */
203        @Child(name = "target", type = {Claim.class, Account.class, Invoice.class, ChargeItem.class, Encounter.class, Contract.class}, order=3, min=0, max=1, modifier=false, summary=false)
204        @Description(shortDefinition="Subject of the payment", formalDefinition="Specific resource to which the payment/adjustment/advance applies." )
205        protected Reference target;
206
207        /**
208         *  Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.
209         */
210        @Child(name = "targetItem", type = {StringType.class, Identifier.class, PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=false)
211        @Description(shortDefinition="Sub-element of the subject", formalDefinition=" Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred." )
212        protected DataType targetItem;
213
214        /**
215         * The Encounter to which this payment applies, may be completed by the receiver, used for search.
216         */
217        @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=false)
218        @Description(shortDefinition="Applied-to encounter", formalDefinition="The Encounter to which this payment applies, may be completed by the receiver, used for search." )
219        protected Reference encounter;
220
221        /**
222         * The Account to which this payment applies, may be completed by the receiver, used for search.
223         */
224        @Child(name = "account", type = {Account.class}, order=6, min=0, max=1, modifier=false, summary=false)
225        @Description(shortDefinition="Applied-to account", formalDefinition="The Account to which this payment applies, may be completed by the receiver, used for search." )
226        protected Reference account;
227
228        /**
229         * Code to indicate the nature of the payment.
230         */
231        @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false)
232        @Description(shortDefinition="Category of payment", formalDefinition="Code to indicate the nature of the payment." )
233        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-type")
234        protected CodeableConcept type;
235
236        /**
237         * The party which submitted the claim or financial transaction.
238         */
239        @Child(name = "submitter", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=false)
240        @Description(shortDefinition="Submitter of the request", formalDefinition="The party which submitted the claim or financial transaction." )
241        protected Reference submitter;
242
243        /**
244         * A resource, such as a ClaimResponse, which contains a commitment to payment.
245         */
246        @Child(name = "response", type = {ClaimResponse.class}, order=9, min=0, max=1, modifier=false, summary=false)
247        @Description(shortDefinition="Response committing to a payment", formalDefinition="A resource, such as a ClaimResponse, which contains a commitment to payment." )
248        protected Reference response;
249
250        /**
251         * The date from the response resource containing a commitment to pay.
252         */
253        @Child(name = "date", type = {DateType.class}, order=10, min=0, max=1, modifier=false, summary=false)
254        @Description(shortDefinition="Date of commitment to pay", formalDefinition="The date from the response resource containing a commitment to pay." )
255        protected DateType date;
256
257        /**
258         * A reference to the individual who is responsible for inquiries regarding the response and its payment.
259         */
260        @Child(name = "responsible", type = {PractitionerRole.class}, order=11, min=0, max=1, modifier=false, summary=false)
261        @Description(shortDefinition="Contact for the response", formalDefinition="A reference to the individual who is responsible for inquiries regarding the response and its payment." )
262        protected Reference responsible;
263
264        /**
265         * The party which is receiving the payment.
266         */
267        @Child(name = "payee", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=12, min=0, max=1, modifier=false, summary=false)
268        @Description(shortDefinition="Recipient of the payment", formalDefinition="The party which is receiving the payment." )
269        protected Reference payee;
270
271        /**
272         * The monetary amount allocated from the total payment to the payable.
273         */
274        @Child(name = "amount", type = {Money.class}, order=13, min=0, max=1, modifier=false, summary=false)
275        @Description(shortDefinition="Amount allocated to this payable", formalDefinition="The monetary amount allocated from the total payment to the payable." )
276        protected Money amount;
277
278        private static final long serialVersionUID = -1153705409L;
279
280    /**
281     * Constructor
282     */
283      public PaymentReconciliationAllocationComponent() {
284        super();
285      }
286
287        /**
288         * @return {@link #identifier} (Unique identifier for the current payment item for the referenced payable.)
289         */
290        public Identifier getIdentifier() { 
291          if (this.identifier == null)
292            if (Configuration.errorOnAutoCreate())
293              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.identifier");
294            else if (Configuration.doAutoCreate())
295              this.identifier = new Identifier(); // cc
296          return this.identifier;
297        }
298
299        public boolean hasIdentifier() { 
300          return this.identifier != null && !this.identifier.isEmpty();
301        }
302
303        /**
304         * @param value {@link #identifier} (Unique identifier for the current payment item for the referenced payable.)
305         */
306        public PaymentReconciliationAllocationComponent setIdentifier(Identifier value) { 
307          this.identifier = value;
308          return this;
309        }
310
311        /**
312         * @return {@link #predecessor} (Unique identifier for the prior payment item for the referenced payable.)
313         */
314        public Identifier getPredecessor() { 
315          if (this.predecessor == null)
316            if (Configuration.errorOnAutoCreate())
317              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.predecessor");
318            else if (Configuration.doAutoCreate())
319              this.predecessor = new Identifier(); // cc
320          return this.predecessor;
321        }
322
323        public boolean hasPredecessor() { 
324          return this.predecessor != null && !this.predecessor.isEmpty();
325        }
326
327        /**
328         * @param value {@link #predecessor} (Unique identifier for the prior payment item for the referenced payable.)
329         */
330        public PaymentReconciliationAllocationComponent setPredecessor(Identifier value) { 
331          this.predecessor = value;
332          return this;
333        }
334
335        /**
336         * @return {@link #target} (Specific resource to which the payment/adjustment/advance applies.)
337         */
338        public Reference getTarget() { 
339          if (this.target == null)
340            if (Configuration.errorOnAutoCreate())
341              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.target");
342            else if (Configuration.doAutoCreate())
343              this.target = new Reference(); // cc
344          return this.target;
345        }
346
347        public boolean hasTarget() { 
348          return this.target != null && !this.target.isEmpty();
349        }
350
351        /**
352         * @param value {@link #target} (Specific resource to which the payment/adjustment/advance applies.)
353         */
354        public PaymentReconciliationAllocationComponent setTarget(Reference value) { 
355          this.target = value;
356          return this;
357        }
358
359        /**
360         * @return {@link #targetItem} ( Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.)
361         */
362        public DataType getTargetItem() { 
363          return this.targetItem;
364        }
365
366        /**
367         * @return {@link #targetItem} ( Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.)
368         */
369        public StringType getTargetItemStringType() throws FHIRException { 
370          if (this.targetItem == null)
371            this.targetItem = new StringType();
372          if (!(this.targetItem instanceof StringType))
373            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.targetItem.getClass().getName()+" was encountered");
374          return (StringType) this.targetItem;
375        }
376
377        public boolean hasTargetItemStringType() { 
378          return this != null && this.targetItem instanceof StringType;
379        }
380
381        /**
382         * @return {@link #targetItem} ( Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.)
383         */
384        public Identifier getTargetItemIdentifier() throws FHIRException { 
385          if (this.targetItem == null)
386            this.targetItem = new Identifier();
387          if (!(this.targetItem instanceof Identifier))
388            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.targetItem.getClass().getName()+" was encountered");
389          return (Identifier) this.targetItem;
390        }
391
392        public boolean hasTargetItemIdentifier() { 
393          return this != null && this.targetItem instanceof Identifier;
394        }
395
396        /**
397         * @return {@link #targetItem} ( Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.)
398         */
399        public PositiveIntType getTargetItemPositiveIntType() throws FHIRException { 
400          if (this.targetItem == null)
401            this.targetItem = new PositiveIntType();
402          if (!(this.targetItem instanceof PositiveIntType))
403            throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.targetItem.getClass().getName()+" was encountered");
404          return (PositiveIntType) this.targetItem;
405        }
406
407        public boolean hasTargetItemPositiveIntType() { 
408          return this != null && this.targetItem instanceof PositiveIntType;
409        }
410
411        public boolean hasTargetItem() { 
412          return this.targetItem != null && !this.targetItem.isEmpty();
413        }
414
415        /**
416         * @param value {@link #targetItem} ( Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.)
417         */
418        public PaymentReconciliationAllocationComponent setTargetItem(DataType value) { 
419          if (value != null && !(value instanceof StringType || value instanceof Identifier || value instanceof PositiveIntType))
420            throw new Error("Not the right type for PaymentReconciliation.allocation.targetItem[x]: "+value.fhirType());
421          this.targetItem = value;
422          return this;
423        }
424
425        /**
426         * @return {@link #encounter} (The Encounter to which this payment applies, may be completed by the receiver, used for search.)
427         */
428        public Reference getEncounter() { 
429          if (this.encounter == null)
430            if (Configuration.errorOnAutoCreate())
431              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.encounter");
432            else if (Configuration.doAutoCreate())
433              this.encounter = new Reference(); // cc
434          return this.encounter;
435        }
436
437        public boolean hasEncounter() { 
438          return this.encounter != null && !this.encounter.isEmpty();
439        }
440
441        /**
442         * @param value {@link #encounter} (The Encounter to which this payment applies, may be completed by the receiver, used for search.)
443         */
444        public PaymentReconciliationAllocationComponent setEncounter(Reference value) { 
445          this.encounter = value;
446          return this;
447        }
448
449        /**
450         * @return {@link #account} (The Account to which this payment applies, may be completed by the receiver, used for search.)
451         */
452        public Reference getAccount() { 
453          if (this.account == null)
454            if (Configuration.errorOnAutoCreate())
455              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.account");
456            else if (Configuration.doAutoCreate())
457              this.account = new Reference(); // cc
458          return this.account;
459        }
460
461        public boolean hasAccount() { 
462          return this.account != null && !this.account.isEmpty();
463        }
464
465        /**
466         * @param value {@link #account} (The Account to which this payment applies, may be completed by the receiver, used for search.)
467         */
468        public PaymentReconciliationAllocationComponent setAccount(Reference value) { 
469          this.account = value;
470          return this;
471        }
472
473        /**
474         * @return {@link #type} (Code to indicate the nature of the payment.)
475         */
476        public CodeableConcept getType() { 
477          if (this.type == null)
478            if (Configuration.errorOnAutoCreate())
479              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.type");
480            else if (Configuration.doAutoCreate())
481              this.type = new CodeableConcept(); // cc
482          return this.type;
483        }
484
485        public boolean hasType() { 
486          return this.type != null && !this.type.isEmpty();
487        }
488
489        /**
490         * @param value {@link #type} (Code to indicate the nature of the payment.)
491         */
492        public PaymentReconciliationAllocationComponent setType(CodeableConcept value) { 
493          this.type = value;
494          return this;
495        }
496
497        /**
498         * @return {@link #submitter} (The party which submitted the claim or financial transaction.)
499         */
500        public Reference getSubmitter() { 
501          if (this.submitter == null)
502            if (Configuration.errorOnAutoCreate())
503              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.submitter");
504            else if (Configuration.doAutoCreate())
505              this.submitter = new Reference(); // cc
506          return this.submitter;
507        }
508
509        public boolean hasSubmitter() { 
510          return this.submitter != null && !this.submitter.isEmpty();
511        }
512
513        /**
514         * @param value {@link #submitter} (The party which submitted the claim or financial transaction.)
515         */
516        public PaymentReconciliationAllocationComponent setSubmitter(Reference value) { 
517          this.submitter = value;
518          return this;
519        }
520
521        /**
522         * @return {@link #response} (A resource, such as a ClaimResponse, which contains a commitment to payment.)
523         */
524        public Reference getResponse() { 
525          if (this.response == null)
526            if (Configuration.errorOnAutoCreate())
527              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.response");
528            else if (Configuration.doAutoCreate())
529              this.response = new Reference(); // cc
530          return this.response;
531        }
532
533        public boolean hasResponse() { 
534          return this.response != null && !this.response.isEmpty();
535        }
536
537        /**
538         * @param value {@link #response} (A resource, such as a ClaimResponse, which contains a commitment to payment.)
539         */
540        public PaymentReconciliationAllocationComponent setResponse(Reference value) { 
541          this.response = value;
542          return this;
543        }
544
545        /**
546         * @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
547         */
548        public DateType getDateElement() { 
549          if (this.date == null)
550            if (Configuration.errorOnAutoCreate())
551              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.date");
552            else if (Configuration.doAutoCreate())
553              this.date = new DateType(); // bb
554          return this.date;
555        }
556
557        public boolean hasDateElement() { 
558          return this.date != null && !this.date.isEmpty();
559        }
560
561        public boolean hasDate() { 
562          return this.date != null && !this.date.isEmpty();
563        }
564
565        /**
566         * @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
567         */
568        public PaymentReconciliationAllocationComponent setDateElement(DateType value) { 
569          this.date = value;
570          return this;
571        }
572
573        /**
574         * @return The date from the response resource containing a commitment to pay.
575         */
576        public Date getDate() { 
577          return this.date == null ? null : this.date.getValue();
578        }
579
580        /**
581         * @param value The date from the response resource containing a commitment to pay.
582         */
583        public PaymentReconciliationAllocationComponent setDate(Date value) { 
584          if (value == null)
585            this.date = null;
586          else {
587            if (this.date == null)
588              this.date = new DateType();
589            this.date.setValue(value);
590          }
591          return this;
592        }
593
594        /**
595         * @return {@link #responsible} (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
596         */
597        public Reference getResponsible() { 
598          if (this.responsible == null)
599            if (Configuration.errorOnAutoCreate())
600              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.responsible");
601            else if (Configuration.doAutoCreate())
602              this.responsible = new Reference(); // cc
603          return this.responsible;
604        }
605
606        public boolean hasResponsible() { 
607          return this.responsible != null && !this.responsible.isEmpty();
608        }
609
610        /**
611         * @param value {@link #responsible} (A reference to the individual who is responsible for inquiries regarding the response and its payment.)
612         */
613        public PaymentReconciliationAllocationComponent setResponsible(Reference value) { 
614          this.responsible = value;
615          return this;
616        }
617
618        /**
619         * @return {@link #payee} (The party which is receiving the payment.)
620         */
621        public Reference getPayee() { 
622          if (this.payee == null)
623            if (Configuration.errorOnAutoCreate())
624              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.payee");
625            else if (Configuration.doAutoCreate())
626              this.payee = new Reference(); // cc
627          return this.payee;
628        }
629
630        public boolean hasPayee() { 
631          return this.payee != null && !this.payee.isEmpty();
632        }
633
634        /**
635         * @param value {@link #payee} (The party which is receiving the payment.)
636         */
637        public PaymentReconciliationAllocationComponent setPayee(Reference value) { 
638          this.payee = value;
639          return this;
640        }
641
642        /**
643         * @return {@link #amount} (The monetary amount allocated from the total payment to the payable.)
644         */
645        public Money getAmount() { 
646          if (this.amount == null)
647            if (Configuration.errorOnAutoCreate())
648              throw new Error("Attempt to auto-create PaymentReconciliationAllocationComponent.amount");
649            else if (Configuration.doAutoCreate())
650              this.amount = new Money(); // cc
651          return this.amount;
652        }
653
654        public boolean hasAmount() { 
655          return this.amount != null && !this.amount.isEmpty();
656        }
657
658        /**
659         * @param value {@link #amount} (The monetary amount allocated from the total payment to the payable.)
660         */
661        public PaymentReconciliationAllocationComponent setAmount(Money value) { 
662          this.amount = value;
663          return this;
664        }
665
666        protected void listChildren(List<Property> children) {
667          super.listChildren(children);
668          children.add(new Property("identifier", "Identifier", "Unique identifier for the current payment item for the referenced payable.", 0, 1, identifier));
669          children.add(new Property("predecessor", "Identifier", "Unique identifier for the prior payment item for the referenced payable.", 0, 1, predecessor));
670          children.add(new Property("target", "Reference(Claim|Account|Invoice|ChargeItem|Encounter|Contract)", "Specific resource to which the payment/adjustment/advance applies.", 0, 1, target));
671          children.add(new Property("targetItem[x]", "string|Identifier|positiveInt", " Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.", 0, 1, targetItem));
672          children.add(new Property("encounter", "Reference(Encounter)", "The Encounter to which this payment applies, may be completed by the receiver, used for search.", 0, 1, encounter));
673          children.add(new Property("account", "Reference(Account)", "The Account to which this payment applies, may be completed by the receiver, used for search.", 0, 1, account));
674          children.add(new Property("type", "CodeableConcept", "Code to indicate the nature of the payment.", 0, 1, type));
675          children.add(new Property("submitter", "Reference(Practitioner|PractitionerRole|Organization)", "The party which submitted the claim or financial transaction.", 0, 1, submitter));
676          children.add(new Property("response", "Reference(ClaimResponse)", "A resource, such as a ClaimResponse, which contains a commitment to payment.", 0, 1, response));
677          children.add(new Property("date", "date", "The date from the response resource containing a commitment to pay.", 0, 1, date));
678          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));
679          children.add(new Property("payee", "Reference(Practitioner|PractitionerRole|Organization)", "The party which is receiving the payment.", 0, 1, payee));
680          children.add(new Property("amount", "Money", "The monetary amount allocated from the total payment to the payable.", 0, 1, amount));
681        }
682
683        @Override
684        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
685          switch (_hash) {
686          case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Unique identifier for the current payment item for the referenced payable.", 0, 1, identifier);
687          case -1925032183: /*predecessor*/  return new Property("predecessor", "Identifier", "Unique identifier for the prior payment item for the referenced payable.", 0, 1, predecessor);
688          case -880905839: /*target*/  return new Property("target", "Reference(Claim|Account|Invoice|ChargeItem|Encounter|Contract)", "Specific resource to which the payment/adjustment/advance applies.", 0, 1, target);
689          case 125181372: /*targetItem[x]*/  return new Property("targetItem[x]", "string|Identifier|positiveInt", " Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.", 0, 1, targetItem);
690          case 486289476: /*targetItem*/  return new Property("targetItem[x]", "string|Identifier|positiveInt", " Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.", 0, 1, targetItem);
691          case 1014643061: /*targetItemString*/  return new Property("targetItem[x]", "string", " Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.", 0, 1, targetItem);
692          case -1768279027: /*targetItemIdentifier*/  return new Property("targetItem[x]", "Identifier", " Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.", 0, 1, targetItem);
693          case -481526702: /*targetItemPositiveInt*/  return new Property("targetItem[x]", "positiveInt", " Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.", 0, 1, targetItem);
694          case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The Encounter to which this payment applies, may be completed by the receiver, used for search.", 0, 1, encounter);
695          case -1177318867: /*account*/  return new Property("account", "Reference(Account)", "The Account to which this payment applies, may be completed by the receiver, used for search.", 0, 1, account);
696          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Code to indicate the nature of the payment.", 0, 1, type);
697          case 348678409: /*submitter*/  return new Property("submitter", "Reference(Practitioner|PractitionerRole|Organization)", "The party which submitted the claim or financial transaction.", 0, 1, submitter);
698          case -340323263: /*response*/  return new Property("response", "Reference(ClaimResponse)", "A resource, such as a ClaimResponse, which contains a commitment to payment.", 0, 1, response);
699          case 3076014: /*date*/  return new Property("date", "date", "The date from the response resource containing a commitment to pay.", 0, 1, date);
700          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);
701          case 106443592: /*payee*/  return new Property("payee", "Reference(Practitioner|PractitionerRole|Organization)", "The party which is receiving the payment.", 0, 1, payee);
702          case -1413853096: /*amount*/  return new Property("amount", "Money", "The monetary amount allocated from the total payment to the payable.", 0, 1, amount);
703          default: return super.getNamedProperty(_hash, _name, _checkValid);
704          }
705
706        }
707
708      @Override
709      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
710        switch (hash) {
711        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
712        case -1925032183: /*predecessor*/ return this.predecessor == null ? new Base[0] : new Base[] {this.predecessor}; // Identifier
713        case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Reference
714        case 486289476: /*targetItem*/ return this.targetItem == null ? new Base[0] : new Base[] {this.targetItem}; // DataType
715        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
716        case -1177318867: /*account*/ return this.account == null ? new Base[0] : new Base[] {this.account}; // Reference
717        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
718        case 348678409: /*submitter*/ return this.submitter == null ? new Base[0] : new Base[] {this.submitter}; // Reference
719        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Reference
720        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType
721        case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // Reference
722        case 106443592: /*payee*/ return this.payee == null ? new Base[0] : new Base[] {this.payee}; // Reference
723        case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money
724        default: return super.getProperty(hash, name, checkValid);
725        }
726
727      }
728
729      @Override
730      public Base setProperty(int hash, String name, Base value) throws FHIRException {
731        switch (hash) {
732        case -1618432855: // identifier
733          this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
734          return value;
735        case -1925032183: // predecessor
736          this.predecessor = TypeConvertor.castToIdentifier(value); // Identifier
737          return value;
738        case -880905839: // target
739          this.target = TypeConvertor.castToReference(value); // Reference
740          return value;
741        case 486289476: // targetItem
742          this.targetItem = TypeConvertor.castToType(value); // DataType
743          return value;
744        case 1524132147: // encounter
745          this.encounter = TypeConvertor.castToReference(value); // Reference
746          return value;
747        case -1177318867: // account
748          this.account = TypeConvertor.castToReference(value); // Reference
749          return value;
750        case 3575610: // type
751          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
752          return value;
753        case 348678409: // submitter
754          this.submitter = TypeConvertor.castToReference(value); // Reference
755          return value;
756        case -340323263: // response
757          this.response = TypeConvertor.castToReference(value); // Reference
758          return value;
759        case 3076014: // date
760          this.date = TypeConvertor.castToDate(value); // DateType
761          return value;
762        case 1847674614: // responsible
763          this.responsible = TypeConvertor.castToReference(value); // Reference
764          return value;
765        case 106443592: // payee
766          this.payee = TypeConvertor.castToReference(value); // Reference
767          return value;
768        case -1413853096: // amount
769          this.amount = TypeConvertor.castToMoney(value); // Money
770          return value;
771        default: return super.setProperty(hash, name, value);
772        }
773
774      }
775
776      @Override
777      public Base setProperty(String name, Base value) throws FHIRException {
778        if (name.equals("identifier")) {
779          this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
780        } else if (name.equals("predecessor")) {
781          this.predecessor = TypeConvertor.castToIdentifier(value); // Identifier
782        } else if (name.equals("target")) {
783          this.target = TypeConvertor.castToReference(value); // Reference
784        } else if (name.equals("targetItem[x]")) {
785          this.targetItem = TypeConvertor.castToType(value); // DataType
786        } else if (name.equals("encounter")) {
787          this.encounter = TypeConvertor.castToReference(value); // Reference
788        } else if (name.equals("account")) {
789          this.account = TypeConvertor.castToReference(value); // Reference
790        } else if (name.equals("type")) {
791          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
792        } else if (name.equals("submitter")) {
793          this.submitter = TypeConvertor.castToReference(value); // Reference
794        } else if (name.equals("response")) {
795          this.response = TypeConvertor.castToReference(value); // Reference
796        } else if (name.equals("date")) {
797          this.date = TypeConvertor.castToDate(value); // DateType
798        } else if (name.equals("responsible")) {
799          this.responsible = TypeConvertor.castToReference(value); // Reference
800        } else if (name.equals("payee")) {
801          this.payee = TypeConvertor.castToReference(value); // Reference
802        } else if (name.equals("amount")) {
803          this.amount = TypeConvertor.castToMoney(value); // Money
804        } else
805          return super.setProperty(name, value);
806        return value;
807      }
808
809      @Override
810      public Base makeProperty(int hash, String name) throws FHIRException {
811        switch (hash) {
812        case -1618432855:  return getIdentifier();
813        case -1925032183:  return getPredecessor();
814        case -880905839:  return getTarget();
815        case 125181372:  return getTargetItem();
816        case 486289476:  return getTargetItem();
817        case 1524132147:  return getEncounter();
818        case -1177318867:  return getAccount();
819        case 3575610:  return getType();
820        case 348678409:  return getSubmitter();
821        case -340323263:  return getResponse();
822        case 3076014:  return getDateElement();
823        case 1847674614:  return getResponsible();
824        case 106443592:  return getPayee();
825        case -1413853096:  return getAmount();
826        default: return super.makeProperty(hash, name);
827        }
828
829      }
830
831      @Override
832      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
833        switch (hash) {
834        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
835        case -1925032183: /*predecessor*/ return new String[] {"Identifier"};
836        case -880905839: /*target*/ return new String[] {"Reference"};
837        case 486289476: /*targetItem*/ return new String[] {"string", "Identifier", "positiveInt"};
838        case 1524132147: /*encounter*/ return new String[] {"Reference"};
839        case -1177318867: /*account*/ return new String[] {"Reference"};
840        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
841        case 348678409: /*submitter*/ return new String[] {"Reference"};
842        case -340323263: /*response*/ return new String[] {"Reference"};
843        case 3076014: /*date*/ return new String[] {"date"};
844        case 1847674614: /*responsible*/ return new String[] {"Reference"};
845        case 106443592: /*payee*/ return new String[] {"Reference"};
846        case -1413853096: /*amount*/ return new String[] {"Money"};
847        default: return super.getTypesForProperty(hash, name);
848        }
849
850      }
851
852      @Override
853      public Base addChild(String name) throws FHIRException {
854        if (name.equals("identifier")) {
855          this.identifier = new Identifier();
856          return this.identifier;
857        }
858        else if (name.equals("predecessor")) {
859          this.predecessor = new Identifier();
860          return this.predecessor;
861        }
862        else if (name.equals("target")) {
863          this.target = new Reference();
864          return this.target;
865        }
866        else if (name.equals("targetItemString")) {
867          this.targetItem = new StringType();
868          return this.targetItem;
869        }
870        else if (name.equals("targetItemIdentifier")) {
871          this.targetItem = new Identifier();
872          return this.targetItem;
873        }
874        else if (name.equals("targetItemPositiveInt")) {
875          this.targetItem = new PositiveIntType();
876          return this.targetItem;
877        }
878        else if (name.equals("encounter")) {
879          this.encounter = new Reference();
880          return this.encounter;
881        }
882        else if (name.equals("account")) {
883          this.account = new Reference();
884          return this.account;
885        }
886        else if (name.equals("type")) {
887          this.type = new CodeableConcept();
888          return this.type;
889        }
890        else if (name.equals("submitter")) {
891          this.submitter = new Reference();
892          return this.submitter;
893        }
894        else if (name.equals("response")) {
895          this.response = new Reference();
896          return this.response;
897        }
898        else if (name.equals("date")) {
899          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.allocation.date");
900        }
901        else if (name.equals("responsible")) {
902          this.responsible = new Reference();
903          return this.responsible;
904        }
905        else if (name.equals("payee")) {
906          this.payee = new Reference();
907          return this.payee;
908        }
909        else if (name.equals("amount")) {
910          this.amount = new Money();
911          return this.amount;
912        }
913        else
914          return super.addChild(name);
915      }
916
917      public PaymentReconciliationAllocationComponent copy() {
918        PaymentReconciliationAllocationComponent dst = new PaymentReconciliationAllocationComponent();
919        copyValues(dst);
920        return dst;
921      }
922
923      public void copyValues(PaymentReconciliationAllocationComponent dst) {
924        super.copyValues(dst);
925        dst.identifier = identifier == null ? null : identifier.copy();
926        dst.predecessor = predecessor == null ? null : predecessor.copy();
927        dst.target = target == null ? null : target.copy();
928        dst.targetItem = targetItem == null ? null : targetItem.copy();
929        dst.encounter = encounter == null ? null : encounter.copy();
930        dst.account = account == null ? null : account.copy();
931        dst.type = type == null ? null : type.copy();
932        dst.submitter = submitter == null ? null : submitter.copy();
933        dst.response = response == null ? null : response.copy();
934        dst.date = date == null ? null : date.copy();
935        dst.responsible = responsible == null ? null : responsible.copy();
936        dst.payee = payee == null ? null : payee.copy();
937        dst.amount = amount == null ? null : amount.copy();
938      }
939
940      @Override
941      public boolean equalsDeep(Base other_) {
942        if (!super.equalsDeep(other_))
943          return false;
944        if (!(other_ instanceof PaymentReconciliationAllocationComponent))
945          return false;
946        PaymentReconciliationAllocationComponent o = (PaymentReconciliationAllocationComponent) other_;
947        return compareDeep(identifier, o.identifier, true) && compareDeep(predecessor, o.predecessor, true)
948           && compareDeep(target, o.target, true) && compareDeep(targetItem, o.targetItem, true) && compareDeep(encounter, o.encounter, true)
949           && compareDeep(account, o.account, true) && compareDeep(type, o.type, true) && compareDeep(submitter, o.submitter, true)
950           && compareDeep(response, o.response, true) && compareDeep(date, o.date, true) && compareDeep(responsible, o.responsible, true)
951           && compareDeep(payee, o.payee, true) && compareDeep(amount, o.amount, true);
952      }
953
954      @Override
955      public boolean equalsShallow(Base other_) {
956        if (!super.equalsShallow(other_))
957          return false;
958        if (!(other_ instanceof PaymentReconciliationAllocationComponent))
959          return false;
960        PaymentReconciliationAllocationComponent o = (PaymentReconciliationAllocationComponent) other_;
961        return compareValues(date, o.date, true);
962      }
963
964      public boolean isEmpty() {
965        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, predecessor, target
966          , targetItem, encounter, account, type, submitter, response, date, responsible
967          , payee, amount);
968      }
969
970  public String fhirType() {
971    return "PaymentReconciliation.allocation";
972
973  }
974
975  }
976
977    @Block()
978    public static class NotesComponent extends BackboneElement implements IBaseBackboneElement {
979        /**
980         * The business purpose of the note text.
981         */
982        @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
983        @Description(shortDefinition="display | print | printoper", formalDefinition="The business purpose of the note text." )
984        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/note-type")
985        protected Enumeration<NoteType> type;
986
987        /**
988         * The explanation or description associated with the processing.
989         */
990        @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
991        @Description(shortDefinition="Note explanatory text", formalDefinition="The explanation or description associated with the processing." )
992        protected StringType text;
993
994        private static final long serialVersionUID = 529250161L;
995
996    /**
997     * Constructor
998     */
999      public NotesComponent() {
1000        super();
1001      }
1002
1003        /**
1004         * @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
1005         */
1006        public Enumeration<NoteType> getTypeElement() { 
1007          if (this.type == null)
1008            if (Configuration.errorOnAutoCreate())
1009              throw new Error("Attempt to auto-create NotesComponent.type");
1010            else if (Configuration.doAutoCreate())
1011              this.type = new Enumeration<NoteType>(new NoteTypeEnumFactory()); // bb
1012          return this.type;
1013        }
1014
1015        public boolean hasTypeElement() { 
1016          return this.type != null && !this.type.isEmpty();
1017        }
1018
1019        public boolean hasType() { 
1020          return this.type != null && !this.type.isEmpty();
1021        }
1022
1023        /**
1024         * @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
1025         */
1026        public NotesComponent setTypeElement(Enumeration<NoteType> value) { 
1027          this.type = value;
1028          return this;
1029        }
1030
1031        /**
1032         * @return The business purpose of the note text.
1033         */
1034        public NoteType getType() { 
1035          return this.type == null ? null : this.type.getValue();
1036        }
1037
1038        /**
1039         * @param value The business purpose of the note text.
1040         */
1041        public NotesComponent setType(NoteType value) { 
1042          if (value == null)
1043            this.type = null;
1044          else {
1045            if (this.type == null)
1046              this.type = new Enumeration<NoteType>(new NoteTypeEnumFactory());
1047            this.type.setValue(value);
1048          }
1049          return this;
1050        }
1051
1052        /**
1053         * @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
1054         */
1055        public StringType getTextElement() { 
1056          if (this.text == null)
1057            if (Configuration.errorOnAutoCreate())
1058              throw new Error("Attempt to auto-create NotesComponent.text");
1059            else if (Configuration.doAutoCreate())
1060              this.text = new StringType(); // bb
1061          return this.text;
1062        }
1063
1064        public boolean hasTextElement() { 
1065          return this.text != null && !this.text.isEmpty();
1066        }
1067
1068        public boolean hasText() { 
1069          return this.text != null && !this.text.isEmpty();
1070        }
1071
1072        /**
1073         * @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
1074         */
1075        public NotesComponent setTextElement(StringType value) { 
1076          this.text = value;
1077          return this;
1078        }
1079
1080        /**
1081         * @return The explanation or description associated with the processing.
1082         */
1083        public String getText() { 
1084          return this.text == null ? null : this.text.getValue();
1085        }
1086
1087        /**
1088         * @param value The explanation or description associated with the processing.
1089         */
1090        public NotesComponent setText(String value) { 
1091          if (Utilities.noString(value))
1092            this.text = null;
1093          else {
1094            if (this.text == null)
1095              this.text = new StringType();
1096            this.text.setValue(value);
1097          }
1098          return this;
1099        }
1100
1101        protected void listChildren(List<Property> children) {
1102          super.listChildren(children);
1103          children.add(new Property("type", "code", "The business purpose of the note text.", 0, 1, type));
1104          children.add(new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text));
1105        }
1106
1107        @Override
1108        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1109          switch (_hash) {
1110          case 3575610: /*type*/  return new Property("type", "code", "The business purpose of the note text.", 0, 1, type);
1111          case 3556653: /*text*/  return new Property("text", "string", "The explanation or description associated with the processing.", 0, 1, text);
1112          default: return super.getNamedProperty(_hash, _name, _checkValid);
1113          }
1114
1115        }
1116
1117      @Override
1118      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1119        switch (hash) {
1120        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<NoteType>
1121        case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
1122        default: return super.getProperty(hash, name, checkValid);
1123        }
1124
1125      }
1126
1127      @Override
1128      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1129        switch (hash) {
1130        case 3575610: // type
1131          value = new NoteTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1132          this.type = (Enumeration) value; // Enumeration<NoteType>
1133          return value;
1134        case 3556653: // text
1135          this.text = TypeConvertor.castToString(value); // StringType
1136          return value;
1137        default: return super.setProperty(hash, name, value);
1138        }
1139
1140      }
1141
1142      @Override
1143      public Base setProperty(String name, Base value) throws FHIRException {
1144        if (name.equals("type")) {
1145          value = new NoteTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1146          this.type = (Enumeration) value; // Enumeration<NoteType>
1147        } else if (name.equals("text")) {
1148          this.text = TypeConvertor.castToString(value); // StringType
1149        } else
1150          return super.setProperty(name, value);
1151        return value;
1152      }
1153
1154      @Override
1155      public Base makeProperty(int hash, String name) throws FHIRException {
1156        switch (hash) {
1157        case 3575610:  return getTypeElement();
1158        case 3556653:  return getTextElement();
1159        default: return super.makeProperty(hash, name);
1160        }
1161
1162      }
1163
1164      @Override
1165      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1166        switch (hash) {
1167        case 3575610: /*type*/ return new String[] {"code"};
1168        case 3556653: /*text*/ return new String[] {"string"};
1169        default: return super.getTypesForProperty(hash, name);
1170        }
1171
1172      }
1173
1174      @Override
1175      public Base addChild(String name) throws FHIRException {
1176        if (name.equals("type")) {
1177          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.processNote.type");
1178        }
1179        else if (name.equals("text")) {
1180          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.processNote.text");
1181        }
1182        else
1183          return super.addChild(name);
1184      }
1185
1186      public NotesComponent copy() {
1187        NotesComponent dst = new NotesComponent();
1188        copyValues(dst);
1189        return dst;
1190      }
1191
1192      public void copyValues(NotesComponent dst) {
1193        super.copyValues(dst);
1194        dst.type = type == null ? null : type.copy();
1195        dst.text = text == null ? null : text.copy();
1196      }
1197
1198      @Override
1199      public boolean equalsDeep(Base other_) {
1200        if (!super.equalsDeep(other_))
1201          return false;
1202        if (!(other_ instanceof NotesComponent))
1203          return false;
1204        NotesComponent o = (NotesComponent) other_;
1205        return compareDeep(type, o.type, true) && compareDeep(text, o.text, true);
1206      }
1207
1208      @Override
1209      public boolean equalsShallow(Base other_) {
1210        if (!super.equalsShallow(other_))
1211          return false;
1212        if (!(other_ instanceof NotesComponent))
1213          return false;
1214        NotesComponent o = (NotesComponent) other_;
1215        return compareValues(type, o.type, true) && compareValues(text, o.text, true);
1216      }
1217
1218      public boolean isEmpty() {
1219        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, text);
1220      }
1221
1222  public String fhirType() {
1223    return "PaymentReconciliation.processNote";
1224
1225  }
1226
1227  }
1228
1229    /**
1230     * A unique identifier assigned to this payment reconciliation.
1231     */
1232    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1233    @Description(shortDefinition="Business Identifier for a payment reconciliation", formalDefinition="A unique identifier assigned to this payment reconciliation." )
1234    protected List<Identifier> identifier;
1235
1236    /**
1237     * Code to indicate the nature of the payment such as payment, adjustment.
1238     */
1239    @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
1240    @Description(shortDefinition="Category of payment", formalDefinition="Code to indicate the nature of the payment such as payment, adjustment." )
1241    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-type")
1242    protected CodeableConcept type;
1243
1244    /**
1245     * The status of the resource instance.
1246     */
1247    @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
1248    @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." )
1249    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status")
1250    protected Enumeration<FinancialResourceStatusCodes> status;
1251
1252    /**
1253     * The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.
1254     */
1255    @Child(name = "kind", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
1256    @Description(shortDefinition="Workflow originating payment", formalDefinition="The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc." )
1257    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-kind")
1258    protected CodeableConcept kind;
1259
1260    /**
1261     * The period of time for which payments have been gathered into this bulk payment for settlement.
1262     */
1263    @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true)
1264    @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." )
1265    protected Period period;
1266
1267    /**
1268     * The date when the resource was created.
1269     */
1270    @Child(name = "created", type = {DateTimeType.class}, order=5, min=1, max=1, modifier=false, summary=true)
1271    @Description(shortDefinition="Creation date", formalDefinition="The date when the resource was created." )
1272    protected DateTimeType created;
1273
1274    /**
1275     * Payment enterer if not the actual payment issuer.
1276     */
1277    @Child(name = "enterer", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=false)
1278    @Description(shortDefinition="Who entered the payment", formalDefinition="Payment enterer if not the actual payment issuer." )
1279    protected Reference enterer;
1280
1281    /**
1282     * The type of the source such as patient or insurance.
1283     */
1284    @Child(name = "issuerType", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false)
1285    @Description(shortDefinition="Nature of the source", formalDefinition="The type of the source such as patient or insurance." )
1286    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-issuertype")
1287    protected CodeableConcept issuerType;
1288
1289    /**
1290     * The party who generated the payment.
1291     */
1292    @Child(name = "paymentIssuer", type = {Organization.class, Patient.class, Person.class, RelatedPerson.class}, order=8, min=0, max=1, modifier=false, summary=true)
1293    @Description(shortDefinition="Party generating payment", formalDefinition="The party who generated the payment." )
1294    protected Reference paymentIssuer;
1295
1296    /**
1297     * Original request resource reference.
1298     */
1299    @Child(name = "request", type = {Task.class}, order=9, min=0, max=1, modifier=false, summary=false)
1300    @Description(shortDefinition="Reference to requesting resource", formalDefinition="Original request resource reference." )
1301    protected Reference request;
1302
1303    /**
1304     * The practitioner who is responsible for the services rendered to the patient.
1305     */
1306    @Child(name = "requestor", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=10, min=0, max=1, modifier=false, summary=false)
1307    @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." )
1308    protected Reference requestor;
1309
1310    /**
1311     * The outcome of a request for a reconciliation.
1312     */
1313    @Child(name = "outcome", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=false)
1314    @Description(shortDefinition="queued | complete | error | partial", formalDefinition="The outcome of a request for a reconciliation." )
1315    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payment-outcome")
1316    protected Enumeration<PaymentOutcome> outcome;
1317
1318    /**
1319     * A human readable description of the status of the request for the reconciliation.
1320     */
1321    @Child(name = "disposition", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
1322    @Description(shortDefinition="Disposition message", formalDefinition="A human readable description of the status of the request for the reconciliation." )
1323    protected StringType disposition;
1324
1325    /**
1326     * The date of payment as indicated on the financial instrument.
1327     */
1328    @Child(name = "date", type = {DateType.class}, order=13, min=1, max=1, modifier=false, summary=true)
1329    @Description(shortDefinition="When payment issued", formalDefinition="The date of payment as indicated on the financial instrument." )
1330    protected DateType date;
1331
1332    /**
1333     * The location of the site or device for electronic transfers or physical location for cash payments.
1334     */
1335    @Child(name = "location", type = {Location.class}, order=14, min=0, max=1, modifier=false, summary=false)
1336    @Description(shortDefinition="Where payment collected", formalDefinition="The location of the site or device for electronic transfers or physical location for cash payments." )
1337    protected Reference location;
1338
1339    /**
1340     * The means of payment such as check, card cash, or electronic funds transfer.
1341     */
1342    @Child(name = "method", type = {CodeableConcept.class}, order=15, min=0, max=1, modifier=false, summary=false)
1343    @Description(shortDefinition="Payment instrument", formalDefinition="The means of payment such as check, card cash, or electronic funds transfer." )
1344    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0570")
1345    protected CodeableConcept method;
1346
1347    /**
1348     * The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.
1349     */
1350    @Child(name = "cardBrand", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false)
1351    @Description(shortDefinition="Type of card", formalDefinition="The card brand such as debit, Visa, Amex etc. used if a card is the method of payment." )
1352    protected StringType cardBrand;
1353
1354    /**
1355     * A portion of the account number, often the last 4 digits, used for verification not charging purposes.
1356     */
1357    @Child(name = "accountNumber", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false)
1358    @Description(shortDefinition="Digits for verification", formalDefinition="A portion of the account number, often the last 4 digits, used for verification not charging purposes." )
1359    protected StringType accountNumber;
1360
1361    /**
1362     * The year and month (YYYY-MM) when the instrument, typically card, expires.
1363     */
1364    @Child(name = "expirationDate", type = {DateType.class}, order=18, min=0, max=1, modifier=false, summary=false)
1365    @Description(shortDefinition="Expiration year-month", formalDefinition="The year and month (YYYY-MM) when the instrument, typically card, expires." )
1366    protected DateType expirationDate;
1367
1368    /**
1369     * The name of the card processor, etf processor, bank for checks.
1370     */
1371    @Child(name = "processor", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1372    @Description(shortDefinition="Processor name", formalDefinition="The name of the card processor, etf processor, bank for checks." )
1373    protected StringType processor;
1374
1375    /**
1376     * The check number, eft reference, car processor reference.
1377     */
1378    @Child(name = "referenceNumber", type = {StringType.class}, order=20, min=0, max=1, modifier=false, summary=false)
1379    @Description(shortDefinition="Check number or payment reference", formalDefinition="The check number, eft reference, car processor reference." )
1380    protected StringType referenceNumber;
1381
1382    /**
1383     * An alphanumeric issued by the processor to confirm the successful issuance of payment.
1384     */
1385    @Child(name = "authorization", type = {StringType.class}, order=21, min=0, max=1, modifier=false, summary=false)
1386    @Description(shortDefinition="Authorization number", formalDefinition="An alphanumeric issued by the processor to confirm the successful issuance of payment." )
1387    protected StringType authorization;
1388
1389    /**
1390     * The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.
1391     */
1392    @Child(name = "tenderedAmount", type = {Money.class}, order=22, min=0, max=1, modifier=false, summary=false)
1393    @Description(shortDefinition="Amount offered by the issuer", formalDefinition="The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid." )
1394    protected Money tenderedAmount;
1395
1396    /**
1397     * The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.
1398     */
1399    @Child(name = "returnedAmount", type = {Money.class}, order=23, min=0, max=1, modifier=false, summary=false)
1400    @Description(shortDefinition="Amount returned by the receiver", formalDefinition="The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'." )
1401    protected Money returnedAmount;
1402
1403    /**
1404     * Total payment amount as indicated on the financial instrument.
1405     */
1406    @Child(name = "amount", type = {Money.class}, order=24, min=1, max=1, modifier=false, summary=true)
1407    @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount as indicated on the financial instrument." )
1408    protected Money amount;
1409
1410    /**
1411     * Issuer's unique identifier for the payment instrument.
1412     */
1413    @Child(name = "paymentIdentifier", type = {Identifier.class}, order=25, min=0, max=1, modifier=false, summary=false)
1414    @Description(shortDefinition="Business identifier for the payment", formalDefinition="Issuer's unique identifier for the payment instrument." )
1415    protected Identifier paymentIdentifier;
1416
1417    /**
1418     * Distribution of the payment amount for a previously acknowledged payable.
1419     */
1420    @Child(name = "allocation", type = {}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1421    @Description(shortDefinition="Settlement particulars", formalDefinition="Distribution of the payment amount for a previously acknowledged payable." )
1422    protected List<PaymentReconciliationAllocationComponent> allocation;
1423
1424    /**
1425     * A code for the form to be used for printing the content.
1426     */
1427    @Child(name = "formCode", type = {CodeableConcept.class}, order=27, min=0, max=1, modifier=false, summary=false)
1428    @Description(shortDefinition="Printed form identifier", formalDefinition="A code for the form to be used for printing the content." )
1429    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms")
1430    protected CodeableConcept formCode;
1431
1432    /**
1433     * A note that describes or explains the processing in a human readable form.
1434     */
1435    @Child(name = "processNote", type = {}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1436    @Description(shortDefinition="Note concerning processing", formalDefinition="A note that describes or explains the processing in a human readable form." )
1437    protected List<NotesComponent> processNote;
1438
1439    private static final long serialVersionUID = 705873820L;
1440
1441  /**
1442   * Constructor
1443   */
1444    public PaymentReconciliation() {
1445      super();
1446    }
1447
1448  /**
1449   * Constructor
1450   */
1451    public PaymentReconciliation(CodeableConcept type, FinancialResourceStatusCodes status, Date created, Date date, Money amount) {
1452      super();
1453      this.setType(type);
1454      this.setStatus(status);
1455      this.setCreated(created);
1456      this.setDate(date);
1457      this.setAmount(amount);
1458    }
1459
1460    /**
1461     * @return {@link #identifier} (A unique identifier assigned to this payment reconciliation.)
1462     */
1463    public List<Identifier> getIdentifier() { 
1464      if (this.identifier == null)
1465        this.identifier = new ArrayList<Identifier>();
1466      return this.identifier;
1467    }
1468
1469    /**
1470     * @return Returns a reference to <code>this</code> for easy method chaining
1471     */
1472    public PaymentReconciliation setIdentifier(List<Identifier> theIdentifier) { 
1473      this.identifier = theIdentifier;
1474      return this;
1475    }
1476
1477    public boolean hasIdentifier() { 
1478      if (this.identifier == null)
1479        return false;
1480      for (Identifier item : this.identifier)
1481        if (!item.isEmpty())
1482          return true;
1483      return false;
1484    }
1485
1486    public Identifier addIdentifier() { //3
1487      Identifier t = new Identifier();
1488      if (this.identifier == null)
1489        this.identifier = new ArrayList<Identifier>();
1490      this.identifier.add(t);
1491      return t;
1492    }
1493
1494    public PaymentReconciliation addIdentifier(Identifier t) { //3
1495      if (t == null)
1496        return this;
1497      if (this.identifier == null)
1498        this.identifier = new ArrayList<Identifier>();
1499      this.identifier.add(t);
1500      return this;
1501    }
1502
1503    /**
1504     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1505     */
1506    public Identifier getIdentifierFirstRep() { 
1507      if (getIdentifier().isEmpty()) {
1508        addIdentifier();
1509      }
1510      return getIdentifier().get(0);
1511    }
1512
1513    /**
1514     * @return {@link #type} (Code to indicate the nature of the payment such as payment, adjustment.)
1515     */
1516    public CodeableConcept getType() { 
1517      if (this.type == null)
1518        if (Configuration.errorOnAutoCreate())
1519          throw new Error("Attempt to auto-create PaymentReconciliation.type");
1520        else if (Configuration.doAutoCreate())
1521          this.type = new CodeableConcept(); // cc
1522      return this.type;
1523    }
1524
1525    public boolean hasType() { 
1526      return this.type != null && !this.type.isEmpty();
1527    }
1528
1529    /**
1530     * @param value {@link #type} (Code to indicate the nature of the payment such as payment, adjustment.)
1531     */
1532    public PaymentReconciliation setType(CodeableConcept value) { 
1533      this.type = value;
1534      return this;
1535    }
1536
1537    /**
1538     * @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
1539     */
1540    public Enumeration<FinancialResourceStatusCodes> getStatusElement() { 
1541      if (this.status == null)
1542        if (Configuration.errorOnAutoCreate())
1543          throw new Error("Attempt to auto-create PaymentReconciliation.status");
1544        else if (Configuration.doAutoCreate())
1545          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); // bb
1546      return this.status;
1547    }
1548
1549    public boolean hasStatusElement() { 
1550      return this.status != null && !this.status.isEmpty();
1551    }
1552
1553    public boolean hasStatus() { 
1554      return this.status != null && !this.status.isEmpty();
1555    }
1556
1557    /**
1558     * @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
1559     */
1560    public PaymentReconciliation setStatusElement(Enumeration<FinancialResourceStatusCodes> value) { 
1561      this.status = value;
1562      return this;
1563    }
1564
1565    /**
1566     * @return The status of the resource instance.
1567     */
1568    public FinancialResourceStatusCodes getStatus() { 
1569      return this.status == null ? null : this.status.getValue();
1570    }
1571
1572    /**
1573     * @param value The status of the resource instance.
1574     */
1575    public PaymentReconciliation setStatus(FinancialResourceStatusCodes value) { 
1576        if (this.status == null)
1577          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory());
1578        this.status.setValue(value);
1579      return this;
1580    }
1581
1582    /**
1583     * @return {@link #kind} (The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.)
1584     */
1585    public CodeableConcept getKind() { 
1586      if (this.kind == null)
1587        if (Configuration.errorOnAutoCreate())
1588          throw new Error("Attempt to auto-create PaymentReconciliation.kind");
1589        else if (Configuration.doAutoCreate())
1590          this.kind = new CodeableConcept(); // cc
1591      return this.kind;
1592    }
1593
1594    public boolean hasKind() { 
1595      return this.kind != null && !this.kind.isEmpty();
1596    }
1597
1598    /**
1599     * @param value {@link #kind} (The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.)
1600     */
1601    public PaymentReconciliation setKind(CodeableConcept value) { 
1602      this.kind = value;
1603      return this;
1604    }
1605
1606    /**
1607     * @return {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.)
1608     */
1609    public Period getPeriod() { 
1610      if (this.period == null)
1611        if (Configuration.errorOnAutoCreate())
1612          throw new Error("Attempt to auto-create PaymentReconciliation.period");
1613        else if (Configuration.doAutoCreate())
1614          this.period = new Period(); // cc
1615      return this.period;
1616    }
1617
1618    public boolean hasPeriod() { 
1619      return this.period != null && !this.period.isEmpty();
1620    }
1621
1622    /**
1623     * @param value {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.)
1624     */
1625    public PaymentReconciliation setPeriod(Period value) { 
1626      this.period = value;
1627      return this;
1628    }
1629
1630    /**
1631     * @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
1632     */
1633    public DateTimeType getCreatedElement() { 
1634      if (this.created == null)
1635        if (Configuration.errorOnAutoCreate())
1636          throw new Error("Attempt to auto-create PaymentReconciliation.created");
1637        else if (Configuration.doAutoCreate())
1638          this.created = new DateTimeType(); // bb
1639      return this.created;
1640    }
1641
1642    public boolean hasCreatedElement() { 
1643      return this.created != null && !this.created.isEmpty();
1644    }
1645
1646    public boolean hasCreated() { 
1647      return this.created != null && !this.created.isEmpty();
1648    }
1649
1650    /**
1651     * @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
1652     */
1653    public PaymentReconciliation setCreatedElement(DateTimeType value) { 
1654      this.created = value;
1655      return this;
1656    }
1657
1658    /**
1659     * @return The date when the resource was created.
1660     */
1661    public Date getCreated() { 
1662      return this.created == null ? null : this.created.getValue();
1663    }
1664
1665    /**
1666     * @param value The date when the resource was created.
1667     */
1668    public PaymentReconciliation setCreated(Date value) { 
1669        if (this.created == null)
1670          this.created = new DateTimeType();
1671        this.created.setValue(value);
1672      return this;
1673    }
1674
1675    /**
1676     * @return {@link #enterer} (Payment enterer if not the actual payment issuer.)
1677     */
1678    public Reference getEnterer() { 
1679      if (this.enterer == null)
1680        if (Configuration.errorOnAutoCreate())
1681          throw new Error("Attempt to auto-create PaymentReconciliation.enterer");
1682        else if (Configuration.doAutoCreate())
1683          this.enterer = new Reference(); // cc
1684      return this.enterer;
1685    }
1686
1687    public boolean hasEnterer() { 
1688      return this.enterer != null && !this.enterer.isEmpty();
1689    }
1690
1691    /**
1692     * @param value {@link #enterer} (Payment enterer if not the actual payment issuer.)
1693     */
1694    public PaymentReconciliation setEnterer(Reference value) { 
1695      this.enterer = value;
1696      return this;
1697    }
1698
1699    /**
1700     * @return {@link #issuerType} (The type of the source such as patient or insurance.)
1701     */
1702    public CodeableConcept getIssuerType() { 
1703      if (this.issuerType == null)
1704        if (Configuration.errorOnAutoCreate())
1705          throw new Error("Attempt to auto-create PaymentReconciliation.issuerType");
1706        else if (Configuration.doAutoCreate())
1707          this.issuerType = new CodeableConcept(); // cc
1708      return this.issuerType;
1709    }
1710
1711    public boolean hasIssuerType() { 
1712      return this.issuerType != null && !this.issuerType.isEmpty();
1713    }
1714
1715    /**
1716     * @param value {@link #issuerType} (The type of the source such as patient or insurance.)
1717     */
1718    public PaymentReconciliation setIssuerType(CodeableConcept value) { 
1719      this.issuerType = value;
1720      return this;
1721    }
1722
1723    /**
1724     * @return {@link #paymentIssuer} (The party who generated the payment.)
1725     */
1726    public Reference getPaymentIssuer() { 
1727      if (this.paymentIssuer == null)
1728        if (Configuration.errorOnAutoCreate())
1729          throw new Error("Attempt to auto-create PaymentReconciliation.paymentIssuer");
1730        else if (Configuration.doAutoCreate())
1731          this.paymentIssuer = new Reference(); // cc
1732      return this.paymentIssuer;
1733    }
1734
1735    public boolean hasPaymentIssuer() { 
1736      return this.paymentIssuer != null && !this.paymentIssuer.isEmpty();
1737    }
1738
1739    /**
1740     * @param value {@link #paymentIssuer} (The party who generated the payment.)
1741     */
1742    public PaymentReconciliation setPaymentIssuer(Reference value) { 
1743      this.paymentIssuer = value;
1744      return this;
1745    }
1746
1747    /**
1748     * @return {@link #request} (Original request resource reference.)
1749     */
1750    public Reference getRequest() { 
1751      if (this.request == null)
1752        if (Configuration.errorOnAutoCreate())
1753          throw new Error("Attempt to auto-create PaymentReconciliation.request");
1754        else if (Configuration.doAutoCreate())
1755          this.request = new Reference(); // cc
1756      return this.request;
1757    }
1758
1759    public boolean hasRequest() { 
1760      return this.request != null && !this.request.isEmpty();
1761    }
1762
1763    /**
1764     * @param value {@link #request} (Original request resource reference.)
1765     */
1766    public PaymentReconciliation setRequest(Reference value) { 
1767      this.request = value;
1768      return this;
1769    }
1770
1771    /**
1772     * @return {@link #requestor} (The practitioner who is responsible for the services rendered to the patient.)
1773     */
1774    public Reference getRequestor() { 
1775      if (this.requestor == null)
1776        if (Configuration.errorOnAutoCreate())
1777          throw new Error("Attempt to auto-create PaymentReconciliation.requestor");
1778        else if (Configuration.doAutoCreate())
1779          this.requestor = new Reference(); // cc
1780      return this.requestor;
1781    }
1782
1783    public boolean hasRequestor() { 
1784      return this.requestor != null && !this.requestor.isEmpty();
1785    }
1786
1787    /**
1788     * @param value {@link #requestor} (The practitioner who is responsible for the services rendered to the patient.)
1789     */
1790    public PaymentReconciliation setRequestor(Reference value) { 
1791      this.requestor = value;
1792      return this;
1793    }
1794
1795    /**
1796     * @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
1797     */
1798    public Enumeration<PaymentOutcome> getOutcomeElement() { 
1799      if (this.outcome == null)
1800        if (Configuration.errorOnAutoCreate())
1801          throw new Error("Attempt to auto-create PaymentReconciliation.outcome");
1802        else if (Configuration.doAutoCreate())
1803          this.outcome = new Enumeration<PaymentOutcome>(new PaymentOutcomeEnumFactory()); // bb
1804      return this.outcome;
1805    }
1806
1807    public boolean hasOutcomeElement() { 
1808      return this.outcome != null && !this.outcome.isEmpty();
1809    }
1810
1811    public boolean hasOutcome() { 
1812      return this.outcome != null && !this.outcome.isEmpty();
1813    }
1814
1815    /**
1816     * @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
1817     */
1818    public PaymentReconciliation setOutcomeElement(Enumeration<PaymentOutcome> value) { 
1819      this.outcome = value;
1820      return this;
1821    }
1822
1823    /**
1824     * @return The outcome of a request for a reconciliation.
1825     */
1826    public PaymentOutcome getOutcome() { 
1827      return this.outcome == null ? null : this.outcome.getValue();
1828    }
1829
1830    /**
1831     * @param value The outcome of a request for a reconciliation.
1832     */
1833    public PaymentReconciliation setOutcome(PaymentOutcome value) { 
1834      if (value == null)
1835        this.outcome = null;
1836      else {
1837        if (this.outcome == null)
1838          this.outcome = new Enumeration<PaymentOutcome>(new PaymentOutcomeEnumFactory());
1839        this.outcome.setValue(value);
1840      }
1841      return this;
1842    }
1843
1844    /**
1845     * @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
1846     */
1847    public StringType getDispositionElement() { 
1848      if (this.disposition == null)
1849        if (Configuration.errorOnAutoCreate())
1850          throw new Error("Attempt to auto-create PaymentReconciliation.disposition");
1851        else if (Configuration.doAutoCreate())
1852          this.disposition = new StringType(); // bb
1853      return this.disposition;
1854    }
1855
1856    public boolean hasDispositionElement() { 
1857      return this.disposition != null && !this.disposition.isEmpty();
1858    }
1859
1860    public boolean hasDisposition() { 
1861      return this.disposition != null && !this.disposition.isEmpty();
1862    }
1863
1864    /**
1865     * @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
1866     */
1867    public PaymentReconciliation setDispositionElement(StringType value) { 
1868      this.disposition = value;
1869      return this;
1870    }
1871
1872    /**
1873     * @return A human readable description of the status of the request for the reconciliation.
1874     */
1875    public String getDisposition() { 
1876      return this.disposition == null ? null : this.disposition.getValue();
1877    }
1878
1879    /**
1880     * @param value A human readable description of the status of the request for the reconciliation.
1881     */
1882    public PaymentReconciliation setDisposition(String value) { 
1883      if (Utilities.noString(value))
1884        this.disposition = null;
1885      else {
1886        if (this.disposition == null)
1887          this.disposition = new StringType();
1888        this.disposition.setValue(value);
1889      }
1890      return this;
1891    }
1892
1893    /**
1894     * @return {@link #date} (The date of payment as indicated on the financial instrument.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1895     */
1896    public DateType getDateElement() { 
1897      if (this.date == null)
1898        if (Configuration.errorOnAutoCreate())
1899          throw new Error("Attempt to auto-create PaymentReconciliation.date");
1900        else if (Configuration.doAutoCreate())
1901          this.date = new DateType(); // bb
1902      return this.date;
1903    }
1904
1905    public boolean hasDateElement() { 
1906      return this.date != null && !this.date.isEmpty();
1907    }
1908
1909    public boolean hasDate() { 
1910      return this.date != null && !this.date.isEmpty();
1911    }
1912
1913    /**
1914     * @param value {@link #date} (The date of payment as indicated on the financial instrument.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1915     */
1916    public PaymentReconciliation setDateElement(DateType value) { 
1917      this.date = value;
1918      return this;
1919    }
1920
1921    /**
1922     * @return The date of payment as indicated on the financial instrument.
1923     */
1924    public Date getDate() { 
1925      return this.date == null ? null : this.date.getValue();
1926    }
1927
1928    /**
1929     * @param value The date of payment as indicated on the financial instrument.
1930     */
1931    public PaymentReconciliation setDate(Date value) { 
1932        if (this.date == null)
1933          this.date = new DateType();
1934        this.date.setValue(value);
1935      return this;
1936    }
1937
1938    /**
1939     * @return {@link #location} (The location of the site or device for electronic transfers or physical location for cash payments.)
1940     */
1941    public Reference getLocation() { 
1942      if (this.location == null)
1943        if (Configuration.errorOnAutoCreate())
1944          throw new Error("Attempt to auto-create PaymentReconciliation.location");
1945        else if (Configuration.doAutoCreate())
1946          this.location = new Reference(); // cc
1947      return this.location;
1948    }
1949
1950    public boolean hasLocation() { 
1951      return this.location != null && !this.location.isEmpty();
1952    }
1953
1954    /**
1955     * @param value {@link #location} (The location of the site or device for electronic transfers or physical location for cash payments.)
1956     */
1957    public PaymentReconciliation setLocation(Reference value) { 
1958      this.location = value;
1959      return this;
1960    }
1961
1962    /**
1963     * @return {@link #method} (The means of payment such as check, card cash, or electronic funds transfer.)
1964     */
1965    public CodeableConcept getMethod() { 
1966      if (this.method == null)
1967        if (Configuration.errorOnAutoCreate())
1968          throw new Error("Attempt to auto-create PaymentReconciliation.method");
1969        else if (Configuration.doAutoCreate())
1970          this.method = new CodeableConcept(); // cc
1971      return this.method;
1972    }
1973
1974    public boolean hasMethod() { 
1975      return this.method != null && !this.method.isEmpty();
1976    }
1977
1978    /**
1979     * @param value {@link #method} (The means of payment such as check, card cash, or electronic funds transfer.)
1980     */
1981    public PaymentReconciliation setMethod(CodeableConcept value) { 
1982      this.method = value;
1983      return this;
1984    }
1985
1986    /**
1987     * @return {@link #cardBrand} (The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.). This is the underlying object with id, value and extensions. The accessor "getCardBrand" gives direct access to the value
1988     */
1989    public StringType getCardBrandElement() { 
1990      if (this.cardBrand == null)
1991        if (Configuration.errorOnAutoCreate())
1992          throw new Error("Attempt to auto-create PaymentReconciliation.cardBrand");
1993        else if (Configuration.doAutoCreate())
1994          this.cardBrand = new StringType(); // bb
1995      return this.cardBrand;
1996    }
1997
1998    public boolean hasCardBrandElement() { 
1999      return this.cardBrand != null && !this.cardBrand.isEmpty();
2000    }
2001
2002    public boolean hasCardBrand() { 
2003      return this.cardBrand != null && !this.cardBrand.isEmpty();
2004    }
2005
2006    /**
2007     * @param value {@link #cardBrand} (The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.). This is the underlying object with id, value and extensions. The accessor "getCardBrand" gives direct access to the value
2008     */
2009    public PaymentReconciliation setCardBrandElement(StringType value) { 
2010      this.cardBrand = value;
2011      return this;
2012    }
2013
2014    /**
2015     * @return The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.
2016     */
2017    public String getCardBrand() { 
2018      return this.cardBrand == null ? null : this.cardBrand.getValue();
2019    }
2020
2021    /**
2022     * @param value The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.
2023     */
2024    public PaymentReconciliation setCardBrand(String value) { 
2025      if (Utilities.noString(value))
2026        this.cardBrand = null;
2027      else {
2028        if (this.cardBrand == null)
2029          this.cardBrand = new StringType();
2030        this.cardBrand.setValue(value);
2031      }
2032      return this;
2033    }
2034
2035    /**
2036     * @return {@link #accountNumber} (A portion of the account number, often the last 4 digits, used for verification not charging purposes.). This is the underlying object with id, value and extensions. The accessor "getAccountNumber" gives direct access to the value
2037     */
2038    public StringType getAccountNumberElement() { 
2039      if (this.accountNumber == null)
2040        if (Configuration.errorOnAutoCreate())
2041          throw new Error("Attempt to auto-create PaymentReconciliation.accountNumber");
2042        else if (Configuration.doAutoCreate())
2043          this.accountNumber = new StringType(); // bb
2044      return this.accountNumber;
2045    }
2046
2047    public boolean hasAccountNumberElement() { 
2048      return this.accountNumber != null && !this.accountNumber.isEmpty();
2049    }
2050
2051    public boolean hasAccountNumber() { 
2052      return this.accountNumber != null && !this.accountNumber.isEmpty();
2053    }
2054
2055    /**
2056     * @param value {@link #accountNumber} (A portion of the account number, often the last 4 digits, used for verification not charging purposes.). This is the underlying object with id, value and extensions. The accessor "getAccountNumber" gives direct access to the value
2057     */
2058    public PaymentReconciliation setAccountNumberElement(StringType value) { 
2059      this.accountNumber = value;
2060      return this;
2061    }
2062
2063    /**
2064     * @return A portion of the account number, often the last 4 digits, used for verification not charging purposes.
2065     */
2066    public String getAccountNumber() { 
2067      return this.accountNumber == null ? null : this.accountNumber.getValue();
2068    }
2069
2070    /**
2071     * @param value A portion of the account number, often the last 4 digits, used for verification not charging purposes.
2072     */
2073    public PaymentReconciliation setAccountNumber(String value) { 
2074      if (Utilities.noString(value))
2075        this.accountNumber = null;
2076      else {
2077        if (this.accountNumber == null)
2078          this.accountNumber = new StringType();
2079        this.accountNumber.setValue(value);
2080      }
2081      return this;
2082    }
2083
2084    /**
2085     * @return {@link #expirationDate} (The year and month (YYYY-MM) when the instrument, typically card, expires.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value
2086     */
2087    public DateType getExpirationDateElement() { 
2088      if (this.expirationDate == null)
2089        if (Configuration.errorOnAutoCreate())
2090          throw new Error("Attempt to auto-create PaymentReconciliation.expirationDate");
2091        else if (Configuration.doAutoCreate())
2092          this.expirationDate = new DateType(); // bb
2093      return this.expirationDate;
2094    }
2095
2096    public boolean hasExpirationDateElement() { 
2097      return this.expirationDate != null && !this.expirationDate.isEmpty();
2098    }
2099
2100    public boolean hasExpirationDate() { 
2101      return this.expirationDate != null && !this.expirationDate.isEmpty();
2102    }
2103
2104    /**
2105     * @param value {@link #expirationDate} (The year and month (YYYY-MM) when the instrument, typically card, expires.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value
2106     */
2107    public PaymentReconciliation setExpirationDateElement(DateType value) { 
2108      this.expirationDate = value;
2109      return this;
2110    }
2111
2112    /**
2113     * @return The year and month (YYYY-MM) when the instrument, typically card, expires.
2114     */
2115    public Date getExpirationDate() { 
2116      return this.expirationDate == null ? null : this.expirationDate.getValue();
2117    }
2118
2119    /**
2120     * @param value The year and month (YYYY-MM) when the instrument, typically card, expires.
2121     */
2122    public PaymentReconciliation setExpirationDate(Date value) { 
2123      if (value == null)
2124        this.expirationDate = null;
2125      else {
2126        if (this.expirationDate == null)
2127          this.expirationDate = new DateType();
2128        this.expirationDate.setValue(value);
2129      }
2130      return this;
2131    }
2132
2133    /**
2134     * @return {@link #processor} (The name of the card processor, etf processor, bank for checks.). This is the underlying object with id, value and extensions. The accessor "getProcessor" gives direct access to the value
2135     */
2136    public StringType getProcessorElement() { 
2137      if (this.processor == null)
2138        if (Configuration.errorOnAutoCreate())
2139          throw new Error("Attempt to auto-create PaymentReconciliation.processor");
2140        else if (Configuration.doAutoCreate())
2141          this.processor = new StringType(); // bb
2142      return this.processor;
2143    }
2144
2145    public boolean hasProcessorElement() { 
2146      return this.processor != null && !this.processor.isEmpty();
2147    }
2148
2149    public boolean hasProcessor() { 
2150      return this.processor != null && !this.processor.isEmpty();
2151    }
2152
2153    /**
2154     * @param value {@link #processor} (The name of the card processor, etf processor, bank for checks.). This is the underlying object with id, value and extensions. The accessor "getProcessor" gives direct access to the value
2155     */
2156    public PaymentReconciliation setProcessorElement(StringType value) { 
2157      this.processor = value;
2158      return this;
2159    }
2160
2161    /**
2162     * @return The name of the card processor, etf processor, bank for checks.
2163     */
2164    public String getProcessor() { 
2165      return this.processor == null ? null : this.processor.getValue();
2166    }
2167
2168    /**
2169     * @param value The name of the card processor, etf processor, bank for checks.
2170     */
2171    public PaymentReconciliation setProcessor(String value) { 
2172      if (Utilities.noString(value))
2173        this.processor = null;
2174      else {
2175        if (this.processor == null)
2176          this.processor = new StringType();
2177        this.processor.setValue(value);
2178      }
2179      return this;
2180    }
2181
2182    /**
2183     * @return {@link #referenceNumber} (The check number, eft reference, car processor reference.). This is the underlying object with id, value and extensions. The accessor "getReferenceNumber" gives direct access to the value
2184     */
2185    public StringType getReferenceNumberElement() { 
2186      if (this.referenceNumber == null)
2187        if (Configuration.errorOnAutoCreate())
2188          throw new Error("Attempt to auto-create PaymentReconciliation.referenceNumber");
2189        else if (Configuration.doAutoCreate())
2190          this.referenceNumber = new StringType(); // bb
2191      return this.referenceNumber;
2192    }
2193
2194    public boolean hasReferenceNumberElement() { 
2195      return this.referenceNumber != null && !this.referenceNumber.isEmpty();
2196    }
2197
2198    public boolean hasReferenceNumber() { 
2199      return this.referenceNumber != null && !this.referenceNumber.isEmpty();
2200    }
2201
2202    /**
2203     * @param value {@link #referenceNumber} (The check number, eft reference, car processor reference.). This is the underlying object with id, value and extensions. The accessor "getReferenceNumber" gives direct access to the value
2204     */
2205    public PaymentReconciliation setReferenceNumberElement(StringType value) { 
2206      this.referenceNumber = value;
2207      return this;
2208    }
2209
2210    /**
2211     * @return The check number, eft reference, car processor reference.
2212     */
2213    public String getReferenceNumber() { 
2214      return this.referenceNumber == null ? null : this.referenceNumber.getValue();
2215    }
2216
2217    /**
2218     * @param value The check number, eft reference, car processor reference.
2219     */
2220    public PaymentReconciliation setReferenceNumber(String value) { 
2221      if (Utilities.noString(value))
2222        this.referenceNumber = null;
2223      else {
2224        if (this.referenceNumber == null)
2225          this.referenceNumber = new StringType();
2226        this.referenceNumber.setValue(value);
2227      }
2228      return this;
2229    }
2230
2231    /**
2232     * @return {@link #authorization} (An alphanumeric issued by the processor to confirm the successful issuance of payment.). This is the underlying object with id, value and extensions. The accessor "getAuthorization" gives direct access to the value
2233     */
2234    public StringType getAuthorizationElement() { 
2235      if (this.authorization == null)
2236        if (Configuration.errorOnAutoCreate())
2237          throw new Error("Attempt to auto-create PaymentReconciliation.authorization");
2238        else if (Configuration.doAutoCreate())
2239          this.authorization = new StringType(); // bb
2240      return this.authorization;
2241    }
2242
2243    public boolean hasAuthorizationElement() { 
2244      return this.authorization != null && !this.authorization.isEmpty();
2245    }
2246
2247    public boolean hasAuthorization() { 
2248      return this.authorization != null && !this.authorization.isEmpty();
2249    }
2250
2251    /**
2252     * @param value {@link #authorization} (An alphanumeric issued by the processor to confirm the successful issuance of payment.). This is the underlying object with id, value and extensions. The accessor "getAuthorization" gives direct access to the value
2253     */
2254    public PaymentReconciliation setAuthorizationElement(StringType value) { 
2255      this.authorization = value;
2256      return this;
2257    }
2258
2259    /**
2260     * @return An alphanumeric issued by the processor to confirm the successful issuance of payment.
2261     */
2262    public String getAuthorization() { 
2263      return this.authorization == null ? null : this.authorization.getValue();
2264    }
2265
2266    /**
2267     * @param value An alphanumeric issued by the processor to confirm the successful issuance of payment.
2268     */
2269    public PaymentReconciliation setAuthorization(String value) { 
2270      if (Utilities.noString(value))
2271        this.authorization = null;
2272      else {
2273        if (this.authorization == null)
2274          this.authorization = new StringType();
2275        this.authorization.setValue(value);
2276      }
2277      return this;
2278    }
2279
2280    /**
2281     * @return {@link #tenderedAmount} (The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.)
2282     */
2283    public Money getTenderedAmount() { 
2284      if (this.tenderedAmount == null)
2285        if (Configuration.errorOnAutoCreate())
2286          throw new Error("Attempt to auto-create PaymentReconciliation.tenderedAmount");
2287        else if (Configuration.doAutoCreate())
2288          this.tenderedAmount = new Money(); // cc
2289      return this.tenderedAmount;
2290    }
2291
2292    public boolean hasTenderedAmount() { 
2293      return this.tenderedAmount != null && !this.tenderedAmount.isEmpty();
2294    }
2295
2296    /**
2297     * @param value {@link #tenderedAmount} (The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.)
2298     */
2299    public PaymentReconciliation setTenderedAmount(Money value) { 
2300      this.tenderedAmount = value;
2301      return this;
2302    }
2303
2304    /**
2305     * @return {@link #returnedAmount} (The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.)
2306     */
2307    public Money getReturnedAmount() { 
2308      if (this.returnedAmount == null)
2309        if (Configuration.errorOnAutoCreate())
2310          throw new Error("Attempt to auto-create PaymentReconciliation.returnedAmount");
2311        else if (Configuration.doAutoCreate())
2312          this.returnedAmount = new Money(); // cc
2313      return this.returnedAmount;
2314    }
2315
2316    public boolean hasReturnedAmount() { 
2317      return this.returnedAmount != null && !this.returnedAmount.isEmpty();
2318    }
2319
2320    /**
2321     * @param value {@link #returnedAmount} (The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.)
2322     */
2323    public PaymentReconciliation setReturnedAmount(Money value) { 
2324      this.returnedAmount = value;
2325      return this;
2326    }
2327
2328    /**
2329     * @return {@link #amount} (Total payment amount as indicated on the financial instrument.)
2330     */
2331    public Money getAmount() { 
2332      if (this.amount == null)
2333        if (Configuration.errorOnAutoCreate())
2334          throw new Error("Attempt to auto-create PaymentReconciliation.amount");
2335        else if (Configuration.doAutoCreate())
2336          this.amount = new Money(); // cc
2337      return this.amount;
2338    }
2339
2340    public boolean hasAmount() { 
2341      return this.amount != null && !this.amount.isEmpty();
2342    }
2343
2344    /**
2345     * @param value {@link #amount} (Total payment amount as indicated on the financial instrument.)
2346     */
2347    public PaymentReconciliation setAmount(Money value) { 
2348      this.amount = value;
2349      return this;
2350    }
2351
2352    /**
2353     * @return {@link #paymentIdentifier} (Issuer's unique identifier for the payment instrument.)
2354     */
2355    public Identifier getPaymentIdentifier() { 
2356      if (this.paymentIdentifier == null)
2357        if (Configuration.errorOnAutoCreate())
2358          throw new Error("Attempt to auto-create PaymentReconciliation.paymentIdentifier");
2359        else if (Configuration.doAutoCreate())
2360          this.paymentIdentifier = new Identifier(); // cc
2361      return this.paymentIdentifier;
2362    }
2363
2364    public boolean hasPaymentIdentifier() { 
2365      return this.paymentIdentifier != null && !this.paymentIdentifier.isEmpty();
2366    }
2367
2368    /**
2369     * @param value {@link #paymentIdentifier} (Issuer's unique identifier for the payment instrument.)
2370     */
2371    public PaymentReconciliation setPaymentIdentifier(Identifier value) { 
2372      this.paymentIdentifier = value;
2373      return this;
2374    }
2375
2376    /**
2377     * @return {@link #allocation} (Distribution of the payment amount for a previously acknowledged payable.)
2378     */
2379    public List<PaymentReconciliationAllocationComponent> getAllocation() { 
2380      if (this.allocation == null)
2381        this.allocation = new ArrayList<PaymentReconciliationAllocationComponent>();
2382      return this.allocation;
2383    }
2384
2385    /**
2386     * @return Returns a reference to <code>this</code> for easy method chaining
2387     */
2388    public PaymentReconciliation setAllocation(List<PaymentReconciliationAllocationComponent> theAllocation) { 
2389      this.allocation = theAllocation;
2390      return this;
2391    }
2392
2393    public boolean hasAllocation() { 
2394      if (this.allocation == null)
2395        return false;
2396      for (PaymentReconciliationAllocationComponent item : this.allocation)
2397        if (!item.isEmpty())
2398          return true;
2399      return false;
2400    }
2401
2402    public PaymentReconciliationAllocationComponent addAllocation() { //3
2403      PaymentReconciliationAllocationComponent t = new PaymentReconciliationAllocationComponent();
2404      if (this.allocation == null)
2405        this.allocation = new ArrayList<PaymentReconciliationAllocationComponent>();
2406      this.allocation.add(t);
2407      return t;
2408    }
2409
2410    public PaymentReconciliation addAllocation(PaymentReconciliationAllocationComponent t) { //3
2411      if (t == null)
2412        return this;
2413      if (this.allocation == null)
2414        this.allocation = new ArrayList<PaymentReconciliationAllocationComponent>();
2415      this.allocation.add(t);
2416      return this;
2417    }
2418
2419    /**
2420     * @return The first repetition of repeating field {@link #allocation}, creating it if it does not already exist {3}
2421     */
2422    public PaymentReconciliationAllocationComponent getAllocationFirstRep() { 
2423      if (getAllocation().isEmpty()) {
2424        addAllocation();
2425      }
2426      return getAllocation().get(0);
2427    }
2428
2429    /**
2430     * @return {@link #formCode} (A code for the form to be used for printing the content.)
2431     */
2432    public CodeableConcept getFormCode() { 
2433      if (this.formCode == null)
2434        if (Configuration.errorOnAutoCreate())
2435          throw new Error("Attempt to auto-create PaymentReconciliation.formCode");
2436        else if (Configuration.doAutoCreate())
2437          this.formCode = new CodeableConcept(); // cc
2438      return this.formCode;
2439    }
2440
2441    public boolean hasFormCode() { 
2442      return this.formCode != null && !this.formCode.isEmpty();
2443    }
2444
2445    /**
2446     * @param value {@link #formCode} (A code for the form to be used for printing the content.)
2447     */
2448    public PaymentReconciliation setFormCode(CodeableConcept value) { 
2449      this.formCode = value;
2450      return this;
2451    }
2452
2453    /**
2454     * @return {@link #processNote} (A note that describes or explains the processing in a human readable form.)
2455     */
2456    public List<NotesComponent> getProcessNote() { 
2457      if (this.processNote == null)
2458        this.processNote = new ArrayList<NotesComponent>();
2459      return this.processNote;
2460    }
2461
2462    /**
2463     * @return Returns a reference to <code>this</code> for easy method chaining
2464     */
2465    public PaymentReconciliation setProcessNote(List<NotesComponent> theProcessNote) { 
2466      this.processNote = theProcessNote;
2467      return this;
2468    }
2469
2470    public boolean hasProcessNote() { 
2471      if (this.processNote == null)
2472        return false;
2473      for (NotesComponent item : this.processNote)
2474        if (!item.isEmpty())
2475          return true;
2476      return false;
2477    }
2478
2479    public NotesComponent addProcessNote() { //3
2480      NotesComponent t = new NotesComponent();
2481      if (this.processNote == null)
2482        this.processNote = new ArrayList<NotesComponent>();
2483      this.processNote.add(t);
2484      return t;
2485    }
2486
2487    public PaymentReconciliation addProcessNote(NotesComponent t) { //3
2488      if (t == null)
2489        return this;
2490      if (this.processNote == null)
2491        this.processNote = new ArrayList<NotesComponent>();
2492      this.processNote.add(t);
2493      return this;
2494    }
2495
2496    /**
2497     * @return The first repetition of repeating field {@link #processNote}, creating it if it does not already exist {3}
2498     */
2499    public NotesComponent getProcessNoteFirstRep() { 
2500      if (getProcessNote().isEmpty()) {
2501        addProcessNote();
2502      }
2503      return getProcessNote().get(0);
2504    }
2505
2506      protected void listChildren(List<Property> children) {
2507        super.listChildren(children);
2508        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this payment reconciliation.", 0, java.lang.Integer.MAX_VALUE, identifier));
2509        children.add(new Property("type", "CodeableConcept", "Code to indicate the nature of the payment such as payment, adjustment.", 0, 1, type));
2510        children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status));
2511        children.add(new Property("kind", "CodeableConcept", "The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.", 0, 1, kind));
2512        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));
2513        children.add(new Property("created", "dateTime", "The date when the resource was created.", 0, 1, created));
2514        children.add(new Property("enterer", "Reference(Practitioner|PractitionerRole|Organization)", "Payment enterer if not the actual payment issuer.", 0, 1, enterer));
2515        children.add(new Property("issuerType", "CodeableConcept", "The type of the source such as patient or insurance.", 0, 1, issuerType));
2516        children.add(new Property("paymentIssuer", "Reference(Organization|Patient|Person|RelatedPerson)", "The party who generated the payment.", 0, 1, paymentIssuer));
2517        children.add(new Property("request", "Reference(Task)", "Original request resource reference.", 0, 1, request));
2518        children.add(new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The practitioner who is responsible for the services rendered to the patient.", 0, 1, requestor));
2519        children.add(new Property("outcome", "code", "The outcome of a request for a reconciliation.", 0, 1, outcome));
2520        children.add(new Property("disposition", "string", "A human readable description of the status of the request for the reconciliation.", 0, 1, disposition));
2521        children.add(new Property("date", "date", "The date of payment as indicated on the financial instrument.", 0, 1, date));
2522        children.add(new Property("location", "Reference(Location)", "The location of the site or device for electronic transfers or physical location for cash payments.", 0, 1, location));
2523        children.add(new Property("method", "CodeableConcept", "The means of payment such as check, card cash, or electronic funds transfer.", 0, 1, method));
2524        children.add(new Property("cardBrand", "string", "The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.", 0, 1, cardBrand));
2525        children.add(new Property("accountNumber", "string", "A portion of the account number, often the last 4 digits, used for verification not charging purposes.", 0, 1, accountNumber));
2526        children.add(new Property("expirationDate", "date", "The year and month (YYYY-MM) when the instrument, typically card, expires.", 0, 1, expirationDate));
2527        children.add(new Property("processor", "string", "The name of the card processor, etf processor, bank for checks.", 0, 1, processor));
2528        children.add(new Property("referenceNumber", "string", "The check number, eft reference, car processor reference.", 0, 1, referenceNumber));
2529        children.add(new Property("authorization", "string", "An alphanumeric issued by the processor to confirm the successful issuance of payment.", 0, 1, authorization));
2530        children.add(new Property("tenderedAmount", "Money", "The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.", 0, 1, tenderedAmount));
2531        children.add(new Property("returnedAmount", "Money", "The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.", 0, 1, returnedAmount));
2532        children.add(new Property("amount", "Money", "Total payment amount as indicated on the financial instrument.", 0, 1, amount));
2533        children.add(new Property("paymentIdentifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, paymentIdentifier));
2534        children.add(new Property("allocation", "", "Distribution of the payment amount for a previously acknowledged payable.", 0, java.lang.Integer.MAX_VALUE, allocation));
2535        children.add(new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode));
2536        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));
2537      }
2538
2539      @Override
2540      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2541        switch (_hash) {
2542        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this payment reconciliation.", 0, java.lang.Integer.MAX_VALUE, identifier);
2543        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Code to indicate the nature of the payment such as payment, adjustment.", 0, 1, type);
2544        case -892481550: /*status*/  return new Property("status", "code", "The status of the resource instance.", 0, 1, status);
2545        case 3292052: /*kind*/  return new Property("kind", "CodeableConcept", "The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.", 0, 1, kind);
2546        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);
2547        case 1028554472: /*created*/  return new Property("created", "dateTime", "The date when the resource was created.", 0, 1, created);
2548        case -1591951995: /*enterer*/  return new Property("enterer", "Reference(Practitioner|PractitionerRole|Organization)", "Payment enterer if not the actual payment issuer.", 0, 1, enterer);
2549        case 1459974547: /*issuerType*/  return new Property("issuerType", "CodeableConcept", "The type of the source such as patient or insurance.", 0, 1, issuerType);
2550        case 1144026207: /*paymentIssuer*/  return new Property("paymentIssuer", "Reference(Organization|Patient|Person|RelatedPerson)", "The party who generated the payment.", 0, 1, paymentIssuer);
2551        case 1095692943: /*request*/  return new Property("request", "Reference(Task)", "Original request resource reference.", 0, 1, request);
2552        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);
2553        case -1106507950: /*outcome*/  return new Property("outcome", "code", "The outcome of a request for a reconciliation.", 0, 1, outcome);
2554        case 583380919: /*disposition*/  return new Property("disposition", "string", "A human readable description of the status of the request for the reconciliation.", 0, 1, disposition);
2555        case 3076014: /*date*/  return new Property("date", "date", "The date of payment as indicated on the financial instrument.", 0, 1, date);
2556        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The location of the site or device for electronic transfers or physical location for cash payments.", 0, 1, location);
2557        case -1077554975: /*method*/  return new Property("method", "CodeableConcept", "The means of payment such as check, card cash, or electronic funds transfer.", 0, 1, method);
2558        case -271889833: /*cardBrand*/  return new Property("cardBrand", "string", "The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.", 0, 1, cardBrand);
2559        case -1011205162: /*accountNumber*/  return new Property("accountNumber", "string", "A portion of the account number, often the last 4 digits, used for verification not charging purposes.", 0, 1, accountNumber);
2560        case -668811523: /*expirationDate*/  return new Property("expirationDate", "date", "The year and month (YYYY-MM) when the instrument, typically card, expires.", 0, 1, expirationDate);
2561        case -1094759278: /*processor*/  return new Property("processor", "string", "The name of the card processor, etf processor, bank for checks.", 0, 1, processor);
2562        case 744563316: /*referenceNumber*/  return new Property("referenceNumber", "string", "The check number, eft reference, car processor reference.", 0, 1, referenceNumber);
2563        case -1385570183: /*authorization*/  return new Property("authorization", "string", "An alphanumeric issued by the processor to confirm the successful issuance of payment.", 0, 1, authorization);
2564        case 1815344299: /*tenderedAmount*/  return new Property("tenderedAmount", "Money", "The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.", 0, 1, tenderedAmount);
2565        case -797236473: /*returnedAmount*/  return new Property("returnedAmount", "Money", "The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.", 0, 1, returnedAmount);
2566        case -1413853096: /*amount*/  return new Property("amount", "Money", "Total payment amount as indicated on the financial instrument.", 0, 1, amount);
2567        case 1555852111: /*paymentIdentifier*/  return new Property("paymentIdentifier", "Identifier", "Issuer's unique identifier for the payment instrument.", 0, 1, paymentIdentifier);
2568        case -1912450848: /*allocation*/  return new Property("allocation", "", "Distribution of the payment amount for a previously acknowledged payable.", 0, java.lang.Integer.MAX_VALUE, allocation);
2569        case 473181393: /*formCode*/  return new Property("formCode", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, formCode);
2570        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);
2571        default: return super.getNamedProperty(_hash, _name, _checkValid);
2572        }
2573
2574      }
2575
2576      @Override
2577      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2578        switch (hash) {
2579        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2580        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
2581        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FinancialResourceStatusCodes>
2582        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // CodeableConcept
2583        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
2584        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
2585        case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Reference
2586        case 1459974547: /*issuerType*/ return this.issuerType == null ? new Base[0] : new Base[] {this.issuerType}; // CodeableConcept
2587        case 1144026207: /*paymentIssuer*/ return this.paymentIssuer == null ? new Base[0] : new Base[] {this.paymentIssuer}; // Reference
2588        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference
2589        case 693934258: /*requestor*/ return this.requestor == null ? new Base[0] : new Base[] {this.requestor}; // Reference
2590        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<PaymentOutcome>
2591        case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
2592        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType
2593        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
2594        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // CodeableConcept
2595        case -271889833: /*cardBrand*/ return this.cardBrand == null ? new Base[0] : new Base[] {this.cardBrand}; // StringType
2596        case -1011205162: /*accountNumber*/ return this.accountNumber == null ? new Base[0] : new Base[] {this.accountNumber}; // StringType
2597        case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateType
2598        case -1094759278: /*processor*/ return this.processor == null ? new Base[0] : new Base[] {this.processor}; // StringType
2599        case 744563316: /*referenceNumber*/ return this.referenceNumber == null ? new Base[0] : new Base[] {this.referenceNumber}; // StringType
2600        case -1385570183: /*authorization*/ return this.authorization == null ? new Base[0] : new Base[] {this.authorization}; // StringType
2601        case 1815344299: /*tenderedAmount*/ return this.tenderedAmount == null ? new Base[0] : new Base[] {this.tenderedAmount}; // Money
2602        case -797236473: /*returnedAmount*/ return this.returnedAmount == null ? new Base[0] : new Base[] {this.returnedAmount}; // Money
2603        case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money
2604        case 1555852111: /*paymentIdentifier*/ return this.paymentIdentifier == null ? new Base[0] : new Base[] {this.paymentIdentifier}; // Identifier
2605        case -1912450848: /*allocation*/ return this.allocation == null ? new Base[0] : this.allocation.toArray(new Base[this.allocation.size()]); // PaymentReconciliationAllocationComponent
2606        case 473181393: /*formCode*/ return this.formCode == null ? new Base[0] : new Base[] {this.formCode}; // CodeableConcept
2607        case 202339073: /*processNote*/ return this.processNote == null ? new Base[0] : this.processNote.toArray(new Base[this.processNote.size()]); // NotesComponent
2608        default: return super.getProperty(hash, name, checkValid);
2609        }
2610
2611      }
2612
2613      @Override
2614      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2615        switch (hash) {
2616        case -1618432855: // identifier
2617          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2618          return value;
2619        case 3575610: // type
2620          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2621          return value;
2622        case -892481550: // status
2623          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2624          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2625          return value;
2626        case 3292052: // kind
2627          this.kind = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2628          return value;
2629        case -991726143: // period
2630          this.period = TypeConvertor.castToPeriod(value); // Period
2631          return value;
2632        case 1028554472: // created
2633          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2634          return value;
2635        case -1591951995: // enterer
2636          this.enterer = TypeConvertor.castToReference(value); // Reference
2637          return value;
2638        case 1459974547: // issuerType
2639          this.issuerType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2640          return value;
2641        case 1144026207: // paymentIssuer
2642          this.paymentIssuer = TypeConvertor.castToReference(value); // Reference
2643          return value;
2644        case 1095692943: // request
2645          this.request = TypeConvertor.castToReference(value); // Reference
2646          return value;
2647        case 693934258: // requestor
2648          this.requestor = TypeConvertor.castToReference(value); // Reference
2649          return value;
2650        case -1106507950: // outcome
2651          value = new PaymentOutcomeEnumFactory().fromType(TypeConvertor.castToCode(value));
2652          this.outcome = (Enumeration) value; // Enumeration<PaymentOutcome>
2653          return value;
2654        case 583380919: // disposition
2655          this.disposition = TypeConvertor.castToString(value); // StringType
2656          return value;
2657        case 3076014: // date
2658          this.date = TypeConvertor.castToDate(value); // DateType
2659          return value;
2660        case 1901043637: // location
2661          this.location = TypeConvertor.castToReference(value); // Reference
2662          return value;
2663        case -1077554975: // method
2664          this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2665          return value;
2666        case -271889833: // cardBrand
2667          this.cardBrand = TypeConvertor.castToString(value); // StringType
2668          return value;
2669        case -1011205162: // accountNumber
2670          this.accountNumber = TypeConvertor.castToString(value); // StringType
2671          return value;
2672        case -668811523: // expirationDate
2673          this.expirationDate = TypeConvertor.castToDate(value); // DateType
2674          return value;
2675        case -1094759278: // processor
2676          this.processor = TypeConvertor.castToString(value); // StringType
2677          return value;
2678        case 744563316: // referenceNumber
2679          this.referenceNumber = TypeConvertor.castToString(value); // StringType
2680          return value;
2681        case -1385570183: // authorization
2682          this.authorization = TypeConvertor.castToString(value); // StringType
2683          return value;
2684        case 1815344299: // tenderedAmount
2685          this.tenderedAmount = TypeConvertor.castToMoney(value); // Money
2686          return value;
2687        case -797236473: // returnedAmount
2688          this.returnedAmount = TypeConvertor.castToMoney(value); // Money
2689          return value;
2690        case -1413853096: // amount
2691          this.amount = TypeConvertor.castToMoney(value); // Money
2692          return value;
2693        case 1555852111: // paymentIdentifier
2694          this.paymentIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
2695          return value;
2696        case -1912450848: // allocation
2697          this.getAllocation().add((PaymentReconciliationAllocationComponent) value); // PaymentReconciliationAllocationComponent
2698          return value;
2699        case 473181393: // formCode
2700          this.formCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2701          return value;
2702        case 202339073: // processNote
2703          this.getProcessNote().add((NotesComponent) value); // NotesComponent
2704          return value;
2705        default: return super.setProperty(hash, name, value);
2706        }
2707
2708      }
2709
2710      @Override
2711      public Base setProperty(String name, Base value) throws FHIRException {
2712        if (name.equals("identifier")) {
2713          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2714        } else if (name.equals("type")) {
2715          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2716        } else if (name.equals("status")) {
2717          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2718          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2719        } else if (name.equals("kind")) {
2720          this.kind = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2721        } else if (name.equals("period")) {
2722          this.period = TypeConvertor.castToPeriod(value); // Period
2723        } else if (name.equals("created")) {
2724          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2725        } else if (name.equals("enterer")) {
2726          this.enterer = TypeConvertor.castToReference(value); // Reference
2727        } else if (name.equals("issuerType")) {
2728          this.issuerType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2729        } else if (name.equals("paymentIssuer")) {
2730          this.paymentIssuer = TypeConvertor.castToReference(value); // Reference
2731        } else if (name.equals("request")) {
2732          this.request = TypeConvertor.castToReference(value); // Reference
2733        } else if (name.equals("requestor")) {
2734          this.requestor = TypeConvertor.castToReference(value); // Reference
2735        } else if (name.equals("outcome")) {
2736          value = new PaymentOutcomeEnumFactory().fromType(TypeConvertor.castToCode(value));
2737          this.outcome = (Enumeration) value; // Enumeration<PaymentOutcome>
2738        } else if (name.equals("disposition")) {
2739          this.disposition = TypeConvertor.castToString(value); // StringType
2740        } else if (name.equals("date")) {
2741          this.date = TypeConvertor.castToDate(value); // DateType
2742        } else if (name.equals("location")) {
2743          this.location = TypeConvertor.castToReference(value); // Reference
2744        } else if (name.equals("method")) {
2745          this.method = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2746        } else if (name.equals("cardBrand")) {
2747          this.cardBrand = TypeConvertor.castToString(value); // StringType
2748        } else if (name.equals("accountNumber")) {
2749          this.accountNumber = TypeConvertor.castToString(value); // StringType
2750        } else if (name.equals("expirationDate")) {
2751          this.expirationDate = TypeConvertor.castToDate(value); // DateType
2752        } else if (name.equals("processor")) {
2753          this.processor = TypeConvertor.castToString(value); // StringType
2754        } else if (name.equals("referenceNumber")) {
2755          this.referenceNumber = TypeConvertor.castToString(value); // StringType
2756        } else if (name.equals("authorization")) {
2757          this.authorization = TypeConvertor.castToString(value); // StringType
2758        } else if (name.equals("tenderedAmount")) {
2759          this.tenderedAmount = TypeConvertor.castToMoney(value); // Money
2760        } else if (name.equals("returnedAmount")) {
2761          this.returnedAmount = TypeConvertor.castToMoney(value); // Money
2762        } else if (name.equals("amount")) {
2763          this.amount = TypeConvertor.castToMoney(value); // Money
2764        } else if (name.equals("paymentIdentifier")) {
2765          this.paymentIdentifier = TypeConvertor.castToIdentifier(value); // Identifier
2766        } else if (name.equals("allocation")) {
2767          this.getAllocation().add((PaymentReconciliationAllocationComponent) value);
2768        } else if (name.equals("formCode")) {
2769          this.formCode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2770        } else if (name.equals("processNote")) {
2771          this.getProcessNote().add((NotesComponent) value);
2772        } else
2773          return super.setProperty(name, value);
2774        return value;
2775      }
2776
2777      @Override
2778      public Base makeProperty(int hash, String name) throws FHIRException {
2779        switch (hash) {
2780        case -1618432855:  return addIdentifier(); 
2781        case 3575610:  return getType();
2782        case -892481550:  return getStatusElement();
2783        case 3292052:  return getKind();
2784        case -991726143:  return getPeriod();
2785        case 1028554472:  return getCreatedElement();
2786        case -1591951995:  return getEnterer();
2787        case 1459974547:  return getIssuerType();
2788        case 1144026207:  return getPaymentIssuer();
2789        case 1095692943:  return getRequest();
2790        case 693934258:  return getRequestor();
2791        case -1106507950:  return getOutcomeElement();
2792        case 583380919:  return getDispositionElement();
2793        case 3076014:  return getDateElement();
2794        case 1901043637:  return getLocation();
2795        case -1077554975:  return getMethod();
2796        case -271889833:  return getCardBrandElement();
2797        case -1011205162:  return getAccountNumberElement();
2798        case -668811523:  return getExpirationDateElement();
2799        case -1094759278:  return getProcessorElement();
2800        case 744563316:  return getReferenceNumberElement();
2801        case -1385570183:  return getAuthorizationElement();
2802        case 1815344299:  return getTenderedAmount();
2803        case -797236473:  return getReturnedAmount();
2804        case -1413853096:  return getAmount();
2805        case 1555852111:  return getPaymentIdentifier();
2806        case -1912450848:  return addAllocation(); 
2807        case 473181393:  return getFormCode();
2808        case 202339073:  return addProcessNote(); 
2809        default: return super.makeProperty(hash, name);
2810        }
2811
2812      }
2813
2814      @Override
2815      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2816        switch (hash) {
2817        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2818        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2819        case -892481550: /*status*/ return new String[] {"code"};
2820        case 3292052: /*kind*/ return new String[] {"CodeableConcept"};
2821        case -991726143: /*period*/ return new String[] {"Period"};
2822        case 1028554472: /*created*/ return new String[] {"dateTime"};
2823        case -1591951995: /*enterer*/ return new String[] {"Reference"};
2824        case 1459974547: /*issuerType*/ return new String[] {"CodeableConcept"};
2825        case 1144026207: /*paymentIssuer*/ return new String[] {"Reference"};
2826        case 1095692943: /*request*/ return new String[] {"Reference"};
2827        case 693934258: /*requestor*/ return new String[] {"Reference"};
2828        case -1106507950: /*outcome*/ return new String[] {"code"};
2829        case 583380919: /*disposition*/ return new String[] {"string"};
2830        case 3076014: /*date*/ return new String[] {"date"};
2831        case 1901043637: /*location*/ return new String[] {"Reference"};
2832        case -1077554975: /*method*/ return new String[] {"CodeableConcept"};
2833        case -271889833: /*cardBrand*/ return new String[] {"string"};
2834        case -1011205162: /*accountNumber*/ return new String[] {"string"};
2835        case -668811523: /*expirationDate*/ return new String[] {"date"};
2836        case -1094759278: /*processor*/ return new String[] {"string"};
2837        case 744563316: /*referenceNumber*/ return new String[] {"string"};
2838        case -1385570183: /*authorization*/ return new String[] {"string"};
2839        case 1815344299: /*tenderedAmount*/ return new String[] {"Money"};
2840        case -797236473: /*returnedAmount*/ return new String[] {"Money"};
2841        case -1413853096: /*amount*/ return new String[] {"Money"};
2842        case 1555852111: /*paymentIdentifier*/ return new String[] {"Identifier"};
2843        case -1912450848: /*allocation*/ return new String[] {};
2844        case 473181393: /*formCode*/ return new String[] {"CodeableConcept"};
2845        case 202339073: /*processNote*/ return new String[] {};
2846        default: return super.getTypesForProperty(hash, name);
2847        }
2848
2849      }
2850
2851      @Override
2852      public Base addChild(String name) throws FHIRException {
2853        if (name.equals("identifier")) {
2854          return addIdentifier();
2855        }
2856        else if (name.equals("type")) {
2857          this.type = new CodeableConcept();
2858          return this.type;
2859        }
2860        else if (name.equals("status")) {
2861          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.status");
2862        }
2863        else if (name.equals("kind")) {
2864          this.kind = new CodeableConcept();
2865          return this.kind;
2866        }
2867        else if (name.equals("period")) {
2868          this.period = new Period();
2869          return this.period;
2870        }
2871        else if (name.equals("created")) {
2872          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.created");
2873        }
2874        else if (name.equals("enterer")) {
2875          this.enterer = new Reference();
2876          return this.enterer;
2877        }
2878        else if (name.equals("issuerType")) {
2879          this.issuerType = new CodeableConcept();
2880          return this.issuerType;
2881        }
2882        else if (name.equals("paymentIssuer")) {
2883          this.paymentIssuer = new Reference();
2884          return this.paymentIssuer;
2885        }
2886        else if (name.equals("request")) {
2887          this.request = new Reference();
2888          return this.request;
2889        }
2890        else if (name.equals("requestor")) {
2891          this.requestor = new Reference();
2892          return this.requestor;
2893        }
2894        else if (name.equals("outcome")) {
2895          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome");
2896        }
2897        else if (name.equals("disposition")) {
2898          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition");
2899        }
2900        else if (name.equals("date")) {
2901          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.date");
2902        }
2903        else if (name.equals("location")) {
2904          this.location = new Reference();
2905          return this.location;
2906        }
2907        else if (name.equals("method")) {
2908          this.method = new CodeableConcept();
2909          return this.method;
2910        }
2911        else if (name.equals("cardBrand")) {
2912          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.cardBrand");
2913        }
2914        else if (name.equals("accountNumber")) {
2915          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.accountNumber");
2916        }
2917        else if (name.equals("expirationDate")) {
2918          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.expirationDate");
2919        }
2920        else if (name.equals("processor")) {
2921          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.processor");
2922        }
2923        else if (name.equals("referenceNumber")) {
2924          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.referenceNumber");
2925        }
2926        else if (name.equals("authorization")) {
2927          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.authorization");
2928        }
2929        else if (name.equals("tenderedAmount")) {
2930          this.tenderedAmount = new Money();
2931          return this.tenderedAmount;
2932        }
2933        else if (name.equals("returnedAmount")) {
2934          this.returnedAmount = new Money();
2935          return this.returnedAmount;
2936        }
2937        else if (name.equals("amount")) {
2938          this.amount = new Money();
2939          return this.amount;
2940        }
2941        else if (name.equals("paymentIdentifier")) {
2942          this.paymentIdentifier = new Identifier();
2943          return this.paymentIdentifier;
2944        }
2945        else if (name.equals("allocation")) {
2946          return addAllocation();
2947        }
2948        else if (name.equals("formCode")) {
2949          this.formCode = new CodeableConcept();
2950          return this.formCode;
2951        }
2952        else if (name.equals("processNote")) {
2953          return addProcessNote();
2954        }
2955        else
2956          return super.addChild(name);
2957      }
2958
2959  public String fhirType() {
2960    return "PaymentReconciliation";
2961
2962  }
2963
2964      public PaymentReconciliation copy() {
2965        PaymentReconciliation dst = new PaymentReconciliation();
2966        copyValues(dst);
2967        return dst;
2968      }
2969
2970      public void copyValues(PaymentReconciliation dst) {
2971        super.copyValues(dst);
2972        if (identifier != null) {
2973          dst.identifier = new ArrayList<Identifier>();
2974          for (Identifier i : identifier)
2975            dst.identifier.add(i.copy());
2976        };
2977        dst.type = type == null ? null : type.copy();
2978        dst.status = status == null ? null : status.copy();
2979        dst.kind = kind == null ? null : kind.copy();
2980        dst.period = period == null ? null : period.copy();
2981        dst.created = created == null ? null : created.copy();
2982        dst.enterer = enterer == null ? null : enterer.copy();
2983        dst.issuerType = issuerType == null ? null : issuerType.copy();
2984        dst.paymentIssuer = paymentIssuer == null ? null : paymentIssuer.copy();
2985        dst.request = request == null ? null : request.copy();
2986        dst.requestor = requestor == null ? null : requestor.copy();
2987        dst.outcome = outcome == null ? null : outcome.copy();
2988        dst.disposition = disposition == null ? null : disposition.copy();
2989        dst.date = date == null ? null : date.copy();
2990        dst.location = location == null ? null : location.copy();
2991        dst.method = method == null ? null : method.copy();
2992        dst.cardBrand = cardBrand == null ? null : cardBrand.copy();
2993        dst.accountNumber = accountNumber == null ? null : accountNumber.copy();
2994        dst.expirationDate = expirationDate == null ? null : expirationDate.copy();
2995        dst.processor = processor == null ? null : processor.copy();
2996        dst.referenceNumber = referenceNumber == null ? null : referenceNumber.copy();
2997        dst.authorization = authorization == null ? null : authorization.copy();
2998        dst.tenderedAmount = tenderedAmount == null ? null : tenderedAmount.copy();
2999        dst.returnedAmount = returnedAmount == null ? null : returnedAmount.copy();
3000        dst.amount = amount == null ? null : amount.copy();
3001        dst.paymentIdentifier = paymentIdentifier == null ? null : paymentIdentifier.copy();
3002        if (allocation != null) {
3003          dst.allocation = new ArrayList<PaymentReconciliationAllocationComponent>();
3004          for (PaymentReconciliationAllocationComponent i : allocation)
3005            dst.allocation.add(i.copy());
3006        };
3007        dst.formCode = formCode == null ? null : formCode.copy();
3008        if (processNote != null) {
3009          dst.processNote = new ArrayList<NotesComponent>();
3010          for (NotesComponent i : processNote)
3011            dst.processNote.add(i.copy());
3012        };
3013      }
3014
3015      protected PaymentReconciliation typedCopy() {
3016        return copy();
3017      }
3018
3019      @Override
3020      public boolean equalsDeep(Base other_) {
3021        if (!super.equalsDeep(other_))
3022          return false;
3023        if (!(other_ instanceof PaymentReconciliation))
3024          return false;
3025        PaymentReconciliation o = (PaymentReconciliation) other_;
3026        return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(status, o.status, true)
3027           && compareDeep(kind, o.kind, true) && compareDeep(period, o.period, true) && compareDeep(created, o.created, true)
3028           && compareDeep(enterer, o.enterer, true) && compareDeep(issuerType, o.issuerType, true) && compareDeep(paymentIssuer, o.paymentIssuer, true)
3029           && compareDeep(request, o.request, true) && compareDeep(requestor, o.requestor, true) && compareDeep(outcome, o.outcome, true)
3030           && compareDeep(disposition, o.disposition, true) && compareDeep(date, o.date, true) && compareDeep(location, o.location, true)
3031           && compareDeep(method, o.method, true) && compareDeep(cardBrand, o.cardBrand, true) && compareDeep(accountNumber, o.accountNumber, true)
3032           && compareDeep(expirationDate, o.expirationDate, true) && compareDeep(processor, o.processor, true)
3033           && compareDeep(referenceNumber, o.referenceNumber, true) && compareDeep(authorization, o.authorization, true)
3034           && compareDeep(tenderedAmount, o.tenderedAmount, true) && compareDeep(returnedAmount, o.returnedAmount, true)
3035           && compareDeep(amount, o.amount, true) && compareDeep(paymentIdentifier, o.paymentIdentifier, true)
3036           && compareDeep(allocation, o.allocation, true) && compareDeep(formCode, o.formCode, true) && compareDeep(processNote, o.processNote, true)
3037          ;
3038      }
3039
3040      @Override
3041      public boolean equalsShallow(Base other_) {
3042        if (!super.equalsShallow(other_))
3043          return false;
3044        if (!(other_ instanceof PaymentReconciliation))
3045          return false;
3046        PaymentReconciliation o = (PaymentReconciliation) other_;
3047        return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(outcome, o.outcome, true)
3048           && compareValues(disposition, o.disposition, true) && compareValues(date, o.date, true) && compareValues(cardBrand, o.cardBrand, true)
3049           && compareValues(accountNumber, o.accountNumber, true) && compareValues(expirationDate, o.expirationDate, true)
3050           && compareValues(processor, o.processor, true) && compareValues(referenceNumber, o.referenceNumber, true)
3051           && compareValues(authorization, o.authorization, true);
3052      }
3053
3054      public boolean isEmpty() {
3055        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, status
3056          , kind, period, created, enterer, issuerType, paymentIssuer, request, requestor
3057          , outcome, disposition, date, location, method, cardBrand, accountNumber, expirationDate
3058          , processor, referenceNumber, authorization, tenderedAmount, returnedAmount, amount
3059          , paymentIdentifier, allocation, formCode, processNote);
3060      }
3061
3062  @Override
3063  public ResourceType getResourceType() {
3064    return ResourceType.PaymentReconciliation;
3065   }
3066
3067 /**
3068   * Search parameter: <b>allocation-account</b>
3069   * <p>
3070   * Description: <b>The account to which payment or adjustment was applied.</b><br>
3071   * Type: <b>reference</b><br>
3072   * Path: <b>PaymentReconciliation.allocation.account</b><br>
3073   * </p>
3074   */
3075  @SearchParamDefinition(name="allocation-account", path="PaymentReconciliation.allocation.account", description="The account to which payment or adjustment was applied.", type="reference", target={Account.class } )
3076  public static final String SP_ALLOCATION_ACCOUNT = "allocation-account";
3077 /**
3078   * <b>Fluent Client</b> search parameter constant for <b>allocation-account</b>
3079   * <p>
3080   * Description: <b>The account to which payment or adjustment was applied.</b><br>
3081   * Type: <b>reference</b><br>
3082   * Path: <b>PaymentReconciliation.allocation.account</b><br>
3083   * </p>
3084   */
3085  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ALLOCATION_ACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ALLOCATION_ACCOUNT);
3086
3087/**
3088   * Constant for fluent queries to be used to add include statements. Specifies
3089   * the path value of "<b>PaymentReconciliation:allocation-account</b>".
3090   */
3091  public static final ca.uhn.fhir.model.api.Include INCLUDE_ALLOCATION_ACCOUNT = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:allocation-account").toLocked();
3092
3093 /**
3094   * Search parameter: <b>allocation-encounter</b>
3095   * <p>
3096   * Description: <b>The encounter to which payment or adjustment was applied.</b><br>
3097   * Type: <b>reference</b><br>
3098   * Path: <b>PaymentReconciliation.allocation.encounter</b><br>
3099   * </p>
3100   */
3101  @SearchParamDefinition(name="allocation-encounter", path="PaymentReconciliation.allocation.encounter", description="The encounter to which payment or adjustment was applied.", type="reference", target={Encounter.class } )
3102  public static final String SP_ALLOCATION_ENCOUNTER = "allocation-encounter";
3103 /**
3104   * <b>Fluent Client</b> search parameter constant for <b>allocation-encounter</b>
3105   * <p>
3106   * Description: <b>The encounter to which payment or adjustment was applied.</b><br>
3107   * Type: <b>reference</b><br>
3108   * Path: <b>PaymentReconciliation.allocation.encounter</b><br>
3109   * </p>
3110   */
3111  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ALLOCATION_ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ALLOCATION_ENCOUNTER);
3112
3113/**
3114   * Constant for fluent queries to be used to add include statements. Specifies
3115   * the path value of "<b>PaymentReconciliation:allocation-encounter</b>".
3116   */
3117  public static final ca.uhn.fhir.model.api.Include INCLUDE_ALLOCATION_ENCOUNTER = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:allocation-encounter").toLocked();
3118
3119 /**
3120   * Search parameter: <b>created</b>
3121   * <p>
3122   * Description: <b>The creation date</b><br>
3123   * Type: <b>date</b><br>
3124   * Path: <b>PaymentReconciliation.created</b><br>
3125   * </p>
3126   */
3127  @SearchParamDefinition(name="created", path="PaymentReconciliation.created", description="The creation date", type="date" )
3128  public static final String SP_CREATED = "created";
3129 /**
3130   * <b>Fluent Client</b> search parameter constant for <b>created</b>
3131   * <p>
3132   * Description: <b>The creation date</b><br>
3133   * Type: <b>date</b><br>
3134   * Path: <b>PaymentReconciliation.created</b><br>
3135   * </p>
3136   */
3137  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
3138
3139 /**
3140   * Search parameter: <b>disposition</b>
3141   * <p>
3142   * Description: <b>The contents of the disposition message</b><br>
3143   * Type: <b>string</b><br>
3144   * Path: <b>PaymentReconciliation.disposition</b><br>
3145   * </p>
3146   */
3147  @SearchParamDefinition(name="disposition", path="PaymentReconciliation.disposition", description="The contents of the disposition message", type="string" )
3148  public static final String SP_DISPOSITION = "disposition";
3149 /**
3150   * <b>Fluent Client</b> search parameter constant for <b>disposition</b>
3151   * <p>
3152   * Description: <b>The contents of the disposition message</b><br>
3153   * Type: <b>string</b><br>
3154   * Path: <b>PaymentReconciliation.disposition</b><br>
3155   * </p>
3156   */
3157  public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION);
3158
3159 /**
3160   * Search parameter: <b>identifier</b>
3161   * <p>
3162   * Description: <b>The business identifier of the ExplanationOfBenefit</b><br>
3163   * Type: <b>token</b><br>
3164   * Path: <b>PaymentReconciliation.identifier</b><br>
3165   * </p>
3166   */
3167  @SearchParamDefinition(name="identifier", path="PaymentReconciliation.identifier", description="The business identifier of the ExplanationOfBenefit", type="token" )
3168  public static final String SP_IDENTIFIER = "identifier";
3169 /**
3170   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3171   * <p>
3172   * Description: <b>The business identifier of the ExplanationOfBenefit</b><br>
3173   * Type: <b>token</b><br>
3174   * Path: <b>PaymentReconciliation.identifier</b><br>
3175   * </p>
3176   */
3177  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3178
3179 /**
3180   * Search parameter: <b>outcome</b>
3181   * <p>
3182   * Description: <b>The processing outcome</b><br>
3183   * Type: <b>token</b><br>
3184   * Path: <b>PaymentReconciliation.outcome</b><br>
3185   * </p>
3186   */
3187  @SearchParamDefinition(name="outcome", path="PaymentReconciliation.outcome", description="The processing outcome", type="token" )
3188  public static final String SP_OUTCOME = "outcome";
3189 /**
3190   * <b>Fluent Client</b> search parameter constant for <b>outcome</b>
3191   * <p>
3192   * Description: <b>The processing outcome</b><br>
3193   * Type: <b>token</b><br>
3194   * Path: <b>PaymentReconciliation.outcome</b><br>
3195   * </p>
3196   */
3197  public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME);
3198
3199 /**
3200   * Search parameter: <b>payment-issuer</b>
3201   * <p>
3202   * Description: <b>The organization which generated this resource</b><br>
3203   * Type: <b>reference</b><br>
3204   * Path: <b>PaymentReconciliation.paymentIssuer</b><br>
3205   * </p>
3206   */
3207  @SearchParamDefinition(name="payment-issuer", path="PaymentReconciliation.paymentIssuer", description="The organization which generated this resource", type="reference", target={Organization.class, Patient.class, Person.class, RelatedPerson.class } )
3208  public static final String SP_PAYMENT_ISSUER = "payment-issuer";
3209 /**
3210   * <b>Fluent Client</b> search parameter constant for <b>payment-issuer</b>
3211   * <p>
3212   * Description: <b>The organization which generated this resource</b><br>
3213   * Type: <b>reference</b><br>
3214   * Path: <b>PaymentReconciliation.paymentIssuer</b><br>
3215   * </p>
3216   */
3217  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PAYMENT_ISSUER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PAYMENT_ISSUER);
3218
3219/**
3220   * Constant for fluent queries to be used to add include statements. Specifies
3221   * the path value of "<b>PaymentReconciliation:payment-issuer</b>".
3222   */
3223  public static final ca.uhn.fhir.model.api.Include INCLUDE_PAYMENT_ISSUER = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:payment-issuer").toLocked();
3224
3225 /**
3226   * Search parameter: <b>request</b>
3227   * <p>
3228   * Description: <b>The reference to the claim</b><br>
3229   * Type: <b>reference</b><br>
3230   * Path: <b>PaymentReconciliation.request</b><br>
3231   * </p>
3232   */
3233  @SearchParamDefinition(name="request", path="PaymentReconciliation.request", description="The reference to the claim", type="reference", target={Task.class } )
3234  public static final String SP_REQUEST = "request";
3235 /**
3236   * <b>Fluent Client</b> search parameter constant for <b>request</b>
3237   * <p>
3238   * Description: <b>The reference to the claim</b><br>
3239   * Type: <b>reference</b><br>
3240   * Path: <b>PaymentReconciliation.request</b><br>
3241   * </p>
3242   */
3243  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST);
3244
3245/**
3246   * Constant for fluent queries to be used to add include statements. Specifies
3247   * the path value of "<b>PaymentReconciliation:request</b>".
3248   */
3249  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:request").toLocked();
3250
3251 /**
3252   * Search parameter: <b>requestor</b>
3253   * <p>
3254   * Description: <b>The reference to the provider who submitted the claim</b><br>
3255   * Type: <b>reference</b><br>
3256   * Path: <b>PaymentReconciliation.requestor</b><br>
3257   * </p>
3258   */
3259  @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="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } )
3260  public static final String SP_REQUESTOR = "requestor";
3261 /**
3262   * <b>Fluent Client</b> search parameter constant for <b>requestor</b>
3263   * <p>
3264   * Description: <b>The reference to the provider who submitted the claim</b><br>
3265   * Type: <b>reference</b><br>
3266   * Path: <b>PaymentReconciliation.requestor</b><br>
3267   * </p>
3268   */
3269  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTOR);
3270
3271/**
3272   * Constant for fluent queries to be used to add include statements. Specifies
3273   * the path value of "<b>PaymentReconciliation:requestor</b>".
3274   */
3275  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTOR = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestor").toLocked();
3276
3277 /**
3278   * Search parameter: <b>status</b>
3279   * <p>
3280   * Description: <b>The status of the payment reconciliation</b><br>
3281   * Type: <b>token</b><br>
3282   * Path: <b>PaymentReconciliation.status</b><br>
3283   * </p>
3284   */
3285  @SearchParamDefinition(name="status", path="PaymentReconciliation.status", description="The status of the payment reconciliation", type="token" )
3286  public static final String SP_STATUS = "status";
3287 /**
3288   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3289   * <p>
3290   * Description: <b>The status of the payment reconciliation</b><br>
3291   * Type: <b>token</b><br>
3292   * Path: <b>PaymentReconciliation.status</b><br>
3293   * </p>
3294   */
3295  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3296
3297
3298}