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