001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
052 */
053@ResourceDef(name="Invoice", profile="http://hl7.org/fhir/StructureDefinition/Invoice")
054public class Invoice extends DomainResource {
055
056    public enum InvoiceStatus {
057        /**
058         * the invoice has been prepared but not yet finalized.
059         */
060        DRAFT, 
061        /**
062         * the invoice has been finalized and sent to the recipient.
063         */
064        ISSUED, 
065        /**
066         * the invoice has been balaced / completely paid.
067         */
068        BALANCED, 
069        /**
070         * the invoice was cancelled.
071         */
072        CANCELLED, 
073        /**
074         * the invoice was determined as entered in error before it was issued.
075         */
076        ENTEREDINERROR, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static InvoiceStatus fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("draft".equals(codeString))
085          return DRAFT;
086        if ("issued".equals(codeString))
087          return ISSUED;
088        if ("balanced".equals(codeString))
089          return BALANCED;
090        if ("cancelled".equals(codeString))
091          return CANCELLED;
092        if ("entered-in-error".equals(codeString))
093          return ENTEREDINERROR;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown InvoiceStatus code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case DRAFT: return "draft";
102            case ISSUED: return "issued";
103            case BALANCED: return "balanced";
104            case CANCELLED: return "cancelled";
105            case ENTEREDINERROR: return "entered-in-error";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getSystem() {
111          switch (this) {
112            case DRAFT: return "http://hl7.org/fhir/invoice-status";
113            case ISSUED: return "http://hl7.org/fhir/invoice-status";
114            case BALANCED: return "http://hl7.org/fhir/invoice-status";
115            case CANCELLED: return "http://hl7.org/fhir/invoice-status";
116            case ENTEREDINERROR: return "http://hl7.org/fhir/invoice-status";
117            case NULL: return null;
118            default: return "?";
119          }
120        }
121        public String getDefinition() {
122          switch (this) {
123            case DRAFT: return "the invoice has been prepared but not yet finalized.";
124            case ISSUED: return "the invoice has been finalized and sent to the recipient.";
125            case BALANCED: return "the invoice has been balaced / completely paid.";
126            case CANCELLED: return "the invoice was cancelled.";
127            case ENTEREDINERROR: return "the invoice was determined as entered in error before it was issued.";
128            case NULL: return null;
129            default: return "?";
130          }
131        }
132        public String getDisplay() {
133          switch (this) {
134            case DRAFT: return "draft";
135            case ISSUED: return "issued";
136            case BALANCED: return "balanced";
137            case CANCELLED: return "cancelled";
138            case ENTEREDINERROR: return "entered in error";
139            case NULL: return null;
140            default: return "?";
141          }
142        }
143    }
144
145  public static class InvoiceStatusEnumFactory implements EnumFactory<InvoiceStatus> {
146    public InvoiceStatus fromCode(String codeString) throws IllegalArgumentException {
147      if (codeString == null || "".equals(codeString))
148            if (codeString == null || "".equals(codeString))
149                return null;
150        if ("draft".equals(codeString))
151          return InvoiceStatus.DRAFT;
152        if ("issued".equals(codeString))
153          return InvoiceStatus.ISSUED;
154        if ("balanced".equals(codeString))
155          return InvoiceStatus.BALANCED;
156        if ("cancelled".equals(codeString))
157          return InvoiceStatus.CANCELLED;
158        if ("entered-in-error".equals(codeString))
159          return InvoiceStatus.ENTEREDINERROR;
160        throw new IllegalArgumentException("Unknown InvoiceStatus code '"+codeString+"'");
161        }
162        public Enumeration<InvoiceStatus> fromType(PrimitiveType<?> code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<InvoiceStatus>(this, InvoiceStatus.NULL, code);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return new Enumeration<InvoiceStatus>(this, InvoiceStatus.NULL, code);
170        if ("draft".equals(codeString))
171          return new Enumeration<InvoiceStatus>(this, InvoiceStatus.DRAFT, code);
172        if ("issued".equals(codeString))
173          return new Enumeration<InvoiceStatus>(this, InvoiceStatus.ISSUED, code);
174        if ("balanced".equals(codeString))
175          return new Enumeration<InvoiceStatus>(this, InvoiceStatus.BALANCED, code);
176        if ("cancelled".equals(codeString))
177          return new Enumeration<InvoiceStatus>(this, InvoiceStatus.CANCELLED, code);
178        if ("entered-in-error".equals(codeString))
179          return new Enumeration<InvoiceStatus>(this, InvoiceStatus.ENTEREDINERROR, code);
180        throw new FHIRException("Unknown InvoiceStatus code '"+codeString+"'");
181        }
182    public String toCode(InvoiceStatus code) {
183      if (code == InvoiceStatus.DRAFT)
184        return "draft";
185      if (code == InvoiceStatus.ISSUED)
186        return "issued";
187      if (code == InvoiceStatus.BALANCED)
188        return "balanced";
189      if (code == InvoiceStatus.CANCELLED)
190        return "cancelled";
191      if (code == InvoiceStatus.ENTEREDINERROR)
192        return "entered-in-error";
193      return "?";
194      }
195    public String toSystem(InvoiceStatus code) {
196      return code.getSystem();
197      }
198    }
199
200    @Block()
201    public static class InvoiceParticipantComponent extends BackboneElement implements IBaseBackboneElement {
202        /**
203         * Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.
204         */
205        @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
206        @Description(shortDefinition="Type of involvement in creation of this Invoice", formalDefinition="Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device." )
207        protected CodeableConcept role;
208
209        /**
210         * The device, practitioner, etc. who performed or participated in the service.
211         */
212        @Child(name = "actor", type = {Practitioner.class, Organization.class, Patient.class, PractitionerRole.class, Device.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false)
213        @Description(shortDefinition="Individual who was involved", formalDefinition="The device, practitioner, etc. who performed or participated in the service." )
214        protected Reference actor;
215
216        private static final long serialVersionUID = -1684441509L;
217
218    /**
219     * Constructor
220     */
221      public InvoiceParticipantComponent() {
222        super();
223      }
224
225    /**
226     * Constructor
227     */
228      public InvoiceParticipantComponent(Reference actor) {
229        super();
230        this.setActor(actor);
231      }
232
233        /**
234         * @return {@link #role} (Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.)
235         */
236        public CodeableConcept getRole() { 
237          if (this.role == null)
238            if (Configuration.errorOnAutoCreate())
239              throw new Error("Attempt to auto-create InvoiceParticipantComponent.role");
240            else if (Configuration.doAutoCreate())
241              this.role = new CodeableConcept(); // cc
242          return this.role;
243        }
244
245        public boolean hasRole() { 
246          return this.role != null && !this.role.isEmpty();
247        }
248
249        /**
250         * @param value {@link #role} (Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.)
251         */
252        public InvoiceParticipantComponent setRole(CodeableConcept value) { 
253          this.role = value;
254          return this;
255        }
256
257        /**
258         * @return {@link #actor} (The device, practitioner, etc. who performed or participated in the service.)
259         */
260        public Reference getActor() { 
261          if (this.actor == null)
262            if (Configuration.errorOnAutoCreate())
263              throw new Error("Attempt to auto-create InvoiceParticipantComponent.actor");
264            else if (Configuration.doAutoCreate())
265              this.actor = new Reference(); // cc
266          return this.actor;
267        }
268
269        public boolean hasActor() { 
270          return this.actor != null && !this.actor.isEmpty();
271        }
272
273        /**
274         * @param value {@link #actor} (The device, practitioner, etc. who performed or participated in the service.)
275         */
276        public InvoiceParticipantComponent setActor(Reference value) { 
277          this.actor = value;
278          return this;
279        }
280
281        protected void listChildren(List<Property> children) {
282          super.listChildren(children);
283          children.add(new Property("role", "CodeableConcept", "Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.", 0, 1, role));
284          children.add(new Property("actor", "Reference(Practitioner|Organization|Patient|PractitionerRole|Device|RelatedPerson)", "The device, practitioner, etc. who performed or participated in the service.", 0, 1, actor));
285        }
286
287        @Override
288        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
289          switch (_hash) {
290          case 3506294: /*role*/  return new Property("role", "CodeableConcept", "Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device.", 0, 1, role);
291          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|Organization|Patient|PractitionerRole|Device|RelatedPerson)", "The device, practitioner, etc. who performed or participated in the service.", 0, 1, actor);
292          default: return super.getNamedProperty(_hash, _name, _checkValid);
293          }
294
295        }
296
297      @Override
298      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
299        switch (hash) {
300        case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
301        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
302        default: return super.getProperty(hash, name, checkValid);
303        }
304
305      }
306
307      @Override
308      public Base setProperty(int hash, String name, Base value) throws FHIRException {
309        switch (hash) {
310        case 3506294: // role
311          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
312          return value;
313        case 92645877: // actor
314          this.actor = TypeConvertor.castToReference(value); // Reference
315          return value;
316        default: return super.setProperty(hash, name, value);
317        }
318
319      }
320
321      @Override
322      public Base setProperty(String name, Base value) throws FHIRException {
323        if (name.equals("role")) {
324          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
325        } else if (name.equals("actor")) {
326          this.actor = TypeConvertor.castToReference(value); // Reference
327        } else
328          return super.setProperty(name, value);
329        return value;
330      }
331
332      @Override
333      public Base makeProperty(int hash, String name) throws FHIRException {
334        switch (hash) {
335        case 3506294:  return getRole();
336        case 92645877:  return getActor();
337        default: return super.makeProperty(hash, name);
338        }
339
340      }
341
342      @Override
343      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
344        switch (hash) {
345        case 3506294: /*role*/ return new String[] {"CodeableConcept"};
346        case 92645877: /*actor*/ return new String[] {"Reference"};
347        default: return super.getTypesForProperty(hash, name);
348        }
349
350      }
351
352      @Override
353      public Base addChild(String name) throws FHIRException {
354        if (name.equals("role")) {
355          this.role = new CodeableConcept();
356          return this.role;
357        }
358        else if (name.equals("actor")) {
359          this.actor = new Reference();
360          return this.actor;
361        }
362        else
363          return super.addChild(name);
364      }
365
366      public InvoiceParticipantComponent copy() {
367        InvoiceParticipantComponent dst = new InvoiceParticipantComponent();
368        copyValues(dst);
369        return dst;
370      }
371
372      public void copyValues(InvoiceParticipantComponent dst) {
373        super.copyValues(dst);
374        dst.role = role == null ? null : role.copy();
375        dst.actor = actor == null ? null : actor.copy();
376      }
377
378      @Override
379      public boolean equalsDeep(Base other_) {
380        if (!super.equalsDeep(other_))
381          return false;
382        if (!(other_ instanceof InvoiceParticipantComponent))
383          return false;
384        InvoiceParticipantComponent o = (InvoiceParticipantComponent) other_;
385        return compareDeep(role, o.role, true) && compareDeep(actor, o.actor, true);
386      }
387
388      @Override
389      public boolean equalsShallow(Base other_) {
390        if (!super.equalsShallow(other_))
391          return false;
392        if (!(other_ instanceof InvoiceParticipantComponent))
393          return false;
394        InvoiceParticipantComponent o = (InvoiceParticipantComponent) other_;
395        return true;
396      }
397
398      public boolean isEmpty() {
399        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, actor);
400      }
401
402  public String fhirType() {
403    return "Invoice.participant";
404
405  }
406
407  }
408
409    @Block()
410    public static class InvoiceLineItemComponent extends BackboneElement implements IBaseBackboneElement {
411        /**
412         * Sequence in which the items appear on the invoice.
413         */
414        @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=0, max=1, modifier=false, summary=false)
415        @Description(shortDefinition="Sequence number of line item", formalDefinition="Sequence in which the items appear on the invoice." )
416        protected PositiveIntType sequence;
417
418        /**
419         * Date/time(s) range when this service was delivered or completed.
420         */
421        @Child(name = "serviced", type = {DateType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
422        @Description(shortDefinition="Service data or period", formalDefinition="Date/time(s) range when this service was delivered or completed." )
423        protected DataType serviced;
424
425        /**
426         * The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.
427         */
428        @Child(name = "chargeItem", type = {ChargeItem.class, CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=false)
429        @Description(shortDefinition="Reference to ChargeItem containing details of this line item or an inline billing code", formalDefinition="The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference." )
430        protected DataType chargeItem;
431
432        /**
433         * The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.
434         */
435        @Child(name = "priceComponent", type = {MonetaryComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
436        @Description(shortDefinition="Components of total line item price", formalDefinition="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated." )
437        protected List<MonetaryComponent> priceComponent;
438
439        private static final long serialVersionUID = -9393053L;
440
441    /**
442     * Constructor
443     */
444      public InvoiceLineItemComponent() {
445        super();
446      }
447
448    /**
449     * Constructor
450     */
451      public InvoiceLineItemComponent(DataType chargeItem) {
452        super();
453        this.setChargeItem(chargeItem);
454      }
455
456        /**
457         * @return {@link #sequence} (Sequence in which the items appear on the invoice.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
458         */
459        public PositiveIntType getSequenceElement() { 
460          if (this.sequence == null)
461            if (Configuration.errorOnAutoCreate())
462              throw new Error("Attempt to auto-create InvoiceLineItemComponent.sequence");
463            else if (Configuration.doAutoCreate())
464              this.sequence = new PositiveIntType(); // bb
465          return this.sequence;
466        }
467
468        public boolean hasSequenceElement() { 
469          return this.sequence != null && !this.sequence.isEmpty();
470        }
471
472        public boolean hasSequence() { 
473          return this.sequence != null && !this.sequence.isEmpty();
474        }
475
476        /**
477         * @param value {@link #sequence} (Sequence in which the items appear on the invoice.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
478         */
479        public InvoiceLineItemComponent setSequenceElement(PositiveIntType value) { 
480          this.sequence = value;
481          return this;
482        }
483
484        /**
485         * @return Sequence in which the items appear on the invoice.
486         */
487        public int getSequence() { 
488          return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
489        }
490
491        /**
492         * @param value Sequence in which the items appear on the invoice.
493         */
494        public InvoiceLineItemComponent setSequence(int value) { 
495            if (this.sequence == null)
496              this.sequence = new PositiveIntType();
497            this.sequence.setValue(value);
498          return this;
499        }
500
501        /**
502         * @return {@link #serviced} (Date/time(s) range when this service was delivered or completed.)
503         */
504        public DataType getServiced() { 
505          return this.serviced;
506        }
507
508        /**
509         * @return {@link #serviced} (Date/time(s) range when this service was delivered or completed.)
510         */
511        public DateType getServicedDateType() throws FHIRException { 
512          if (this.serviced == null)
513            this.serviced = new DateType();
514          if (!(this.serviced instanceof DateType))
515            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered");
516          return (DateType) this.serviced;
517        }
518
519        public boolean hasServicedDateType() { 
520          return this != null && this.serviced instanceof DateType;
521        }
522
523        /**
524         * @return {@link #serviced} (Date/time(s) range when this service was delivered or completed.)
525         */
526        public Period getServicedPeriod() throws FHIRException { 
527          if (this.serviced == null)
528            this.serviced = new Period();
529          if (!(this.serviced instanceof Period))
530            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered");
531          return (Period) this.serviced;
532        }
533
534        public boolean hasServicedPeriod() { 
535          return this != null && this.serviced instanceof Period;
536        }
537
538        public boolean hasServiced() { 
539          return this.serviced != null && !this.serviced.isEmpty();
540        }
541
542        /**
543         * @param value {@link #serviced} (Date/time(s) range when this service was delivered or completed.)
544         */
545        public InvoiceLineItemComponent setServiced(DataType value) { 
546          if (value != null && !(value instanceof DateType || value instanceof Period))
547            throw new FHIRException("Not the right type for Invoice.lineItem.serviced[x]: "+value.fhirType());
548          this.serviced = value;
549          return this;
550        }
551
552        /**
553         * @return {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.)
554         */
555        public DataType getChargeItem() { 
556          return this.chargeItem;
557        }
558
559        /**
560         * @return {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.)
561         */
562        public Reference getChargeItemReference() throws FHIRException { 
563          if (this.chargeItem == null)
564            this.chargeItem = new Reference();
565          if (!(this.chargeItem instanceof Reference))
566            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.chargeItem.getClass().getName()+" was encountered");
567          return (Reference) this.chargeItem;
568        }
569
570        public boolean hasChargeItemReference() { 
571          return this != null && this.chargeItem instanceof Reference;
572        }
573
574        /**
575         * @return {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.)
576         */
577        public CodeableConcept getChargeItemCodeableConcept() throws FHIRException { 
578          if (this.chargeItem == null)
579            this.chargeItem = new CodeableConcept();
580          if (!(this.chargeItem instanceof CodeableConcept))
581            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.chargeItem.getClass().getName()+" was encountered");
582          return (CodeableConcept) this.chargeItem;
583        }
584
585        public boolean hasChargeItemCodeableConcept() { 
586          return this != null && this.chargeItem instanceof CodeableConcept;
587        }
588
589        public boolean hasChargeItem() { 
590          return this.chargeItem != null && !this.chargeItem.isEmpty();
591        }
592
593        /**
594         * @param value {@link #chargeItem} (The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.)
595         */
596        public InvoiceLineItemComponent setChargeItem(DataType value) { 
597          if (value != null && !(value instanceof Reference || value instanceof CodeableConcept))
598            throw new FHIRException("Not the right type for Invoice.lineItem.chargeItem[x]: "+value.fhirType());
599          this.chargeItem = value;
600          return this;
601        }
602
603        /**
604         * @return {@link #priceComponent} (The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.)
605         */
606        public List<MonetaryComponent> getPriceComponent() { 
607          if (this.priceComponent == null)
608            this.priceComponent = new ArrayList<MonetaryComponent>();
609          return this.priceComponent;
610        }
611
612        /**
613         * @return Returns a reference to <code>this</code> for easy method chaining
614         */
615        public InvoiceLineItemComponent setPriceComponent(List<MonetaryComponent> thePriceComponent) { 
616          this.priceComponent = thePriceComponent;
617          return this;
618        }
619
620        public boolean hasPriceComponent() { 
621          if (this.priceComponent == null)
622            return false;
623          for (MonetaryComponent item : this.priceComponent)
624            if (!item.isEmpty())
625              return true;
626          return false;
627        }
628
629        public MonetaryComponent addPriceComponent() { //3
630          MonetaryComponent t = new MonetaryComponent();
631          if (this.priceComponent == null)
632            this.priceComponent = new ArrayList<MonetaryComponent>();
633          this.priceComponent.add(t);
634          return t;
635        }
636
637        public InvoiceLineItemComponent addPriceComponent(MonetaryComponent t) { //3
638          if (t == null)
639            return this;
640          if (this.priceComponent == null)
641            this.priceComponent = new ArrayList<MonetaryComponent>();
642          this.priceComponent.add(t);
643          return this;
644        }
645
646        /**
647         * @return The first repetition of repeating field {@link #priceComponent}, creating it if it does not already exist {3}
648         */
649        public MonetaryComponent getPriceComponentFirstRep() { 
650          if (getPriceComponent().isEmpty()) {
651            addPriceComponent();
652          }
653          return getPriceComponent().get(0);
654        }
655
656        protected void listChildren(List<Property> children) {
657          super.listChildren(children);
658          children.add(new Property("sequence", "positiveInt", "Sequence in which the items appear on the invoice.", 0, 1, sequence));
659          children.add(new Property("serviced[x]", "date|Period", "Date/time(s) range when this service was delivered or completed.", 0, 1, serviced));
660          children.add(new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem));
661          children.add(new Property("priceComponent", "MonetaryComponent", "The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.", 0, java.lang.Integer.MAX_VALUE, priceComponent));
662        }
663
664        @Override
665        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
666          switch (_hash) {
667          case 1349547969: /*sequence*/  return new Property("sequence", "positiveInt", "Sequence in which the items appear on the invoice.", 0, 1, sequence);
668          case -1927922223: /*serviced[x]*/  return new Property("serviced[x]", "date|Period", "Date/time(s) range when this service was delivered or completed.", 0, 1, serviced);
669          case 1379209295: /*serviced*/  return new Property("serviced[x]", "date|Period", "Date/time(s) range when this service was delivered or completed.", 0, 1, serviced);
670          case 363246749: /*servicedDate*/  return new Property("serviced[x]", "date", "Date/time(s) range when this service was delivered or completed.", 0, 1, serviced);
671          case 1534966512: /*servicedPeriod*/  return new Property("serviced[x]", "Period", "Date/time(s) range when this service was delivered or completed.", 0, 1, serviced);
672          case 351104825: /*chargeItem[x]*/  return new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem);
673          case 1417779175: /*chargeItem*/  return new Property("chargeItem[x]", "Reference(ChargeItem)|CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem);
674          case 753580836: /*chargeItemReference*/  return new Property("chargeItem[x]", "Reference(ChargeItem)", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem);
675          case 1226532026: /*chargeItemCodeableConcept*/  return new Property("chargeItem[x]", "CodeableConcept", "The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference.", 0, 1, chargeItem);
676          case 1219095988: /*priceComponent*/  return new Property("priceComponent", "MonetaryComponent", "The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated.", 0, java.lang.Integer.MAX_VALUE, priceComponent);
677          default: return super.getNamedProperty(_hash, _name, _checkValid);
678          }
679
680        }
681
682      @Override
683      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
684        switch (hash) {
685        case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
686        case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // DataType
687        case 1417779175: /*chargeItem*/ return this.chargeItem == null ? new Base[0] : new Base[] {this.chargeItem}; // DataType
688        case 1219095988: /*priceComponent*/ return this.priceComponent == null ? new Base[0] : this.priceComponent.toArray(new Base[this.priceComponent.size()]); // MonetaryComponent
689        default: return super.getProperty(hash, name, checkValid);
690        }
691
692      }
693
694      @Override
695      public Base setProperty(int hash, String name, Base value) throws FHIRException {
696        switch (hash) {
697        case 1349547969: // sequence
698          this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
699          return value;
700        case 1379209295: // serviced
701          this.serviced = TypeConvertor.castToType(value); // DataType
702          return value;
703        case 1417779175: // chargeItem
704          this.chargeItem = TypeConvertor.castToType(value); // DataType
705          return value;
706        case 1219095988: // priceComponent
707          this.getPriceComponent().add(TypeConvertor.castToMonetaryComponent(value)); // MonetaryComponent
708          return value;
709        default: return super.setProperty(hash, name, value);
710        }
711
712      }
713
714      @Override
715      public Base setProperty(String name, Base value) throws FHIRException {
716        if (name.equals("sequence")) {
717          this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
718        } else if (name.equals("serviced[x]")) {
719          this.serviced = TypeConvertor.castToType(value); // DataType
720        } else if (name.equals("chargeItem[x]")) {
721          this.chargeItem = TypeConvertor.castToType(value); // DataType
722        } else if (name.equals("priceComponent")) {
723          this.getPriceComponent().add(TypeConvertor.castToMonetaryComponent(value));
724        } else
725          return super.setProperty(name, value);
726        return value;
727      }
728
729      @Override
730      public Base makeProperty(int hash, String name) throws FHIRException {
731        switch (hash) {
732        case 1349547969:  return getSequenceElement();
733        case -1927922223:  return getServiced();
734        case 1379209295:  return getServiced();
735        case 351104825:  return getChargeItem();
736        case 1417779175:  return getChargeItem();
737        case 1219095988:  return addPriceComponent(); 
738        default: return super.makeProperty(hash, name);
739        }
740
741      }
742
743      @Override
744      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
745        switch (hash) {
746        case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
747        case 1379209295: /*serviced*/ return new String[] {"date", "Period"};
748        case 1417779175: /*chargeItem*/ return new String[] {"Reference", "CodeableConcept"};
749        case 1219095988: /*priceComponent*/ return new String[] {"MonetaryComponent"};
750        default: return super.getTypesForProperty(hash, name);
751        }
752
753      }
754
755      @Override
756      public Base addChild(String name) throws FHIRException {
757        if (name.equals("sequence")) {
758          throw new FHIRException("Cannot call addChild on a singleton property Invoice.lineItem.sequence");
759        }
760        else if (name.equals("servicedDate")) {
761          this.serviced = new DateType();
762          return this.serviced;
763        }
764        else if (name.equals("servicedPeriod")) {
765          this.serviced = new Period();
766          return this.serviced;
767        }
768        else if (name.equals("chargeItemReference")) {
769          this.chargeItem = new Reference();
770          return this.chargeItem;
771        }
772        else if (name.equals("chargeItemCodeableConcept")) {
773          this.chargeItem = new CodeableConcept();
774          return this.chargeItem;
775        }
776        else if (name.equals("priceComponent")) {
777          return addPriceComponent();
778        }
779        else
780          return super.addChild(name);
781      }
782
783      public InvoiceLineItemComponent copy() {
784        InvoiceLineItemComponent dst = new InvoiceLineItemComponent();
785        copyValues(dst);
786        return dst;
787      }
788
789      public void copyValues(InvoiceLineItemComponent dst) {
790        super.copyValues(dst);
791        dst.sequence = sequence == null ? null : sequence.copy();
792        dst.serviced = serviced == null ? null : serviced.copy();
793        dst.chargeItem = chargeItem == null ? null : chargeItem.copy();
794        if (priceComponent != null) {
795          dst.priceComponent = new ArrayList<MonetaryComponent>();
796          for (MonetaryComponent i : priceComponent)
797            dst.priceComponent.add(i.copy());
798        };
799      }
800
801      @Override
802      public boolean equalsDeep(Base other_) {
803        if (!super.equalsDeep(other_))
804          return false;
805        if (!(other_ instanceof InvoiceLineItemComponent))
806          return false;
807        InvoiceLineItemComponent o = (InvoiceLineItemComponent) other_;
808        return compareDeep(sequence, o.sequence, true) && compareDeep(serviced, o.serviced, true) && compareDeep(chargeItem, o.chargeItem, true)
809           && compareDeep(priceComponent, o.priceComponent, true);
810      }
811
812      @Override
813      public boolean equalsShallow(Base other_) {
814        if (!super.equalsShallow(other_))
815          return false;
816        if (!(other_ instanceof InvoiceLineItemComponent))
817          return false;
818        InvoiceLineItemComponent o = (InvoiceLineItemComponent) other_;
819        return compareValues(sequence, o.sequence, true);
820      }
821
822      public boolean isEmpty() {
823        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, serviced, chargeItem
824          , priceComponent);
825      }
826
827  public String fhirType() {
828    return "Invoice.lineItem";
829
830  }
831
832  }
833
834    /**
835     * Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.
836     */
837    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
838    @Description(shortDefinition="Business Identifier for item", formalDefinition="Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments." )
839    protected List<Identifier> identifier;
840
841    /**
842     * The current state of the Invoice.
843     */
844    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
845    @Description(shortDefinition="draft | issued | balanced | cancelled | entered-in-error", formalDefinition="The current state of the Invoice." )
846    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/invoice-status")
847    protected Enumeration<InvoiceStatus> status;
848
849    /**
850     * In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).
851     */
852    @Child(name = "cancelledReason", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
853    @Description(shortDefinition="Reason for cancellation of this Invoice", formalDefinition="In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.)." )
854    protected StringType cancelledReason;
855
856    /**
857     * Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).
858     */
859    @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
860    @Description(shortDefinition="Type of Invoice", formalDefinition="Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary)." )
861    protected CodeableConcept type;
862
863    /**
864     * The individual or set of individuals receiving the goods and services billed in this invoice.
865     */
866    @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=true)
867    @Description(shortDefinition="Recipient(s) of goods and services", formalDefinition="The individual or set of individuals receiving the goods and services billed in this invoice." )
868    protected Reference subject;
869
870    /**
871     * The individual or Organization responsible for balancing of this invoice.
872     */
873    @Child(name = "recipient", type = {Organization.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=1, modifier=false, summary=true)
874    @Description(shortDefinition="Recipient of this invoice", formalDefinition="The individual or Organization responsible for balancing of this invoice." )
875    protected Reference recipient;
876
877    /**
878     * Depricared by the element below.
879     */
880    @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
881    @Description(shortDefinition="DEPRICATED", formalDefinition="Depricared by the element below." )
882    protected DateTimeType date;
883
884    /**
885     * Date/time(s) of when this Invoice was posted.
886     */
887    @Child(name = "creation", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
888    @Description(shortDefinition="When posted", formalDefinition="Date/time(s) of when this Invoice was posted." )
889    protected DateTimeType creation;
890
891    /**
892     * Date/time(s) range of services included in this invoice.
893     */
894    @Child(name = "period", type = {DateType.class, Period.class}, order=8, min=0, max=1, modifier=false, summary=true)
895    @Description(shortDefinition="Billing date or period", formalDefinition="Date/time(s) range of services included in this invoice." )
896    protected DataType period;
897
898    /**
899     * Indicates who or what performed or participated in the charged service.
900     */
901    @Child(name = "participant", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
902    @Description(shortDefinition="Participant in creation of this Invoice", formalDefinition="Indicates who or what performed or participated in the charged service." )
903    protected List<InvoiceParticipantComponent> participant;
904
905    /**
906     * The organizationissuing the Invoice.
907     */
908    @Child(name = "issuer", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=false)
909    @Description(shortDefinition="Issuing Organization of Invoice", formalDefinition="The organizationissuing the Invoice." )
910    protected Reference issuer;
911
912    /**
913     * Account which is supposed to be balanced with this Invoice.
914     */
915    @Child(name = "account", type = {Account.class}, order=11, min=0, max=1, modifier=false, summary=false)
916    @Description(shortDefinition="Account that is being balanced", formalDefinition="Account which is supposed to be balanced with this Invoice." )
917    protected Reference account;
918
919    /**
920     * Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource.
921     */
922    @Child(name = "lineItem", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
923    @Description(shortDefinition="Line items of this Invoice", formalDefinition="Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource." )
924    protected List<InvoiceLineItemComponent> lineItem;
925
926    /**
927     * The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.
928     */
929    @Child(name = "totalPriceComponent", type = {MonetaryComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
930    @Description(shortDefinition="Components of Invoice total", formalDefinition="The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated." )
931    protected List<MonetaryComponent> totalPriceComponent;
932
933    /**
934     * Invoice total , taxes excluded.
935     */
936    @Child(name = "totalNet", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=true)
937    @Description(shortDefinition="Net total of this Invoice", formalDefinition="Invoice total , taxes excluded." )
938    protected Money totalNet;
939
940    /**
941     * Invoice total, tax included.
942     */
943    @Child(name = "totalGross", type = {Money.class}, order=15, min=0, max=1, modifier=false, summary=true)
944    @Description(shortDefinition="Gross total of this Invoice", formalDefinition="Invoice total, tax included." )
945    protected Money totalGross;
946
947    /**
948     * Payment details such as banking details, period of payment, deductibles, methods of payment.
949     */
950    @Child(name = "paymentTerms", type = {MarkdownType.class}, order=16, min=0, max=1, modifier=false, summary=false)
951    @Description(shortDefinition="Payment details", formalDefinition="Payment details such as banking details, period of payment, deductibles, methods of payment." )
952    protected MarkdownType paymentTerms;
953
954    /**
955     * Comments made about the invoice by the issuer, subject, or other participants.
956     */
957    @Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
958    @Description(shortDefinition="Comments made about the invoice", formalDefinition="Comments made about the invoice by the issuer, subject, or other participants." )
959    protected List<Annotation> note;
960
961    private static final long serialVersionUID = 6346282L;
962
963  /**
964   * Constructor
965   */
966    public Invoice() {
967      super();
968    }
969
970  /**
971   * Constructor
972   */
973    public Invoice(InvoiceStatus status) {
974      super();
975      this.setStatus(status);
976    }
977
978    /**
979     * @return {@link #identifier} (Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.)
980     */
981    public List<Identifier> getIdentifier() { 
982      if (this.identifier == null)
983        this.identifier = new ArrayList<Identifier>();
984      return this.identifier;
985    }
986
987    /**
988     * @return Returns a reference to <code>this</code> for easy method chaining
989     */
990    public Invoice setIdentifier(List<Identifier> theIdentifier) { 
991      this.identifier = theIdentifier;
992      return this;
993    }
994
995    public boolean hasIdentifier() { 
996      if (this.identifier == null)
997        return false;
998      for (Identifier item : this.identifier)
999        if (!item.isEmpty())
1000          return true;
1001      return false;
1002    }
1003
1004    public Identifier addIdentifier() { //3
1005      Identifier t = new Identifier();
1006      if (this.identifier == null)
1007        this.identifier = new ArrayList<Identifier>();
1008      this.identifier.add(t);
1009      return t;
1010    }
1011
1012    public Invoice addIdentifier(Identifier t) { //3
1013      if (t == null)
1014        return this;
1015      if (this.identifier == null)
1016        this.identifier = new ArrayList<Identifier>();
1017      this.identifier.add(t);
1018      return this;
1019    }
1020
1021    /**
1022     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1023     */
1024    public Identifier getIdentifierFirstRep() { 
1025      if (getIdentifier().isEmpty()) {
1026        addIdentifier();
1027      }
1028      return getIdentifier().get(0);
1029    }
1030
1031    /**
1032     * @return {@link #status} (The current state of the Invoice.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1033     */
1034    public Enumeration<InvoiceStatus> getStatusElement() { 
1035      if (this.status == null)
1036        if (Configuration.errorOnAutoCreate())
1037          throw new Error("Attempt to auto-create Invoice.status");
1038        else if (Configuration.doAutoCreate())
1039          this.status = new Enumeration<InvoiceStatus>(new InvoiceStatusEnumFactory()); // bb
1040      return this.status;
1041    }
1042
1043    public boolean hasStatusElement() { 
1044      return this.status != null && !this.status.isEmpty();
1045    }
1046
1047    public boolean hasStatus() { 
1048      return this.status != null && !this.status.isEmpty();
1049    }
1050
1051    /**
1052     * @param value {@link #status} (The current state of the Invoice.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1053     */
1054    public Invoice setStatusElement(Enumeration<InvoiceStatus> value) { 
1055      this.status = value;
1056      return this;
1057    }
1058
1059    /**
1060     * @return The current state of the Invoice.
1061     */
1062    public InvoiceStatus getStatus() { 
1063      return this.status == null ? null : this.status.getValue();
1064    }
1065
1066    /**
1067     * @param value The current state of the Invoice.
1068     */
1069    public Invoice setStatus(InvoiceStatus value) { 
1070        if (this.status == null)
1071          this.status = new Enumeration<InvoiceStatus>(new InvoiceStatusEnumFactory());
1072        this.status.setValue(value);
1073      return this;
1074    }
1075
1076    /**
1077     * @return {@link #cancelledReason} (In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).). This is the underlying object with id, value and extensions. The accessor "getCancelledReason" gives direct access to the value
1078     */
1079    public StringType getCancelledReasonElement() { 
1080      if (this.cancelledReason == null)
1081        if (Configuration.errorOnAutoCreate())
1082          throw new Error("Attempt to auto-create Invoice.cancelledReason");
1083        else if (Configuration.doAutoCreate())
1084          this.cancelledReason = new StringType(); // bb
1085      return this.cancelledReason;
1086    }
1087
1088    public boolean hasCancelledReasonElement() { 
1089      return this.cancelledReason != null && !this.cancelledReason.isEmpty();
1090    }
1091
1092    public boolean hasCancelledReason() { 
1093      return this.cancelledReason != null && !this.cancelledReason.isEmpty();
1094    }
1095
1096    /**
1097     * @param value {@link #cancelledReason} (In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).). This is the underlying object with id, value and extensions. The accessor "getCancelledReason" gives direct access to the value
1098     */
1099    public Invoice setCancelledReasonElement(StringType value) { 
1100      this.cancelledReason = value;
1101      return this;
1102    }
1103
1104    /**
1105     * @return In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).
1106     */
1107    public String getCancelledReason() { 
1108      return this.cancelledReason == null ? null : this.cancelledReason.getValue();
1109    }
1110
1111    /**
1112     * @param value In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).
1113     */
1114    public Invoice setCancelledReason(String value) { 
1115      if (Utilities.noString(value))
1116        this.cancelledReason = null;
1117      else {
1118        if (this.cancelledReason == null)
1119          this.cancelledReason = new StringType();
1120        this.cancelledReason.setValue(value);
1121      }
1122      return this;
1123    }
1124
1125    /**
1126     * @return {@link #type} (Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).)
1127     */
1128    public CodeableConcept getType() { 
1129      if (this.type == null)
1130        if (Configuration.errorOnAutoCreate())
1131          throw new Error("Attempt to auto-create Invoice.type");
1132        else if (Configuration.doAutoCreate())
1133          this.type = new CodeableConcept(); // cc
1134      return this.type;
1135    }
1136
1137    public boolean hasType() { 
1138      return this.type != null && !this.type.isEmpty();
1139    }
1140
1141    /**
1142     * @param value {@link #type} (Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).)
1143     */
1144    public Invoice setType(CodeableConcept value) { 
1145      this.type = value;
1146      return this;
1147    }
1148
1149    /**
1150     * @return {@link #subject} (The individual or set of individuals receiving the goods and services billed in this invoice.)
1151     */
1152    public Reference getSubject() { 
1153      if (this.subject == null)
1154        if (Configuration.errorOnAutoCreate())
1155          throw new Error("Attempt to auto-create Invoice.subject");
1156        else if (Configuration.doAutoCreate())
1157          this.subject = new Reference(); // cc
1158      return this.subject;
1159    }
1160
1161    public boolean hasSubject() { 
1162      return this.subject != null && !this.subject.isEmpty();
1163    }
1164
1165    /**
1166     * @param value {@link #subject} (The individual or set of individuals receiving the goods and services billed in this invoice.)
1167     */
1168    public Invoice setSubject(Reference value) { 
1169      this.subject = value;
1170      return this;
1171    }
1172
1173    /**
1174     * @return {@link #recipient} (The individual or Organization responsible for balancing of this invoice.)
1175     */
1176    public Reference getRecipient() { 
1177      if (this.recipient == null)
1178        if (Configuration.errorOnAutoCreate())
1179          throw new Error("Attempt to auto-create Invoice.recipient");
1180        else if (Configuration.doAutoCreate())
1181          this.recipient = new Reference(); // cc
1182      return this.recipient;
1183    }
1184
1185    public boolean hasRecipient() { 
1186      return this.recipient != null && !this.recipient.isEmpty();
1187    }
1188
1189    /**
1190     * @param value {@link #recipient} (The individual or Organization responsible for balancing of this invoice.)
1191     */
1192    public Invoice setRecipient(Reference value) { 
1193      this.recipient = value;
1194      return this;
1195    }
1196
1197    /**
1198     * @return {@link #date} (Depricared by the element below.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1199     */
1200    public DateTimeType getDateElement() { 
1201      if (this.date == null)
1202        if (Configuration.errorOnAutoCreate())
1203          throw new Error("Attempt to auto-create Invoice.date");
1204        else if (Configuration.doAutoCreate())
1205          this.date = new DateTimeType(); // bb
1206      return this.date;
1207    }
1208
1209    public boolean hasDateElement() { 
1210      return this.date != null && !this.date.isEmpty();
1211    }
1212
1213    public boolean hasDate() { 
1214      return this.date != null && !this.date.isEmpty();
1215    }
1216
1217    /**
1218     * @param value {@link #date} (Depricared by the element below.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1219     */
1220    public Invoice setDateElement(DateTimeType value) { 
1221      this.date = value;
1222      return this;
1223    }
1224
1225    /**
1226     * @return Depricared by the element below.
1227     */
1228    public Date getDate() { 
1229      return this.date == null ? null : this.date.getValue();
1230    }
1231
1232    /**
1233     * @param value Depricared by the element below.
1234     */
1235    public Invoice setDate(Date value) { 
1236      if (value == null)
1237        this.date = null;
1238      else {
1239        if (this.date == null)
1240          this.date = new DateTimeType();
1241        this.date.setValue(value);
1242      }
1243      return this;
1244    }
1245
1246    /**
1247     * @return {@link #creation} (Date/time(s) of when this Invoice was posted.). This is the underlying object with id, value and extensions. The accessor "getCreation" gives direct access to the value
1248     */
1249    public DateTimeType getCreationElement() { 
1250      if (this.creation == null)
1251        if (Configuration.errorOnAutoCreate())
1252          throw new Error("Attempt to auto-create Invoice.creation");
1253        else if (Configuration.doAutoCreate())
1254          this.creation = new DateTimeType(); // bb
1255      return this.creation;
1256    }
1257
1258    public boolean hasCreationElement() { 
1259      return this.creation != null && !this.creation.isEmpty();
1260    }
1261
1262    public boolean hasCreation() { 
1263      return this.creation != null && !this.creation.isEmpty();
1264    }
1265
1266    /**
1267     * @param value {@link #creation} (Date/time(s) of when this Invoice was posted.). This is the underlying object with id, value and extensions. The accessor "getCreation" gives direct access to the value
1268     */
1269    public Invoice setCreationElement(DateTimeType value) { 
1270      this.creation = value;
1271      return this;
1272    }
1273
1274    /**
1275     * @return Date/time(s) of when this Invoice was posted.
1276     */
1277    public Date getCreation() { 
1278      return this.creation == null ? null : this.creation.getValue();
1279    }
1280
1281    /**
1282     * @param value Date/time(s) of when this Invoice was posted.
1283     */
1284    public Invoice setCreation(Date value) { 
1285      if (value == null)
1286        this.creation = null;
1287      else {
1288        if (this.creation == null)
1289          this.creation = new DateTimeType();
1290        this.creation.setValue(value);
1291      }
1292      return this;
1293    }
1294
1295    /**
1296     * @return {@link #period} (Date/time(s) range of services included in this invoice.)
1297     */
1298    public DataType getPeriod() { 
1299      return this.period;
1300    }
1301
1302    /**
1303     * @return {@link #period} (Date/time(s) range of services included in this invoice.)
1304     */
1305    public DateType getPeriodDateType() throws FHIRException { 
1306      if (this.period == null)
1307        this.period = new DateType();
1308      if (!(this.period instanceof DateType))
1309        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.period.getClass().getName()+" was encountered");
1310      return (DateType) this.period;
1311    }
1312
1313    public boolean hasPeriodDateType() { 
1314      return this != null && this.period instanceof DateType;
1315    }
1316
1317    /**
1318     * @return {@link #period} (Date/time(s) range of services included in this invoice.)
1319     */
1320    public Period getPeriodPeriod() throws FHIRException { 
1321      if (this.period == null)
1322        this.period = new Period();
1323      if (!(this.period instanceof Period))
1324        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.period.getClass().getName()+" was encountered");
1325      return (Period) this.period;
1326    }
1327
1328    public boolean hasPeriodPeriod() { 
1329      return this != null && this.period instanceof Period;
1330    }
1331
1332    public boolean hasPeriod() { 
1333      return this.period != null && !this.period.isEmpty();
1334    }
1335
1336    /**
1337     * @param value {@link #period} (Date/time(s) range of services included in this invoice.)
1338     */
1339    public Invoice setPeriod(DataType value) { 
1340      if (value != null && !(value instanceof DateType || value instanceof Period))
1341        throw new FHIRException("Not the right type for Invoice.period[x]: "+value.fhirType());
1342      this.period = value;
1343      return this;
1344    }
1345
1346    /**
1347     * @return {@link #participant} (Indicates who or what performed or participated in the charged service.)
1348     */
1349    public List<InvoiceParticipantComponent> getParticipant() { 
1350      if (this.participant == null)
1351        this.participant = new ArrayList<InvoiceParticipantComponent>();
1352      return this.participant;
1353    }
1354
1355    /**
1356     * @return Returns a reference to <code>this</code> for easy method chaining
1357     */
1358    public Invoice setParticipant(List<InvoiceParticipantComponent> theParticipant) { 
1359      this.participant = theParticipant;
1360      return this;
1361    }
1362
1363    public boolean hasParticipant() { 
1364      if (this.participant == null)
1365        return false;
1366      for (InvoiceParticipantComponent item : this.participant)
1367        if (!item.isEmpty())
1368          return true;
1369      return false;
1370    }
1371
1372    public InvoiceParticipantComponent addParticipant() { //3
1373      InvoiceParticipantComponent t = new InvoiceParticipantComponent();
1374      if (this.participant == null)
1375        this.participant = new ArrayList<InvoiceParticipantComponent>();
1376      this.participant.add(t);
1377      return t;
1378    }
1379
1380    public Invoice addParticipant(InvoiceParticipantComponent t) { //3
1381      if (t == null)
1382        return this;
1383      if (this.participant == null)
1384        this.participant = new ArrayList<InvoiceParticipantComponent>();
1385      this.participant.add(t);
1386      return this;
1387    }
1388
1389    /**
1390     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
1391     */
1392    public InvoiceParticipantComponent getParticipantFirstRep() { 
1393      if (getParticipant().isEmpty()) {
1394        addParticipant();
1395      }
1396      return getParticipant().get(0);
1397    }
1398
1399    /**
1400     * @return {@link #issuer} (The organizationissuing the Invoice.)
1401     */
1402    public Reference getIssuer() { 
1403      if (this.issuer == null)
1404        if (Configuration.errorOnAutoCreate())
1405          throw new Error("Attempt to auto-create Invoice.issuer");
1406        else if (Configuration.doAutoCreate())
1407          this.issuer = new Reference(); // cc
1408      return this.issuer;
1409    }
1410
1411    public boolean hasIssuer() { 
1412      return this.issuer != null && !this.issuer.isEmpty();
1413    }
1414
1415    /**
1416     * @param value {@link #issuer} (The organizationissuing the Invoice.)
1417     */
1418    public Invoice setIssuer(Reference value) { 
1419      this.issuer = value;
1420      return this;
1421    }
1422
1423    /**
1424     * @return {@link #account} (Account which is supposed to be balanced with this Invoice.)
1425     */
1426    public Reference getAccount() { 
1427      if (this.account == null)
1428        if (Configuration.errorOnAutoCreate())
1429          throw new Error("Attempt to auto-create Invoice.account");
1430        else if (Configuration.doAutoCreate())
1431          this.account = new Reference(); // cc
1432      return this.account;
1433    }
1434
1435    public boolean hasAccount() { 
1436      return this.account != null && !this.account.isEmpty();
1437    }
1438
1439    /**
1440     * @param value {@link #account} (Account which is supposed to be balanced with this Invoice.)
1441     */
1442    public Invoice setAccount(Reference value) { 
1443      this.account = value;
1444      return this;
1445    }
1446
1447    /**
1448     * @return {@link #lineItem} (Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource.)
1449     */
1450    public List<InvoiceLineItemComponent> getLineItem() { 
1451      if (this.lineItem == null)
1452        this.lineItem = new ArrayList<InvoiceLineItemComponent>();
1453      return this.lineItem;
1454    }
1455
1456    /**
1457     * @return Returns a reference to <code>this</code> for easy method chaining
1458     */
1459    public Invoice setLineItem(List<InvoiceLineItemComponent> theLineItem) { 
1460      this.lineItem = theLineItem;
1461      return this;
1462    }
1463
1464    public boolean hasLineItem() { 
1465      if (this.lineItem == null)
1466        return false;
1467      for (InvoiceLineItemComponent item : this.lineItem)
1468        if (!item.isEmpty())
1469          return true;
1470      return false;
1471    }
1472
1473    public InvoiceLineItemComponent addLineItem() { //3
1474      InvoiceLineItemComponent t = new InvoiceLineItemComponent();
1475      if (this.lineItem == null)
1476        this.lineItem = new ArrayList<InvoiceLineItemComponent>();
1477      this.lineItem.add(t);
1478      return t;
1479    }
1480
1481    public Invoice addLineItem(InvoiceLineItemComponent t) { //3
1482      if (t == null)
1483        return this;
1484      if (this.lineItem == null)
1485        this.lineItem = new ArrayList<InvoiceLineItemComponent>();
1486      this.lineItem.add(t);
1487      return this;
1488    }
1489
1490    /**
1491     * @return The first repetition of repeating field {@link #lineItem}, creating it if it does not already exist {3}
1492     */
1493    public InvoiceLineItemComponent getLineItemFirstRep() { 
1494      if (getLineItem().isEmpty()) {
1495        addLineItem();
1496      }
1497      return getLineItem().get(0);
1498    }
1499
1500    /**
1501     * @return {@link #totalPriceComponent} (The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.)
1502     */
1503    public List<MonetaryComponent> getTotalPriceComponent() { 
1504      if (this.totalPriceComponent == null)
1505        this.totalPriceComponent = new ArrayList<MonetaryComponent>();
1506      return this.totalPriceComponent;
1507    }
1508
1509    /**
1510     * @return Returns a reference to <code>this</code> for easy method chaining
1511     */
1512    public Invoice setTotalPriceComponent(List<MonetaryComponent> theTotalPriceComponent) { 
1513      this.totalPriceComponent = theTotalPriceComponent;
1514      return this;
1515    }
1516
1517    public boolean hasTotalPriceComponent() { 
1518      if (this.totalPriceComponent == null)
1519        return false;
1520      for (MonetaryComponent item : this.totalPriceComponent)
1521        if (!item.isEmpty())
1522          return true;
1523      return false;
1524    }
1525
1526    public MonetaryComponent addTotalPriceComponent() { //3
1527      MonetaryComponent t = new MonetaryComponent();
1528      if (this.totalPriceComponent == null)
1529        this.totalPriceComponent = new ArrayList<MonetaryComponent>();
1530      this.totalPriceComponent.add(t);
1531      return t;
1532    }
1533
1534    public Invoice addTotalPriceComponent(MonetaryComponent t) { //3
1535      if (t == null)
1536        return this;
1537      if (this.totalPriceComponent == null)
1538        this.totalPriceComponent = new ArrayList<MonetaryComponent>();
1539      this.totalPriceComponent.add(t);
1540      return this;
1541    }
1542
1543    /**
1544     * @return The first repetition of repeating field {@link #totalPriceComponent}, creating it if it does not already exist {3}
1545     */
1546    public MonetaryComponent getTotalPriceComponentFirstRep() { 
1547      if (getTotalPriceComponent().isEmpty()) {
1548        addTotalPriceComponent();
1549      }
1550      return getTotalPriceComponent().get(0);
1551    }
1552
1553    /**
1554     * @return {@link #totalNet} (Invoice total , taxes excluded.)
1555     */
1556    public Money getTotalNet() { 
1557      if (this.totalNet == null)
1558        if (Configuration.errorOnAutoCreate())
1559          throw new Error("Attempt to auto-create Invoice.totalNet");
1560        else if (Configuration.doAutoCreate())
1561          this.totalNet = new Money(); // cc
1562      return this.totalNet;
1563    }
1564
1565    public boolean hasTotalNet() { 
1566      return this.totalNet != null && !this.totalNet.isEmpty();
1567    }
1568
1569    /**
1570     * @param value {@link #totalNet} (Invoice total , taxes excluded.)
1571     */
1572    public Invoice setTotalNet(Money value) { 
1573      this.totalNet = value;
1574      return this;
1575    }
1576
1577    /**
1578     * @return {@link #totalGross} (Invoice total, tax included.)
1579     */
1580    public Money getTotalGross() { 
1581      if (this.totalGross == null)
1582        if (Configuration.errorOnAutoCreate())
1583          throw new Error("Attempt to auto-create Invoice.totalGross");
1584        else if (Configuration.doAutoCreate())
1585          this.totalGross = new Money(); // cc
1586      return this.totalGross;
1587    }
1588
1589    public boolean hasTotalGross() { 
1590      return this.totalGross != null && !this.totalGross.isEmpty();
1591    }
1592
1593    /**
1594     * @param value {@link #totalGross} (Invoice total, tax included.)
1595     */
1596    public Invoice setTotalGross(Money value) { 
1597      this.totalGross = value;
1598      return this;
1599    }
1600
1601    /**
1602     * @return {@link #paymentTerms} (Payment details such as banking details, period of payment, deductibles, methods of payment.). This is the underlying object with id, value and extensions. The accessor "getPaymentTerms" gives direct access to the value
1603     */
1604    public MarkdownType getPaymentTermsElement() { 
1605      if (this.paymentTerms == null)
1606        if (Configuration.errorOnAutoCreate())
1607          throw new Error("Attempt to auto-create Invoice.paymentTerms");
1608        else if (Configuration.doAutoCreate())
1609          this.paymentTerms = new MarkdownType(); // bb
1610      return this.paymentTerms;
1611    }
1612
1613    public boolean hasPaymentTermsElement() { 
1614      return this.paymentTerms != null && !this.paymentTerms.isEmpty();
1615    }
1616
1617    public boolean hasPaymentTerms() { 
1618      return this.paymentTerms != null && !this.paymentTerms.isEmpty();
1619    }
1620
1621    /**
1622     * @param value {@link #paymentTerms} (Payment details such as banking details, period of payment, deductibles, methods of payment.). This is the underlying object with id, value and extensions. The accessor "getPaymentTerms" gives direct access to the value
1623     */
1624    public Invoice setPaymentTermsElement(MarkdownType value) { 
1625      this.paymentTerms = value;
1626      return this;
1627    }
1628
1629    /**
1630     * @return Payment details such as banking details, period of payment, deductibles, methods of payment.
1631     */
1632    public String getPaymentTerms() { 
1633      return this.paymentTerms == null ? null : this.paymentTerms.getValue();
1634    }
1635
1636    /**
1637     * @param value Payment details such as banking details, period of payment, deductibles, methods of payment.
1638     */
1639    public Invoice setPaymentTerms(String value) { 
1640      if (Utilities.noString(value))
1641        this.paymentTerms = null;
1642      else {
1643        if (this.paymentTerms == null)
1644          this.paymentTerms = new MarkdownType();
1645        this.paymentTerms.setValue(value);
1646      }
1647      return this;
1648    }
1649
1650    /**
1651     * @return {@link #note} (Comments made about the invoice by the issuer, subject, or other participants.)
1652     */
1653    public List<Annotation> getNote() { 
1654      if (this.note == null)
1655        this.note = new ArrayList<Annotation>();
1656      return this.note;
1657    }
1658
1659    /**
1660     * @return Returns a reference to <code>this</code> for easy method chaining
1661     */
1662    public Invoice setNote(List<Annotation> theNote) { 
1663      this.note = theNote;
1664      return this;
1665    }
1666
1667    public boolean hasNote() { 
1668      if (this.note == null)
1669        return false;
1670      for (Annotation item : this.note)
1671        if (!item.isEmpty())
1672          return true;
1673      return false;
1674    }
1675
1676    public Annotation addNote() { //3
1677      Annotation t = new Annotation();
1678      if (this.note == null)
1679        this.note = new ArrayList<Annotation>();
1680      this.note.add(t);
1681      return t;
1682    }
1683
1684    public Invoice addNote(Annotation t) { //3
1685      if (t == null)
1686        return this;
1687      if (this.note == null)
1688        this.note = new ArrayList<Annotation>();
1689      this.note.add(t);
1690      return this;
1691    }
1692
1693    /**
1694     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1695     */
1696    public Annotation getNoteFirstRep() { 
1697      if (getNote().isEmpty()) {
1698        addNote();
1699      }
1700      return getNote().get(0);
1701    }
1702
1703      protected void listChildren(List<Property> children) {
1704        super.listChildren(children);
1705        children.add(new Property("identifier", "Identifier", "Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.", 0, java.lang.Integer.MAX_VALUE, identifier));
1706        children.add(new Property("status", "code", "The current state of the Invoice.", 0, 1, status));
1707        children.add(new Property("cancelledReason", "string", "In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).", 0, 1, cancelledReason));
1708        children.add(new Property("type", "CodeableConcept", "Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).", 0, 1, type));
1709        children.add(new Property("subject", "Reference(Patient|Group)", "The individual or set of individuals receiving the goods and services billed in this invoice.", 0, 1, subject));
1710        children.add(new Property("recipient", "Reference(Organization|Patient|RelatedPerson)", "The individual or Organization responsible for balancing of this invoice.", 0, 1, recipient));
1711        children.add(new Property("date", "dateTime", "Depricared by the element below.", 0, 1, date));
1712        children.add(new Property("creation", "dateTime", "Date/time(s) of when this Invoice was posted.", 0, 1, creation));
1713        children.add(new Property("period[x]", "date|Period", "Date/time(s) range of services included in this invoice.", 0, 1, period));
1714        children.add(new Property("participant", "", "Indicates who or what performed or participated in the charged service.", 0, java.lang.Integer.MAX_VALUE, participant));
1715        children.add(new Property("issuer", "Reference(Organization)", "The organizationissuing the Invoice.", 0, 1, issuer));
1716        children.add(new Property("account", "Reference(Account)", "Account which is supposed to be balanced with this Invoice.", 0, 1, account));
1717        children.add(new Property("lineItem", "", "Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource.", 0, java.lang.Integer.MAX_VALUE, lineItem));
1718        children.add(new Property("totalPriceComponent", "MonetaryComponent", "The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.", 0, java.lang.Integer.MAX_VALUE, totalPriceComponent));
1719        children.add(new Property("totalNet", "Money", "Invoice total , taxes excluded.", 0, 1, totalNet));
1720        children.add(new Property("totalGross", "Money", "Invoice total, tax included.", 0, 1, totalGross));
1721        children.add(new Property("paymentTerms", "markdown", "Payment details such as banking details, period of payment, deductibles, methods of payment.", 0, 1, paymentTerms));
1722        children.add(new Property("note", "Annotation", "Comments made about the invoice by the issuer, subject, or other participants.", 0, java.lang.Integer.MAX_VALUE, note));
1723      }
1724
1725      @Override
1726      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1727        switch (_hash) {
1728        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments.", 0, java.lang.Integer.MAX_VALUE, identifier);
1729        case -892481550: /*status*/  return new Property("status", "code", "The current state of the Invoice.", 0, 1, status);
1730        case 1550362357: /*cancelledReason*/  return new Property("cancelledReason", "string", "In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.).", 0, 1, cancelledReason);
1731        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary).", 0, 1, type);
1732        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "The individual or set of individuals receiving the goods and services billed in this invoice.", 0, 1, subject);
1733        case 820081177: /*recipient*/  return new Property("recipient", "Reference(Organization|Patient|RelatedPerson)", "The individual or Organization responsible for balancing of this invoice.", 0, 1, recipient);
1734        case 3076014: /*date*/  return new Property("date", "dateTime", "Depricared by the element below.", 0, 1, date);
1735        case 1820421855: /*creation*/  return new Property("creation", "dateTime", "Date/time(s) of when this Invoice was posted.", 0, 1, creation);
1736        case 566594335: /*period[x]*/  return new Property("period[x]", "date|Period", "Date/time(s) range of services included in this invoice.", 0, 1, period);
1737        case -991726143: /*period*/  return new Property("period[x]", "date|Period", "Date/time(s) range of services included in this invoice.", 0, 1, period);
1738        case 383848719: /*periodDate*/  return new Property("period[x]", "date", "Date/time(s) range of services included in this invoice.", 0, 1, period);
1739        case -141376798: /*periodPeriod*/  return new Property("period[x]", "Period", "Date/time(s) range of services included in this invoice.", 0, 1, period);
1740        case 767422259: /*participant*/  return new Property("participant", "", "Indicates who or what performed or participated in the charged service.", 0, java.lang.Integer.MAX_VALUE, participant);
1741        case -1179159879: /*issuer*/  return new Property("issuer", "Reference(Organization)", "The organizationissuing the Invoice.", 0, 1, issuer);
1742        case -1177318867: /*account*/  return new Property("account", "Reference(Account)", "Account which is supposed to be balanced with this Invoice.", 0, 1, account);
1743        case 1188332839: /*lineItem*/  return new Property("lineItem", "", "Each line item represents one charge for goods and services rendered. Details such.ofType(date), code and amount are found in the referenced ChargeItem resource.", 0, java.lang.Integer.MAX_VALUE, lineItem);
1744        case 1731497496: /*totalPriceComponent*/  return new Property("totalPriceComponent", "MonetaryComponent", "The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated.", 0, java.lang.Integer.MAX_VALUE, totalPriceComponent);
1745        case -849911879: /*totalNet*/  return new Property("totalNet", "Money", "Invoice total , taxes excluded.", 0, 1, totalNet);
1746        case -727607968: /*totalGross*/  return new Property("totalGross", "Money", "Invoice total, tax included.", 0, 1, totalGross);
1747        case -507544799: /*paymentTerms*/  return new Property("paymentTerms", "markdown", "Payment details such as banking details, period of payment, deductibles, methods of payment.", 0, 1, paymentTerms);
1748        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments made about the invoice by the issuer, subject, or other participants.", 0, java.lang.Integer.MAX_VALUE, note);
1749        default: return super.getNamedProperty(_hash, _name, _checkValid);
1750        }
1751
1752      }
1753
1754      @Override
1755      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1756        switch (hash) {
1757        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1758        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<InvoiceStatus>
1759        case 1550362357: /*cancelledReason*/ return this.cancelledReason == null ? new Base[0] : new Base[] {this.cancelledReason}; // StringType
1760        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1761        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1762        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : new Base[] {this.recipient}; // Reference
1763        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1764        case 1820421855: /*creation*/ return this.creation == null ? new Base[0] : new Base[] {this.creation}; // DateTimeType
1765        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // DataType
1766        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // InvoiceParticipantComponent
1767        case -1179159879: /*issuer*/ return this.issuer == null ? new Base[0] : new Base[] {this.issuer}; // Reference
1768        case -1177318867: /*account*/ return this.account == null ? new Base[0] : new Base[] {this.account}; // Reference
1769        case 1188332839: /*lineItem*/ return this.lineItem == null ? new Base[0] : this.lineItem.toArray(new Base[this.lineItem.size()]); // InvoiceLineItemComponent
1770        case 1731497496: /*totalPriceComponent*/ return this.totalPriceComponent == null ? new Base[0] : this.totalPriceComponent.toArray(new Base[this.totalPriceComponent.size()]); // MonetaryComponent
1771        case -849911879: /*totalNet*/ return this.totalNet == null ? new Base[0] : new Base[] {this.totalNet}; // Money
1772        case -727607968: /*totalGross*/ return this.totalGross == null ? new Base[0] : new Base[] {this.totalGross}; // Money
1773        case -507544799: /*paymentTerms*/ return this.paymentTerms == null ? new Base[0] : new Base[] {this.paymentTerms}; // MarkdownType
1774        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1775        default: return super.getProperty(hash, name, checkValid);
1776        }
1777
1778      }
1779
1780      @Override
1781      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1782        switch (hash) {
1783        case -1618432855: // identifier
1784          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1785          return value;
1786        case -892481550: // status
1787          value = new InvoiceStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1788          this.status = (Enumeration) value; // Enumeration<InvoiceStatus>
1789          return value;
1790        case 1550362357: // cancelledReason
1791          this.cancelledReason = TypeConvertor.castToString(value); // StringType
1792          return value;
1793        case 3575610: // type
1794          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1795          return value;
1796        case -1867885268: // subject
1797          this.subject = TypeConvertor.castToReference(value); // Reference
1798          return value;
1799        case 820081177: // recipient
1800          this.recipient = TypeConvertor.castToReference(value); // Reference
1801          return value;
1802        case 3076014: // date
1803          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
1804          return value;
1805        case 1820421855: // creation
1806          this.creation = TypeConvertor.castToDateTime(value); // DateTimeType
1807          return value;
1808        case -991726143: // period
1809          this.period = TypeConvertor.castToType(value); // DataType
1810          return value;
1811        case 767422259: // participant
1812          this.getParticipant().add((InvoiceParticipantComponent) value); // InvoiceParticipantComponent
1813          return value;
1814        case -1179159879: // issuer
1815          this.issuer = TypeConvertor.castToReference(value); // Reference
1816          return value;
1817        case -1177318867: // account
1818          this.account = TypeConvertor.castToReference(value); // Reference
1819          return value;
1820        case 1188332839: // lineItem
1821          this.getLineItem().add((InvoiceLineItemComponent) value); // InvoiceLineItemComponent
1822          return value;
1823        case 1731497496: // totalPriceComponent
1824          this.getTotalPriceComponent().add(TypeConvertor.castToMonetaryComponent(value)); // MonetaryComponent
1825          return value;
1826        case -849911879: // totalNet
1827          this.totalNet = TypeConvertor.castToMoney(value); // Money
1828          return value;
1829        case -727607968: // totalGross
1830          this.totalGross = TypeConvertor.castToMoney(value); // Money
1831          return value;
1832        case -507544799: // paymentTerms
1833          this.paymentTerms = TypeConvertor.castToMarkdown(value); // MarkdownType
1834          return value;
1835        case 3387378: // note
1836          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1837          return value;
1838        default: return super.setProperty(hash, name, value);
1839        }
1840
1841      }
1842
1843      @Override
1844      public Base setProperty(String name, Base value) throws FHIRException {
1845        if (name.equals("identifier")) {
1846          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1847        } else if (name.equals("status")) {
1848          value = new InvoiceStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1849          this.status = (Enumeration) value; // Enumeration<InvoiceStatus>
1850        } else if (name.equals("cancelledReason")) {
1851          this.cancelledReason = TypeConvertor.castToString(value); // StringType
1852        } else if (name.equals("type")) {
1853          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1854        } else if (name.equals("subject")) {
1855          this.subject = TypeConvertor.castToReference(value); // Reference
1856        } else if (name.equals("recipient")) {
1857          this.recipient = TypeConvertor.castToReference(value); // Reference
1858        } else if (name.equals("date")) {
1859          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
1860        } else if (name.equals("creation")) {
1861          this.creation = TypeConvertor.castToDateTime(value); // DateTimeType
1862        } else if (name.equals("period[x]")) {
1863          this.period = TypeConvertor.castToType(value); // DataType
1864        } else if (name.equals("participant")) {
1865          this.getParticipant().add((InvoiceParticipantComponent) value);
1866        } else if (name.equals("issuer")) {
1867          this.issuer = TypeConvertor.castToReference(value); // Reference
1868        } else if (name.equals("account")) {
1869          this.account = TypeConvertor.castToReference(value); // Reference
1870        } else if (name.equals("lineItem")) {
1871          this.getLineItem().add((InvoiceLineItemComponent) value);
1872        } else if (name.equals("totalPriceComponent")) {
1873          this.getTotalPriceComponent().add(TypeConvertor.castToMonetaryComponent(value));
1874        } else if (name.equals("totalNet")) {
1875          this.totalNet = TypeConvertor.castToMoney(value); // Money
1876        } else if (name.equals("totalGross")) {
1877          this.totalGross = TypeConvertor.castToMoney(value); // Money
1878        } else if (name.equals("paymentTerms")) {
1879          this.paymentTerms = TypeConvertor.castToMarkdown(value); // MarkdownType
1880        } else if (name.equals("note")) {
1881          this.getNote().add(TypeConvertor.castToAnnotation(value));
1882        } else
1883          return super.setProperty(name, value);
1884        return value;
1885      }
1886
1887      @Override
1888      public Base makeProperty(int hash, String name) throws FHIRException {
1889        switch (hash) {
1890        case -1618432855:  return addIdentifier(); 
1891        case -892481550:  return getStatusElement();
1892        case 1550362357:  return getCancelledReasonElement();
1893        case 3575610:  return getType();
1894        case -1867885268:  return getSubject();
1895        case 820081177:  return getRecipient();
1896        case 3076014:  return getDateElement();
1897        case 1820421855:  return getCreationElement();
1898        case 566594335:  return getPeriod();
1899        case -991726143:  return getPeriod();
1900        case 767422259:  return addParticipant(); 
1901        case -1179159879:  return getIssuer();
1902        case -1177318867:  return getAccount();
1903        case 1188332839:  return addLineItem(); 
1904        case 1731497496:  return addTotalPriceComponent(); 
1905        case -849911879:  return getTotalNet();
1906        case -727607968:  return getTotalGross();
1907        case -507544799:  return getPaymentTermsElement();
1908        case 3387378:  return addNote(); 
1909        default: return super.makeProperty(hash, name);
1910        }
1911
1912      }
1913
1914      @Override
1915      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1916        switch (hash) {
1917        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1918        case -892481550: /*status*/ return new String[] {"code"};
1919        case 1550362357: /*cancelledReason*/ return new String[] {"string"};
1920        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1921        case -1867885268: /*subject*/ return new String[] {"Reference"};
1922        case 820081177: /*recipient*/ return new String[] {"Reference"};
1923        case 3076014: /*date*/ return new String[] {"dateTime"};
1924        case 1820421855: /*creation*/ return new String[] {"dateTime"};
1925        case -991726143: /*period*/ return new String[] {"date", "Period"};
1926        case 767422259: /*participant*/ return new String[] {};
1927        case -1179159879: /*issuer*/ return new String[] {"Reference"};
1928        case -1177318867: /*account*/ return new String[] {"Reference"};
1929        case 1188332839: /*lineItem*/ return new String[] {};
1930        case 1731497496: /*totalPriceComponent*/ return new String[] {"MonetaryComponent"};
1931        case -849911879: /*totalNet*/ return new String[] {"Money"};
1932        case -727607968: /*totalGross*/ return new String[] {"Money"};
1933        case -507544799: /*paymentTerms*/ return new String[] {"markdown"};
1934        case 3387378: /*note*/ return new String[] {"Annotation"};
1935        default: return super.getTypesForProperty(hash, name);
1936        }
1937
1938      }
1939
1940      @Override
1941      public Base addChild(String name) throws FHIRException {
1942        if (name.equals("identifier")) {
1943          return addIdentifier();
1944        }
1945        else if (name.equals("status")) {
1946          throw new FHIRException("Cannot call addChild on a singleton property Invoice.status");
1947        }
1948        else if (name.equals("cancelledReason")) {
1949          throw new FHIRException("Cannot call addChild on a singleton property Invoice.cancelledReason");
1950        }
1951        else if (name.equals("type")) {
1952          this.type = new CodeableConcept();
1953          return this.type;
1954        }
1955        else if (name.equals("subject")) {
1956          this.subject = new Reference();
1957          return this.subject;
1958        }
1959        else if (name.equals("recipient")) {
1960          this.recipient = new Reference();
1961          return this.recipient;
1962        }
1963        else if (name.equals("date")) {
1964          throw new FHIRException("Cannot call addChild on a singleton property Invoice.date");
1965        }
1966        else if (name.equals("creation")) {
1967          throw new FHIRException("Cannot call addChild on a singleton property Invoice.creation");
1968        }
1969        else if (name.equals("periodDate")) {
1970          this.period = new DateType();
1971          return this.period;
1972        }
1973        else if (name.equals("periodPeriod")) {
1974          this.period = new Period();
1975          return this.period;
1976        }
1977        else if (name.equals("participant")) {
1978          return addParticipant();
1979        }
1980        else if (name.equals("issuer")) {
1981          this.issuer = new Reference();
1982          return this.issuer;
1983        }
1984        else if (name.equals("account")) {
1985          this.account = new Reference();
1986          return this.account;
1987        }
1988        else if (name.equals("lineItem")) {
1989          return addLineItem();
1990        }
1991        else if (name.equals("totalPriceComponent")) {
1992          return addTotalPriceComponent();
1993        }
1994        else if (name.equals("totalNet")) {
1995          this.totalNet = new Money();
1996          return this.totalNet;
1997        }
1998        else if (name.equals("totalGross")) {
1999          this.totalGross = new Money();
2000          return this.totalGross;
2001        }
2002        else if (name.equals("paymentTerms")) {
2003          throw new FHIRException("Cannot call addChild on a singleton property Invoice.paymentTerms");
2004        }
2005        else if (name.equals("note")) {
2006          return addNote();
2007        }
2008        else
2009          return super.addChild(name);
2010      }
2011
2012  public String fhirType() {
2013    return "Invoice";
2014
2015  }
2016
2017      public Invoice copy() {
2018        Invoice dst = new Invoice();
2019        copyValues(dst);
2020        return dst;
2021      }
2022
2023      public void copyValues(Invoice dst) {
2024        super.copyValues(dst);
2025        if (identifier != null) {
2026          dst.identifier = new ArrayList<Identifier>();
2027          for (Identifier i : identifier)
2028            dst.identifier.add(i.copy());
2029        };
2030        dst.status = status == null ? null : status.copy();
2031        dst.cancelledReason = cancelledReason == null ? null : cancelledReason.copy();
2032        dst.type = type == null ? null : type.copy();
2033        dst.subject = subject == null ? null : subject.copy();
2034        dst.recipient = recipient == null ? null : recipient.copy();
2035        dst.date = date == null ? null : date.copy();
2036        dst.creation = creation == null ? null : creation.copy();
2037        dst.period = period == null ? null : period.copy();
2038        if (participant != null) {
2039          dst.participant = new ArrayList<InvoiceParticipantComponent>();
2040          for (InvoiceParticipantComponent i : participant)
2041            dst.participant.add(i.copy());
2042        };
2043        dst.issuer = issuer == null ? null : issuer.copy();
2044        dst.account = account == null ? null : account.copy();
2045        if (lineItem != null) {
2046          dst.lineItem = new ArrayList<InvoiceLineItemComponent>();
2047          for (InvoiceLineItemComponent i : lineItem)
2048            dst.lineItem.add(i.copy());
2049        };
2050        if (totalPriceComponent != null) {
2051          dst.totalPriceComponent = new ArrayList<MonetaryComponent>();
2052          for (MonetaryComponent i : totalPriceComponent)
2053            dst.totalPriceComponent.add(i.copy());
2054        };
2055        dst.totalNet = totalNet == null ? null : totalNet.copy();
2056        dst.totalGross = totalGross == null ? null : totalGross.copy();
2057        dst.paymentTerms = paymentTerms == null ? null : paymentTerms.copy();
2058        if (note != null) {
2059          dst.note = new ArrayList<Annotation>();
2060          for (Annotation i : note)
2061            dst.note.add(i.copy());
2062        };
2063      }
2064
2065      protected Invoice typedCopy() {
2066        return copy();
2067      }
2068
2069      @Override
2070      public boolean equalsDeep(Base other_) {
2071        if (!super.equalsDeep(other_))
2072          return false;
2073        if (!(other_ instanceof Invoice))
2074          return false;
2075        Invoice o = (Invoice) other_;
2076        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(cancelledReason, o.cancelledReason, true)
2077           && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) && compareDeep(recipient, o.recipient, true)
2078           && compareDeep(date, o.date, true) && compareDeep(creation, o.creation, true) && compareDeep(period, o.period, true)
2079           && compareDeep(participant, o.participant, true) && compareDeep(issuer, o.issuer, true) && compareDeep(account, o.account, true)
2080           && compareDeep(lineItem, o.lineItem, true) && compareDeep(totalPriceComponent, o.totalPriceComponent, true)
2081           && compareDeep(totalNet, o.totalNet, true) && compareDeep(totalGross, o.totalGross, true) && compareDeep(paymentTerms, o.paymentTerms, true)
2082           && compareDeep(note, o.note, true);
2083      }
2084
2085      @Override
2086      public boolean equalsShallow(Base other_) {
2087        if (!super.equalsShallow(other_))
2088          return false;
2089        if (!(other_ instanceof Invoice))
2090          return false;
2091        Invoice o = (Invoice) other_;
2092        return compareValues(status, o.status, true) && compareValues(cancelledReason, o.cancelledReason, true)
2093           && compareValues(date, o.date, true) && compareValues(creation, o.creation, true) && compareValues(paymentTerms, o.paymentTerms, true)
2094          ;
2095      }
2096
2097      public boolean isEmpty() {
2098        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, cancelledReason
2099          , type, subject, recipient, date, creation, period, participant, issuer, account
2100          , lineItem, totalPriceComponent, totalNet, totalGross, paymentTerms, note);
2101      }
2102
2103  @Override
2104  public ResourceType getResourceType() {
2105    return ResourceType.Invoice;
2106   }
2107
2108 /**
2109   * Search parameter: <b>account</b>
2110   * <p>
2111   * Description: <b>Account that is being balanced</b><br>
2112   * Type: <b>reference</b><br>
2113   * Path: <b>Invoice.account</b><br>
2114   * </p>
2115   */
2116  @SearchParamDefinition(name="account", path="Invoice.account", description="Account that is being balanced", type="reference", target={Account.class } )
2117  public static final String SP_ACCOUNT = "account";
2118 /**
2119   * <b>Fluent Client</b> search parameter constant for <b>account</b>
2120   * <p>
2121   * Description: <b>Account that is being balanced</b><br>
2122   * Type: <b>reference</b><br>
2123   * Path: <b>Invoice.account</b><br>
2124   * </p>
2125   */
2126  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ACCOUNT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ACCOUNT);
2127
2128/**
2129   * Constant for fluent queries to be used to add include statements. Specifies
2130   * the path value of "<b>Invoice:account</b>".
2131   */
2132  public static final ca.uhn.fhir.model.api.Include INCLUDE_ACCOUNT = new ca.uhn.fhir.model.api.Include("Invoice:account").toLocked();
2133
2134 /**
2135   * Search parameter: <b>issuer</b>
2136   * <p>
2137   * Description: <b>Issuing Organization of Invoice</b><br>
2138   * Type: <b>reference</b><br>
2139   * Path: <b>Invoice.issuer</b><br>
2140   * </p>
2141   */
2142  @SearchParamDefinition(name="issuer", path="Invoice.issuer", description="Issuing Organization of Invoice", type="reference", target={Organization.class } )
2143  public static final String SP_ISSUER = "issuer";
2144 /**
2145   * <b>Fluent Client</b> search parameter constant for <b>issuer</b>
2146   * <p>
2147   * Description: <b>Issuing Organization of Invoice</b><br>
2148   * Type: <b>reference</b><br>
2149   * Path: <b>Invoice.issuer</b><br>
2150   * </p>
2151   */
2152  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ISSUER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ISSUER);
2153
2154/**
2155   * Constant for fluent queries to be used to add include statements. Specifies
2156   * the path value of "<b>Invoice:issuer</b>".
2157   */
2158  public static final ca.uhn.fhir.model.api.Include INCLUDE_ISSUER = new ca.uhn.fhir.model.api.Include("Invoice:issuer").toLocked();
2159
2160 /**
2161   * Search parameter: <b>participant-role</b>
2162   * <p>
2163   * Description: <b>Type of involvement in creation of this Invoice</b><br>
2164   * Type: <b>token</b><br>
2165   * Path: <b>Invoice.participant.role</b><br>
2166   * </p>
2167   */
2168  @SearchParamDefinition(name="participant-role", path="Invoice.participant.role", description="Type of involvement in creation of this Invoice", type="token" )
2169  public static final String SP_PARTICIPANT_ROLE = "participant-role";
2170 /**
2171   * <b>Fluent Client</b> search parameter constant for <b>participant-role</b>
2172   * <p>
2173   * Description: <b>Type of involvement in creation of this Invoice</b><br>
2174   * Type: <b>token</b><br>
2175   * Path: <b>Invoice.participant.role</b><br>
2176   * </p>
2177   */
2178  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PARTICIPANT_ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PARTICIPANT_ROLE);
2179
2180 /**
2181   * Search parameter: <b>participant</b>
2182   * <p>
2183   * Description: <b>Individual who was involved</b><br>
2184   * Type: <b>reference</b><br>
2185   * Path: <b>Invoice.participant.actor</b><br>
2186   * </p>
2187   */
2188  @SearchParamDefinition(name="participant", path="Invoice.participant.actor", description="Individual who was involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2189  public static final String SP_PARTICIPANT = "participant";
2190 /**
2191   * <b>Fluent Client</b> search parameter constant for <b>participant</b>
2192   * <p>
2193   * Description: <b>Individual who was involved</b><br>
2194   * Type: <b>reference</b><br>
2195   * Path: <b>Invoice.participant.actor</b><br>
2196   * </p>
2197   */
2198  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT);
2199
2200/**
2201   * Constant for fluent queries to be used to add include statements. Specifies
2202   * the path value of "<b>Invoice:participant</b>".
2203   */
2204  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("Invoice:participant").toLocked();
2205
2206 /**
2207   * Search parameter: <b>recipient</b>
2208   * <p>
2209   * Description: <b>Recipient of this invoice</b><br>
2210   * Type: <b>reference</b><br>
2211   * Path: <b>Invoice.recipient</b><br>
2212   * </p>
2213   */
2214  @SearchParamDefinition(name="recipient", path="Invoice.recipient", description="Recipient of this invoice", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Organization.class, Patient.class, RelatedPerson.class } )
2215  public static final String SP_RECIPIENT = "recipient";
2216 /**
2217   * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
2218   * <p>
2219   * Description: <b>Recipient of this invoice</b><br>
2220   * Type: <b>reference</b><br>
2221   * Path: <b>Invoice.recipient</b><br>
2222   * </p>
2223   */
2224  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECIPIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECIPIENT);
2225
2226/**
2227   * Constant for fluent queries to be used to add include statements. Specifies
2228   * the path value of "<b>Invoice:recipient</b>".
2229   */
2230  public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("Invoice:recipient").toLocked();
2231
2232 /**
2233   * Search parameter: <b>status</b>
2234   * <p>
2235   * Description: <b>draft | issued | balanced | cancelled | entered-in-error</b><br>
2236   * Type: <b>token</b><br>
2237   * Path: <b>Invoice.status</b><br>
2238   * </p>
2239   */
2240  @SearchParamDefinition(name="status", path="Invoice.status", description="draft | issued | balanced | cancelled | entered-in-error", type="token" )
2241  public static final String SP_STATUS = "status";
2242 /**
2243   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2244   * <p>
2245   * Description: <b>draft | issued | balanced | cancelled | entered-in-error</b><br>
2246   * Type: <b>token</b><br>
2247   * Path: <b>Invoice.status</b><br>
2248   * </p>
2249   */
2250  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2251
2252 /**
2253   * Search parameter: <b>subject</b>
2254   * <p>
2255   * Description: <b>Recipient(s) of goods and services</b><br>
2256   * Type: <b>reference</b><br>
2257   * Path: <b>Invoice.subject</b><br>
2258   * </p>
2259   */
2260  @SearchParamDefinition(name="subject", path="Invoice.subject", description="Recipient(s) of goods and services", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Group.class, Patient.class } )
2261  public static final String SP_SUBJECT = "subject";
2262 /**
2263   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2264   * <p>
2265   * Description: <b>Recipient(s) of goods and services</b><br>
2266   * Type: <b>reference</b><br>
2267   * Path: <b>Invoice.subject</b><br>
2268   * </p>
2269   */
2270  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2271
2272/**
2273   * Constant for fluent queries to be used to add include statements. Specifies
2274   * the path value of "<b>Invoice:subject</b>".
2275   */
2276  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Invoice:subject").toLocked();
2277
2278 /**
2279   * Search parameter: <b>totalgross</b>
2280   * <p>
2281   * Description: <b>Gross total of this Invoice</b><br>
2282   * Type: <b>quantity</b><br>
2283   * Path: <b>Invoice.totalGross</b><br>
2284   * </p>
2285   */
2286  @SearchParamDefinition(name="totalgross", path="Invoice.totalGross", description="Gross total of this Invoice", type="quantity" )
2287  public static final String SP_TOTALGROSS = "totalgross";
2288 /**
2289   * <b>Fluent Client</b> search parameter constant for <b>totalgross</b>
2290   * <p>
2291   * Description: <b>Gross total of this Invoice</b><br>
2292   * Type: <b>quantity</b><br>
2293   * Path: <b>Invoice.totalGross</b><br>
2294   * </p>
2295   */
2296  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam TOTALGROSS = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_TOTALGROSS);
2297
2298 /**
2299   * Search parameter: <b>totalnet</b>
2300   * <p>
2301   * Description: <b>Net total of this Invoice</b><br>
2302   * Type: <b>quantity</b><br>
2303   * Path: <b>Invoice.totalNet</b><br>
2304   * </p>
2305   */
2306  @SearchParamDefinition(name="totalnet", path="Invoice.totalNet", description="Net total of this Invoice", type="quantity" )
2307  public static final String SP_TOTALNET = "totalnet";
2308 /**
2309   * <b>Fluent Client</b> search parameter constant for <b>totalnet</b>
2310   * <p>
2311   * Description: <b>Net total of this Invoice</b><br>
2312   * Type: <b>quantity</b><br>
2313   * Path: <b>Invoice.totalNet</b><br>
2314   * </p>
2315   */
2316  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam TOTALNET = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_TOTALNET);
2317
2318 /**
2319   * Search parameter: <b>date</b>
2320   * <p>
2321   * Description: <b>Multiple Resources: 
2322
2323* [AdverseEvent](adverseevent.html): When the event occurred
2324* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2325* [Appointment](appointment.html): Appointment date/time.
2326* [AuditEvent](auditevent.html): Time when the event was recorded
2327* [CarePlan](careplan.html): Time period plan covers
2328* [CareTeam](careteam.html): A date within the coverage time period.
2329* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2330* [Composition](composition.html): Composition editing time
2331* [Consent](consent.html): When consent was agreed to
2332* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2333* [DocumentReference](documentreference.html): When this document reference was created
2334* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2335* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2336* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2337* [Flag](flag.html): Time period when flag is active
2338* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2339* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2340* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2341* [Invoice](invoice.html): Invoice date / posting date
2342* [List](list.html): When the list was prepared
2343* [MeasureReport](measurereport.html): The date of the measure report
2344* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2345* [Observation](observation.html): Clinically relevant time/time-period for observation
2346* [Procedure](procedure.html): When the procedure occurred or is occurring
2347* [ResearchSubject](researchsubject.html): Start and end of participation
2348* [RiskAssessment](riskassessment.html): When was assessment made?
2349* [SupplyRequest](supplyrequest.html): When the request was made
2350</b><br>
2351   * Type: <b>date</b><br>
2352   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2353   * </p>
2354   */
2355  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
2356  public static final String SP_DATE = "date";
2357 /**
2358   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2359   * <p>
2360   * Description: <b>Multiple Resources: 
2361
2362* [AdverseEvent](adverseevent.html): When the event occurred
2363* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2364* [Appointment](appointment.html): Appointment date/time.
2365* [AuditEvent](auditevent.html): Time when the event was recorded
2366* [CarePlan](careplan.html): Time period plan covers
2367* [CareTeam](careteam.html): A date within the coverage time period.
2368* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2369* [Composition](composition.html): Composition editing time
2370* [Consent](consent.html): When consent was agreed to
2371* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2372* [DocumentReference](documentreference.html): When this document reference was created
2373* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2374* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2375* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2376* [Flag](flag.html): Time period when flag is active
2377* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2378* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2379* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2380* [Invoice](invoice.html): Invoice date / posting date
2381* [List](list.html): When the list was prepared
2382* [MeasureReport](measurereport.html): The date of the measure report
2383* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2384* [Observation](observation.html): Clinically relevant time/time-period for observation
2385* [Procedure](procedure.html): When the procedure occurred or is occurring
2386* [ResearchSubject](researchsubject.html): Start and end of participation
2387* [RiskAssessment](riskassessment.html): When was assessment made?
2388* [SupplyRequest](supplyrequest.html): When the request was made
2389</b><br>
2390   * Type: <b>date</b><br>
2391   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2392   * </p>
2393   */
2394  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2395
2396 /**
2397   * Search parameter: <b>identifier</b>
2398   * <p>
2399   * Description: <b>Multiple Resources: 
2400
2401* [Account](account.html): Account number
2402* [AdverseEvent](adverseevent.html): Business identifier for the event
2403* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2404* [Appointment](appointment.html): An Identifier of the Appointment
2405* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2406* [Basic](basic.html): Business identifier
2407* [BodyStructure](bodystructure.html): Bodystructure identifier
2408* [CarePlan](careplan.html): External Ids for this plan
2409* [CareTeam](careteam.html): External Ids for this team
2410* [ChargeItem](chargeitem.html): Business Identifier for item
2411* [Claim](claim.html): The primary identifier of the financial resource
2412* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2413* [ClinicalImpression](clinicalimpression.html): Business identifier
2414* [Communication](communication.html): Unique identifier
2415* [CommunicationRequest](communicationrequest.html): Unique identifier
2416* [Composition](composition.html): Version-independent identifier for the Composition
2417* [Condition](condition.html): A unique identifier of the condition record
2418* [Consent](consent.html): Identifier for this record (external references)
2419* [Contract](contract.html): The identity of the contract
2420* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2421* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2422* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2423* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2424* [DeviceRequest](devicerequest.html): Business identifier for request/order
2425* [DeviceUsage](deviceusage.html): Search by identifier
2426* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2427* [DocumentReference](documentreference.html): Identifier of the attachment binary
2428* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2429* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2430* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2431* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2432* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2433* [Flag](flag.html): Business identifier
2434* [Goal](goal.html): External Ids for this goal
2435* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2436* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2437* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2438* [Immunization](immunization.html): Business identifier
2439* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2440* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2441* [Invoice](invoice.html): Business Identifier for item
2442* [List](list.html): Business identifier
2443* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2444* [Medication](medication.html): Returns medications with this external identifier
2445* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2446* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2447* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2448* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2449* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2450* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2451* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2452* [Observation](observation.html): The unique id for a particular observation
2453* [Person](person.html): A person Identifier
2454* [Procedure](procedure.html): A unique identifier for a procedure
2455* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2456* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2457* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2458* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2459* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2460* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2461* [Specimen](specimen.html): The unique identifier associated with the specimen
2462* [SupplyDelivery](supplydelivery.html): External identifier
2463* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2464* [Task](task.html): Search for a task instance by its business identifier
2465* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2466</b><br>
2467   * Type: <b>token</b><br>
2468   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2469   * </p>
2470   */
2471  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2472  public static final String SP_IDENTIFIER = "identifier";
2473 /**
2474   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2475   * <p>
2476   * Description: <b>Multiple Resources: 
2477
2478* [Account](account.html): Account number
2479* [AdverseEvent](adverseevent.html): Business identifier for the event
2480* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2481* [Appointment](appointment.html): An Identifier of the Appointment
2482* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2483* [Basic](basic.html): Business identifier
2484* [BodyStructure](bodystructure.html): Bodystructure identifier
2485* [CarePlan](careplan.html): External Ids for this plan
2486* [CareTeam](careteam.html): External Ids for this team
2487* [ChargeItem](chargeitem.html): Business Identifier for item
2488* [Claim](claim.html): The primary identifier of the financial resource
2489* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2490* [ClinicalImpression](clinicalimpression.html): Business identifier
2491* [Communication](communication.html): Unique identifier
2492* [CommunicationRequest](communicationrequest.html): Unique identifier
2493* [Composition](composition.html): Version-independent identifier for the Composition
2494* [Condition](condition.html): A unique identifier of the condition record
2495* [Consent](consent.html): Identifier for this record (external references)
2496* [Contract](contract.html): The identity of the contract
2497* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2498* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2499* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2500* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2501* [DeviceRequest](devicerequest.html): Business identifier for request/order
2502* [DeviceUsage](deviceusage.html): Search by identifier
2503* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2504* [DocumentReference](documentreference.html): Identifier of the attachment binary
2505* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2506* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2507* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2508* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2509* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2510* [Flag](flag.html): Business identifier
2511* [Goal](goal.html): External Ids for this goal
2512* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2513* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2514* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2515* [Immunization](immunization.html): Business identifier
2516* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2517* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2518* [Invoice](invoice.html): Business Identifier for item
2519* [List](list.html): Business identifier
2520* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2521* [Medication](medication.html): Returns medications with this external identifier
2522* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2523* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2524* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2525* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2526* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2527* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2528* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2529* [Observation](observation.html): The unique id for a particular observation
2530* [Person](person.html): A person Identifier
2531* [Procedure](procedure.html): A unique identifier for a procedure
2532* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2533* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2534* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2535* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2536* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2537* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2538* [Specimen](specimen.html): The unique identifier associated with the specimen
2539* [SupplyDelivery](supplydelivery.html): External identifier
2540* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2541* [Task](task.html): Search for a task instance by its business identifier
2542* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2543</b><br>
2544   * Type: <b>token</b><br>
2545   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2546   * </p>
2547   */
2548  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2549
2550 /**
2551   * Search parameter: <b>patient</b>
2552   * <p>
2553   * Description: <b>Multiple Resources: 
2554
2555* [Account](account.html): The entity that caused the expenses
2556* [AdverseEvent](adverseevent.html): Subject impacted by event
2557* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2558* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2559* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2560* [AuditEvent](auditevent.html): Where the activity involved patient data
2561* [Basic](basic.html): Identifies the focus of this resource
2562* [BodyStructure](bodystructure.html): Who this is about
2563* [CarePlan](careplan.html): Who the care plan is for
2564* [CareTeam](careteam.html): Who care team is for
2565* [ChargeItem](chargeitem.html): Individual service was done for/to
2566* [Claim](claim.html): Patient receiving the products or services
2567* [ClaimResponse](claimresponse.html): The subject of care
2568* [ClinicalImpression](clinicalimpression.html): Patient assessed
2569* [Communication](communication.html): Focus of message
2570* [CommunicationRequest](communicationrequest.html): Focus of message
2571* [Composition](composition.html): Who and/or what the composition is about
2572* [Condition](condition.html): Who has the condition?
2573* [Consent](consent.html): Who the consent applies to
2574* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2575* [Coverage](coverage.html): Retrieve coverages for a patient
2576* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2577* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2578* [DetectedIssue](detectedissue.html): Associated patient
2579* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2580* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2581* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2582* [DocumentReference](documentreference.html): Who/what is the subject of the document
2583* [Encounter](encounter.html): The patient present at the encounter
2584* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2585* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2586* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2587* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2588* [Flag](flag.html): The identity of a subject to list flags for
2589* [Goal](goal.html): Who this goal is intended for
2590* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2591* [ImagingSelection](imagingselection.html): Who the study is about
2592* [ImagingStudy](imagingstudy.html): Who the study is about
2593* [Immunization](immunization.html): The patient for the vaccination record
2594* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2595* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2596* [Invoice](invoice.html): Recipient(s) of goods and services
2597* [List](list.html): If all resources have the same subject
2598* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2599* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2600* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2601* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2602* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2603* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2604* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2605* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2606* [Observation](observation.html): The subject that the observation is about (if patient)
2607* [Person](person.html): The Person links to this Patient
2608* [Procedure](procedure.html): Search by subject - a patient
2609* [Provenance](provenance.html): Where the activity involved patient data
2610* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2611* [RelatedPerson](relatedperson.html): The patient this related person is related to
2612* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2613* [ResearchSubject](researchsubject.html): Who or what is part of study
2614* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2615* [ServiceRequest](servicerequest.html): Search by subject - a patient
2616* [Specimen](specimen.html): The patient the specimen comes from
2617* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2618* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2619* [Task](task.html): Search by patient
2620* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2621</b><br>
2622   * Type: <b>reference</b><br>
2623   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2624   * </p>
2625   */
2626  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
2627  public static final String SP_PATIENT = "patient";
2628 /**
2629   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2630   * <p>
2631   * Description: <b>Multiple Resources: 
2632
2633* [Account](account.html): The entity that caused the expenses
2634* [AdverseEvent](adverseevent.html): Subject impacted by event
2635* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2636* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2637* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2638* [AuditEvent](auditevent.html): Where the activity involved patient data
2639* [Basic](basic.html): Identifies the focus of this resource
2640* [BodyStructure](bodystructure.html): Who this is about
2641* [CarePlan](careplan.html): Who the care plan is for
2642* [CareTeam](careteam.html): Who care team is for
2643* [ChargeItem](chargeitem.html): Individual service was done for/to
2644* [Claim](claim.html): Patient receiving the products or services
2645* [ClaimResponse](claimresponse.html): The subject of care
2646* [ClinicalImpression](clinicalimpression.html): Patient assessed
2647* [Communication](communication.html): Focus of message
2648* [CommunicationRequest](communicationrequest.html): Focus of message
2649* [Composition](composition.html): Who and/or what the composition is about
2650* [Condition](condition.html): Who has the condition?
2651* [Consent](consent.html): Who the consent applies to
2652* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2653* [Coverage](coverage.html): Retrieve coverages for a patient
2654* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2655* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2656* [DetectedIssue](detectedissue.html): Associated patient
2657* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2658* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2659* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2660* [DocumentReference](documentreference.html): Who/what is the subject of the document
2661* [Encounter](encounter.html): The patient present at the encounter
2662* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2663* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2664* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2665* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2666* [Flag](flag.html): The identity of a subject to list flags for
2667* [Goal](goal.html): Who this goal is intended for
2668* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2669* [ImagingSelection](imagingselection.html): Who the study is about
2670* [ImagingStudy](imagingstudy.html): Who the study is about
2671* [Immunization](immunization.html): The patient for the vaccination record
2672* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2673* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2674* [Invoice](invoice.html): Recipient(s) of goods and services
2675* [List](list.html): If all resources have the same subject
2676* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2677* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2678* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2679* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2680* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2681* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2682* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2683* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2684* [Observation](observation.html): The subject that the observation is about (if patient)
2685* [Person](person.html): The Person links to this Patient
2686* [Procedure](procedure.html): Search by subject - a patient
2687* [Provenance](provenance.html): Where the activity involved patient data
2688* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2689* [RelatedPerson](relatedperson.html): The patient this related person is related to
2690* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2691* [ResearchSubject](researchsubject.html): Who or what is part of study
2692* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2693* [ServiceRequest](servicerequest.html): Search by subject - a patient
2694* [Specimen](specimen.html): The patient the specimen comes from
2695* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2696* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2697* [Task](task.html): Search by patient
2698* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2699</b><br>
2700   * Type: <b>reference</b><br>
2701   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2702   * </p>
2703   */
2704  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2705
2706/**
2707   * Constant for fluent queries to be used to add include statements. Specifies
2708   * the path value of "<b>Invoice:patient</b>".
2709   */
2710  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Invoice:patient").toLocked();
2711
2712 /**
2713   * Search parameter: <b>type</b>
2714   * <p>
2715   * Description: <b>Multiple Resources: 
2716
2717* [Account](account.html): E.g. patient, expense, depreciation
2718* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
2719* [Composition](composition.html): Kind of composition (LOINC if possible)
2720* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
2721* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
2722* [Encounter](encounter.html): Specific type of encounter
2723* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
2724* [Invoice](invoice.html): Type of Invoice
2725* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
2726* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
2727* [Specimen](specimen.html): The specimen type
2728</b><br>
2729   * Type: <b>token</b><br>
2730   * Path: <b>Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type</b><br>
2731   * </p>
2732   */
2733  @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" )
2734  public static final String SP_TYPE = "type";
2735 /**
2736   * <b>Fluent Client</b> search parameter constant for <b>type</b>
2737   * <p>
2738   * Description: <b>Multiple Resources: 
2739
2740* [Account](account.html): E.g. patient, expense, depreciation
2741* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
2742* [Composition](composition.html): Kind of composition (LOINC if possible)
2743* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
2744* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
2745* [Encounter](encounter.html): Specific type of encounter
2746* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
2747* [Invoice](invoice.html): Type of Invoice
2748* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
2749* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
2750* [Specimen](specimen.html): The specimen type
2751</b><br>
2752   * Type: <b>token</b><br>
2753   * Path: <b>Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type</b><br>
2754   * </p>
2755   */
2756  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
2757
2758
2759}
2760