001package org.hl7.fhir.dstu2016may.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036import java.util.ArrayList;
037import java.util.Date;
038import java.util.List;
039
040import org.hl7.fhir.dstu2016may.model.Enumerations.RemittanceOutcome;
041import org.hl7.fhir.dstu2016may.model.Enumerations.RemittanceOutcomeEnumFactory;
042import org.hl7.fhir.exceptions.FHIRException;
043import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
044import org.hl7.fhir.utilities.Utilities;
045
046import ca.uhn.fhir.model.api.annotation.Block;
047import ca.uhn.fhir.model.api.annotation.Child;
048import ca.uhn.fhir.model.api.annotation.Description;
049import ca.uhn.fhir.model.api.annotation.ResourceDef;
050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
051/**
052 * This resource provides payment details and claim references supporting a bulk payment.
053 */
054@ResourceDef(name="PaymentReconciliation", profile="http://hl7.org/fhir/Profile/PaymentReconciliation")
055public class PaymentReconciliation extends DomainResource {
056
057    @Block()
058    public static class DetailsComponent extends BackboneElement implements IBaseBackboneElement {
059        /**
060         * Code to indicate the nature of the payment, adjustment, funds advance, etc.
061         */
062        @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true)
063        @Description(shortDefinition="Type code", formalDefinition="Code to indicate the nature of the payment, adjustment, funds advance, etc." )
064        protected Coding type;
065
066        /**
067         * The claim or financial resource.
068         */
069        @Child(name = "request", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=true)
070        @Description(shortDefinition="Claim", formalDefinition="The claim or financial resource." )
071        protected Type request;
072
073        /**
074         * The claim response resource.
075         */
076        @Child(name = "responce", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true)
077        @Description(shortDefinition="Claim Response", formalDefinition="The claim response resource." )
078        protected Type responce;
079
080        /**
081         * The Organization which submitted the invoice or financial transaction.
082         */
083        @Child(name = "submitter", type = {Identifier.class, Organization.class}, order=4, min=0, max=1, modifier=false, summary=true)
084        @Description(shortDefinition="Submitter", formalDefinition="The Organization which submitted the invoice or financial transaction." )
085        protected Type submitter;
086
087        /**
088         * The organization which is receiving the payment.
089         */
090        @Child(name = "payee", type = {Identifier.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=true)
091        @Description(shortDefinition="Payee", formalDefinition="The organization which is receiving the payment." )
092        protected Type payee;
093
094        /**
095         * The date of the invoice or financial resource.
096         */
097        @Child(name = "date", type = {DateType.class}, order=6, min=0, max=1, modifier=false, summary=true)
098        @Description(shortDefinition="Invoice date", formalDefinition="The date of the invoice or financial resource." )
099        protected DateType date;
100
101        /**
102         * Amount paid for this detail.
103         */
104        @Child(name = "amount", type = {Money.class}, order=7, min=0, max=1, modifier=false, summary=true)
105        @Description(shortDefinition="Detail amount", formalDefinition="Amount paid for this detail." )
106        protected Money amount;
107
108        private static final long serialVersionUID = 1706468339L;
109
110    /**
111     * Constructor
112     */
113      public DetailsComponent() {
114        super();
115      }
116
117    /**
118     * Constructor
119     */
120      public DetailsComponent(Coding type) {
121        super();
122        this.type = type;
123      }
124
125        /**
126         * @return {@link #type} (Code to indicate the nature of the payment, adjustment, funds advance, etc.)
127         */
128        public Coding getType() { 
129          if (this.type == null)
130            if (Configuration.errorOnAutoCreate())
131              throw new Error("Attempt to auto-create DetailsComponent.type");
132            else if (Configuration.doAutoCreate())
133              this.type = new Coding(); // cc
134          return this.type;
135        }
136
137        public boolean hasType() { 
138          return this.type != null && !this.type.isEmpty();
139        }
140
141        /**
142         * @param value {@link #type} (Code to indicate the nature of the payment, adjustment, funds advance, etc.)
143         */
144        public DetailsComponent setType(Coding value) { 
145          this.type = value;
146          return this;
147        }
148
149        /**
150         * @return {@link #request} (The claim or financial resource.)
151         */
152        public Type getRequest() { 
153          return this.request;
154        }
155
156        /**
157         * @return {@link #request} (The claim or financial resource.)
158         */
159        public Identifier getRequestIdentifier() throws FHIRException { 
160          if (!(this.request instanceof Identifier))
161            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered");
162          return (Identifier) this.request;
163        }
164
165        public boolean hasRequestIdentifier() { 
166          return this.request instanceof Identifier;
167        }
168
169        /**
170         * @return {@link #request} (The claim or financial resource.)
171         */
172        public Reference getRequestReference() throws FHIRException { 
173          if (!(this.request instanceof Reference))
174            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered");
175          return (Reference) this.request;
176        }
177
178        public boolean hasRequestReference() { 
179          return this.request instanceof Reference;
180        }
181
182        public boolean hasRequest() { 
183          return this.request != null && !this.request.isEmpty();
184        }
185
186        /**
187         * @param value {@link #request} (The claim or financial resource.)
188         */
189        public DetailsComponent setRequest(Type value) { 
190          this.request = value;
191          return this;
192        }
193
194        /**
195         * @return {@link #responce} (The claim response resource.)
196         */
197        public Type getResponce() { 
198          return this.responce;
199        }
200
201        /**
202         * @return {@link #responce} (The claim response resource.)
203         */
204        public Identifier getResponceIdentifier() throws FHIRException { 
205          if (!(this.responce instanceof Identifier))
206            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.responce.getClass().getName()+" was encountered");
207          return (Identifier) this.responce;
208        }
209
210        public boolean hasResponceIdentifier() { 
211          return this.responce instanceof Identifier;
212        }
213
214        /**
215         * @return {@link #responce} (The claim response resource.)
216         */
217        public Reference getResponceReference() throws FHIRException { 
218          if (!(this.responce instanceof Reference))
219            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.responce.getClass().getName()+" was encountered");
220          return (Reference) this.responce;
221        }
222
223        public boolean hasResponceReference() { 
224          return this.responce instanceof Reference;
225        }
226
227        public boolean hasResponce() { 
228          return this.responce != null && !this.responce.isEmpty();
229        }
230
231        /**
232         * @param value {@link #responce} (The claim response resource.)
233         */
234        public DetailsComponent setResponce(Type value) { 
235          this.responce = value;
236          return this;
237        }
238
239        /**
240         * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.)
241         */
242        public Type getSubmitter() { 
243          return this.submitter;
244        }
245
246        /**
247         * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.)
248         */
249        public Identifier getSubmitterIdentifier() throws FHIRException { 
250          if (!(this.submitter instanceof Identifier))
251            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.submitter.getClass().getName()+" was encountered");
252          return (Identifier) this.submitter;
253        }
254
255        public boolean hasSubmitterIdentifier() { 
256          return this.submitter instanceof Identifier;
257        }
258
259        /**
260         * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.)
261         */
262        public Reference getSubmitterReference() throws FHIRException { 
263          if (!(this.submitter instanceof Reference))
264            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.submitter.getClass().getName()+" was encountered");
265          return (Reference) this.submitter;
266        }
267
268        public boolean hasSubmitterReference() { 
269          return this.submitter instanceof Reference;
270        }
271
272        public boolean hasSubmitter() { 
273          return this.submitter != null && !this.submitter.isEmpty();
274        }
275
276        /**
277         * @param value {@link #submitter} (The Organization which submitted the invoice or financial transaction.)
278         */
279        public DetailsComponent setSubmitter(Type value) { 
280          this.submitter = value;
281          return this;
282        }
283
284        /**
285         * @return {@link #payee} (The organization which is receiving the payment.)
286         */
287        public Type getPayee() { 
288          return this.payee;
289        }
290
291        /**
292         * @return {@link #payee} (The organization which is receiving the payment.)
293         */
294        public Identifier getPayeeIdentifier() throws FHIRException { 
295          if (!(this.payee instanceof Identifier))
296            throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.payee.getClass().getName()+" was encountered");
297          return (Identifier) this.payee;
298        }
299
300        public boolean hasPayeeIdentifier() { 
301          return this.payee instanceof Identifier;
302        }
303
304        /**
305         * @return {@link #payee} (The organization which is receiving the payment.)
306         */
307        public Reference getPayeeReference() throws FHIRException { 
308          if (!(this.payee instanceof Reference))
309            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.payee.getClass().getName()+" was encountered");
310          return (Reference) this.payee;
311        }
312
313        public boolean hasPayeeReference() { 
314          return this.payee instanceof Reference;
315        }
316
317        public boolean hasPayee() { 
318          return this.payee != null && !this.payee.isEmpty();
319        }
320
321        /**
322         * @param value {@link #payee} (The organization which is receiving the payment.)
323         */
324        public DetailsComponent setPayee(Type value) { 
325          this.payee = value;
326          return this;
327        }
328
329        /**
330         * @return {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
331         */
332        public DateType getDateElement() { 
333          if (this.date == null)
334            if (Configuration.errorOnAutoCreate())
335              throw new Error("Attempt to auto-create DetailsComponent.date");
336            else if (Configuration.doAutoCreate())
337              this.date = new DateType(); // bb
338          return this.date;
339        }
340
341        public boolean hasDateElement() { 
342          return this.date != null && !this.date.isEmpty();
343        }
344
345        public boolean hasDate() { 
346          return this.date != null && !this.date.isEmpty();
347        }
348
349        /**
350         * @param value {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
351         */
352        public DetailsComponent setDateElement(DateType value) { 
353          this.date = value;
354          return this;
355        }
356
357        /**
358         * @return The date of the invoice or financial resource.
359         */
360        public Date getDate() { 
361          return this.date == null ? null : this.date.getValue();
362        }
363
364        /**
365         * @param value The date of the invoice or financial resource.
366         */
367        public DetailsComponent setDate(Date value) { 
368          if (value == null)
369            this.date = null;
370          else {
371            if (this.date == null)
372              this.date = new DateType();
373            this.date.setValue(value);
374          }
375          return this;
376        }
377
378        /**
379         * @return {@link #amount} (Amount paid for this detail.)
380         */
381        public Money getAmount() { 
382          if (this.amount == null)
383            if (Configuration.errorOnAutoCreate())
384              throw new Error("Attempt to auto-create DetailsComponent.amount");
385            else if (Configuration.doAutoCreate())
386              this.amount = new Money(); // cc
387          return this.amount;
388        }
389
390        public boolean hasAmount() { 
391          return this.amount != null && !this.amount.isEmpty();
392        }
393
394        /**
395         * @param value {@link #amount} (Amount paid for this detail.)
396         */
397        public DetailsComponent setAmount(Money value) { 
398          this.amount = value;
399          return this;
400        }
401
402        protected void listChildren(List<Property> childrenList) {
403          super.listChildren(childrenList);
404          childrenList.add(new Property("type", "Coding", "Code to indicate the nature of the payment, adjustment, funds advance, etc.", 0, java.lang.Integer.MAX_VALUE, type));
405          childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "The claim or financial resource.", 0, java.lang.Integer.MAX_VALUE, request));
406          childrenList.add(new Property("responce[x]", "Identifier|Reference(Any)", "The claim response resource.", 0, java.lang.Integer.MAX_VALUE, responce));
407          childrenList.add(new Property("submitter[x]", "Identifier|Reference(Organization)", "The Organization which submitted the invoice or financial transaction.", 0, java.lang.Integer.MAX_VALUE, submitter));
408          childrenList.add(new Property("payee[x]", "Identifier|Reference(Organization)", "The organization which is receiving the payment.", 0, java.lang.Integer.MAX_VALUE, payee));
409          childrenList.add(new Property("date", "date", "The date of the invoice or financial resource.", 0, java.lang.Integer.MAX_VALUE, date));
410          childrenList.add(new Property("amount", "Money", "Amount paid for this detail.", 0, java.lang.Integer.MAX_VALUE, amount));
411        }
412
413      @Override
414      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
415        switch (hash) {
416        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
417        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Type
418        case -340323759: /*responce*/ return this.responce == null ? new Base[0] : new Base[] {this.responce}; // Type
419        case 348678409: /*submitter*/ return this.submitter == null ? new Base[0] : new Base[] {this.submitter}; // Type
420        case 106443592: /*payee*/ return this.payee == null ? new Base[0] : new Base[] {this.payee}; // Type
421        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType
422        case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money
423        default: return super.getProperty(hash, name, checkValid);
424        }
425
426      }
427
428      @Override
429      public void setProperty(int hash, String name, Base value) throws FHIRException {
430        switch (hash) {
431        case 3575610: // type
432          this.type = castToCoding(value); // Coding
433          break;
434        case 1095692943: // request
435          this.request = (Type) value; // Type
436          break;
437        case -340323759: // responce
438          this.responce = (Type) value; // Type
439          break;
440        case 348678409: // submitter
441          this.submitter = (Type) value; // Type
442          break;
443        case 106443592: // payee
444          this.payee = (Type) value; // Type
445          break;
446        case 3076014: // date
447          this.date = castToDate(value); // DateType
448          break;
449        case -1413853096: // amount
450          this.amount = castToMoney(value); // Money
451          break;
452        default: super.setProperty(hash, name, value);
453        }
454
455      }
456
457      @Override
458      public void setProperty(String name, Base value) throws FHIRException {
459        if (name.equals("type"))
460          this.type = castToCoding(value); // Coding
461        else if (name.equals("request[x]"))
462          this.request = (Type) value; // Type
463        else if (name.equals("responce[x]"))
464          this.responce = (Type) value; // Type
465        else if (name.equals("submitter[x]"))
466          this.submitter = (Type) value; // Type
467        else if (name.equals("payee[x]"))
468          this.payee = (Type) value; // Type
469        else if (name.equals("date"))
470          this.date = castToDate(value); // DateType
471        else if (name.equals("amount"))
472          this.amount = castToMoney(value); // Money
473        else
474          super.setProperty(name, value);
475      }
476
477      @Override
478      public Base makeProperty(int hash, String name) throws FHIRException {
479        switch (hash) {
480        case 3575610:  return getType(); // Coding
481        case 37106577:  return getRequest(); // Type
482        case 1832772751:  return getResponce(); // Type
483        case -2047315241:  return getSubmitter(); // Type
484        case 1375276088:  return getPayee(); // Type
485        case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateType
486        case -1413853096:  return getAmount(); // Money
487        default: return super.makeProperty(hash, name);
488        }
489
490      }
491
492      @Override
493      public Base addChild(String name) throws FHIRException {
494        if (name.equals("type")) {
495          this.type = new Coding();
496          return this.type;
497        }
498        else if (name.equals("requestIdentifier")) {
499          this.request = new Identifier();
500          return this.request;
501        }
502        else if (name.equals("requestReference")) {
503          this.request = new Reference();
504          return this.request;
505        }
506        else if (name.equals("responceIdentifier")) {
507          this.responce = new Identifier();
508          return this.responce;
509        }
510        else if (name.equals("responceReference")) {
511          this.responce = new Reference();
512          return this.responce;
513        }
514        else if (name.equals("submitterIdentifier")) {
515          this.submitter = new Identifier();
516          return this.submitter;
517        }
518        else if (name.equals("submitterReference")) {
519          this.submitter = new Reference();
520          return this.submitter;
521        }
522        else if (name.equals("payeeIdentifier")) {
523          this.payee = new Identifier();
524          return this.payee;
525        }
526        else if (name.equals("payeeReference")) {
527          this.payee = new Reference();
528          return this.payee;
529        }
530        else if (name.equals("date")) {
531          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.date");
532        }
533        else if (name.equals("amount")) {
534          this.amount = new Money();
535          return this.amount;
536        }
537        else
538          return super.addChild(name);
539      }
540
541      public DetailsComponent copy() {
542        DetailsComponent dst = new DetailsComponent();
543        copyValues(dst);
544        dst.type = type == null ? null : type.copy();
545        dst.request = request == null ? null : request.copy();
546        dst.responce = responce == null ? null : responce.copy();
547        dst.submitter = submitter == null ? null : submitter.copy();
548        dst.payee = payee == null ? null : payee.copy();
549        dst.date = date == null ? null : date.copy();
550        dst.amount = amount == null ? null : amount.copy();
551        return dst;
552      }
553
554      @Override
555      public boolean equalsDeep(Base other) {
556        if (!super.equalsDeep(other))
557          return false;
558        if (!(other instanceof DetailsComponent))
559          return false;
560        DetailsComponent o = (DetailsComponent) other;
561        return compareDeep(type, o.type, true) && compareDeep(request, o.request, true) && compareDeep(responce, o.responce, true)
562           && compareDeep(submitter, o.submitter, true) && compareDeep(payee, o.payee, true) && compareDeep(date, o.date, true)
563           && compareDeep(amount, o.amount, true);
564      }
565
566      @Override
567      public boolean equalsShallow(Base other) {
568        if (!super.equalsShallow(other))
569          return false;
570        if (!(other instanceof DetailsComponent))
571          return false;
572        DetailsComponent o = (DetailsComponent) other;
573        return compareValues(date, o.date, true);
574      }
575
576      public boolean isEmpty() {
577        return super.isEmpty() && (type == null || type.isEmpty()) && (request == null || request.isEmpty())
578           && (responce == null || responce.isEmpty()) && (submitter == null || submitter.isEmpty())
579           && (payee == null || payee.isEmpty()) && (date == null || date.isEmpty()) && (amount == null || amount.isEmpty())
580          ;
581      }
582
583  public String fhirType() {
584    return "PaymentReconciliation.detail";
585
586  }
587
588  }
589
590    @Block()
591    public static class NotesComponent extends BackboneElement implements IBaseBackboneElement {
592        /**
593         * The note purpose: Print/Display.
594         */
595        @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true)
596        @Description(shortDefinition="display | print | printoper", formalDefinition="The note purpose: Print/Display." )
597        protected Coding type;
598
599        /**
600         * The note text.
601         */
602        @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
603        @Description(shortDefinition="Notes text", formalDefinition="The note text." )
604        protected StringType text;
605
606        private static final long serialVersionUID = 129959202L;
607
608    /**
609     * Constructor
610     */
611      public NotesComponent() {
612        super();
613      }
614
615        /**
616         * @return {@link #type} (The note purpose: Print/Display.)
617         */
618        public Coding getType() { 
619          if (this.type == null)
620            if (Configuration.errorOnAutoCreate())
621              throw new Error("Attempt to auto-create NotesComponent.type");
622            else if (Configuration.doAutoCreate())
623              this.type = new Coding(); // cc
624          return this.type;
625        }
626
627        public boolean hasType() { 
628          return this.type != null && !this.type.isEmpty();
629        }
630
631        /**
632         * @param value {@link #type} (The note purpose: Print/Display.)
633         */
634        public NotesComponent setType(Coding value) { 
635          this.type = value;
636          return this;
637        }
638
639        /**
640         * @return {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
641         */
642        public StringType getTextElement() { 
643          if (this.text == null)
644            if (Configuration.errorOnAutoCreate())
645              throw new Error("Attempt to auto-create NotesComponent.text");
646            else if (Configuration.doAutoCreate())
647              this.text = new StringType(); // bb
648          return this.text;
649        }
650
651        public boolean hasTextElement() { 
652          return this.text != null && !this.text.isEmpty();
653        }
654
655        public boolean hasText() { 
656          return this.text != null && !this.text.isEmpty();
657        }
658
659        /**
660         * @param value {@link #text} (The note text.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
661         */
662        public NotesComponent setTextElement(StringType value) { 
663          this.text = value;
664          return this;
665        }
666
667        /**
668         * @return The note text.
669         */
670        public String getText() { 
671          return this.text == null ? null : this.text.getValue();
672        }
673
674        /**
675         * @param value The note text.
676         */
677        public NotesComponent setText(String value) { 
678          if (Utilities.noString(value))
679            this.text = null;
680          else {
681            if (this.text == null)
682              this.text = new StringType();
683            this.text.setValue(value);
684          }
685          return this;
686        }
687
688        protected void listChildren(List<Property> childrenList) {
689          super.listChildren(childrenList);
690          childrenList.add(new Property("type", "Coding", "The note purpose: Print/Display.", 0, java.lang.Integer.MAX_VALUE, type));
691          childrenList.add(new Property("text", "string", "The note text.", 0, java.lang.Integer.MAX_VALUE, text));
692        }
693
694      @Override
695      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
696        switch (hash) {
697        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
698        case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
699        default: return super.getProperty(hash, name, checkValid);
700        }
701
702      }
703
704      @Override
705      public void setProperty(int hash, String name, Base value) throws FHIRException {
706        switch (hash) {
707        case 3575610: // type
708          this.type = castToCoding(value); // Coding
709          break;
710        case 3556653: // text
711          this.text = castToString(value); // StringType
712          break;
713        default: super.setProperty(hash, name, value);
714        }
715
716      }
717
718      @Override
719      public void setProperty(String name, Base value) throws FHIRException {
720        if (name.equals("type"))
721          this.type = castToCoding(value); // Coding
722        else if (name.equals("text"))
723          this.text = castToString(value); // StringType
724        else
725          super.setProperty(name, value);
726      }
727
728      @Override
729      public Base makeProperty(int hash, String name) throws FHIRException {
730        switch (hash) {
731        case 3575610:  return getType(); // Coding
732        case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
733        default: return super.makeProperty(hash, name);
734        }
735
736      }
737
738      @Override
739      public Base addChild(String name) throws FHIRException {
740        if (name.equals("type")) {
741          this.type = new Coding();
742          return this.type;
743        }
744        else if (name.equals("text")) {
745          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.text");
746        }
747        else
748          return super.addChild(name);
749      }
750
751      public NotesComponent copy() {
752        NotesComponent dst = new NotesComponent();
753        copyValues(dst);
754        dst.type = type == null ? null : type.copy();
755        dst.text = text == null ? null : text.copy();
756        return dst;
757      }
758
759      @Override
760      public boolean equalsDeep(Base other) {
761        if (!super.equalsDeep(other))
762          return false;
763        if (!(other instanceof NotesComponent))
764          return false;
765        NotesComponent o = (NotesComponent) other;
766        return compareDeep(type, o.type, true) && compareDeep(text, o.text, true);
767      }
768
769      @Override
770      public boolean equalsShallow(Base other) {
771        if (!super.equalsShallow(other))
772          return false;
773        if (!(other instanceof NotesComponent))
774          return false;
775        NotesComponent o = (NotesComponent) other;
776        return compareValues(text, o.text, true);
777      }
778
779      public boolean isEmpty() {
780        return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty())
781          ;
782      }
783
784  public String fhirType() {
785    return "PaymentReconciliation.note";
786
787  }
788
789  }
790
791    /**
792     * The Response business identifier.
793     */
794    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
795    @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." )
796    protected List<Identifier> identifier;
797
798    /**
799     * Original request resource reference.
800     */
801    @Child(name = "request", type = {Identifier.class, ProcessRequest.class}, order=1, min=0, max=1, modifier=false, summary=true)
802    @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." )
803    protected Type request;
804
805    /**
806     * Transaction status: error, complete.
807     */
808    @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true)
809    @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." )
810    protected Enumeration<RemittanceOutcome> outcome;
811
812    /**
813     * A description of the status of the adjudication.
814     */
815    @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
816    @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." )
817    protected StringType disposition;
818
819    /**
820     * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.
821     */
822    @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true)
823    @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." )
824    protected Coding ruleset;
825
826    /**
827     * The style (standard) and version of the original material which was converted into this resource.
828     */
829    @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true)
830    @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." )
831    protected Coding originalRuleset;
832
833    /**
834     * The date when the enclosed suite of services were performed or completed.
835     */
836    @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
837    @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." )
838    protected DateTimeType created;
839
840    /**
841     * The period of time for which payments have been gathered into this bulk payment for settlement.
842     */
843    @Child(name = "period", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true)
844    @Description(shortDefinition="Period covered", formalDefinition="The period of time for which payments have been gathered into this bulk payment for settlement." )
845    protected Period period;
846
847    /**
848     * The Insurer who produced this adjudicated response.
849     */
850    @Child(name = "organization", type = {Identifier.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true)
851    @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." )
852    protected Type organization;
853
854    /**
855     * The practitioner who is responsible for the services rendered to the patient.
856     */
857    @Child(name = "requestProvider", type = {Identifier.class, Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true)
858    @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." )
859    protected Type requestProvider;
860
861    /**
862     * The organization which is responsible for the services rendered to the patient.
863     */
864    @Child(name = "requestOrganization", type = {Identifier.class, Organization.class}, order=10, min=0, max=1, modifier=false, summary=true)
865    @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." )
866    protected Type requestOrganization;
867
868    /**
869     * List of individual settlement amounts and the corresponding transaction.
870     */
871    @Child(name = "detail", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
872    @Description(shortDefinition="Details", formalDefinition="List of individual settlement amounts and the corresponding transaction." )
873    protected List<DetailsComponent> detail;
874
875    /**
876     * The form to be used for printing the content.
877     */
878    @Child(name = "form", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true)
879    @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." )
880    protected Coding form;
881
882    /**
883     * Total payment amount.
884     */
885    @Child(name = "total", type = {Money.class}, order=13, min=1, max=1, modifier=false, summary=true)
886    @Description(shortDefinition="Total amount of Payment", formalDefinition="Total payment amount." )
887    protected Money total;
888
889    /**
890     * Suite of notes.
891     */
892    @Child(name = "note", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
893    @Description(shortDefinition="Note text", formalDefinition="Suite of notes." )
894    protected List<NotesComponent> note;
895
896    private static final long serialVersionUID = -293306995L;
897
898  /**
899   * Constructor
900   */
901    public PaymentReconciliation() {
902      super();
903    }
904
905  /**
906   * Constructor
907   */
908    public PaymentReconciliation(Money total) {
909      super();
910      this.total = total;
911    }
912
913    /**
914     * @return {@link #identifier} (The Response business identifier.)
915     */
916    public List<Identifier> getIdentifier() { 
917      if (this.identifier == null)
918        this.identifier = new ArrayList<Identifier>();
919      return this.identifier;
920    }
921
922    public boolean hasIdentifier() { 
923      if (this.identifier == null)
924        return false;
925      for (Identifier item : this.identifier)
926        if (!item.isEmpty())
927          return true;
928      return false;
929    }
930
931    /**
932     * @return {@link #identifier} (The Response business identifier.)
933     */
934    // syntactic sugar
935    public Identifier addIdentifier() { //3
936      Identifier t = new Identifier();
937      if (this.identifier == null)
938        this.identifier = new ArrayList<Identifier>();
939      this.identifier.add(t);
940      return t;
941    }
942
943    // syntactic sugar
944    public PaymentReconciliation addIdentifier(Identifier t) { //3
945      if (t == null)
946        return this;
947      if (this.identifier == null)
948        this.identifier = new ArrayList<Identifier>();
949      this.identifier.add(t);
950      return this;
951    }
952
953    /**
954     * @return {@link #request} (Original request resource reference.)
955     */
956    public Type getRequest() { 
957      return this.request;
958    }
959
960    /**
961     * @return {@link #request} (Original request resource reference.)
962     */
963    public Identifier getRequestIdentifier() throws FHIRException { 
964      if (!(this.request instanceof Identifier))
965        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered");
966      return (Identifier) this.request;
967    }
968
969    public boolean hasRequestIdentifier() { 
970      return this.request instanceof Identifier;
971    }
972
973    /**
974     * @return {@link #request} (Original request resource reference.)
975     */
976    public Reference getRequestReference() throws FHIRException { 
977      if (!(this.request instanceof Reference))
978        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered");
979      return (Reference) this.request;
980    }
981
982    public boolean hasRequestReference() { 
983      return this.request instanceof Reference;
984    }
985
986    public boolean hasRequest() { 
987      return this.request != null && !this.request.isEmpty();
988    }
989
990    /**
991     * @param value {@link #request} (Original request resource reference.)
992     */
993    public PaymentReconciliation setRequest(Type value) { 
994      this.request = value;
995      return this;
996    }
997
998    /**
999     * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
1000     */
1001    public Enumeration<RemittanceOutcome> getOutcomeElement() { 
1002      if (this.outcome == null)
1003        if (Configuration.errorOnAutoCreate())
1004          throw new Error("Attempt to auto-create PaymentReconciliation.outcome");
1005        else if (Configuration.doAutoCreate())
1006          this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); // bb
1007      return this.outcome;
1008    }
1009
1010    public boolean hasOutcomeElement() { 
1011      return this.outcome != null && !this.outcome.isEmpty();
1012    }
1013
1014    public boolean hasOutcome() { 
1015      return this.outcome != null && !this.outcome.isEmpty();
1016    }
1017
1018    /**
1019     * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
1020     */
1021    public PaymentReconciliation setOutcomeElement(Enumeration<RemittanceOutcome> value) { 
1022      this.outcome = value;
1023      return this;
1024    }
1025
1026    /**
1027     * @return Transaction status: error, complete.
1028     */
1029    public RemittanceOutcome getOutcome() { 
1030      return this.outcome == null ? null : this.outcome.getValue();
1031    }
1032
1033    /**
1034     * @param value Transaction status: error, complete.
1035     */
1036    public PaymentReconciliation setOutcome(RemittanceOutcome value) { 
1037      if (value == null)
1038        this.outcome = null;
1039      else {
1040        if (this.outcome == null)
1041          this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory());
1042        this.outcome.setValue(value);
1043      }
1044      return this;
1045    }
1046
1047    /**
1048     * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1049     */
1050    public StringType getDispositionElement() { 
1051      if (this.disposition == null)
1052        if (Configuration.errorOnAutoCreate())
1053          throw new Error("Attempt to auto-create PaymentReconciliation.disposition");
1054        else if (Configuration.doAutoCreate())
1055          this.disposition = new StringType(); // bb
1056      return this.disposition;
1057    }
1058
1059    public boolean hasDispositionElement() { 
1060      return this.disposition != null && !this.disposition.isEmpty();
1061    }
1062
1063    public boolean hasDisposition() { 
1064      return this.disposition != null && !this.disposition.isEmpty();
1065    }
1066
1067    /**
1068     * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1069     */
1070    public PaymentReconciliation setDispositionElement(StringType value) { 
1071      this.disposition = value;
1072      return this;
1073    }
1074
1075    /**
1076     * @return A description of the status of the adjudication.
1077     */
1078    public String getDisposition() { 
1079      return this.disposition == null ? null : this.disposition.getValue();
1080    }
1081
1082    /**
1083     * @param value A description of the status of the adjudication.
1084     */
1085    public PaymentReconciliation setDisposition(String value) { 
1086      if (Utilities.noString(value))
1087        this.disposition = null;
1088      else {
1089        if (this.disposition == null)
1090          this.disposition = new StringType();
1091        this.disposition.setValue(value);
1092      }
1093      return this;
1094    }
1095
1096    /**
1097     * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.)
1098     */
1099    public Coding getRuleset() { 
1100      if (this.ruleset == null)
1101        if (Configuration.errorOnAutoCreate())
1102          throw new Error("Attempt to auto-create PaymentReconciliation.ruleset");
1103        else if (Configuration.doAutoCreate())
1104          this.ruleset = new Coding(); // cc
1105      return this.ruleset;
1106    }
1107
1108    public boolean hasRuleset() { 
1109      return this.ruleset != null && !this.ruleset.isEmpty();
1110    }
1111
1112    /**
1113     * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.)
1114     */
1115    public PaymentReconciliation setRuleset(Coding value) { 
1116      this.ruleset = value;
1117      return this;
1118    }
1119
1120    /**
1121     * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.)
1122     */
1123    public Coding getOriginalRuleset() { 
1124      if (this.originalRuleset == null)
1125        if (Configuration.errorOnAutoCreate())
1126          throw new Error("Attempt to auto-create PaymentReconciliation.originalRuleset");
1127        else if (Configuration.doAutoCreate())
1128          this.originalRuleset = new Coding(); // cc
1129      return this.originalRuleset;
1130    }
1131
1132    public boolean hasOriginalRuleset() { 
1133      return this.originalRuleset != null && !this.originalRuleset.isEmpty();
1134    }
1135
1136    /**
1137     * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.)
1138     */
1139    public PaymentReconciliation setOriginalRuleset(Coding value) { 
1140      this.originalRuleset = value;
1141      return this;
1142    }
1143
1144    /**
1145     * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1146     */
1147    public DateTimeType getCreatedElement() { 
1148      if (this.created == null)
1149        if (Configuration.errorOnAutoCreate())
1150          throw new Error("Attempt to auto-create PaymentReconciliation.created");
1151        else if (Configuration.doAutoCreate())
1152          this.created = new DateTimeType(); // bb
1153      return this.created;
1154    }
1155
1156    public boolean hasCreatedElement() { 
1157      return this.created != null && !this.created.isEmpty();
1158    }
1159
1160    public boolean hasCreated() { 
1161      return this.created != null && !this.created.isEmpty();
1162    }
1163
1164    /**
1165     * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1166     */
1167    public PaymentReconciliation setCreatedElement(DateTimeType value) { 
1168      this.created = value;
1169      return this;
1170    }
1171
1172    /**
1173     * @return The date when the enclosed suite of services were performed or completed.
1174     */
1175    public Date getCreated() { 
1176      return this.created == null ? null : this.created.getValue();
1177    }
1178
1179    /**
1180     * @param value The date when the enclosed suite of services were performed or completed.
1181     */
1182    public PaymentReconciliation setCreated(Date value) { 
1183      if (value == null)
1184        this.created = null;
1185      else {
1186        if (this.created == null)
1187          this.created = new DateTimeType();
1188        this.created.setValue(value);
1189      }
1190      return this;
1191    }
1192
1193    /**
1194     * @return {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.)
1195     */
1196    public Period getPeriod() { 
1197      if (this.period == null)
1198        if (Configuration.errorOnAutoCreate())
1199          throw new Error("Attempt to auto-create PaymentReconciliation.period");
1200        else if (Configuration.doAutoCreate())
1201          this.period = new Period(); // cc
1202      return this.period;
1203    }
1204
1205    public boolean hasPeriod() { 
1206      return this.period != null && !this.period.isEmpty();
1207    }
1208
1209    /**
1210     * @param value {@link #period} (The period of time for which payments have been gathered into this bulk payment for settlement.)
1211     */
1212    public PaymentReconciliation setPeriod(Period value) { 
1213      this.period = value;
1214      return this;
1215    }
1216
1217    /**
1218     * @return {@link #organization} (The Insurer who produced this adjudicated response.)
1219     */
1220    public Type getOrganization() { 
1221      return this.organization;
1222    }
1223
1224    /**
1225     * @return {@link #organization} (The Insurer who produced this adjudicated response.)
1226     */
1227    public Identifier getOrganizationIdentifier() throws FHIRException { 
1228      if (!(this.organization instanceof Identifier))
1229        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered");
1230      return (Identifier) this.organization;
1231    }
1232
1233    public boolean hasOrganizationIdentifier() { 
1234      return this.organization instanceof Identifier;
1235    }
1236
1237    /**
1238     * @return {@link #organization} (The Insurer who produced this adjudicated response.)
1239     */
1240    public Reference getOrganizationReference() throws FHIRException { 
1241      if (!(this.organization instanceof Reference))
1242        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered");
1243      return (Reference) this.organization;
1244    }
1245
1246    public boolean hasOrganizationReference() { 
1247      return this.organization instanceof Reference;
1248    }
1249
1250    public boolean hasOrganization() { 
1251      return this.organization != null && !this.organization.isEmpty();
1252    }
1253
1254    /**
1255     * @param value {@link #organization} (The Insurer who produced this adjudicated response.)
1256     */
1257    public PaymentReconciliation setOrganization(Type value) { 
1258      this.organization = value;
1259      return this;
1260    }
1261
1262    /**
1263     * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1264     */
1265    public Type getRequestProvider() { 
1266      return this.requestProvider;
1267    }
1268
1269    /**
1270     * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1271     */
1272    public Identifier getRequestProviderIdentifier() throws FHIRException { 
1273      if (!(this.requestProvider instanceof Identifier))
1274        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestProvider.getClass().getName()+" was encountered");
1275      return (Identifier) this.requestProvider;
1276    }
1277
1278    public boolean hasRequestProviderIdentifier() { 
1279      return this.requestProvider instanceof Identifier;
1280    }
1281
1282    /**
1283     * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1284     */
1285    public Reference getRequestProviderReference() throws FHIRException { 
1286      if (!(this.requestProvider instanceof Reference))
1287        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestProvider.getClass().getName()+" was encountered");
1288      return (Reference) this.requestProvider;
1289    }
1290
1291    public boolean hasRequestProviderReference() { 
1292      return this.requestProvider instanceof Reference;
1293    }
1294
1295    public boolean hasRequestProvider() { 
1296      return this.requestProvider != null && !this.requestProvider.isEmpty();
1297    }
1298
1299    /**
1300     * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1301     */
1302    public PaymentReconciliation setRequestProvider(Type value) { 
1303      this.requestProvider = value;
1304      return this;
1305    }
1306
1307    /**
1308     * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1309     */
1310    public Type getRequestOrganization() { 
1311      return this.requestOrganization;
1312    }
1313
1314    /**
1315     * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1316     */
1317    public Identifier getRequestOrganizationIdentifier() throws FHIRException { 
1318      if (!(this.requestOrganization instanceof Identifier))
1319        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestOrganization.getClass().getName()+" was encountered");
1320      return (Identifier) this.requestOrganization;
1321    }
1322
1323    public boolean hasRequestOrganizationIdentifier() { 
1324      return this.requestOrganization instanceof Identifier;
1325    }
1326
1327    /**
1328     * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1329     */
1330    public Reference getRequestOrganizationReference() throws FHIRException { 
1331      if (!(this.requestOrganization instanceof Reference))
1332        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestOrganization.getClass().getName()+" was encountered");
1333      return (Reference) this.requestOrganization;
1334    }
1335
1336    public boolean hasRequestOrganizationReference() { 
1337      return this.requestOrganization instanceof Reference;
1338    }
1339
1340    public boolean hasRequestOrganization() { 
1341      return this.requestOrganization != null && !this.requestOrganization.isEmpty();
1342    }
1343
1344    /**
1345     * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1346     */
1347    public PaymentReconciliation setRequestOrganization(Type value) { 
1348      this.requestOrganization = value;
1349      return this;
1350    }
1351
1352    /**
1353     * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.)
1354     */
1355    public List<DetailsComponent> getDetail() { 
1356      if (this.detail == null)
1357        this.detail = new ArrayList<DetailsComponent>();
1358      return this.detail;
1359    }
1360
1361    public boolean hasDetail() { 
1362      if (this.detail == null)
1363        return false;
1364      for (DetailsComponent item : this.detail)
1365        if (!item.isEmpty())
1366          return true;
1367      return false;
1368    }
1369
1370    /**
1371     * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.)
1372     */
1373    // syntactic sugar
1374    public DetailsComponent addDetail() { //3
1375      DetailsComponent t = new DetailsComponent();
1376      if (this.detail == null)
1377        this.detail = new ArrayList<DetailsComponent>();
1378      this.detail.add(t);
1379      return t;
1380    }
1381
1382    // syntactic sugar
1383    public PaymentReconciliation addDetail(DetailsComponent t) { //3
1384      if (t == null)
1385        return this;
1386      if (this.detail == null)
1387        this.detail = new ArrayList<DetailsComponent>();
1388      this.detail.add(t);
1389      return this;
1390    }
1391
1392    /**
1393     * @return {@link #form} (The form to be used for printing the content.)
1394     */
1395    public Coding getForm() { 
1396      if (this.form == null)
1397        if (Configuration.errorOnAutoCreate())
1398          throw new Error("Attempt to auto-create PaymentReconciliation.form");
1399        else if (Configuration.doAutoCreate())
1400          this.form = new Coding(); // cc
1401      return this.form;
1402    }
1403
1404    public boolean hasForm() { 
1405      return this.form != null && !this.form.isEmpty();
1406    }
1407
1408    /**
1409     * @param value {@link #form} (The form to be used for printing the content.)
1410     */
1411    public PaymentReconciliation setForm(Coding value) { 
1412      this.form = value;
1413      return this;
1414    }
1415
1416    /**
1417     * @return {@link #total} (Total payment amount.)
1418     */
1419    public Money getTotal() { 
1420      if (this.total == null)
1421        if (Configuration.errorOnAutoCreate())
1422          throw new Error("Attempt to auto-create PaymentReconciliation.total");
1423        else if (Configuration.doAutoCreate())
1424          this.total = new Money(); // cc
1425      return this.total;
1426    }
1427
1428    public boolean hasTotal() { 
1429      return this.total != null && !this.total.isEmpty();
1430    }
1431
1432    /**
1433     * @param value {@link #total} (Total payment amount.)
1434     */
1435    public PaymentReconciliation setTotal(Money value) { 
1436      this.total = value;
1437      return this;
1438    }
1439
1440    /**
1441     * @return {@link #note} (Suite of notes.)
1442     */
1443    public List<NotesComponent> getNote() { 
1444      if (this.note == null)
1445        this.note = new ArrayList<NotesComponent>();
1446      return this.note;
1447    }
1448
1449    public boolean hasNote() { 
1450      if (this.note == null)
1451        return false;
1452      for (NotesComponent item : this.note)
1453        if (!item.isEmpty())
1454          return true;
1455      return false;
1456    }
1457
1458    /**
1459     * @return {@link #note} (Suite of notes.)
1460     */
1461    // syntactic sugar
1462    public NotesComponent addNote() { //3
1463      NotesComponent t = new NotesComponent();
1464      if (this.note == null)
1465        this.note = new ArrayList<NotesComponent>();
1466      this.note.add(t);
1467      return t;
1468    }
1469
1470    // syntactic sugar
1471    public PaymentReconciliation addNote(NotesComponent t) { //3
1472      if (t == null)
1473        return this;
1474      if (this.note == null)
1475        this.note = new ArrayList<NotesComponent>();
1476      this.note.add(t);
1477      return this;
1478    }
1479
1480      protected void listChildren(List<Property> childrenList) {
1481        super.listChildren(childrenList);
1482        childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier));
1483        childrenList.add(new Property("request[x]", "Identifier|Reference(ProcessRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request));
1484        childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome));
1485        childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition));
1486        childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset));
1487        childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset));
1488        childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created));
1489        childrenList.add(new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, java.lang.Integer.MAX_VALUE, period));
1490        childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization));
1491        childrenList.add(new Property("requestProvider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider));
1492        childrenList.add(new Property("requestOrganization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization));
1493        childrenList.add(new Property("detail", "", "List of individual settlement amounts and the corresponding transaction.", 0, java.lang.Integer.MAX_VALUE, detail));
1494        childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form));
1495        childrenList.add(new Property("total", "Money", "Total payment amount.", 0, java.lang.Integer.MAX_VALUE, total));
1496        childrenList.add(new Property("note", "", "Suite of notes.", 0, java.lang.Integer.MAX_VALUE, note));
1497      }
1498
1499      @Override
1500      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1501        switch (hash) {
1502        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1503        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Type
1504        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<RemittanceOutcome>
1505        case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
1506        case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding
1507        case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding
1508        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
1509        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1510        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type
1511        case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Type
1512        case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Type
1513        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // DetailsComponent
1514        case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // Coding
1515        case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // Money
1516        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // NotesComponent
1517        default: return super.getProperty(hash, name, checkValid);
1518        }
1519
1520      }
1521
1522      @Override
1523      public void setProperty(int hash, String name, Base value) throws FHIRException {
1524        switch (hash) {
1525        case -1618432855: // identifier
1526          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1527          break;
1528        case 1095692943: // request
1529          this.request = (Type) value; // Type
1530          break;
1531        case -1106507950: // outcome
1532          this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome>
1533          break;
1534        case 583380919: // disposition
1535          this.disposition = castToString(value); // StringType
1536          break;
1537        case 1548678118: // ruleset
1538          this.ruleset = castToCoding(value); // Coding
1539          break;
1540        case 1089373397: // originalRuleset
1541          this.originalRuleset = castToCoding(value); // Coding
1542          break;
1543        case 1028554472: // created
1544          this.created = castToDateTime(value); // DateTimeType
1545          break;
1546        case -991726143: // period
1547          this.period = castToPeriod(value); // Period
1548          break;
1549        case 1178922291: // organization
1550          this.organization = (Type) value; // Type
1551          break;
1552        case 1601527200: // requestProvider
1553          this.requestProvider = (Type) value; // Type
1554          break;
1555        case 599053666: // requestOrganization
1556          this.requestOrganization = (Type) value; // Type
1557          break;
1558        case -1335224239: // detail
1559          this.getDetail().add((DetailsComponent) value); // DetailsComponent
1560          break;
1561        case 3148996: // form
1562          this.form = castToCoding(value); // Coding
1563          break;
1564        case 110549828: // total
1565          this.total = castToMoney(value); // Money
1566          break;
1567        case 3387378: // note
1568          this.getNote().add((NotesComponent) value); // NotesComponent
1569          break;
1570        default: super.setProperty(hash, name, value);
1571        }
1572
1573      }
1574
1575      @Override
1576      public void setProperty(String name, Base value) throws FHIRException {
1577        if (name.equals("identifier"))
1578          this.getIdentifier().add(castToIdentifier(value));
1579        else if (name.equals("request[x]"))
1580          this.request = (Type) value; // Type
1581        else if (name.equals("outcome"))
1582          this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome>
1583        else if (name.equals("disposition"))
1584          this.disposition = castToString(value); // StringType
1585        else if (name.equals("ruleset"))
1586          this.ruleset = castToCoding(value); // Coding
1587        else if (name.equals("originalRuleset"))
1588          this.originalRuleset = castToCoding(value); // Coding
1589        else if (name.equals("created"))
1590          this.created = castToDateTime(value); // DateTimeType
1591        else if (name.equals("period"))
1592          this.period = castToPeriod(value); // Period
1593        else if (name.equals("organization[x]"))
1594          this.organization = (Type) value; // Type
1595        else if (name.equals("requestProvider[x]"))
1596          this.requestProvider = (Type) value; // Type
1597        else if (name.equals("requestOrganization[x]"))
1598          this.requestOrganization = (Type) value; // Type
1599        else if (name.equals("detail"))
1600          this.getDetail().add((DetailsComponent) value);
1601        else if (name.equals("form"))
1602          this.form = castToCoding(value); // Coding
1603        else if (name.equals("total"))
1604          this.total = castToMoney(value); // Money
1605        else if (name.equals("note"))
1606          this.getNote().add((NotesComponent) value);
1607        else
1608          super.setProperty(name, value);
1609      }
1610
1611      @Override
1612      public Base makeProperty(int hash, String name) throws FHIRException {
1613        switch (hash) {
1614        case -1618432855:  return addIdentifier(); // Identifier
1615        case 37106577:  return getRequest(); // Type
1616        case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Enumeration<RemittanceOutcome>
1617        case 583380919: throw new FHIRException("Cannot make property disposition as it is not a complex type"); // StringType
1618        case 1548678118:  return getRuleset(); // Coding
1619        case 1089373397:  return getOriginalRuleset(); // Coding
1620        case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
1621        case -991726143:  return getPeriod(); // Period
1622        case 1326483053:  return getOrganization(); // Type
1623        case -1694784800:  return getRequestProvider(); // Type
1624        case 818740190:  return getRequestOrganization(); // Type
1625        case -1335224239:  return addDetail(); // DetailsComponent
1626        case 3148996:  return getForm(); // Coding
1627        case 110549828:  return getTotal(); // Money
1628        case 3387378:  return addNote(); // NotesComponent
1629        default: return super.makeProperty(hash, name);
1630        }
1631
1632      }
1633
1634      @Override
1635      public Base addChild(String name) throws FHIRException {
1636        if (name.equals("identifier")) {
1637          return addIdentifier();
1638        }
1639        else if (name.equals("requestIdentifier")) {
1640          this.request = new Identifier();
1641          return this.request;
1642        }
1643        else if (name.equals("requestReference")) {
1644          this.request = new Reference();
1645          return this.request;
1646        }
1647        else if (name.equals("outcome")) {
1648          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.outcome");
1649        }
1650        else if (name.equals("disposition")) {
1651          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.disposition");
1652        }
1653        else if (name.equals("ruleset")) {
1654          this.ruleset = new Coding();
1655          return this.ruleset;
1656        }
1657        else if (name.equals("originalRuleset")) {
1658          this.originalRuleset = new Coding();
1659          return this.originalRuleset;
1660        }
1661        else if (name.equals("created")) {
1662          throw new FHIRException("Cannot call addChild on a primitive type PaymentReconciliation.created");
1663        }
1664        else if (name.equals("period")) {
1665          this.period = new Period();
1666          return this.period;
1667        }
1668        else if (name.equals("organizationIdentifier")) {
1669          this.organization = new Identifier();
1670          return this.organization;
1671        }
1672        else if (name.equals("organizationReference")) {
1673          this.organization = new Reference();
1674          return this.organization;
1675        }
1676        else if (name.equals("requestProviderIdentifier")) {
1677          this.requestProvider = new Identifier();
1678          return this.requestProvider;
1679        }
1680        else if (name.equals("requestProviderReference")) {
1681          this.requestProvider = new Reference();
1682          return this.requestProvider;
1683        }
1684        else if (name.equals("requestOrganizationIdentifier")) {
1685          this.requestOrganization = new Identifier();
1686          return this.requestOrganization;
1687        }
1688        else if (name.equals("requestOrganizationReference")) {
1689          this.requestOrganization = new Reference();
1690          return this.requestOrganization;
1691        }
1692        else if (name.equals("detail")) {
1693          return addDetail();
1694        }
1695        else if (name.equals("form")) {
1696          this.form = new Coding();
1697          return this.form;
1698        }
1699        else if (name.equals("total")) {
1700          this.total = new Money();
1701          return this.total;
1702        }
1703        else if (name.equals("note")) {
1704          return addNote();
1705        }
1706        else
1707          return super.addChild(name);
1708      }
1709
1710  public String fhirType() {
1711    return "PaymentReconciliation";
1712
1713  }
1714
1715      public PaymentReconciliation copy() {
1716        PaymentReconciliation dst = new PaymentReconciliation();
1717        copyValues(dst);
1718        if (identifier != null) {
1719          dst.identifier = new ArrayList<Identifier>();
1720          for (Identifier i : identifier)
1721            dst.identifier.add(i.copy());
1722        };
1723        dst.request = request == null ? null : request.copy();
1724        dst.outcome = outcome == null ? null : outcome.copy();
1725        dst.disposition = disposition == null ? null : disposition.copy();
1726        dst.ruleset = ruleset == null ? null : ruleset.copy();
1727        dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
1728        dst.created = created == null ? null : created.copy();
1729        dst.period = period == null ? null : period.copy();
1730        dst.organization = organization == null ? null : organization.copy();
1731        dst.requestProvider = requestProvider == null ? null : requestProvider.copy();
1732        dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy();
1733        if (detail != null) {
1734          dst.detail = new ArrayList<DetailsComponent>();
1735          for (DetailsComponent i : detail)
1736            dst.detail.add(i.copy());
1737        };
1738        dst.form = form == null ? null : form.copy();
1739        dst.total = total == null ? null : total.copy();
1740        if (note != null) {
1741          dst.note = new ArrayList<NotesComponent>();
1742          for (NotesComponent i : note)
1743            dst.note.add(i.copy());
1744        };
1745        return dst;
1746      }
1747
1748      protected PaymentReconciliation typedCopy() {
1749        return copy();
1750      }
1751
1752      @Override
1753      public boolean equalsDeep(Base other) {
1754        if (!super.equalsDeep(other))
1755          return false;
1756        if (!(other instanceof PaymentReconciliation))
1757          return false;
1758        PaymentReconciliation o = (PaymentReconciliation) other;
1759        return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true)
1760           && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true)
1761           && compareDeep(created, o.created, true) && compareDeep(period, o.period, true) && compareDeep(organization, o.organization, true)
1762           && compareDeep(requestProvider, o.requestProvider, true) && compareDeep(requestOrganization, o.requestOrganization, true)
1763           && compareDeep(detail, o.detail, true) && compareDeep(form, o.form, true) && compareDeep(total, o.total, true)
1764           && compareDeep(note, o.note, true);
1765      }
1766
1767      @Override
1768      public boolean equalsShallow(Base other) {
1769        if (!super.equalsShallow(other))
1770          return false;
1771        if (!(other instanceof PaymentReconciliation))
1772          return false;
1773        PaymentReconciliation o = (PaymentReconciliation) other;
1774        return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true)
1775          ;
1776      }
1777
1778      public boolean isEmpty() {
1779        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty())
1780           && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty())
1781           && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty())
1782           && (created == null || created.isEmpty()) && (period == null || period.isEmpty()) && (organization == null || organization.isEmpty())
1783           && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty())
1784           && (detail == null || detail.isEmpty()) && (form == null || form.isEmpty()) && (total == null || total.isEmpty())
1785           && (note == null || note.isEmpty());
1786      }
1787
1788  @Override
1789  public ResourceType getResourceType() {
1790    return ResourceType.PaymentReconciliation;
1791   }
1792
1793 /**
1794   * Search parameter: <b>requestorganizationreference</b>
1795   * <p>
1796   * Description: <b>The organization who generated this resource</b><br>
1797   * Type: <b>reference</b><br>
1798   * Path: <b>PaymentReconciliation.requestOrganizationReference</b><br>
1799   * </p>
1800   */
1801  @SearchParamDefinition(name="requestorganizationreference", path="PaymentReconciliation.requestOrganization.as(Reference)", description="The organization who generated this resource", type="reference" )
1802  public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference";
1803 /**
1804   * <b>Fluent Client</b> search parameter constant for <b>requestorganizationreference</b>
1805   * <p>
1806   * Description: <b>The organization who generated this resource</b><br>
1807   * Type: <b>reference</b><br>
1808   * Path: <b>PaymentReconciliation.requestOrganizationReference</b><br>
1809   * </p>
1810   */
1811  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATIONREFERENCE);
1812
1813/**
1814   * Constant for fluent queries to be used to add include statements. Specifies
1815   * the path value of "<b>PaymentReconciliation:requestorganizationreference</b>".
1816   */
1817  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestorganizationreference").toLocked();
1818
1819 /**
1820   * Search parameter: <b>created</b>
1821   * <p>
1822   * Description: <b>The creation date</b><br>
1823   * Type: <b>date</b><br>
1824   * Path: <b>PaymentReconciliation.created</b><br>
1825   * </p>
1826   */
1827  @SearchParamDefinition(name="created", path="PaymentReconciliation.created", description="The creation date", type="date" )
1828  public static final String SP_CREATED = "created";
1829 /**
1830   * <b>Fluent Client</b> search parameter constant for <b>created</b>
1831   * <p>
1832   * Description: <b>The creation date</b><br>
1833   * Type: <b>date</b><br>
1834   * Path: <b>PaymentReconciliation.created</b><br>
1835   * </p>
1836   */
1837  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
1838
1839 /**
1840   * Search parameter: <b>requestorganizationidentifier</b>
1841   * <p>
1842   * Description: <b>The organization who generated this resource</b><br>
1843   * Type: <b>token</b><br>
1844   * Path: <b>PaymentReconciliation.requestOrganizationIdentifier</b><br>
1845   * </p>
1846   */
1847  @SearchParamDefinition(name="requestorganizationidentifier", path="PaymentReconciliation.requestOrganization.as(Identifier)", description="The organization who generated this resource", type="token" )
1848  public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier";
1849 /**
1850   * <b>Fluent Client</b> search parameter constant for <b>requestorganizationidentifier</b>
1851   * <p>
1852   * Description: <b>The organization who generated this resource</b><br>
1853   * Type: <b>token</b><br>
1854   * Path: <b>PaymentReconciliation.requestOrganizationIdentifier</b><br>
1855   * </p>
1856   */
1857  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTORGANIZATIONIDENTIFIER);
1858
1859 /**
1860   * Search parameter: <b>requestprovideridentifier</b>
1861   * <p>
1862   * Description: <b>The reference to the provider who sumbitted the claim</b><br>
1863   * Type: <b>token</b><br>
1864   * Path: <b>PaymentReconciliation.requestProviderIdentifier</b><br>
1865   * </p>
1866   */
1867  @SearchParamDefinition(name="requestprovideridentifier", path="PaymentReconciliation.requestProvider.as(Identifier)", description="The reference to the provider who sumbitted the claim", type="token" )
1868  public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier";
1869 /**
1870   * <b>Fluent Client</b> search parameter constant for <b>requestprovideridentifier</b>
1871   * <p>
1872   * Description: <b>The reference to the provider who sumbitted the claim</b><br>
1873   * Type: <b>token</b><br>
1874   * Path: <b>PaymentReconciliation.requestProviderIdentifier</b><br>
1875   * </p>
1876   */
1877  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTPROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTPROVIDERIDENTIFIER);
1878
1879 /**
1880   * Search parameter: <b>requestidentifier</b>
1881   * <p>
1882   * Description: <b>The reference to the claim</b><br>
1883   * Type: <b>token</b><br>
1884   * Path: <b>PaymentReconciliation.requestIdentifier</b><br>
1885   * </p>
1886   */
1887  @SearchParamDefinition(name="requestidentifier", path="PaymentReconciliation.request.as(Identifier)", description="The reference to the claim", type="token" )
1888  public static final String SP_REQUESTIDENTIFIER = "requestidentifier";
1889 /**
1890   * <b>Fluent Client</b> search parameter constant for <b>requestidentifier</b>
1891   * <p>
1892   * Description: <b>The reference to the claim</b><br>
1893   * Type: <b>token</b><br>
1894   * Path: <b>PaymentReconciliation.requestIdentifier</b><br>
1895   * </p>
1896   */
1897  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER);
1898
1899 /**
1900   * Search parameter: <b>requestreference</b>
1901   * <p>
1902   * Description: <b>The reference to the claim</b><br>
1903   * Type: <b>reference</b><br>
1904   * Path: <b>PaymentReconciliation.requestReference</b><br>
1905   * </p>
1906   */
1907  @SearchParamDefinition(name="requestreference", path="PaymentReconciliation.request.as(Reference)", description="The reference to the claim", type="reference" )
1908  public static final String SP_REQUESTREFERENCE = "requestreference";
1909 /**
1910   * <b>Fluent Client</b> search parameter constant for <b>requestreference</b>
1911   * <p>
1912   * Description: <b>The reference to the claim</b><br>
1913   * Type: <b>reference</b><br>
1914   * Path: <b>PaymentReconciliation.requestReference</b><br>
1915   * </p>
1916   */
1917  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE);
1918
1919/**
1920   * Constant for fluent queries to be used to add include statements. Specifies
1921   * the path value of "<b>PaymentReconciliation:requestreference</b>".
1922   */
1923  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestreference").toLocked();
1924
1925 /**
1926   * Search parameter: <b>organizationidentifier</b>
1927   * <p>
1928   * Description: <b>The organization who generated this resource</b><br>
1929   * Type: <b>token</b><br>
1930   * Path: <b>PaymentReconciliation.organizationIdentifier</b><br>
1931   * </p>
1932   */
1933  @SearchParamDefinition(name="organizationidentifier", path="PaymentReconciliation.organization.as(Identifier)", description="The organization who generated this resource", type="token" )
1934  public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier";
1935 /**
1936   * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b>
1937   * <p>
1938   * Description: <b>The organization who generated this resource</b><br>
1939   * Type: <b>token</b><br>
1940   * Path: <b>PaymentReconciliation.organizationIdentifier</b><br>
1941   * </p>
1942   */
1943  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER);
1944
1945 /**
1946   * Search parameter: <b>requestproviderreference</b>
1947   * <p>
1948   * Description: <b>The reference to the provider who sumbitted the claim</b><br>
1949   * Type: <b>reference</b><br>
1950   * Path: <b>PaymentReconciliation.requestProviderReference</b><br>
1951   * </p>
1952   */
1953  @SearchParamDefinition(name="requestproviderreference", path="PaymentReconciliation.requestProvider.as(Reference)", description="The reference to the provider who sumbitted the claim", type="reference" )
1954  public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference";
1955 /**
1956   * <b>Fluent Client</b> search parameter constant for <b>requestproviderreference</b>
1957   * <p>
1958   * Description: <b>The reference to the provider who sumbitted the claim</b><br>
1959   * Type: <b>reference</b><br>
1960   * Path: <b>PaymentReconciliation.requestProviderReference</b><br>
1961   * </p>
1962   */
1963  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDERREFERENCE);
1964
1965/**
1966   * Constant for fluent queries to be used to add include statements. Specifies
1967   * the path value of "<b>PaymentReconciliation:requestproviderreference</b>".
1968   */
1969  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestproviderreference").toLocked();
1970
1971 /**
1972   * Search parameter: <b>organizationreference</b>
1973   * <p>
1974   * Description: <b>The organization who generated this resource</b><br>
1975   * Type: <b>reference</b><br>
1976   * Path: <b>PaymentReconciliation.organizationReference</b><br>
1977   * </p>
1978   */
1979  @SearchParamDefinition(name="organizationreference", path="PaymentReconciliation.organization.as(Reference)", description="The organization who generated this resource", type="reference" )
1980  public static final String SP_ORGANIZATIONREFERENCE = "organizationreference";
1981 /**
1982   * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b>
1983   * <p>
1984   * Description: <b>The organization who generated this resource</b><br>
1985   * Type: <b>reference</b><br>
1986   * Path: <b>PaymentReconciliation.organizationReference</b><br>
1987   * </p>
1988   */
1989  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE);
1990
1991/**
1992   * Constant for fluent queries to be used to add include statements. Specifies
1993   * the path value of "<b>PaymentReconciliation:organizationreference</b>".
1994   */
1995  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:organizationreference").toLocked();
1996
1997 /**
1998   * Search parameter: <b>outcome</b>
1999   * <p>
2000   * Description: <b>The processing outcome</b><br>
2001   * Type: <b>token</b><br>
2002   * Path: <b>PaymentReconciliation.outcome</b><br>
2003   * </p>
2004   */
2005  @SearchParamDefinition(name="outcome", path="PaymentReconciliation.outcome", description="The processing outcome", type="token" )
2006  public static final String SP_OUTCOME = "outcome";
2007 /**
2008   * <b>Fluent Client</b> search parameter constant for <b>outcome</b>
2009   * <p>
2010   * Description: <b>The processing outcome</b><br>
2011   * Type: <b>token</b><br>
2012   * Path: <b>PaymentReconciliation.outcome</b><br>
2013   * </p>
2014   */
2015  public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME);
2016
2017 /**
2018   * Search parameter: <b>identifier</b>
2019   * <p>
2020   * Description: <b>The business identifier of the Explanation of Benefit</b><br>
2021   * Type: <b>token</b><br>
2022   * Path: <b>PaymentReconciliation.identifier</b><br>
2023   * </p>
2024   */
2025  @SearchParamDefinition(name="identifier", path="PaymentReconciliation.identifier", description="The business identifier of the Explanation of Benefit", type="token" )
2026  public static final String SP_IDENTIFIER = "identifier";
2027 /**
2028   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2029   * <p>
2030   * Description: <b>The business identifier of the Explanation of Benefit</b><br>
2031   * Type: <b>token</b><br>
2032   * Path: <b>PaymentReconciliation.identifier</b><br>
2033   * </p>
2034   */
2035  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2036
2037 /**
2038   * Search parameter: <b>disposition</b>
2039   * <p>
2040   * Description: <b>The contents of the disposition message</b><br>
2041   * Type: <b>string</b><br>
2042   * Path: <b>PaymentReconciliation.disposition</b><br>
2043   * </p>
2044   */
2045  @SearchParamDefinition(name="disposition", path="PaymentReconciliation.disposition", description="The contents of the disposition message", type="string" )
2046  public static final String SP_DISPOSITION = "disposition";
2047 /**
2048   * <b>Fluent Client</b> search parameter constant for <b>disposition</b>
2049   * <p>
2050   * Description: <b>The contents of the disposition message</b><br>
2051   * Type: <b>string</b><br>
2052   * Path: <b>PaymentReconciliation.disposition</b><br>
2053   * </p>
2054   */
2055  public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION);
2056
2057
2058}