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