Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.hl7.fhir.r5.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, \
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this \
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, \
this list of conditions and the following disclaimer in the documentation \
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.math.*;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.r5.model.Enumerations.*;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* This resource provides the adjudication details from the processing of a Claim resource.
*/
@ResourceDef(name="ClaimResponse", profile="http://hl7.org/fhir/StructureDefinition/ClaimResponse")
public class ClaimResponse extends DomainResource {
@Block()
public static class ClaimResponseEventComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A coded event such as when a service is expected or a card printed.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Specific event", formalDefinition="A coded event such as when a service is expected or a card printed." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/datestype")
protected CodeableConcept type;
/**
* A date or period in the past or future indicating when the event occurred or is expectd to occur.
*/
@Child(name = "when", type = {DateTimeType.class, Period.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Occurance date or period", formalDefinition="A date or period in the past or future indicating when the event occurred or is expectd to occur." )
protected DataType when;
private static final long serialVersionUID = -634897375L;
/**
* Constructor
*/
public ClaimResponseEventComponent() {
super();
}
/**
* Constructor
*/
public ClaimResponseEventComponent(CodeableConcept type, DataType when) {
super();
this.setType(type);
this.setWhen(when);
}
/**
* @return {@link #type} (A coded event such as when a service is expected or a card printed.)
*/
public CodeableConcept getType() {
if (this.type == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ClaimResponseEventComponent.type");
else if (Configuration.doAutoCreate())
this.type = new CodeableConcept(); // cc
return this.type;
}
public boolean hasType() {
return this.type != null && !this.type.isEmpty();
}
/**
* @param value {@link #type} (A coded event such as when a service is expected or a card printed.)
*/
public ClaimResponseEventComponent setType(CodeableConcept value) {
this.type = value;
return this;
}
/**
* @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
*/
public DataType getWhen() {
return this.when;
}
/**
* @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
*/
public DateTimeType getWhenDateTimeType() throws FHIRException {
if (this.when == null)
this.when = new DateTimeType();
if (!(this.when instanceof DateTimeType))
throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.when.getClass().getName()+" was encountered");
return (DateTimeType) this.when;
}
public boolean hasWhenDateTimeType() {
return this != null && this.when instanceof DateTimeType;
}
/**
* @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
*/
public Period getWhenPeriod() throws FHIRException {
if (this.when == null)
this.when = new Period();
if (!(this.when instanceof Period))
throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered");
return (Period) this.when;
}
public boolean hasWhenPeriod() {
return this != null && this.when instanceof Period;
}
public boolean hasWhen() {
return this.when != null && !this.when.isEmpty();
}
/**
* @param value {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
*/
public ClaimResponseEventComponent setWhen(DataType value) {
if (value != null && !(value instanceof DateTimeType || value instanceof Period))
throw new FHIRException("Not the right type for ClaimResponse.event.when[x]: "+value.fhirType());
this.when = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type));
children.add(new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 3575610: /*type*/ return new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type);
case 1312831238: /*when[x]*/ return new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
case 3648314: /*when*/ return new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
case -1785502475: /*whenDateTime*/ return new Property("when[x]", "dateTime", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
case 251476379: /*whenPeriod*/ return new Property("when[x]", "Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // DataType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 3648314: // when
this.when = TypeConvertor.castToType(value); // DataType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) {
this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("when[x]")) {
this.when = TypeConvertor.castToType(value); // DataType
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("type")) {
this.type = null;
} else if (name.equals("when[x]")) {
this.when = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType();
case 1312831238: return getWhen();
case 3648314: return getWhen();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return new String[] {"CodeableConcept"};
case 3648314: /*when*/ return new String[] {"dateTime", "Period"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
}
else if (name.equals("whenDateTime")) {
this.when = new DateTimeType();
return this.when;
}
else if (name.equals("whenPeriod")) {
this.when = new Period();
return this.when;
}
else
return super.addChild(name);
}
public ClaimResponseEventComponent copy() {
ClaimResponseEventComponent dst = new ClaimResponseEventComponent();
copyValues(dst);
return dst;
}
public void copyValues(ClaimResponseEventComponent dst) {
super.copyValues(dst);
dst.type = type == null ? null : type.copy();
dst.when = when == null ? null : when.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof ClaimResponseEventComponent))
return false;
ClaimResponseEventComponent o = (ClaimResponseEventComponent) other_;
return compareDeep(type, o.type, true) && compareDeep(when, o.when, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof ClaimResponseEventComponent))
return false;
ClaimResponseEventComponent o = (ClaimResponseEventComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, when);
}
public String fhirType() {
return "ClaimResponse.event";
}
}
@Block()
public static class ItemComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely reference the claim item entries.
*/
@Child(name = "itemSequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Claim item instance identifier", formalDefinition="A number to uniquely reference the claim item entries." )
protected PositiveIntType itemSequence;
/**
* Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.
*/
@Child(name = "traceNumber", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." )
protected List traceNumber;
/**
* The numbers associated with notes below which apply to the adjudication of this item.
*/
@Child(name = "noteNumber", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." )
protected List noteNumber;
/**
* The high-level results of the adjudication if adjudication has been performed.
*/
@Child(name = "reviewOutcome", type = {}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." )
protected ReviewOutcomeComponent reviewOutcome;
/**
* If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.
*/
@Child(name = "adjudication", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Adjudication details", formalDefinition="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item." )
protected List adjudication;
/**
* A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.
*/
@Child(name = "detail", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Adjudication for claim details", formalDefinition="A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items." )
protected List detail;
private static final long serialVersionUID = -1834500828L;
/**
* Constructor
*/
public ItemComponent() {
super();
}
/**
* Constructor
*/
public ItemComponent(int itemSequence) {
super();
this.setItemSequence(itemSequence);
}
/**
* @return {@link #itemSequence} (A number to uniquely reference the claim item entries.). This is the underlying object with id, value and extensions. The accessor "getItemSequence" gives direct access to the value
*/
public PositiveIntType getItemSequenceElement() {
if (this.itemSequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemComponent.itemSequence");
else if (Configuration.doAutoCreate())
this.itemSequence = new PositiveIntType(); // bb
return this.itemSequence;
}
public boolean hasItemSequenceElement() {
return this.itemSequence != null && !this.itemSequence.isEmpty();
}
public boolean hasItemSequence() {
return this.itemSequence != null && !this.itemSequence.isEmpty();
}
/**
* @param value {@link #itemSequence} (A number to uniquely reference the claim item entries.). This is the underlying object with id, value and extensions. The accessor "getItemSequence" gives direct access to the value
*/
public ItemComponent setItemSequenceElement(PositiveIntType value) {
this.itemSequence = value;
return this;
}
/**
* @return A number to uniquely reference the claim item entries.
*/
public int getItemSequence() {
return this.itemSequence == null || this.itemSequence.isEmpty() ? 0 : this.itemSequence.getValue();
}
/**
* @param value A number to uniquely reference the claim item entries.
*/
public ItemComponent setItemSequence(int value) {
if (this.itemSequence == null)
this.itemSequence = new PositiveIntType();
this.itemSequence.setValue(value);
return this;
}
/**
* @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.)
*/
public List getTraceNumber() {
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
return this.traceNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setTraceNumber(List theTraceNumber) {
this.traceNumber = theTraceNumber;
return this;
}
public boolean hasTraceNumber() {
if (this.traceNumber == null)
return false;
for (Identifier item : this.traceNumber)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addTraceNumber() { //3
Identifier t = new Identifier();
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return t;
}
public ItemComponent addTraceNumber(Identifier t) { //3
if (t == null)
return this;
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3}
*/
public Identifier getTraceNumberFirstRep() {
if (getTraceNumber().isEmpty()) {
addTraceNumber();
}
return getTraceNumber().get(0);
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public List getNoteNumber() {
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
return this.noteNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setNoteNumber(List theNoteNumber) {
this.noteNumber = theNoteNumber;
return this;
}
public boolean hasNoteNumber() {
if (this.noteNumber == null)
return false;
for (PositiveIntType item : this.noteNumber)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public PositiveIntType addNoteNumberElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return t;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public ItemComponent addNoteNumber(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return this;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public boolean hasNoteNumber(int value) {
if (this.noteNumber == null)
return false;
for (PositiveIntType v : this.noteNumber)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ReviewOutcomeComponent getReviewOutcome() {
if (this.reviewOutcome == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemComponent.reviewOutcome");
else if (Configuration.doAutoCreate())
this.reviewOutcome = new ReviewOutcomeComponent(); // cc
return this.reviewOutcome;
}
public boolean hasReviewOutcome() {
return this.reviewOutcome != null && !this.reviewOutcome.isEmpty();
}
/**
* @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ItemComponent setReviewOutcome(ReviewOutcomeComponent value) {
this.reviewOutcome = value;
return this;
}
/**
* @return {@link #adjudication} (If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.)
*/
public List getAdjudication() {
if (this.adjudication == null)
this.adjudication = new ArrayList();
return this.adjudication;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setAdjudication(List theAdjudication) {
this.adjudication = theAdjudication;
return this;
}
public boolean hasAdjudication() {
if (this.adjudication == null)
return false;
for (AdjudicationComponent item : this.adjudication)
if (!item.isEmpty())
return true;
return false;
}
public AdjudicationComponent addAdjudication() { //3
AdjudicationComponent t = new AdjudicationComponent();
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return t;
}
public ItemComponent addAdjudication(AdjudicationComponent t) { //3
if (t == null)
return this;
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3}
*/
public AdjudicationComponent getAdjudicationFirstRep() {
if (getAdjudication().isEmpty()) {
addAdjudication();
}
return getAdjudication().get(0);
}
/**
* @return {@link #detail} (A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.)
*/
public List getDetail() {
if (this.detail == null)
this.detail = new ArrayList();
return this.detail;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setDetail(List theDetail) {
this.detail = theDetail;
return this;
}
public boolean hasDetail() {
if (this.detail == null)
return false;
for (ItemDetailComponent item : this.detail)
if (!item.isEmpty())
return true;
return false;
}
public ItemDetailComponent addDetail() { //3
ItemDetailComponent t = new ItemDetailComponent();
if (this.detail == null)
this.detail = new ArrayList();
this.detail.add(t);
return t;
}
public ItemComponent addDetail(ItemDetailComponent t) { //3
if (t == null)
return this;
if (this.detail == null)
this.detail = new ArrayList();
this.detail.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3}
*/
public ItemDetailComponent getDetailFirstRep() {
if (getDetail().isEmpty()) {
addDetail();
}
return getDetail().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("itemSequence", "positiveInt", "A number to uniquely reference the claim item entries.", 0, 1, itemSequence));
children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber));
children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber));
children.add(new Property("reviewOutcome", "", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome));
children.add(new Property("adjudication", "", "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, adjudication));
children.add(new Property("detail", "", "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, java.lang.Integer.MAX_VALUE, detail));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1977979892: /*itemSequence*/ return new Property("itemSequence", "positiveInt", "A number to uniquely reference the claim item entries.", 0, 1, itemSequence);
case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber);
case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber);
case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome);
case -231349275: /*adjudication*/ return new Property("adjudication", "", "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, adjudication);
case -1335224239: /*detail*/ return new Property("detail", "", "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, java.lang.Integer.MAX_VALUE, detail);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1977979892: /*itemSequence*/ return this.itemSequence == null ? new Base[0] : new Base[] {this.itemSequence}; // PositiveIntType
case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier
case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType
case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ReviewOutcomeComponent
case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // ItemDetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1977979892: // itemSequence
this.itemSequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case -1110033957: // noteNumber
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -51825446: // reviewOutcome
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
return value;
case -231349275: // adjudication
this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent
return value;
case -1335224239: // detail
this.getDetail().add((ItemDetailComponent) value); // ItemDetailComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("itemSequence")) {
this.itemSequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("traceNumber")) {
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value));
} else if (name.equals("noteNumber")) {
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().add((AdjudicationComponent) value);
} else if (name.equals("detail")) {
this.getDetail().add((ItemDetailComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("itemSequence")) {
this.itemSequence = null;
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("noteNumber")) {
this.getNoteNumber().remove(value);
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().remove((AdjudicationComponent) value);
} else if (name.equals("detail")) {
this.getDetail().remove((ItemDetailComponent) value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1977979892: return getItemSequenceElement();
case 82505966: return addTraceNumber();
case -1110033957: return addNoteNumberElement();
case -51825446: return getReviewOutcome();
case -231349275: return addAdjudication();
case -1335224239: return addDetail();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1977979892: /*itemSequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"};
case -51825446: /*reviewOutcome*/ return new String[] {};
case -231349275: /*adjudication*/ return new String[] {};
case -1335224239: /*detail*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("itemSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.itemSequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("noteNumber")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.noteNumber");
}
else if (name.equals("reviewOutcome")) {
this.reviewOutcome = new ReviewOutcomeComponent();
return this.reviewOutcome;
}
else if (name.equals("adjudication")) {
return addAdjudication();
}
else if (name.equals("detail")) {
return addDetail();
}
else
return super.addChild(name);
}
public ItemComponent copy() {
ItemComponent dst = new ItemComponent();
copyValues(dst);
return dst;
}
public void copyValues(ItemComponent dst) {
super.copyValues(dst);
dst.itemSequence = itemSequence == null ? null : itemSequence.copy();
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
if (noteNumber != null) {
dst.noteNumber = new ArrayList();
for (PositiveIntType i : noteNumber)
dst.noteNumber.add(i.copy());
};
dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy();
if (adjudication != null) {
dst.adjudication = new ArrayList();
for (AdjudicationComponent i : adjudication)
dst.adjudication.add(i.copy());
};
if (detail != null) {
dst.detail = new ArrayList();
for (ItemDetailComponent i : detail)
dst.detail.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof ItemComponent))
return false;
ItemComponent o = (ItemComponent) other_;
return compareDeep(itemSequence, o.itemSequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true)
&& compareDeep(adjudication, o.adjudication, true) && compareDeep(detail, o.detail, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof ItemComponent))
return false;
ItemComponent o = (ItemComponent) other_;
return compareValues(itemSequence, o.itemSequence, true) && compareValues(noteNumber, o.noteNumber, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(itemSequence, traceNumber
, noteNumber, reviewOutcome, adjudication, detail);
}
public String fhirType() {
return "ClaimResponse.item";
}
}
@Block()
public static class ReviewOutcomeComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The result of the claim, predetermination, or preauthorization adjudication.
*/
@Child(name = "decision", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Result of the adjudication", formalDefinition="The result of the claim, predetermination, or preauthorization adjudication." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-decision")
protected CodeableConcept decision;
/**
* The reasons for the result of the claim, predetermination, or preauthorization adjudication.
*/
@Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Reason for result of the adjudication", formalDefinition="The reasons for the result of the claim, predetermination, or preauthorization adjudication." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-decision-reason")
protected List reason;
/**
* Reference from the Insurer which is used in later communications which refers to this adjudication.
*/
@Child(name = "preAuthRef", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Preauthorization reference", formalDefinition="Reference from the Insurer which is used in later communications which refers to this adjudication." )
protected StringType preAuthRef;
/**
* The time frame during which this authorization is effective.
*/
@Child(name = "preAuthPeriod", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Preauthorization reference effective period", formalDefinition="The time frame during which this authorization is effective." )
protected Period preAuthPeriod;
private static final long serialVersionUID = 2126097594L;
/**
* Constructor
*/
public ReviewOutcomeComponent() {
super();
}
/**
* @return {@link #decision} (The result of the claim, predetermination, or preauthorization adjudication.)
*/
public CodeableConcept getDecision() {
if (this.decision == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ReviewOutcomeComponent.decision");
else if (Configuration.doAutoCreate())
this.decision = new CodeableConcept(); // cc
return this.decision;
}
public boolean hasDecision() {
return this.decision != null && !this.decision.isEmpty();
}
/**
* @param value {@link #decision} (The result of the claim, predetermination, or preauthorization adjudication.)
*/
public ReviewOutcomeComponent setDecision(CodeableConcept value) {
this.decision = value;
return this;
}
/**
* @return {@link #reason} (The reasons for the result of the claim, predetermination, or preauthorization adjudication.)
*/
public List getReason() {
if (this.reason == null)
this.reason = new ArrayList();
return this.reason;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ReviewOutcomeComponent setReason(List theReason) {
this.reason = theReason;
return this;
}
public boolean hasReason() {
if (this.reason == null)
return false;
for (CodeableConcept item : this.reason)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addReason() { //3
CodeableConcept t = new CodeableConcept();
if (this.reason == null)
this.reason = new ArrayList();
this.reason.add(t);
return t;
}
public ReviewOutcomeComponent addReason(CodeableConcept t) { //3
if (t == null)
return this;
if (this.reason == null)
this.reason = new ArrayList();
this.reason.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
*/
public CodeableConcept getReasonFirstRep() {
if (getReason().isEmpty()) {
addReason();
}
return getReason().get(0);
}
/**
* @return {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.). This is the underlying object with id, value and extensions. The accessor "getPreAuthRef" gives direct access to the value
*/
public StringType getPreAuthRefElement() {
if (this.preAuthRef == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ReviewOutcomeComponent.preAuthRef");
else if (Configuration.doAutoCreate())
this.preAuthRef = new StringType(); // bb
return this.preAuthRef;
}
public boolean hasPreAuthRefElement() {
return this.preAuthRef != null && !this.preAuthRef.isEmpty();
}
public boolean hasPreAuthRef() {
return this.preAuthRef != null && !this.preAuthRef.isEmpty();
}
/**
* @param value {@link #preAuthRef} (Reference from the Insurer which is used in later communications which refers to this adjudication.). This is the underlying object with id, value and extensions. The accessor "getPreAuthRef" gives direct access to the value
*/
public ReviewOutcomeComponent setPreAuthRefElement(StringType value) {
this.preAuthRef = value;
return this;
}
/**
* @return Reference from the Insurer which is used in later communications which refers to this adjudication.
*/
public String getPreAuthRef() {
return this.preAuthRef == null ? null : this.preAuthRef.getValue();
}
/**
* @param value Reference from the Insurer which is used in later communications which refers to this adjudication.
*/
public ReviewOutcomeComponent setPreAuthRef(String value) {
if (Utilities.noString(value))
this.preAuthRef = null;
else {
if (this.preAuthRef == null)
this.preAuthRef = new StringType();
this.preAuthRef.setValue(value);
}
return this;
}
/**
* @return {@link #preAuthPeriod} (The time frame during which this authorization is effective.)
*/
public Period getPreAuthPeriod() {
if (this.preAuthPeriod == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ReviewOutcomeComponent.preAuthPeriod");
else if (Configuration.doAutoCreate())
this.preAuthPeriod = new Period(); // cc
return this.preAuthPeriod;
}
public boolean hasPreAuthPeriod() {
return this.preAuthPeriod != null && !this.preAuthPeriod.isEmpty();
}
/**
* @param value {@link #preAuthPeriod} (The time frame during which this authorization is effective.)
*/
public ReviewOutcomeComponent setPreAuthPeriod(Period value) {
this.preAuthPeriod = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("decision", "CodeableConcept", "The result of the claim, predetermination, or preauthorization adjudication.", 0, 1, decision));
children.add(new Property("reason", "CodeableConcept", "The reasons for the result of the claim, predetermination, or preauthorization adjudication.", 0, java.lang.Integer.MAX_VALUE, reason));
children.add(new Property("preAuthRef", "string", "Reference from the Insurer which is used in later communications which refers to this adjudication.", 0, 1, preAuthRef));
children.add(new Property("preAuthPeriod", "Period", "The time frame during which this authorization is effective.", 0, 1, preAuthPeriod));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 565719004: /*decision*/ return new Property("decision", "CodeableConcept", "The result of the claim, predetermination, or preauthorization adjudication.", 0, 1, decision);
case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "The reasons for the result of the claim, predetermination, or preauthorization adjudication.", 0, java.lang.Integer.MAX_VALUE, reason);
case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "Reference from the Insurer which is used in later communications which refers to this adjudication.", 0, 1, preAuthRef);
case 1819164812: /*preAuthPeriod*/ return new Property("preAuthPeriod", "Period", "The time frame during which this authorization is effective.", 0, 1, preAuthPeriod);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 565719004: /*decision*/ return this.decision == null ? new Base[0] : new Base[] {this.decision}; // CodeableConcept
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : new Base[] {this.preAuthRef}; // StringType
case 1819164812: /*preAuthPeriod*/ return this.preAuthPeriod == null ? new Base[0] : new Base[] {this.preAuthPeriod}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 565719004: // decision
this.decision = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -934964668: // reason
this.getReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case 522246568: // preAuthRef
this.preAuthRef = TypeConvertor.castToString(value); // StringType
return value;
case 1819164812: // preAuthPeriod
this.preAuthPeriod = TypeConvertor.castToPeriod(value); // Period
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("decision")) {
this.decision = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("reason")) {
this.getReason().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("preAuthRef")) {
this.preAuthRef = TypeConvertor.castToString(value); // StringType
} else if (name.equals("preAuthPeriod")) {
this.preAuthPeriod = TypeConvertor.castToPeriod(value); // Period
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("decision")) {
this.decision = null;
} else if (name.equals("reason")) {
this.getReason().remove(value);
} else if (name.equals("preAuthRef")) {
this.preAuthRef = null;
} else if (name.equals("preAuthPeriod")) {
this.preAuthPeriod = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 565719004: return getDecision();
case -934964668: return addReason();
case 522246568: return getPreAuthRefElement();
case 1819164812: return getPreAuthPeriod();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 565719004: /*decision*/ return new String[] {"CodeableConcept"};
case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
case 522246568: /*preAuthRef*/ return new String[] {"string"};
case 1819164812: /*preAuthPeriod*/ return new String[] {"Period"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("decision")) {
this.decision = new CodeableConcept();
return this.decision;
}
else if (name.equals("reason")) {
return addReason();
}
else if (name.equals("preAuthRef")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.reviewOutcome.preAuthRef");
}
else if (name.equals("preAuthPeriod")) {
this.preAuthPeriod = new Period();
return this.preAuthPeriod;
}
else
return super.addChild(name);
}
public ReviewOutcomeComponent copy() {
ReviewOutcomeComponent dst = new ReviewOutcomeComponent();
copyValues(dst);
return dst;
}
public void copyValues(ReviewOutcomeComponent dst) {
super.copyValues(dst);
dst.decision = decision == null ? null : decision.copy();
if (reason != null) {
dst.reason = new ArrayList();
for (CodeableConcept i : reason)
dst.reason.add(i.copy());
};
dst.preAuthRef = preAuthRef == null ? null : preAuthRef.copy();
dst.preAuthPeriod = preAuthPeriod == null ? null : preAuthPeriod.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof ReviewOutcomeComponent))
return false;
ReviewOutcomeComponent o = (ReviewOutcomeComponent) other_;
return compareDeep(decision, o.decision, true) && compareDeep(reason, o.reason, true) && compareDeep(preAuthRef, o.preAuthRef, true)
&& compareDeep(preAuthPeriod, o.preAuthPeriod, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof ReviewOutcomeComponent))
return false;
ReviewOutcomeComponent o = (ReviewOutcomeComponent) other_;
return compareValues(preAuthRef, o.preAuthRef, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(decision, reason, preAuthRef
, preAuthPeriod);
}
public String fhirType() {
return "ClaimResponse.item.reviewOutcome";
}
}
@Block()
public static class AdjudicationComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Type of adjudication information", formalDefinition="A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication")
protected CodeableConcept category;
/**
* A code supporting the understanding of the adjudication result and explaining variance from expected amount.
*/
@Child(name = "reason", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Explanation of adjudication outcome", formalDefinition="A code supporting the understanding of the adjudication result and explaining variance from expected amount." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication-reason")
protected CodeableConcept reason;
/**
* Monetary amount associated with the category.
*/
@Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the category." )
protected Money amount;
/**
* A non-monetary value associated with the category. Mutually exclusive to the amount element above.
*/
@Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value associated with the category. Mutually exclusive to the amount element above." )
protected Quantity quantity;
private static final long serialVersionUID = 29312734L;
/**
* Constructor
*/
public AdjudicationComponent() {
super();
}
/**
* Constructor
*/
public AdjudicationComponent(CodeableConcept category) {
super();
this.setCategory(category);
}
/**
* @return {@link #category} (A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AdjudicationComponent.category");
else if (Configuration.doAutoCreate())
this.category = new CodeableConcept(); // cc
return this.category;
}
public boolean hasCategory() {
return this.category != null && !this.category.isEmpty();
}
/**
* @param value {@link #category} (A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.)
*/
public AdjudicationComponent setCategory(CodeableConcept value) {
this.category = value;
return this;
}
/**
* @return {@link #reason} (A code supporting the understanding of the adjudication result and explaining variance from expected amount.)
*/
public CodeableConcept getReason() {
if (this.reason == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AdjudicationComponent.reason");
else if (Configuration.doAutoCreate())
this.reason = new CodeableConcept(); // cc
return this.reason;
}
public boolean hasReason() {
return this.reason != null && !this.reason.isEmpty();
}
/**
* @param value {@link #reason} (A code supporting the understanding of the adjudication result and explaining variance from expected amount.)
*/
public AdjudicationComponent setReason(CodeableConcept value) {
this.reason = value;
return this;
}
/**
* @return {@link #amount} (Monetary amount associated with the category.)
*/
public Money getAmount() {
if (this.amount == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AdjudicationComponent.amount");
else if (Configuration.doAutoCreate())
this.amount = new Money(); // cc
return this.amount;
}
public boolean hasAmount() {
return this.amount != null && !this.amount.isEmpty();
}
/**
* @param value {@link #amount} (Monetary amount associated with the category.)
*/
public AdjudicationComponent setAmount(Money value) {
this.amount = value;
return this;
}
/**
* @return {@link #quantity} (A non-monetary value associated with the category. Mutually exclusive to the amount element above.)
*/
public Quantity getQuantity() {
if (this.quantity == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AdjudicationComponent.quantity");
else if (Configuration.doAutoCreate())
this.quantity = new Quantity(); // cc
return this.quantity;
}
public boolean hasQuantity() {
return this.quantity != null && !this.quantity.isEmpty();
}
/**
* @param value {@link #quantity} (A non-monetary value associated with the category. Mutually exclusive to the amount element above.)
*/
public AdjudicationComponent setQuantity(Quantity value) {
this.quantity = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("category", "CodeableConcept", "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", 0, 1, category));
children.add(new Property("reason", "CodeableConcept", "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", 0, 1, reason));
children.add(new Property("amount", "Money", "Monetary amount associated with the category.", 0, 1, amount));
children.add(new Property("quantity", "Quantity", "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", 0, 1, quantity));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", 0, 1, category);
case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", 0, 1, reason);
case -1413853096: /*amount*/ return new Property("amount", "Money", "Monetary amount associated with the category.", 0, 1, amount);
case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", 0, 1, quantity);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept
case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Money
case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 50511102: // category
this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -934964668: // reason
this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -1413853096: // amount
this.amount = TypeConvertor.castToMoney(value); // Money
return value;
case -1285004149: // quantity
this.quantity = TypeConvertor.castToQuantity(value); // Quantity
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("category")) {
this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("reason")) {
this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("amount")) {
this.amount = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("quantity")) {
this.quantity = TypeConvertor.castToQuantity(value); // Quantity
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("category")) {
this.category = null;
} else if (name.equals("reason")) {
this.reason = null;
} else if (name.equals("amount")) {
this.amount = null;
} else if (name.equals("quantity")) {
this.quantity = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: return getCategory();
case -934964668: return getReason();
case -1413853096: return getAmount();
case -1285004149: return getQuantity();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: /*category*/ return new String[] {"CodeableConcept"};
case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
case -1413853096: /*amount*/ return new String[] {"Money"};
case -1285004149: /*quantity*/ return new String[] {"Quantity"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("category")) {
this.category = new CodeableConcept();
return this.category;
}
else if (name.equals("reason")) {
this.reason = new CodeableConcept();
return this.reason;
}
else if (name.equals("amount")) {
this.amount = new Money();
return this.amount;
}
else if (name.equals("quantity")) {
this.quantity = new Quantity();
return this.quantity;
}
else
return super.addChild(name);
}
public AdjudicationComponent copy() {
AdjudicationComponent dst = new AdjudicationComponent();
copyValues(dst);
return dst;
}
public void copyValues(AdjudicationComponent dst) {
super.copyValues(dst);
dst.category = category == null ? null : category.copy();
dst.reason = reason == null ? null : reason.copy();
dst.amount = amount == null ? null : amount.copy();
dst.quantity = quantity == null ? null : quantity.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof AdjudicationComponent))
return false;
AdjudicationComponent o = (AdjudicationComponent) other_;
return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true)
&& compareDeep(quantity, o.quantity, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof AdjudicationComponent))
return false;
AdjudicationComponent o = (AdjudicationComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, reason, amount
, quantity);
}
public String fhirType() {
return "ClaimResponse.item.adjudication";
}
}
@Block()
public static class ItemDetailComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely reference the claim detail entry.
*/
@Child(name = "detailSequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Claim detail instance identifier", formalDefinition="A number to uniquely reference the claim detail entry." )
protected PositiveIntType detailSequence;
/**
* Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.
*/
@Child(name = "traceNumber", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." )
protected List traceNumber;
/**
* The numbers associated with notes below which apply to the adjudication of this item.
*/
@Child(name = "noteNumber", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." )
protected List noteNumber;
/**
* The high-level results of the adjudication if adjudication has been performed.
*/
@Child(name = "reviewOutcome", type = {ReviewOutcomeComponent.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Detail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." )
protected ReviewOutcomeComponent reviewOutcome;
/**
* The adjudication results.
*/
@Child(name = "adjudication", type = {AdjudicationComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Detail level adjudication details", formalDefinition="The adjudication results." )
protected List adjudication;
/**
* A sub-detail adjudication of a simple product or service.
*/
@Child(name = "subDetail", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Adjudication for claim sub-details", formalDefinition="A sub-detail adjudication of a simple product or service." )
protected List subDetail;
private static final long serialVersionUID = -1263137525L;
/**
* Constructor
*/
public ItemDetailComponent() {
super();
}
/**
* Constructor
*/
public ItemDetailComponent(int detailSequence) {
super();
this.setDetailSequence(detailSequence);
}
/**
* @return {@link #detailSequence} (A number to uniquely reference the claim detail entry.). This is the underlying object with id, value and extensions. The accessor "getDetailSequence" gives direct access to the value
*/
public PositiveIntType getDetailSequenceElement() {
if (this.detailSequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemDetailComponent.detailSequence");
else if (Configuration.doAutoCreate())
this.detailSequence = new PositiveIntType(); // bb
return this.detailSequence;
}
public boolean hasDetailSequenceElement() {
return this.detailSequence != null && !this.detailSequence.isEmpty();
}
public boolean hasDetailSequence() {
return this.detailSequence != null && !this.detailSequence.isEmpty();
}
/**
* @param value {@link #detailSequence} (A number to uniquely reference the claim detail entry.). This is the underlying object with id, value and extensions. The accessor "getDetailSequence" gives direct access to the value
*/
public ItemDetailComponent setDetailSequenceElement(PositiveIntType value) {
this.detailSequence = value;
return this;
}
/**
* @return A number to uniquely reference the claim detail entry.
*/
public int getDetailSequence() {
return this.detailSequence == null || this.detailSequence.isEmpty() ? 0 : this.detailSequence.getValue();
}
/**
* @param value A number to uniquely reference the claim detail entry.
*/
public ItemDetailComponent setDetailSequence(int value) {
if (this.detailSequence == null)
this.detailSequence = new PositiveIntType();
this.detailSequence.setValue(value);
return this;
}
/**
* @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.)
*/
public List getTraceNumber() {
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
return this.traceNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemDetailComponent setTraceNumber(List theTraceNumber) {
this.traceNumber = theTraceNumber;
return this;
}
public boolean hasTraceNumber() {
if (this.traceNumber == null)
return false;
for (Identifier item : this.traceNumber)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addTraceNumber() { //3
Identifier t = new Identifier();
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return t;
}
public ItemDetailComponent addTraceNumber(Identifier t) { //3
if (t == null)
return this;
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3}
*/
public Identifier getTraceNumberFirstRep() {
if (getTraceNumber().isEmpty()) {
addTraceNumber();
}
return getTraceNumber().get(0);
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public List getNoteNumber() {
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
return this.noteNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemDetailComponent setNoteNumber(List theNoteNumber) {
this.noteNumber = theNoteNumber;
return this;
}
public boolean hasNoteNumber() {
if (this.noteNumber == null)
return false;
for (PositiveIntType item : this.noteNumber)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public PositiveIntType addNoteNumberElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return t;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public ItemDetailComponent addNoteNumber(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return this;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public boolean hasNoteNumber(int value) {
if (this.noteNumber == null)
return false;
for (PositiveIntType v : this.noteNumber)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ReviewOutcomeComponent getReviewOutcome() {
if (this.reviewOutcome == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemDetailComponent.reviewOutcome");
else if (Configuration.doAutoCreate())
this.reviewOutcome = new ReviewOutcomeComponent(); // cc
return this.reviewOutcome;
}
public boolean hasReviewOutcome() {
return this.reviewOutcome != null && !this.reviewOutcome.isEmpty();
}
/**
* @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ItemDetailComponent setReviewOutcome(ReviewOutcomeComponent value) {
this.reviewOutcome = value;
return this;
}
/**
* @return {@link #adjudication} (The adjudication results.)
*/
public List getAdjudication() {
if (this.adjudication == null)
this.adjudication = new ArrayList();
return this.adjudication;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemDetailComponent setAdjudication(List theAdjudication) {
this.adjudication = theAdjudication;
return this;
}
public boolean hasAdjudication() {
if (this.adjudication == null)
return false;
for (AdjudicationComponent item : this.adjudication)
if (!item.isEmpty())
return true;
return false;
}
public AdjudicationComponent addAdjudication() { //3
AdjudicationComponent t = new AdjudicationComponent();
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return t;
}
public ItemDetailComponent addAdjudication(AdjudicationComponent t) { //3
if (t == null)
return this;
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3}
*/
public AdjudicationComponent getAdjudicationFirstRep() {
if (getAdjudication().isEmpty()) {
addAdjudication();
}
return getAdjudication().get(0);
}
/**
* @return {@link #subDetail} (A sub-detail adjudication of a simple product or service.)
*/
public List getSubDetail() {
if (this.subDetail == null)
this.subDetail = new ArrayList();
return this.subDetail;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemDetailComponent setSubDetail(List theSubDetail) {
this.subDetail = theSubDetail;
return this;
}
public boolean hasSubDetail() {
if (this.subDetail == null)
return false;
for (SubDetailComponent item : this.subDetail)
if (!item.isEmpty())
return true;
return false;
}
public SubDetailComponent addSubDetail() { //3
SubDetailComponent t = new SubDetailComponent();
if (this.subDetail == null)
this.subDetail = new ArrayList();
this.subDetail.add(t);
return t;
}
public ItemDetailComponent addSubDetail(SubDetailComponent t) { //3
if (t == null)
return this;
if (this.subDetail == null)
this.subDetail = new ArrayList();
this.subDetail.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #subDetail}, creating it if it does not already exist {3}
*/
public SubDetailComponent getSubDetailFirstRep() {
if (getSubDetail().isEmpty()) {
addSubDetail();
}
return getSubDetail().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("detailSequence", "positiveInt", "A number to uniquely reference the claim detail entry.", 0, 1, detailSequence));
children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber));
children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber));
children.add(new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome));
children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication));
children.add(new Property("subDetail", "", "A sub-detail adjudication of a simple product or service.", 0, java.lang.Integer.MAX_VALUE, subDetail));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1321472818: /*detailSequence*/ return new Property("detailSequence", "positiveInt", "A number to uniquely reference the claim detail entry.", 0, 1, detailSequence);
case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber);
case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber);
case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome);
case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication);
case -828829007: /*subDetail*/ return new Property("subDetail", "", "A sub-detail adjudication of a simple product or service.", 0, java.lang.Integer.MAX_VALUE, subDetail);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1321472818: /*detailSequence*/ return this.detailSequence == null ? new Base[0] : new Base[] {this.detailSequence}; // PositiveIntType
case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier
case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType
case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ReviewOutcomeComponent
case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent
case -828829007: /*subDetail*/ return this.subDetail == null ? new Base[0] : this.subDetail.toArray(new Base[this.subDetail.size()]); // SubDetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1321472818: // detailSequence
this.detailSequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case -1110033957: // noteNumber
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -51825446: // reviewOutcome
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
return value;
case -231349275: // adjudication
this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent
return value;
case -828829007: // subDetail
this.getSubDetail().add((SubDetailComponent) value); // SubDetailComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("detailSequence")) {
this.detailSequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("traceNumber")) {
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value));
} else if (name.equals("noteNumber")) {
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().add((AdjudicationComponent) value);
} else if (name.equals("subDetail")) {
this.getSubDetail().add((SubDetailComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("detailSequence")) {
this.detailSequence = null;
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("noteNumber")) {
this.getNoteNumber().remove(value);
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().remove((AdjudicationComponent) value);
} else if (name.equals("subDetail")) {
this.getSubDetail().remove((SubDetailComponent) value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1321472818: return getDetailSequenceElement();
case 82505966: return addTraceNumber();
case -1110033957: return addNoteNumberElement();
case -51825446: return getReviewOutcome();
case -231349275: return addAdjudication();
case -828829007: return addSubDetail();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1321472818: /*detailSequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"};
case -51825446: /*reviewOutcome*/ return new String[] {"@ClaimResponse.item.reviewOutcome"};
case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"};
case -828829007: /*subDetail*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("detailSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.detail.detailSequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("noteNumber")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.detail.noteNumber");
}
else if (name.equals("reviewOutcome")) {
this.reviewOutcome = new ReviewOutcomeComponent();
return this.reviewOutcome;
}
else if (name.equals("adjudication")) {
return addAdjudication();
}
else if (name.equals("subDetail")) {
return addSubDetail();
}
else
return super.addChild(name);
}
public ItemDetailComponent copy() {
ItemDetailComponent dst = new ItemDetailComponent();
copyValues(dst);
return dst;
}
public void copyValues(ItemDetailComponent dst) {
super.copyValues(dst);
dst.detailSequence = detailSequence == null ? null : detailSequence.copy();
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
if (noteNumber != null) {
dst.noteNumber = new ArrayList();
for (PositiveIntType i : noteNumber)
dst.noteNumber.add(i.copy());
};
dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy();
if (adjudication != null) {
dst.adjudication = new ArrayList();
for (AdjudicationComponent i : adjudication)
dst.adjudication.add(i.copy());
};
if (subDetail != null) {
dst.subDetail = new ArrayList();
for (SubDetailComponent i : subDetail)
dst.subDetail.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof ItemDetailComponent))
return false;
ItemDetailComponent o = (ItemDetailComponent) other_;
return compareDeep(detailSequence, o.detailSequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true)
&& compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof ItemDetailComponent))
return false;
ItemDetailComponent o = (ItemDetailComponent) other_;
return compareValues(detailSequence, o.detailSequence, true) && compareValues(noteNumber, o.noteNumber, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(detailSequence, traceNumber
, noteNumber, reviewOutcome, adjudication, subDetail);
}
public String fhirType() {
return "ClaimResponse.item.detail";
}
}
@Block()
public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely reference the claim sub-detail entry.
*/
@Child(name = "subDetailSequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Claim sub-detail instance identifier", formalDefinition="A number to uniquely reference the claim sub-detail entry." )
protected PositiveIntType subDetailSequence;
/**
* Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.
*/
@Child(name = "traceNumber", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." )
protected List traceNumber;
/**
* The numbers associated with notes below which apply to the adjudication of this item.
*/
@Child(name = "noteNumber", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." )
protected List noteNumber;
/**
* The high-level results of the adjudication if adjudication has been performed.
*/
@Child(name = "reviewOutcome", type = {ReviewOutcomeComponent.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Subdetail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." )
protected ReviewOutcomeComponent reviewOutcome;
/**
* The adjudication results.
*/
@Child(name = "adjudication", type = {AdjudicationComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Subdetail level adjudication details", formalDefinition="The adjudication results." )
protected List adjudication;
private static final long serialVersionUID = 1370798714L;
/**
* Constructor
*/
public SubDetailComponent() {
super();
}
/**
* Constructor
*/
public SubDetailComponent(int subDetailSequence) {
super();
this.setSubDetailSequence(subDetailSequence);
}
/**
* @return {@link #subDetailSequence} (A number to uniquely reference the claim sub-detail entry.). This is the underlying object with id, value and extensions. The accessor "getSubDetailSequence" gives direct access to the value
*/
public PositiveIntType getSubDetailSequenceElement() {
if (this.subDetailSequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SubDetailComponent.subDetailSequence");
else if (Configuration.doAutoCreate())
this.subDetailSequence = new PositiveIntType(); // bb
return this.subDetailSequence;
}
public boolean hasSubDetailSequenceElement() {
return this.subDetailSequence != null && !this.subDetailSequence.isEmpty();
}
public boolean hasSubDetailSequence() {
return this.subDetailSequence != null && !this.subDetailSequence.isEmpty();
}
/**
* @param value {@link #subDetailSequence} (A number to uniquely reference the claim sub-detail entry.). This is the underlying object with id, value and extensions. The accessor "getSubDetailSequence" gives direct access to the value
*/
public SubDetailComponent setSubDetailSequenceElement(PositiveIntType value) {
this.subDetailSequence = value;
return this;
}
/**
* @return A number to uniquely reference the claim sub-detail entry.
*/
public int getSubDetailSequence() {
return this.subDetailSequence == null || this.subDetailSequence.isEmpty() ? 0 : this.subDetailSequence.getValue();
}
/**
* @param value A number to uniquely reference the claim sub-detail entry.
*/
public SubDetailComponent setSubDetailSequence(int value) {
if (this.subDetailSequence == null)
this.subDetailSequence = new PositiveIntType();
this.subDetailSequence.setValue(value);
return this;
}
/**
* @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.)
*/
public List getTraceNumber() {
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
return this.traceNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public SubDetailComponent setTraceNumber(List theTraceNumber) {
this.traceNumber = theTraceNumber;
return this;
}
public boolean hasTraceNumber() {
if (this.traceNumber == null)
return false;
for (Identifier item : this.traceNumber)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addTraceNumber() { //3
Identifier t = new Identifier();
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return t;
}
public SubDetailComponent addTraceNumber(Identifier t) { //3
if (t == null)
return this;
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3}
*/
public Identifier getTraceNumberFirstRep() {
if (getTraceNumber().isEmpty()) {
addTraceNumber();
}
return getTraceNumber().get(0);
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public List getNoteNumber() {
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
return this.noteNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public SubDetailComponent setNoteNumber(List theNoteNumber) {
this.noteNumber = theNoteNumber;
return this;
}
public boolean hasNoteNumber() {
if (this.noteNumber == null)
return false;
for (PositiveIntType item : this.noteNumber)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public PositiveIntType addNoteNumberElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return t;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public SubDetailComponent addNoteNumber(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return this;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public boolean hasNoteNumber(int value) {
if (this.noteNumber == null)
return false;
for (PositiveIntType v : this.noteNumber)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ReviewOutcomeComponent getReviewOutcome() {
if (this.reviewOutcome == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SubDetailComponent.reviewOutcome");
else if (Configuration.doAutoCreate())
this.reviewOutcome = new ReviewOutcomeComponent(); // cc
return this.reviewOutcome;
}
public boolean hasReviewOutcome() {
return this.reviewOutcome != null && !this.reviewOutcome.isEmpty();
}
/**
* @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public SubDetailComponent setReviewOutcome(ReviewOutcomeComponent value) {
this.reviewOutcome = value;
return this;
}
/**
* @return {@link #adjudication} (The adjudication results.)
*/
public List getAdjudication() {
if (this.adjudication == null)
this.adjudication = new ArrayList();
return this.adjudication;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public SubDetailComponent setAdjudication(List theAdjudication) {
this.adjudication = theAdjudication;
return this;
}
public boolean hasAdjudication() {
if (this.adjudication == null)
return false;
for (AdjudicationComponent item : this.adjudication)
if (!item.isEmpty())
return true;
return false;
}
public AdjudicationComponent addAdjudication() { //3
AdjudicationComponent t = new AdjudicationComponent();
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return t;
}
public SubDetailComponent addAdjudication(AdjudicationComponent t) { //3
if (t == null)
return this;
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3}
*/
public AdjudicationComponent getAdjudicationFirstRep() {
if (getAdjudication().isEmpty()) {
addAdjudication();
}
return getAdjudication().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("subDetailSequence", "positiveInt", "A number to uniquely reference the claim sub-detail entry.", 0, 1, subDetailSequence));
children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber));
children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber));
children.add(new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome));
children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -855462510: /*subDetailSequence*/ return new Property("subDetailSequence", "positiveInt", "A number to uniquely reference the claim sub-detail entry.", 0, 1, subDetailSequence);
case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber);
case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber);
case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome);
case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -855462510: /*subDetailSequence*/ return this.subDetailSequence == null ? new Base[0] : new Base[] {this.subDetailSequence}; // PositiveIntType
case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier
case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType
case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ReviewOutcomeComponent
case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -855462510: // subDetailSequence
this.subDetailSequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case -1110033957: // noteNumber
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -51825446: // reviewOutcome
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
return value;
case -231349275: // adjudication
this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("subDetailSequence")) {
this.subDetailSequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("traceNumber")) {
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value));
} else if (name.equals("noteNumber")) {
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().add((AdjudicationComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("subDetailSequence")) {
this.subDetailSequence = null;
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("noteNumber")) {
this.getNoteNumber().remove(value);
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().remove((AdjudicationComponent) value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -855462510: return getSubDetailSequenceElement();
case 82505966: return addTraceNumber();
case -1110033957: return addNoteNumberElement();
case -51825446: return getReviewOutcome();
case -231349275: return addAdjudication();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -855462510: /*subDetailSequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"};
case -51825446: /*reviewOutcome*/ return new String[] {"@ClaimResponse.item.reviewOutcome"};
case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("subDetailSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.detail.subDetail.subDetailSequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("noteNumber")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.item.detail.subDetail.noteNumber");
}
else if (name.equals("reviewOutcome")) {
this.reviewOutcome = new ReviewOutcomeComponent();
return this.reviewOutcome;
}
else if (name.equals("adjudication")) {
return addAdjudication();
}
else
return super.addChild(name);
}
public SubDetailComponent copy() {
SubDetailComponent dst = new SubDetailComponent();
copyValues(dst);
return dst;
}
public void copyValues(SubDetailComponent dst) {
super.copyValues(dst);
dst.subDetailSequence = subDetailSequence == null ? null : subDetailSequence.copy();
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
if (noteNumber != null) {
dst.noteNumber = new ArrayList();
for (PositiveIntType i : noteNumber)
dst.noteNumber.add(i.copy());
};
dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy();
if (adjudication != null) {
dst.adjudication = new ArrayList();
for (AdjudicationComponent i : adjudication)
dst.adjudication.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof SubDetailComponent))
return false;
SubDetailComponent o = (SubDetailComponent) other_;
return compareDeep(subDetailSequence, o.subDetailSequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true)
&& compareDeep(adjudication, o.adjudication, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof SubDetailComponent))
return false;
SubDetailComponent o = (SubDetailComponent) other_;
return compareValues(subDetailSequence, o.subDetailSequence, true) && compareValues(noteNumber, o.noteNumber, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(subDetailSequence, traceNumber
, noteNumber, reviewOutcome, adjudication);
}
public String fhirType() {
return "ClaimResponse.item.detail.subDetail";
}
}
@Block()
public static class AddedItemComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Claim items which this service line is intended to replace.
*/
@Child(name = "itemSequence", type = {PositiveIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Item sequence number", formalDefinition="Claim items which this service line is intended to replace." )
protected List itemSequence;
/**
* The sequence number of the details within the claim item which this line is intended to replace.
*/
@Child(name = "detailSequence", type = {PositiveIntType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Detail sequence number", formalDefinition="The sequence number of the details within the claim item which this line is intended to replace." )
protected List detailSequence;
/**
* The sequence number of the sub-details within the details within the claim item which this line is intended to replace.
*/
@Child(name = "subdetailSequence", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Subdetail sequence number", formalDefinition="The sequence number of the sub-details within the details within the claim item which this line is intended to replace." )
protected List subdetailSequence;
/**
* Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.
*/
@Child(name = "traceNumber", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." )
protected List traceNumber;
/**
* The providers who are authorized for the services rendered to the patient.
*/
@Child(name = "provider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Authorized providers", formalDefinition="The providers who are authorized for the services rendered to the patient." )
protected List provider;
/**
* The type of revenue or cost center providing the product and/or service.
*/
@Child(name = "revenue", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center")
protected CodeableConcept revenue;
/**
* When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.
*/
@Child(name = "productOrService", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
protected CodeableConcept productOrService;
/**
* This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.
*/
@Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
protected CodeableConcept productOrServiceEnd;
/**
* Request or Referral for Goods or Service to be rendered.
*/
@Child(name = "request", type = {DeviceRequest.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class, SupplyRequest.class, VisionPrescription.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Request or Referral for Service", formalDefinition="Request or Referral for Goods or Service to be rendered." )
protected List request;
/**
* Item typification or modifiers codes to convey additional context for the product or service.
*/
@Child(name = "modifier", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers")
protected List modifier;
/**
* Identifies the program under which this may be recovered.
*/
@Child(name = "programCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Program the product or service is provided under", formalDefinition="Identifies the program under which this may be recovered." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-program-code")
protected List programCode;
/**
* The date or dates when the service or product was supplied, performed or completed.
*/
@Child(name = "serviced", type = {DateType.class, Period.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Date or dates of service or product delivery", formalDefinition="The date or dates when the service or product was supplied, performed or completed." )
protected DataType serviced;
/**
* Where the product or service was provided.
*/
@Child(name = "location", type = {CodeableConcept.class, Address.class, Location.class}, order=13, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Place of service or where product was supplied", formalDefinition="Where the product or service was provided." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-place")
protected DataType location;
/**
* The number of repetitions of a service or product.
*/
@Child(name = "quantity", type = {Quantity.class}, order=14, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." )
protected Quantity quantity;
/**
* If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.
*/
@Child(name = "unitPrice", type = {Money.class}, order=15, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." )
protected Money unitPrice;
/**
* A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
@Child(name = "factor", type = {DecimalType.class}, order=16, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." )
protected DecimalType factor;
/**
* The total of taxes applicable for this product or service.
*/
@Child(name = "tax", type = {Money.class}, order=17, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." )
protected Money tax;
/**
* The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.
*/
@Child(name = "net", type = {Money.class}, order=18, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor." )
protected Money net;
/**
* Physical location where the service is performed or applies.
*/
@Child(name = "bodySite", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Anatomical location", formalDefinition="Physical location where the service is performed or applies." )
protected List bodySite;
/**
* The numbers associated with notes below which apply to the adjudication of this item.
*/
@Child(name = "noteNumber", type = {PositiveIntType.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." )
protected List noteNumber;
/**
* The high-level results of the adjudication if adjudication has been performed.
*/
@Child(name = "reviewOutcome", type = {ReviewOutcomeComponent.class}, order=21, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Added items adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." )
protected ReviewOutcomeComponent reviewOutcome;
/**
* The adjudication results.
*/
@Child(name = "adjudication", type = {AdjudicationComponent.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Added items adjudication", formalDefinition="The adjudication results." )
protected List adjudication;
/**
* The second-tier service adjudications for payor added services.
*/
@Child(name = "detail", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Insurer added line details", formalDefinition="The second-tier service adjudications for payor added services." )
protected List detail;
private static final long serialVersionUID = 520179532L;
/**
* Constructor
*/
public AddedItemComponent() {
super();
}
/**
* @return {@link #itemSequence} (Claim items which this service line is intended to replace.)
*/
public List getItemSequence() {
if (this.itemSequence == null)
this.itemSequence = new ArrayList();
return this.itemSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setItemSequence(List theItemSequence) {
this.itemSequence = theItemSequence;
return this;
}
public boolean hasItemSequence() {
if (this.itemSequence == null)
return false;
for (PositiveIntType item : this.itemSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #itemSequence} (Claim items which this service line is intended to replace.)
*/
public PositiveIntType addItemSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.itemSequence == null)
this.itemSequence = new ArrayList();
this.itemSequence.add(t);
return t;
}
/**
* @param value {@link #itemSequence} (Claim items which this service line is intended to replace.)
*/
public AddedItemComponent addItemSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.itemSequence == null)
this.itemSequence = new ArrayList();
this.itemSequence.add(t);
return this;
}
/**
* @param value {@link #itemSequence} (Claim items which this service line is intended to replace.)
*/
public boolean hasItemSequence(int value) {
if (this.itemSequence == null)
return false;
for (PositiveIntType v : this.itemSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.)
*/
public List getDetailSequence() {
if (this.detailSequence == null)
this.detailSequence = new ArrayList();
return this.detailSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setDetailSequence(List theDetailSequence) {
this.detailSequence = theDetailSequence;
return this;
}
public boolean hasDetailSequence() {
if (this.detailSequence == null)
return false;
for (PositiveIntType item : this.detailSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.)
*/
public PositiveIntType addDetailSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.detailSequence == null)
this.detailSequence = new ArrayList();
this.detailSequence.add(t);
return t;
}
/**
* @param value {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.)
*/
public AddedItemComponent addDetailSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.detailSequence == null)
this.detailSequence = new ArrayList();
this.detailSequence.add(t);
return this;
}
/**
* @param value {@link #detailSequence} (The sequence number of the details within the claim item which this line is intended to replace.)
*/
public boolean hasDetailSequence(int value) {
if (this.detailSequence == null)
return false;
for (PositiveIntType v : this.detailSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #subdetailSequence} (The sequence number of the sub-details within the details within the claim item which this line is intended to replace.)
*/
public List getSubdetailSequence() {
if (this.subdetailSequence == null)
this.subdetailSequence = new ArrayList();
return this.subdetailSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setSubdetailSequence(List theSubdetailSequence) {
this.subdetailSequence = theSubdetailSequence;
return this;
}
public boolean hasSubdetailSequence() {
if (this.subdetailSequence == null)
return false;
for (PositiveIntType item : this.subdetailSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #subdetailSequence} (The sequence number of the sub-details within the details within the claim item which this line is intended to replace.)
*/
public PositiveIntType addSubdetailSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.subdetailSequence == null)
this.subdetailSequence = new ArrayList();
this.subdetailSequence.add(t);
return t;
}
/**
* @param value {@link #subdetailSequence} (The sequence number of the sub-details within the details within the claim item which this line is intended to replace.)
*/
public AddedItemComponent addSubdetailSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.subdetailSequence == null)
this.subdetailSequence = new ArrayList();
this.subdetailSequence.add(t);
return this;
}
/**
* @param value {@link #subdetailSequence} (The sequence number of the sub-details within the details within the claim item which this line is intended to replace.)
*/
public boolean hasSubdetailSequence(int value) {
if (this.subdetailSequence == null)
return false;
for (PositiveIntType v : this.subdetailSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.)
*/
public List getTraceNumber() {
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
return this.traceNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setTraceNumber(List theTraceNumber) {
this.traceNumber = theTraceNumber;
return this;
}
public boolean hasTraceNumber() {
if (this.traceNumber == null)
return false;
for (Identifier item : this.traceNumber)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addTraceNumber() { //3
Identifier t = new Identifier();
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return t;
}
public AddedItemComponent addTraceNumber(Identifier t) { //3
if (t == null)
return this;
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3}
*/
public Identifier getTraceNumberFirstRep() {
if (getTraceNumber().isEmpty()) {
addTraceNumber();
}
return getTraceNumber().get(0);
}
/**
* @return {@link #provider} (The providers who are authorized for the services rendered to the patient.)
*/
public List getProvider() {
if (this.provider == null)
this.provider = new ArrayList();
return this.provider;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setProvider(List theProvider) {
this.provider = theProvider;
return this;
}
public boolean hasProvider() {
if (this.provider == null)
return false;
for (Reference item : this.provider)
if (!item.isEmpty())
return true;
return false;
}
public Reference addProvider() { //3
Reference t = new Reference();
if (this.provider == null)
this.provider = new ArrayList();
this.provider.add(t);
return t;
}
public AddedItemComponent addProvider(Reference t) { //3
if (t == null)
return this;
if (this.provider == null)
this.provider = new ArrayList();
this.provider.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #provider}, creating it if it does not already exist {3}
*/
public Reference getProviderFirstRep() {
if (getProvider().isEmpty()) {
addProvider();
}
return getProvider().get(0);
}
/**
* @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.)
*/
public CodeableConcept getRevenue() {
if (this.revenue == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.revenue");
else if (Configuration.doAutoCreate())
this.revenue = new CodeableConcept(); // cc
return this.revenue;
}
public boolean hasRevenue() {
return this.revenue != null && !this.revenue.isEmpty();
}
/**
* @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.)
*/
public AddedItemComponent setRevenue(CodeableConcept value) {
this.revenue = value;
return this;
}
/**
* @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.)
*/
public CodeableConcept getProductOrService() {
if (this.productOrService == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.productOrService");
else if (Configuration.doAutoCreate())
this.productOrService = new CodeableConcept(); // cc
return this.productOrService;
}
public boolean hasProductOrService() {
return this.productOrService != null && !this.productOrService.isEmpty();
}
/**
* @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.)
*/
public AddedItemComponent setProductOrService(CodeableConcept value) {
this.productOrService = value;
return this;
}
/**
* @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.)
*/
public CodeableConcept getProductOrServiceEnd() {
if (this.productOrServiceEnd == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.productOrServiceEnd");
else if (Configuration.doAutoCreate())
this.productOrServiceEnd = new CodeableConcept(); // cc
return this.productOrServiceEnd;
}
public boolean hasProductOrServiceEnd() {
return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty();
}
/**
* @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.)
*/
public AddedItemComponent setProductOrServiceEnd(CodeableConcept value) {
this.productOrServiceEnd = value;
return this;
}
/**
* @return {@link #request} (Request or Referral for Goods or Service to be rendered.)
*/
public List getRequest() {
if (this.request == null)
this.request = new ArrayList();
return this.request;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setRequest(List theRequest) {
this.request = theRequest;
return this;
}
public boolean hasRequest() {
if (this.request == null)
return false;
for (Reference item : this.request)
if (!item.isEmpty())
return true;
return false;
}
public Reference addRequest() { //3
Reference t = new Reference();
if (this.request == null)
this.request = new ArrayList();
this.request.add(t);
return t;
}
public AddedItemComponent addRequest(Reference t) { //3
if (t == null)
return this;
if (this.request == null)
this.request = new ArrayList();
this.request.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #request}, creating it if it does not already exist {3}
*/
public Reference getRequestFirstRep() {
if (getRequest().isEmpty()) {
addRequest();
}
return getRequest().get(0);
}
/**
* @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.)
*/
public List getModifier() {
if (this.modifier == null)
this.modifier = new ArrayList();
return this.modifier;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setModifier(List theModifier) {
this.modifier = theModifier;
return this;
}
public boolean hasModifier() {
if (this.modifier == null)
return false;
for (CodeableConcept item : this.modifier)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addModifier() { //3
CodeableConcept t = new CodeableConcept();
if (this.modifier == null)
this.modifier = new ArrayList();
this.modifier.add(t);
return t;
}
public AddedItemComponent addModifier(CodeableConcept t) { //3
if (t == null)
return this;
if (this.modifier == null)
this.modifier = new ArrayList();
this.modifier.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3}
*/
public CodeableConcept getModifierFirstRep() {
if (getModifier().isEmpty()) {
addModifier();
}
return getModifier().get(0);
}
/**
* @return {@link #programCode} (Identifies the program under which this may be recovered.)
*/
public List getProgramCode() {
if (this.programCode == null)
this.programCode = new ArrayList();
return this.programCode;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setProgramCode(List theProgramCode) {
this.programCode = theProgramCode;
return this;
}
public boolean hasProgramCode() {
if (this.programCode == null)
return false;
for (CodeableConcept item : this.programCode)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addProgramCode() { //3
CodeableConcept t = new CodeableConcept();
if (this.programCode == null)
this.programCode = new ArrayList();
this.programCode.add(t);
return t;
}
public AddedItemComponent addProgramCode(CodeableConcept t) { //3
if (t == null)
return this;
if (this.programCode == null)
this.programCode = new ArrayList();
this.programCode.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #programCode}, creating it if it does not already exist {3}
*/
public CodeableConcept getProgramCodeFirstRep() {
if (getProgramCode().isEmpty()) {
addProgramCode();
}
return getProgramCode().get(0);
}
/**
* @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.)
*/
public DataType getServiced() {
return this.serviced;
}
/**
* @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.)
*/
public DateType getServicedDateType() throws FHIRException {
if (this.serviced == null)
this.serviced = new DateType();
if (!(this.serviced instanceof DateType))
throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered");
return (DateType) this.serviced;
}
public boolean hasServicedDateType() {
return this != null && this.serviced instanceof DateType;
}
/**
* @return {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.)
*/
public Period getServicedPeriod() throws FHIRException {
if (this.serviced == null)
this.serviced = new Period();
if (!(this.serviced instanceof Period))
throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered");
return (Period) this.serviced;
}
public boolean hasServicedPeriod() {
return this != null && this.serviced instanceof Period;
}
public boolean hasServiced() {
return this.serviced != null && !this.serviced.isEmpty();
}
/**
* @param value {@link #serviced} (The date or dates when the service or product was supplied, performed or completed.)
*/
public AddedItemComponent setServiced(DataType value) {
if (value != null && !(value instanceof DateType || value instanceof Period))
throw new FHIRException("Not the right type for ClaimResponse.addItem.serviced[x]: "+value.fhirType());
this.serviced = value;
return this;
}
/**
* @return {@link #location} (Where the product or service was provided.)
*/
public DataType getLocation() {
return this.location;
}
/**
* @return {@link #location} (Where the product or service was provided.)
*/
public CodeableConcept getLocationCodeableConcept() throws FHIRException {
if (this.location == null)
this.location = new CodeableConcept();
if (!(this.location instanceof CodeableConcept))
throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.location.getClass().getName()+" was encountered");
return (CodeableConcept) this.location;
}
public boolean hasLocationCodeableConcept() {
return this != null && this.location instanceof CodeableConcept;
}
/**
* @return {@link #location} (Where the product or service was provided.)
*/
public Address getLocationAddress() throws FHIRException {
if (this.location == null)
this.location = new Address();
if (!(this.location instanceof Address))
throw new FHIRException("Type mismatch: the type Address was expected, but "+this.location.getClass().getName()+" was encountered");
return (Address) this.location;
}
public boolean hasLocationAddress() {
return this != null && this.location instanceof Address;
}
/**
* @return {@link #location} (Where the product or service was provided.)
*/
public Reference getLocationReference() throws FHIRException {
if (this.location == null)
this.location = new Reference();
if (!(this.location instanceof Reference))
throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.location.getClass().getName()+" was encountered");
return (Reference) this.location;
}
public boolean hasLocationReference() {
return this != null && this.location instanceof Reference;
}
public boolean hasLocation() {
return this.location != null && !this.location.isEmpty();
}
/**
* @param value {@link #location} (Where the product or service was provided.)
*/
public AddedItemComponent setLocation(DataType value) {
if (value != null && !(value instanceof CodeableConcept || value instanceof Address || value instanceof Reference))
throw new FHIRException("Not the right type for ClaimResponse.addItem.location[x]: "+value.fhirType());
this.location = value;
return this;
}
/**
* @return {@link #quantity} (The number of repetitions of a service or product.)
*/
public Quantity getQuantity() {
if (this.quantity == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.quantity");
else if (Configuration.doAutoCreate())
this.quantity = new Quantity(); // cc
return this.quantity;
}
public boolean hasQuantity() {
return this.quantity != null && !this.quantity.isEmpty();
}
/**
* @param value {@link #quantity} (The number of repetitions of a service or product.)
*/
public AddedItemComponent setQuantity(Quantity value) {
this.quantity = value;
return this;
}
/**
* @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.)
*/
public Money getUnitPrice() {
if (this.unitPrice == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.unitPrice");
else if (Configuration.doAutoCreate())
this.unitPrice = new Money(); // cc
return this.unitPrice;
}
public boolean hasUnitPrice() {
return this.unitPrice != null && !this.unitPrice.isEmpty();
}
/**
* @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.)
*/
public AddedItemComponent setUnitPrice(Money value) {
this.unitPrice = value;
return this;
}
/**
* @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
*/
public DecimalType getFactorElement() {
if (this.factor == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.factor");
else if (Configuration.doAutoCreate())
this.factor = new DecimalType(); // bb
return this.factor;
}
public boolean hasFactorElement() {
return this.factor != null && !this.factor.isEmpty();
}
public boolean hasFactor() {
return this.factor != null && !this.factor.isEmpty();
}
/**
* @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
*/
public AddedItemComponent setFactorElement(DecimalType value) {
this.factor = value;
return this;
}
/**
* @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public BigDecimal getFactor() {
return this.factor == null ? null : this.factor.getValue();
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemComponent setFactor(BigDecimal value) {
if (value == null)
this.factor = null;
else {
if (this.factor == null)
this.factor = new DecimalType();
this.factor.setValue(value);
}
return this;
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemComponent setFactor(long value) {
this.factor = new DecimalType();
this.factor.setValue(value);
return this;
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemComponent setFactor(double value) {
this.factor = new DecimalType();
this.factor.setValue(value);
return this;
}
/**
* @return {@link #tax} (The total of taxes applicable for this product or service.)
*/
public Money getTax() {
if (this.tax == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.tax");
else if (Configuration.doAutoCreate())
this.tax = new Money(); // cc
return this.tax;
}
public boolean hasTax() {
return this.tax != null && !this.tax.isEmpty();
}
/**
* @param value {@link #tax} (The total of taxes applicable for this product or service.)
*/
public AddedItemComponent setTax(Money value) {
this.tax = value;
return this;
}
/**
* @return {@link #net} (The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.)
*/
public Money getNet() {
if (this.net == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.net");
else if (Configuration.doAutoCreate())
this.net = new Money(); // cc
return this.net;
}
public boolean hasNet() {
return this.net != null && !this.net.isEmpty();
}
/**
* @param value {@link #net} (The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.)
*/
public AddedItemComponent setNet(Money value) {
this.net = value;
return this;
}
/**
* @return {@link #bodySite} (Physical location where the service is performed or applies.)
*/
public List getBodySite() {
if (this.bodySite == null)
this.bodySite = new ArrayList();
return this.bodySite;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setBodySite(List theBodySite) {
this.bodySite = theBodySite;
return this;
}
public boolean hasBodySite() {
if (this.bodySite == null)
return false;
for (BodySiteComponent item : this.bodySite)
if (!item.isEmpty())
return true;
return false;
}
public BodySiteComponent addBodySite() { //3
BodySiteComponent t = new BodySiteComponent();
if (this.bodySite == null)
this.bodySite = new ArrayList();
this.bodySite.add(t);
return t;
}
public AddedItemComponent addBodySite(BodySiteComponent t) { //3
if (t == null)
return this;
if (this.bodySite == null)
this.bodySite = new ArrayList();
this.bodySite.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist {3}
*/
public BodySiteComponent getBodySiteFirstRep() {
if (getBodySite().isEmpty()) {
addBodySite();
}
return getBodySite().get(0);
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public List getNoteNumber() {
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
return this.noteNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setNoteNumber(List theNoteNumber) {
this.noteNumber = theNoteNumber;
return this;
}
public boolean hasNoteNumber() {
if (this.noteNumber == null)
return false;
for (PositiveIntType item : this.noteNumber)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public PositiveIntType addNoteNumberElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return t;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public AddedItemComponent addNoteNumber(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return this;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public boolean hasNoteNumber(int value) {
if (this.noteNumber == null)
return false;
for (PositiveIntType v : this.noteNumber)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ReviewOutcomeComponent getReviewOutcome() {
if (this.reviewOutcome == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemComponent.reviewOutcome");
else if (Configuration.doAutoCreate())
this.reviewOutcome = new ReviewOutcomeComponent(); // cc
return this.reviewOutcome;
}
public boolean hasReviewOutcome() {
return this.reviewOutcome != null && !this.reviewOutcome.isEmpty();
}
/**
* @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public AddedItemComponent setReviewOutcome(ReviewOutcomeComponent value) {
this.reviewOutcome = value;
return this;
}
/**
* @return {@link #adjudication} (The adjudication results.)
*/
public List getAdjudication() {
if (this.adjudication == null)
this.adjudication = new ArrayList();
return this.adjudication;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setAdjudication(List theAdjudication) {
this.adjudication = theAdjudication;
return this;
}
public boolean hasAdjudication() {
if (this.adjudication == null)
return false;
for (AdjudicationComponent item : this.adjudication)
if (!item.isEmpty())
return true;
return false;
}
public AdjudicationComponent addAdjudication() { //3
AdjudicationComponent t = new AdjudicationComponent();
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return t;
}
public AddedItemComponent addAdjudication(AdjudicationComponent t) { //3
if (t == null)
return this;
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3}
*/
public AdjudicationComponent getAdjudicationFirstRep() {
if (getAdjudication().isEmpty()) {
addAdjudication();
}
return getAdjudication().get(0);
}
/**
* @return {@link #detail} (The second-tier service adjudications for payor added services.)
*/
public List getDetail() {
if (this.detail == null)
this.detail = new ArrayList();
return this.detail;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemComponent setDetail(List theDetail) {
this.detail = theDetail;
return this;
}
public boolean hasDetail() {
if (this.detail == null)
return false;
for (AddedItemDetailComponent item : this.detail)
if (!item.isEmpty())
return true;
return false;
}
public AddedItemDetailComponent addDetail() { //3
AddedItemDetailComponent t = new AddedItemDetailComponent();
if (this.detail == null)
this.detail = new ArrayList();
this.detail.add(t);
return t;
}
public AddedItemComponent addDetail(AddedItemDetailComponent t) { //3
if (t == null)
return this;
if (this.detail == null)
this.detail = new ArrayList();
this.detail.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3}
*/
public AddedItemDetailComponent getDetailFirstRep() {
if (getDetail().isEmpty()) {
addDetail();
}
return getDetail().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("itemSequence", "positiveInt", "Claim items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, itemSequence));
children.add(new Property("detailSequence", "positiveInt", "The sequence number of the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, detailSequence));
children.add(new Property("subdetailSequence", "positiveInt", "The sequence number of the sub-details within the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, subdetailSequence));
children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber));
children.add(new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The providers who are authorized for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider));
children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue));
children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService));
children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd));
children.add(new Property("request", "Reference(DeviceRequest|MedicationRequest|NutritionOrder|ServiceRequest|SupplyRequest|VisionPrescription)", "Request or Referral for Goods or Service to be rendered.", 0, java.lang.Integer.MAX_VALUE, request));
children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier));
children.add(new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode));
children.add(new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced));
children.add(new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location));
children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity));
children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice));
children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor));
children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax));
children.add(new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.", 0, 1, net));
children.add(new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite));
children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber));
children.add(new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome));
children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication));
children.add(new Property("detail", "", "The second-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1977979892: /*itemSequence*/ return new Property("itemSequence", "positiveInt", "Claim items which this service line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, itemSequence);
case 1321472818: /*detailSequence*/ return new Property("detailSequence", "positiveInt", "The sequence number of the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, detailSequence);
case 146530674: /*subdetailSequence*/ return new Property("subdetailSequence", "positiveInt", "The sequence number of the sub-details within the details within the claim item which this line is intended to replace.", 0, java.lang.Integer.MAX_VALUE, subdetailSequence);
case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber);
case -987494927: /*provider*/ return new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The providers who are authorized for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider);
case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue);
case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService);
case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd);
case 1095692943: /*request*/ return new Property("request", "Reference(DeviceRequest|MedicationRequest|NutritionOrder|ServiceRequest|SupplyRequest|VisionPrescription)", "Request or Referral for Goods or Service to be rendered.", 0, java.lang.Integer.MAX_VALUE, request);
case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier);
case 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode);
case -1927922223: /*serviced[x]*/ return new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced);
case 1379209295: /*serviced*/ return new Property("serviced[x]", "date|Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced);
case 363246749: /*servicedDate*/ return new Property("serviced[x]", "date", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced);
case 1534966512: /*servicedPeriod*/ return new Property("serviced[x]", "Period", "The date or dates when the service or product was supplied, performed or completed.", 0, 1, serviced);
case 552316075: /*location[x]*/ return new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location);
case 1901043637: /*location*/ return new Property("location[x]", "CodeableConcept|Address|Reference(Location)", "Where the product or service was provided.", 0, 1, location);
case -1224800468: /*locationCodeableConcept*/ return new Property("location[x]", "CodeableConcept", "Where the product or service was provided.", 0, 1, location);
case -1280020865: /*locationAddress*/ return new Property("location[x]", "Address", "Where the product or service was provided.", 0, 1, location);
case 755866390: /*locationReference*/ return new Property("location[x]", "Reference(Location)", "Where the product or service was provided.", 0, 1, location);
case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity);
case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice);
case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor);
case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax);
case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.", 0, 1, net);
case 1702620169: /*bodySite*/ return new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite);
case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber);
case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome);
case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication);
case -1335224239: /*detail*/ return new Property("detail", "", "The second-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, detail);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1977979892: /*itemSequence*/ return this.itemSequence == null ? new Base[0] : this.itemSequence.toArray(new Base[this.itemSequence.size()]); // PositiveIntType
case 1321472818: /*detailSequence*/ return this.detailSequence == null ? new Base[0] : this.detailSequence.toArray(new Base[this.detailSequence.size()]); // PositiveIntType
case 146530674: /*subdetailSequence*/ return this.subdetailSequence == null ? new Base[0] : this.subdetailSequence.toArray(new Base[this.subdetailSequence.size()]); // PositiveIntType
case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier
case -987494927: /*provider*/ return this.provider == null ? new Base[0] : this.provider.toArray(new Base[this.provider.size()]); // Reference
case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept
case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept
case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept
case 1095692943: /*request*/ return this.request == null ? new Base[0] : this.request.toArray(new Base[this.request.size()]); // Reference
case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept
case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept
case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // DataType
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // DataType
case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money
case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType
case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money
case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money
case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // BodySiteComponent
case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType
case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ReviewOutcomeComponent
case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // AddedItemDetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1977979892: // itemSequence
this.getItemSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case 1321472818: // detailSequence
this.getDetailSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case 146530674: // subdetailSequence
this.getSubdetailSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case -987494927: // provider
this.getProvider().add(TypeConvertor.castToReference(value)); // Reference
return value;
case 1099842588: // revenue
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 1957227299: // productOrService
this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -717476168: // productOrServiceEnd
this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 1095692943: // request
this.getRequest().add(TypeConvertor.castToReference(value)); // Reference
return value;
case -615513385: // modifier
this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case 1010065041: // programCode
this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case 1379209295: // serviced
this.serviced = TypeConvertor.castToType(value); // DataType
return value;
case 1901043637: // location
this.location = TypeConvertor.castToType(value); // DataType
return value;
case -1285004149: // quantity
this.quantity = TypeConvertor.castToQuantity(value); // Quantity
return value;
case -486196699: // unitPrice
this.unitPrice = TypeConvertor.castToMoney(value); // Money
return value;
case -1282148017: // factor
this.factor = TypeConvertor.castToDecimal(value); // DecimalType
return value;
case 114603: // tax
this.tax = TypeConvertor.castToMoney(value); // Money
return value;
case 108957: // net
this.net = TypeConvertor.castToMoney(value); // Money
return value;
case 1702620169: // bodySite
this.getBodySite().add((BodySiteComponent) value); // BodySiteComponent
return value;
case -1110033957: // noteNumber
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -51825446: // reviewOutcome
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
return value;
case -231349275: // adjudication
this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent
return value;
case -1335224239: // detail
this.getDetail().add((AddedItemDetailComponent) value); // AddedItemDetailComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("itemSequence")) {
this.getItemSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("detailSequence")) {
this.getDetailSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("subdetailSequence")) {
this.getSubdetailSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("traceNumber")) {
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value));
} else if (name.equals("provider")) {
this.getProvider().add(TypeConvertor.castToReference(value));
} else if (name.equals("revenue")) {
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("productOrService")) {
this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("productOrServiceEnd")) {
this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("request")) {
this.getRequest().add(TypeConvertor.castToReference(value));
} else if (name.equals("modifier")) {
this.getModifier().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("programCode")) {
this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("serviced[x]")) {
this.serviced = TypeConvertor.castToType(value); // DataType
} else if (name.equals("location[x]")) {
this.location = TypeConvertor.castToType(value); // DataType
} else if (name.equals("quantity")) {
this.quantity = TypeConvertor.castToQuantity(value); // Quantity
} else if (name.equals("unitPrice")) {
this.unitPrice = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("factor")) {
this.factor = TypeConvertor.castToDecimal(value); // DecimalType
} else if (name.equals("tax")) {
this.tax = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("net")) {
this.net = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("bodySite")) {
this.getBodySite().add((BodySiteComponent) value);
} else if (name.equals("noteNumber")) {
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().add((AdjudicationComponent) value);
} else if (name.equals("detail")) {
this.getDetail().add((AddedItemDetailComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("itemSequence")) {
this.getItemSequence().remove(value);
} else if (name.equals("detailSequence")) {
this.getDetailSequence().remove(value);
} else if (name.equals("subdetailSequence")) {
this.getSubdetailSequence().remove(value);
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("provider")) {
this.getProvider().remove(value);
} else if (name.equals("revenue")) {
this.revenue = null;
} else if (name.equals("productOrService")) {
this.productOrService = null;
} else if (name.equals("productOrServiceEnd")) {
this.productOrServiceEnd = null;
} else if (name.equals("request")) {
this.getRequest().remove(value);
} else if (name.equals("modifier")) {
this.getModifier().remove(value);
} else if (name.equals("programCode")) {
this.getProgramCode().remove(value);
} else if (name.equals("serviced[x]")) {
this.serviced = null;
} else if (name.equals("location[x]")) {
this.location = null;
} else if (name.equals("quantity")) {
this.quantity = null;
} else if (name.equals("unitPrice")) {
this.unitPrice = null;
} else if (name.equals("factor")) {
this.factor = null;
} else if (name.equals("tax")) {
this.tax = null;
} else if (name.equals("net")) {
this.net = null;
} else if (name.equals("bodySite")) {
this.getBodySite().remove((BodySiteComponent) value);
} else if (name.equals("noteNumber")) {
this.getNoteNumber().remove(value);
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().remove((AdjudicationComponent) value);
} else if (name.equals("detail")) {
this.getDetail().remove((AddedItemDetailComponent) value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1977979892: return addItemSequenceElement();
case 1321472818: return addDetailSequenceElement();
case 146530674: return addSubdetailSequenceElement();
case 82505966: return addTraceNumber();
case -987494927: return addProvider();
case 1099842588: return getRevenue();
case 1957227299: return getProductOrService();
case -717476168: return getProductOrServiceEnd();
case 1095692943: return addRequest();
case -615513385: return addModifier();
case 1010065041: return addProgramCode();
case -1927922223: return getServiced();
case 1379209295: return getServiced();
case 552316075: return getLocation();
case 1901043637: return getLocation();
case -1285004149: return getQuantity();
case -486196699: return getUnitPrice();
case -1282148017: return getFactorElement();
case 114603: return getTax();
case 108957: return getNet();
case 1702620169: return addBodySite();
case -1110033957: return addNoteNumberElement();
case -51825446: return getReviewOutcome();
case -231349275: return addAdjudication();
case -1335224239: return addDetail();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1977979892: /*itemSequence*/ return new String[] {"positiveInt"};
case 1321472818: /*detailSequence*/ return new String[] {"positiveInt"};
case 146530674: /*subdetailSequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case -987494927: /*provider*/ return new String[] {"Reference"};
case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"};
case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"};
case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"};
case 1095692943: /*request*/ return new String[] {"Reference"};
case -615513385: /*modifier*/ return new String[] {"CodeableConcept"};
case 1010065041: /*programCode*/ return new String[] {"CodeableConcept"};
case 1379209295: /*serviced*/ return new String[] {"date", "Period"};
case 1901043637: /*location*/ return new String[] {"CodeableConcept", "Address", "Reference"};
case -1285004149: /*quantity*/ return new String[] {"Quantity"};
case -486196699: /*unitPrice*/ return new String[] {"Money"};
case -1282148017: /*factor*/ return new String[] {"decimal"};
case 114603: /*tax*/ return new String[] {"Money"};
case 108957: /*net*/ return new String[] {"Money"};
case 1702620169: /*bodySite*/ return new String[] {};
case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"};
case -51825446: /*reviewOutcome*/ return new String[] {"@ClaimResponse.item.reviewOutcome"};
case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"};
case -1335224239: /*detail*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("itemSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.itemSequence");
}
else if (name.equals("detailSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.detailSequence");
}
else if (name.equals("subdetailSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.subdetailSequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("provider")) {
return addProvider();
}
else if (name.equals("revenue")) {
this.revenue = new CodeableConcept();
return this.revenue;
}
else if (name.equals("productOrService")) {
this.productOrService = new CodeableConcept();
return this.productOrService;
}
else if (name.equals("productOrServiceEnd")) {
this.productOrServiceEnd = new CodeableConcept();
return this.productOrServiceEnd;
}
else if (name.equals("request")) {
return addRequest();
}
else if (name.equals("modifier")) {
return addModifier();
}
else if (name.equals("programCode")) {
return addProgramCode();
}
else if (name.equals("servicedDate")) {
this.serviced = new DateType();
return this.serviced;
}
else if (name.equals("servicedPeriod")) {
this.serviced = new Period();
return this.serviced;
}
else if (name.equals("locationCodeableConcept")) {
this.location = new CodeableConcept();
return this.location;
}
else if (name.equals("locationAddress")) {
this.location = new Address();
return this.location;
}
else if (name.equals("locationReference")) {
this.location = new Reference();
return this.location;
}
else if (name.equals("quantity")) {
this.quantity = new Quantity();
return this.quantity;
}
else if (name.equals("unitPrice")) {
this.unitPrice = new Money();
return this.unitPrice;
}
else if (name.equals("factor")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.factor");
}
else if (name.equals("tax")) {
this.tax = new Money();
return this.tax;
}
else if (name.equals("net")) {
this.net = new Money();
return this.net;
}
else if (name.equals("bodySite")) {
return addBodySite();
}
else if (name.equals("noteNumber")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.noteNumber");
}
else if (name.equals("reviewOutcome")) {
this.reviewOutcome = new ReviewOutcomeComponent();
return this.reviewOutcome;
}
else if (name.equals("adjudication")) {
return addAdjudication();
}
else if (name.equals("detail")) {
return addDetail();
}
else
return super.addChild(name);
}
public AddedItemComponent copy() {
AddedItemComponent dst = new AddedItemComponent();
copyValues(dst);
return dst;
}
public void copyValues(AddedItemComponent dst) {
super.copyValues(dst);
if (itemSequence != null) {
dst.itemSequence = new ArrayList();
for (PositiveIntType i : itemSequence)
dst.itemSequence.add(i.copy());
};
if (detailSequence != null) {
dst.detailSequence = new ArrayList();
for (PositiveIntType i : detailSequence)
dst.detailSequence.add(i.copy());
};
if (subdetailSequence != null) {
dst.subdetailSequence = new ArrayList();
for (PositiveIntType i : subdetailSequence)
dst.subdetailSequence.add(i.copy());
};
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
if (provider != null) {
dst.provider = new ArrayList();
for (Reference i : provider)
dst.provider.add(i.copy());
};
dst.revenue = revenue == null ? null : revenue.copy();
dst.productOrService = productOrService == null ? null : productOrService.copy();
dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy();
if (request != null) {
dst.request = new ArrayList();
for (Reference i : request)
dst.request.add(i.copy());
};
if (modifier != null) {
dst.modifier = new ArrayList();
for (CodeableConcept i : modifier)
dst.modifier.add(i.copy());
};
if (programCode != null) {
dst.programCode = new ArrayList();
for (CodeableConcept i : programCode)
dst.programCode.add(i.copy());
};
dst.serviced = serviced == null ? null : serviced.copy();
dst.location = location == null ? null : location.copy();
dst.quantity = quantity == null ? null : quantity.copy();
dst.unitPrice = unitPrice == null ? null : unitPrice.copy();
dst.factor = factor == null ? null : factor.copy();
dst.tax = tax == null ? null : tax.copy();
dst.net = net == null ? null : net.copy();
if (bodySite != null) {
dst.bodySite = new ArrayList();
for (BodySiteComponent i : bodySite)
dst.bodySite.add(i.copy());
};
if (noteNumber != null) {
dst.noteNumber = new ArrayList();
for (PositiveIntType i : noteNumber)
dst.noteNumber.add(i.copy());
};
dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy();
if (adjudication != null) {
dst.adjudication = new ArrayList();
for (AdjudicationComponent i : adjudication)
dst.adjudication.add(i.copy());
};
if (detail != null) {
dst.detail = new ArrayList();
for (AddedItemDetailComponent i : detail)
dst.detail.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof AddedItemComponent))
return false;
AddedItemComponent o = (AddedItemComponent) other_;
return compareDeep(itemSequence, o.itemSequence, true) && compareDeep(detailSequence, o.detailSequence, true)
&& compareDeep(subdetailSequence, o.subdetailSequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(provider, o.provider, true) && compareDeep(revenue, o.revenue, true) && compareDeep(productOrService, o.productOrService, true)
&& compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(request, o.request, true)
&& compareDeep(modifier, o.modifier, true) && compareDeep(programCode, o.programCode, true) && compareDeep(serviced, o.serviced, true)
&& compareDeep(location, o.location, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true)
&& compareDeep(factor, o.factor, true) && compareDeep(tax, o.tax, true) && compareDeep(net, o.net, true)
&& compareDeep(bodySite, o.bodySite, true) && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(reviewOutcome, o.reviewOutcome, true)
&& compareDeep(adjudication, o.adjudication, true) && compareDeep(detail, o.detail, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof AddedItemComponent))
return false;
AddedItemComponent o = (AddedItemComponent) other_;
return compareValues(itemSequence, o.itemSequence, true) && compareValues(detailSequence, o.detailSequence, true)
&& compareValues(subdetailSequence, o.subdetailSequence, true) && compareValues(factor, o.factor, true)
&& compareValues(noteNumber, o.noteNumber, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(itemSequence, detailSequence
, subdetailSequence, traceNumber, provider, revenue, productOrService, productOrServiceEnd
, request, modifier, programCode, serviced, location, quantity, unitPrice, factor
, tax, net, bodySite, noteNumber, reviewOutcome, adjudication, detail);
}
public String fhirType() {
return "ClaimResponse.addItem";
}
}
@Block()
public static class BodySiteComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Physical service site on the patient (limb, tooth, etc.).
*/
@Child(name = "site", type = {CodeableReference.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Location", formalDefinition="Physical service site on the patient (limb, tooth, etc.)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/tooth")
protected List site;
/**
* A region or surface of the bodySite, e.g. limb region or tooth surface(s).
*/
@Child(name = "subSite", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Sub-location", formalDefinition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/surface")
protected List subSite;
private static final long serialVersionUID = 1190632415L;
/**
* Constructor
*/
public BodySiteComponent() {
super();
}
/**
* Constructor
*/
public BodySiteComponent(CodeableReference site) {
super();
this.addSite(site);
}
/**
* @return {@link #site} (Physical service site on the patient (limb, tooth, etc.).)
*/
public List getSite() {
if (this.site == null)
this.site = new ArrayList();
return this.site;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public BodySiteComponent setSite(List theSite) {
this.site = theSite;
return this;
}
public boolean hasSite() {
if (this.site == null)
return false;
for (CodeableReference item : this.site)
if (!item.isEmpty())
return true;
return false;
}
public CodeableReference addSite() { //3
CodeableReference t = new CodeableReference();
if (this.site == null)
this.site = new ArrayList();
this.site.add(t);
return t;
}
public BodySiteComponent addSite(CodeableReference t) { //3
if (t == null)
return this;
if (this.site == null)
this.site = new ArrayList();
this.site.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #site}, creating it if it does not already exist {3}
*/
public CodeableReference getSiteFirstRep() {
if (getSite().isEmpty()) {
addSite();
}
return getSite().get(0);
}
/**
* @return {@link #subSite} (A region or surface of the bodySite, e.g. limb region or tooth surface(s).)
*/
public List getSubSite() {
if (this.subSite == null)
this.subSite = new ArrayList();
return this.subSite;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public BodySiteComponent setSubSite(List theSubSite) {
this.subSite = theSubSite;
return this;
}
public boolean hasSubSite() {
if (this.subSite == null)
return false;
for (CodeableConcept item : this.subSite)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addSubSite() { //3
CodeableConcept t = new CodeableConcept();
if (this.subSite == null)
this.subSite = new ArrayList();
this.subSite.add(t);
return t;
}
public BodySiteComponent addSubSite(CodeableConcept t) { //3
if (t == null)
return this;
if (this.subSite == null)
this.subSite = new ArrayList();
this.subSite.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #subSite}, creating it if it does not already exist {3}
*/
public CodeableConcept getSubSiteFirstRep() {
if (getSubSite().isEmpty()) {
addSubSite();
}
return getSubSite().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("site", "CodeableReference(BodyStructure)", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, site));
children.add(new Property("subSite", "CodeableConcept", "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 3530567: /*site*/ return new Property("site", "CodeableReference(BodyStructure)", "Physical service site on the patient (limb, tooth, etc.).", 0, java.lang.Integer.MAX_VALUE, site);
case -1868566105: /*subSite*/ return new Property("subSite", "CodeableConcept", "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3530567: /*site*/ return this.site == null ? new Base[0] : this.site.toArray(new Base[this.site.size()]); // CodeableReference
case -1868566105: /*subSite*/ return this.subSite == null ? new Base[0] : this.subSite.toArray(new Base[this.subSite.size()]); // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3530567: // site
this.getSite().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
return value;
case -1868566105: // subSite
this.getSubSite().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("site")) {
this.getSite().add(TypeConvertor.castToCodeableReference(value));
} else if (name.equals("subSite")) {
this.getSubSite().add(TypeConvertor.castToCodeableConcept(value));
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("site")) {
this.getSite().remove(value);
} else if (name.equals("subSite")) {
this.getSubSite().remove(value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3530567: return addSite();
case -1868566105: return addSubSite();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3530567: /*site*/ return new String[] {"CodeableReference"};
case -1868566105: /*subSite*/ return new String[] {"CodeableConcept"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("site")) {
return addSite();
}
else if (name.equals("subSite")) {
return addSubSite();
}
else
return super.addChild(name);
}
public BodySiteComponent copy() {
BodySiteComponent dst = new BodySiteComponent();
copyValues(dst);
return dst;
}
public void copyValues(BodySiteComponent dst) {
super.copyValues(dst);
if (site != null) {
dst.site = new ArrayList();
for (CodeableReference i : site)
dst.site.add(i.copy());
};
if (subSite != null) {
dst.subSite = new ArrayList();
for (CodeableConcept i : subSite)
dst.subSite.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof BodySiteComponent))
return false;
BodySiteComponent o = (BodySiteComponent) other_;
return compareDeep(site, o.site, true) && compareDeep(subSite, o.subSite, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof BodySiteComponent))
return false;
BodySiteComponent o = (BodySiteComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(site, subSite);
}
public String fhirType() {
return "ClaimResponse.addItem.bodySite";
}
}
@Block()
public static class AddedItemDetailComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.
*/
@Child(name = "traceNumber", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." )
protected List traceNumber;
/**
* The type of revenue or cost center providing the product and/or service.
*/
@Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center")
protected CodeableConcept revenue;
/**
* When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.
*/
@Child(name = "productOrService", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
protected CodeableConcept productOrService;
/**
* This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.
*/
@Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
protected CodeableConcept productOrServiceEnd;
/**
* Item typification or modifiers codes to convey additional context for the product or service.
*/
@Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers")
protected List modifier;
/**
* The number of repetitions of a service or product.
*/
@Child(name = "quantity", type = {Quantity.class}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." )
protected Quantity quantity;
/**
* If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.
*/
@Child(name = "unitPrice", type = {Money.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." )
protected Money unitPrice;
/**
* A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
@Child(name = "factor", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." )
protected DecimalType factor;
/**
* The total of taxes applicable for this product or service.
*/
@Child(name = "tax", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." )
protected Money tax;
/**
* The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.
*/
@Child(name = "net", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor." )
protected Money net;
/**
* The numbers associated with notes below which apply to the adjudication of this item.
*/
@Child(name = "noteNumber", type = {PositiveIntType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." )
protected List noteNumber;
/**
* The high-level results of the adjudication if adjudication has been performed.
*/
@Child(name = "reviewOutcome", type = {ReviewOutcomeComponent.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Added items detail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." )
protected ReviewOutcomeComponent reviewOutcome;
/**
* The adjudication results.
*/
@Child(name = "adjudication", type = {AdjudicationComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Added items detail adjudication", formalDefinition="The adjudication results." )
protected List adjudication;
/**
* The third-tier service adjudications for payor added services.
*/
@Child(name = "subDetail", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Insurer added line items", formalDefinition="The third-tier service adjudications for payor added services." )
protected List subDetail;
private static final long serialVersionUID = 1574685043L;
/**
* Constructor
*/
public AddedItemDetailComponent() {
super();
}
/**
* @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.)
*/
public List getTraceNumber() {
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
return this.traceNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemDetailComponent setTraceNumber(List theTraceNumber) {
this.traceNumber = theTraceNumber;
return this;
}
public boolean hasTraceNumber() {
if (this.traceNumber == null)
return false;
for (Identifier item : this.traceNumber)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addTraceNumber() { //3
Identifier t = new Identifier();
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return t;
}
public AddedItemDetailComponent addTraceNumber(Identifier t) { //3
if (t == null)
return this;
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3}
*/
public Identifier getTraceNumberFirstRep() {
if (getTraceNumber().isEmpty()) {
addTraceNumber();
}
return getTraceNumber().get(0);
}
/**
* @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.)
*/
public CodeableConcept getRevenue() {
if (this.revenue == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.revenue");
else if (Configuration.doAutoCreate())
this.revenue = new CodeableConcept(); // cc
return this.revenue;
}
public boolean hasRevenue() {
return this.revenue != null && !this.revenue.isEmpty();
}
/**
* @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.)
*/
public AddedItemDetailComponent setRevenue(CodeableConcept value) {
this.revenue = value;
return this;
}
/**
* @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.)
*/
public CodeableConcept getProductOrService() {
if (this.productOrService == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.productOrService");
else if (Configuration.doAutoCreate())
this.productOrService = new CodeableConcept(); // cc
return this.productOrService;
}
public boolean hasProductOrService() {
return this.productOrService != null && !this.productOrService.isEmpty();
}
/**
* @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.)
*/
public AddedItemDetailComponent setProductOrService(CodeableConcept value) {
this.productOrService = value;
return this;
}
/**
* @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.)
*/
public CodeableConcept getProductOrServiceEnd() {
if (this.productOrServiceEnd == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.productOrServiceEnd");
else if (Configuration.doAutoCreate())
this.productOrServiceEnd = new CodeableConcept(); // cc
return this.productOrServiceEnd;
}
public boolean hasProductOrServiceEnd() {
return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty();
}
/**
* @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.)
*/
public AddedItemDetailComponent setProductOrServiceEnd(CodeableConcept value) {
this.productOrServiceEnd = value;
return this;
}
/**
* @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.)
*/
public List getModifier() {
if (this.modifier == null)
this.modifier = new ArrayList();
return this.modifier;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemDetailComponent setModifier(List theModifier) {
this.modifier = theModifier;
return this;
}
public boolean hasModifier() {
if (this.modifier == null)
return false;
for (CodeableConcept item : this.modifier)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addModifier() { //3
CodeableConcept t = new CodeableConcept();
if (this.modifier == null)
this.modifier = new ArrayList();
this.modifier.add(t);
return t;
}
public AddedItemDetailComponent addModifier(CodeableConcept t) { //3
if (t == null)
return this;
if (this.modifier == null)
this.modifier = new ArrayList();
this.modifier.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3}
*/
public CodeableConcept getModifierFirstRep() {
if (getModifier().isEmpty()) {
addModifier();
}
return getModifier().get(0);
}
/**
* @return {@link #quantity} (The number of repetitions of a service or product.)
*/
public Quantity getQuantity() {
if (this.quantity == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.quantity");
else if (Configuration.doAutoCreate())
this.quantity = new Quantity(); // cc
return this.quantity;
}
public boolean hasQuantity() {
return this.quantity != null && !this.quantity.isEmpty();
}
/**
* @param value {@link #quantity} (The number of repetitions of a service or product.)
*/
public AddedItemDetailComponent setQuantity(Quantity value) {
this.quantity = value;
return this;
}
/**
* @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.)
*/
public Money getUnitPrice() {
if (this.unitPrice == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.unitPrice");
else if (Configuration.doAutoCreate())
this.unitPrice = new Money(); // cc
return this.unitPrice;
}
public boolean hasUnitPrice() {
return this.unitPrice != null && !this.unitPrice.isEmpty();
}
/**
* @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.)
*/
public AddedItemDetailComponent setUnitPrice(Money value) {
this.unitPrice = value;
return this;
}
/**
* @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
*/
public DecimalType getFactorElement() {
if (this.factor == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.factor");
else if (Configuration.doAutoCreate())
this.factor = new DecimalType(); // bb
return this.factor;
}
public boolean hasFactorElement() {
return this.factor != null && !this.factor.isEmpty();
}
public boolean hasFactor() {
return this.factor != null && !this.factor.isEmpty();
}
/**
* @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
*/
public AddedItemDetailComponent setFactorElement(DecimalType value) {
this.factor = value;
return this;
}
/**
* @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public BigDecimal getFactor() {
return this.factor == null ? null : this.factor.getValue();
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemDetailComponent setFactor(BigDecimal value) {
if (value == null)
this.factor = null;
else {
if (this.factor == null)
this.factor = new DecimalType();
this.factor.setValue(value);
}
return this;
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemDetailComponent setFactor(long value) {
this.factor = new DecimalType();
this.factor.setValue(value);
return this;
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemDetailComponent setFactor(double value) {
this.factor = new DecimalType();
this.factor.setValue(value);
return this;
}
/**
* @return {@link #tax} (The total of taxes applicable for this product or service.)
*/
public Money getTax() {
if (this.tax == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.tax");
else if (Configuration.doAutoCreate())
this.tax = new Money(); // cc
return this.tax;
}
public boolean hasTax() {
return this.tax != null && !this.tax.isEmpty();
}
/**
* @param value {@link #tax} (The total of taxes applicable for this product or service.)
*/
public AddedItemDetailComponent setTax(Money value) {
this.tax = value;
return this;
}
/**
* @return {@link #net} (The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.)
*/
public Money getNet() {
if (this.net == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.net");
else if (Configuration.doAutoCreate())
this.net = new Money(); // cc
return this.net;
}
public boolean hasNet() {
return this.net != null && !this.net.isEmpty();
}
/**
* @param value {@link #net} (The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.)
*/
public AddedItemDetailComponent setNet(Money value) {
this.net = value;
return this;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public List getNoteNumber() {
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
return this.noteNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemDetailComponent setNoteNumber(List theNoteNumber) {
this.noteNumber = theNoteNumber;
return this;
}
public boolean hasNoteNumber() {
if (this.noteNumber == null)
return false;
for (PositiveIntType item : this.noteNumber)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public PositiveIntType addNoteNumberElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return t;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public AddedItemDetailComponent addNoteNumber(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return this;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public boolean hasNoteNumber(int value) {
if (this.noteNumber == null)
return false;
for (PositiveIntType v : this.noteNumber)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ReviewOutcomeComponent getReviewOutcome() {
if (this.reviewOutcome == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemDetailComponent.reviewOutcome");
else if (Configuration.doAutoCreate())
this.reviewOutcome = new ReviewOutcomeComponent(); // cc
return this.reviewOutcome;
}
public boolean hasReviewOutcome() {
return this.reviewOutcome != null && !this.reviewOutcome.isEmpty();
}
/**
* @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public AddedItemDetailComponent setReviewOutcome(ReviewOutcomeComponent value) {
this.reviewOutcome = value;
return this;
}
/**
* @return {@link #adjudication} (The adjudication results.)
*/
public List getAdjudication() {
if (this.adjudication == null)
this.adjudication = new ArrayList();
return this.adjudication;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemDetailComponent setAdjudication(List theAdjudication) {
this.adjudication = theAdjudication;
return this;
}
public boolean hasAdjudication() {
if (this.adjudication == null)
return false;
for (AdjudicationComponent item : this.adjudication)
if (!item.isEmpty())
return true;
return false;
}
public AdjudicationComponent addAdjudication() { //3
AdjudicationComponent t = new AdjudicationComponent();
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return t;
}
public AddedItemDetailComponent addAdjudication(AdjudicationComponent t) { //3
if (t == null)
return this;
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3}
*/
public AdjudicationComponent getAdjudicationFirstRep() {
if (getAdjudication().isEmpty()) {
addAdjudication();
}
return getAdjudication().get(0);
}
/**
* @return {@link #subDetail} (The third-tier service adjudications for payor added services.)
*/
public List getSubDetail() {
if (this.subDetail == null)
this.subDetail = new ArrayList();
return this.subDetail;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemDetailComponent setSubDetail(List theSubDetail) {
this.subDetail = theSubDetail;
return this;
}
public boolean hasSubDetail() {
if (this.subDetail == null)
return false;
for (AddedItemSubDetailComponent item : this.subDetail)
if (!item.isEmpty())
return true;
return false;
}
public AddedItemSubDetailComponent addSubDetail() { //3
AddedItemSubDetailComponent t = new AddedItemSubDetailComponent();
if (this.subDetail == null)
this.subDetail = new ArrayList();
this.subDetail.add(t);
return t;
}
public AddedItemDetailComponent addSubDetail(AddedItemSubDetailComponent t) { //3
if (t == null)
return this;
if (this.subDetail == null)
this.subDetail = new ArrayList();
this.subDetail.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #subDetail}, creating it if it does not already exist {3}
*/
public AddedItemSubDetailComponent getSubDetailFirstRep() {
if (getSubDetail().isEmpty()) {
addSubDetail();
}
return getSubDetail().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber));
children.add(new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue));
children.add(new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService));
children.add(new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd));
children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier));
children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity));
children.add(new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice));
children.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor));
children.add(new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax));
children.add(new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.", 0, 1, net));
children.add(new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber));
children.add(new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome));
children.add(new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication));
children.add(new Property("subDetail", "", "The third-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, subDetail));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 82505966: /*traceNumber*/ return new Property("traceNumber", "Identifier", "Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.", 0, java.lang.Integer.MAX_VALUE, traceNumber);
case 1099842588: /*revenue*/ return new Property("revenue", "CodeableConcept", "The type of revenue or cost center providing the product and/or service.", 0, 1, revenue);
case 1957227299: /*productOrService*/ return new Property("productOrService", "CodeableConcept", "When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.", 0, 1, productOrService);
case -717476168: /*productOrServiceEnd*/ return new Property("productOrServiceEnd", "CodeableConcept", "This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.", 0, 1, productOrServiceEnd);
case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier);
case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity);
case -486196699: /*unitPrice*/ return new Property("unitPrice", "Money", "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", 0, 1, unitPrice);
case -1282148017: /*factor*/ return new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, 1, factor);
case 114603: /*tax*/ return new Property("tax", "Money", "The total of taxes applicable for this product or service.", 0, 1, tax);
case 108957: /*net*/ return new Property("net", "Money", "The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.", 0, 1, net);
case -1110033957: /*noteNumber*/ return new Property("noteNumber", "positiveInt", "The numbers associated with notes below which apply to the adjudication of this item.", 0, java.lang.Integer.MAX_VALUE, noteNumber);
case -51825446: /*reviewOutcome*/ return new Property("reviewOutcome", "@ClaimResponse.item.reviewOutcome", "The high-level results of the adjudication if adjudication has been performed.", 0, 1, reviewOutcome);
case -231349275: /*adjudication*/ return new Property("adjudication", "@ClaimResponse.item.adjudication", "The adjudication results.", 0, java.lang.Integer.MAX_VALUE, adjudication);
case -828829007: /*subDetail*/ return new Property("subDetail", "", "The third-tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, subDetail);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier
case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept
case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept
case -717476168: /*productOrServiceEnd*/ return this.productOrServiceEnd == null ? new Base[0] : new Base[] {this.productOrServiceEnd}; // CodeableConcept
case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept
case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money
case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType
case 114603: /*tax*/ return this.tax == null ? new Base[0] : new Base[] {this.tax}; // Money
case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money
case -1110033957: /*noteNumber*/ return this.noteNumber == null ? new Base[0] : this.noteNumber.toArray(new Base[this.noteNumber.size()]); // PositiveIntType
case -51825446: /*reviewOutcome*/ return this.reviewOutcome == null ? new Base[0] : new Base[] {this.reviewOutcome}; // ReviewOutcomeComponent
case -231349275: /*adjudication*/ return this.adjudication == null ? new Base[0] : this.adjudication.toArray(new Base[this.adjudication.size()]); // AdjudicationComponent
case -828829007: /*subDetail*/ return this.subDetail == null ? new Base[0] : this.subDetail.toArray(new Base[this.subDetail.size()]); // AddedItemSubDetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case 1099842588: // revenue
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 1957227299: // productOrService
this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -717476168: // productOrServiceEnd
this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -615513385: // modifier
this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case -1285004149: // quantity
this.quantity = TypeConvertor.castToQuantity(value); // Quantity
return value;
case -486196699: // unitPrice
this.unitPrice = TypeConvertor.castToMoney(value); // Money
return value;
case -1282148017: // factor
this.factor = TypeConvertor.castToDecimal(value); // DecimalType
return value;
case 114603: // tax
this.tax = TypeConvertor.castToMoney(value); // Money
return value;
case 108957: // net
this.net = TypeConvertor.castToMoney(value); // Money
return value;
case -1110033957: // noteNumber
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -51825446: // reviewOutcome
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
return value;
case -231349275: // adjudication
this.getAdjudication().add((AdjudicationComponent) value); // AdjudicationComponent
return value;
case -828829007: // subDetail
this.getSubDetail().add((AddedItemSubDetailComponent) value); // AddedItemSubDetailComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("traceNumber")) {
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value));
} else if (name.equals("revenue")) {
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("productOrService")) {
this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("productOrServiceEnd")) {
this.productOrServiceEnd = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("modifier")) {
this.getModifier().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("quantity")) {
this.quantity = TypeConvertor.castToQuantity(value); // Quantity
} else if (name.equals("unitPrice")) {
this.unitPrice = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("factor")) {
this.factor = TypeConvertor.castToDecimal(value); // DecimalType
} else if (name.equals("tax")) {
this.tax = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("net")) {
this.net = TypeConvertor.castToMoney(value); // Money
} else if (name.equals("noteNumber")) {
this.getNoteNumber().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().add((AdjudicationComponent) value);
} else if (name.equals("subDetail")) {
this.getSubDetail().add((AddedItemSubDetailComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("revenue")) {
this.revenue = null;
} else if (name.equals("productOrService")) {
this.productOrService = null;
} else if (name.equals("productOrServiceEnd")) {
this.productOrServiceEnd = null;
} else if (name.equals("modifier")) {
this.getModifier().remove(value);
} else if (name.equals("quantity")) {
this.quantity = null;
} else if (name.equals("unitPrice")) {
this.unitPrice = null;
} else if (name.equals("factor")) {
this.factor = null;
} else if (name.equals("tax")) {
this.tax = null;
} else if (name.equals("net")) {
this.net = null;
} else if (name.equals("noteNumber")) {
this.getNoteNumber().remove(value);
} else if (name.equals("reviewOutcome")) {
this.reviewOutcome = (ReviewOutcomeComponent) value; // ReviewOutcomeComponent
} else if (name.equals("adjudication")) {
this.getAdjudication().remove((AdjudicationComponent) value);
} else if (name.equals("subDetail")) {
this.getSubDetail().remove((AddedItemSubDetailComponent) value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 82505966: return addTraceNumber();
case 1099842588: return getRevenue();
case 1957227299: return getProductOrService();
case -717476168: return getProductOrServiceEnd();
case -615513385: return addModifier();
case -1285004149: return getQuantity();
case -486196699: return getUnitPrice();
case -1282148017: return getFactorElement();
case 114603: return getTax();
case 108957: return getNet();
case -1110033957: return addNoteNumberElement();
case -51825446: return getReviewOutcome();
case -231349275: return addAdjudication();
case -828829007: return addSubDetail();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"};
case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"};
case -717476168: /*productOrServiceEnd*/ return new String[] {"CodeableConcept"};
case -615513385: /*modifier*/ return new String[] {"CodeableConcept"};
case -1285004149: /*quantity*/ return new String[] {"Quantity"};
case -486196699: /*unitPrice*/ return new String[] {"Money"};
case -1282148017: /*factor*/ return new String[] {"decimal"};
case 114603: /*tax*/ return new String[] {"Money"};
case 108957: /*net*/ return new String[] {"Money"};
case -1110033957: /*noteNumber*/ return new String[] {"positiveInt"};
case -51825446: /*reviewOutcome*/ return new String[] {"@ClaimResponse.item.reviewOutcome"};
case -231349275: /*adjudication*/ return new String[] {"@ClaimResponse.item.adjudication"};
case -828829007: /*subDetail*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("revenue")) {
this.revenue = new CodeableConcept();
return this.revenue;
}
else if (name.equals("productOrService")) {
this.productOrService = new CodeableConcept();
return this.productOrService;
}
else if (name.equals("productOrServiceEnd")) {
this.productOrServiceEnd = new CodeableConcept();
return this.productOrServiceEnd;
}
else if (name.equals("modifier")) {
return addModifier();
}
else if (name.equals("quantity")) {
this.quantity = new Quantity();
return this.quantity;
}
else if (name.equals("unitPrice")) {
this.unitPrice = new Money();
return this.unitPrice;
}
else if (name.equals("factor")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.detail.factor");
}
else if (name.equals("tax")) {
this.tax = new Money();
return this.tax;
}
else if (name.equals("net")) {
this.net = new Money();
return this.net;
}
else if (name.equals("noteNumber")) {
throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.addItem.detail.noteNumber");
}
else if (name.equals("reviewOutcome")) {
this.reviewOutcome = new ReviewOutcomeComponent();
return this.reviewOutcome;
}
else if (name.equals("adjudication")) {
return addAdjudication();
}
else if (name.equals("subDetail")) {
return addSubDetail();
}
else
return super.addChild(name);
}
public AddedItemDetailComponent copy() {
AddedItemDetailComponent dst = new AddedItemDetailComponent();
copyValues(dst);
return dst;
}
public void copyValues(AddedItemDetailComponent dst) {
super.copyValues(dst);
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
dst.revenue = revenue == null ? null : revenue.copy();
dst.productOrService = productOrService == null ? null : productOrService.copy();
dst.productOrServiceEnd = productOrServiceEnd == null ? null : productOrServiceEnd.copy();
if (modifier != null) {
dst.modifier = new ArrayList();
for (CodeableConcept i : modifier)
dst.modifier.add(i.copy());
};
dst.quantity = quantity == null ? null : quantity.copy();
dst.unitPrice = unitPrice == null ? null : unitPrice.copy();
dst.factor = factor == null ? null : factor.copy();
dst.tax = tax == null ? null : tax.copy();
dst.net = net == null ? null : net.copy();
if (noteNumber != null) {
dst.noteNumber = new ArrayList();
for (PositiveIntType i : noteNumber)
dst.noteNumber.add(i.copy());
};
dst.reviewOutcome = reviewOutcome == null ? null : reviewOutcome.copy();
if (adjudication != null) {
dst.adjudication = new ArrayList();
for (AdjudicationComponent i : adjudication)
dst.adjudication.add(i.copy());
};
if (subDetail != null) {
dst.subDetail = new ArrayList();
for (AddedItemSubDetailComponent i : subDetail)
dst.subDetail.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof AddedItemDetailComponent))
return false;
AddedItemDetailComponent o = (AddedItemDetailComponent) other_;
return compareDeep(traceNumber, o.traceNumber, true) && compareDeep(revenue, o.revenue, true) && compareDeep(productOrService, o.productOrService, true)
&& compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true)
&& compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true)
&& compareDeep(tax, o.tax, true) && compareDeep(net, o.net, true) && compareDeep(noteNumber, o.noteNumber, true)
&& compareDeep(reviewOutcome, o.reviewOutcome, true) && compareDeep(adjudication, o.adjudication, true)
&& compareDeep(subDetail, o.subDetail, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof AddedItemDetailComponent))
return false;
AddedItemDetailComponent o = (AddedItemDetailComponent) other_;
return compareValues(factor, o.factor, true) && compareValues(noteNumber, o.noteNumber, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(traceNumber, revenue, productOrService
, productOrServiceEnd, modifier, quantity, unitPrice, factor, tax, net, noteNumber
, reviewOutcome, adjudication, subDetail);
}
public String fhirType() {
return "ClaimResponse.addItem.detail";
}
}
@Block()
public static class AddedItemSubDetailComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.
*/
@Child(name = "traceNumber", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Number for tracking", formalDefinition="Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners." )
protected List traceNumber;
/**
* The type of revenue or cost center providing the product and/or service.
*/
@Child(name = "revenue", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Revenue or cost center code", formalDefinition="The type of revenue or cost center providing the product and/or service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-revenue-center")
protected CodeableConcept revenue;
/**
* When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.
*/
@Child(name = "productOrService", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
protected CodeableConcept productOrService;
/**
* This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.
*/
@Child(name = "productOrServiceEnd", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="End of a range of codes", formalDefinition="This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
protected CodeableConcept productOrServiceEnd;
/**
* Item typification or modifiers codes to convey additional context for the product or service.
*/
@Child(name = "modifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers")
protected List modifier;
/**
* The number of repetitions of a service or product.
*/
@Child(name = "quantity", type = {Quantity.class}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." )
protected Quantity quantity;
/**
* If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.
*/
@Child(name = "unitPrice", type = {Money.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Fee, charge or cost per item", formalDefinition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." )
protected Money unitPrice;
/**
* A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
@Child(name = "factor", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." )
protected DecimalType factor;
/**
* The total of taxes applicable for this product or service.
*/
@Child(name = "tax", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total tax", formalDefinition="The total of taxes applicable for this product or service." )
protected Money tax;
/**
* The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.
*/
@Child(name = "net", type = {Money.class}, order=10, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor." )
protected Money net;
/**
* The numbers associated with notes below which apply to the adjudication of this item.
*/
@Child(name = "noteNumber", type = {PositiveIntType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable note numbers", formalDefinition="The numbers associated with notes below which apply to the adjudication of this item." )
protected List noteNumber;
/**
* The high-level results of the adjudication if adjudication has been performed.
*/
@Child(name = "reviewOutcome", type = {ReviewOutcomeComponent.class}, order=12, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Added items subdetail level adjudication results", formalDefinition="The high-level results of the adjudication if adjudication has been performed." )
protected ReviewOutcomeComponent reviewOutcome;
/**
* The adjudication results.
*/
@Child(name = "adjudication", type = {AdjudicationComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Added items subdetail adjudication", formalDefinition="The adjudication results." )
protected List adjudication;
private static final long serialVersionUID = -1130518441L;
/**
* Constructor
*/
public AddedItemSubDetailComponent() {
super();
}
/**
* @return {@link #traceNumber} (Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.)
*/
public List getTraceNumber() {
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
return this.traceNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemSubDetailComponent setTraceNumber(List theTraceNumber) {
this.traceNumber = theTraceNumber;
return this;
}
public boolean hasTraceNumber() {
if (this.traceNumber == null)
return false;
for (Identifier item : this.traceNumber)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addTraceNumber() { //3
Identifier t = new Identifier();
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return t;
}
public AddedItemSubDetailComponent addTraceNumber(Identifier t) { //3
if (t == null)
return this;
if (this.traceNumber == null)
this.traceNumber = new ArrayList();
this.traceNumber.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #traceNumber}, creating it if it does not already exist {3}
*/
public Identifier getTraceNumberFirstRep() {
if (getTraceNumber().isEmpty()) {
addTraceNumber();
}
return getTraceNumber().get(0);
}
/**
* @return {@link #revenue} (The type of revenue or cost center providing the product and/or service.)
*/
public CodeableConcept getRevenue() {
if (this.revenue == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.revenue");
else if (Configuration.doAutoCreate())
this.revenue = new CodeableConcept(); // cc
return this.revenue;
}
public boolean hasRevenue() {
return this.revenue != null && !this.revenue.isEmpty();
}
/**
* @param value {@link #revenue} (The type of revenue or cost center providing the product and/or service.)
*/
public AddedItemSubDetailComponent setRevenue(CodeableConcept value) {
this.revenue = value;
return this;
}
/**
* @return {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.)
*/
public CodeableConcept getProductOrService() {
if (this.productOrService == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.productOrService");
else if (Configuration.doAutoCreate())
this.productOrService = new CodeableConcept(); // cc
return this.productOrService;
}
public boolean hasProductOrService() {
return this.productOrService != null && !this.productOrService.isEmpty();
}
/**
* @param value {@link #productOrService} (When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.)
*/
public AddedItemSubDetailComponent setProductOrService(CodeableConcept value) {
this.productOrService = value;
return this;
}
/**
* @return {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.)
*/
public CodeableConcept getProductOrServiceEnd() {
if (this.productOrServiceEnd == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.productOrServiceEnd");
else if (Configuration.doAutoCreate())
this.productOrServiceEnd = new CodeableConcept(); // cc
return this.productOrServiceEnd;
}
public boolean hasProductOrServiceEnd() {
return this.productOrServiceEnd != null && !this.productOrServiceEnd.isEmpty();
}
/**
* @param value {@link #productOrServiceEnd} (This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.)
*/
public AddedItemSubDetailComponent setProductOrServiceEnd(CodeableConcept value) {
this.productOrServiceEnd = value;
return this;
}
/**
* @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.)
*/
public List getModifier() {
if (this.modifier == null)
this.modifier = new ArrayList();
return this.modifier;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemSubDetailComponent setModifier(List theModifier) {
this.modifier = theModifier;
return this;
}
public boolean hasModifier() {
if (this.modifier == null)
return false;
for (CodeableConcept item : this.modifier)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addModifier() { //3
CodeableConcept t = new CodeableConcept();
if (this.modifier == null)
this.modifier = new ArrayList();
this.modifier.add(t);
return t;
}
public AddedItemSubDetailComponent addModifier(CodeableConcept t) { //3
if (t == null)
return this;
if (this.modifier == null)
this.modifier = new ArrayList();
this.modifier.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3}
*/
public CodeableConcept getModifierFirstRep() {
if (getModifier().isEmpty()) {
addModifier();
}
return getModifier().get(0);
}
/**
* @return {@link #quantity} (The number of repetitions of a service or product.)
*/
public Quantity getQuantity() {
if (this.quantity == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.quantity");
else if (Configuration.doAutoCreate())
this.quantity = new Quantity(); // cc
return this.quantity;
}
public boolean hasQuantity() {
return this.quantity != null && !this.quantity.isEmpty();
}
/**
* @param value {@link #quantity} (The number of repetitions of a service or product.)
*/
public AddedItemSubDetailComponent setQuantity(Quantity value) {
this.quantity = value;
return this;
}
/**
* @return {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.)
*/
public Money getUnitPrice() {
if (this.unitPrice == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.unitPrice");
else if (Configuration.doAutoCreate())
this.unitPrice = new Money(); // cc
return this.unitPrice;
}
public boolean hasUnitPrice() {
return this.unitPrice != null && !this.unitPrice.isEmpty();
}
/**
* @param value {@link #unitPrice} (If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.)
*/
public AddedItemSubDetailComponent setUnitPrice(Money value) {
this.unitPrice = value;
return this;
}
/**
* @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
*/
public DecimalType getFactorElement() {
if (this.factor == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.factor");
else if (Configuration.doAutoCreate())
this.factor = new DecimalType(); // bb
return this.factor;
}
public boolean hasFactorElement() {
return this.factor != null && !this.factor.isEmpty();
}
public boolean hasFactor() {
return this.factor != null && !this.factor.isEmpty();
}
/**
* @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value
*/
public AddedItemSubDetailComponent setFactorElement(DecimalType value) {
this.factor = value;
return this;
}
/**
* @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public BigDecimal getFactor() {
return this.factor == null ? null : this.factor.getValue();
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemSubDetailComponent setFactor(BigDecimal value) {
if (value == null)
this.factor = null;
else {
if (this.factor == null)
this.factor = new DecimalType();
this.factor.setValue(value);
}
return this;
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemSubDetailComponent setFactor(long value) {
this.factor = new DecimalType();
this.factor.setValue(value);
return this;
}
/**
* @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
public AddedItemSubDetailComponent setFactor(double value) {
this.factor = new DecimalType();
this.factor.setValue(value);
return this;
}
/**
* @return {@link #tax} (The total of taxes applicable for this product or service.)
*/
public Money getTax() {
if (this.tax == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.tax");
else if (Configuration.doAutoCreate())
this.tax = new Money(); // cc
return this.tax;
}
public boolean hasTax() {
return this.tax != null && !this.tax.isEmpty();
}
/**
* @param value {@link #tax} (The total of taxes applicable for this product or service.)
*/
public AddedItemSubDetailComponent setTax(Money value) {
this.tax = value;
return this;
}
/**
* @return {@link #net} (The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.)
*/
public Money getNet() {
if (this.net == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.net");
else if (Configuration.doAutoCreate())
this.net = new Money(); // cc
return this.net;
}
public boolean hasNet() {
return this.net != null && !this.net.isEmpty();
}
/**
* @param value {@link #net} (The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.)
*/
public AddedItemSubDetailComponent setNet(Money value) {
this.net = value;
return this;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public List getNoteNumber() {
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
return this.noteNumber;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemSubDetailComponent setNoteNumber(List theNoteNumber) {
this.noteNumber = theNoteNumber;
return this;
}
public boolean hasNoteNumber() {
if (this.noteNumber == null)
return false;
for (PositiveIntType item : this.noteNumber)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public PositiveIntType addNoteNumberElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return t;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public AddedItemSubDetailComponent addNoteNumber(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.noteNumber == null)
this.noteNumber = new ArrayList();
this.noteNumber.add(t);
return this;
}
/**
* @param value {@link #noteNumber} (The numbers associated with notes below which apply to the adjudication of this item.)
*/
public boolean hasNoteNumber(int value) {
if (this.noteNumber == null)
return false;
for (PositiveIntType v : this.noteNumber)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public ReviewOutcomeComponent getReviewOutcome() {
if (this.reviewOutcome == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AddedItemSubDetailComponent.reviewOutcome");
else if (Configuration.doAutoCreate())
this.reviewOutcome = new ReviewOutcomeComponent(); // cc
return this.reviewOutcome;
}
public boolean hasReviewOutcome() {
return this.reviewOutcome != null && !this.reviewOutcome.isEmpty();
}
/**
* @param value {@link #reviewOutcome} (The high-level results of the adjudication if adjudication has been performed.)
*/
public AddedItemSubDetailComponent setReviewOutcome(ReviewOutcomeComponent value) {
this.reviewOutcome = value;
return this;
}
/**
* @return {@link #adjudication} (The adjudication results.)
*/
public List getAdjudication() {
if (this.adjudication == null)
this.adjudication = new ArrayList();
return this.adjudication;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public AddedItemSubDetailComponent setAdjudication(List theAdjudication) {
this.adjudication = theAdjudication;
return this;
}
public boolean hasAdjudication() {
if (this.adjudication == null)
return false;
for (AdjudicationComponent item : this.adjudication)
if (!item.isEmpty())
return true;
return false;
}
public AdjudicationComponent addAdjudication() { //3
AdjudicationComponent t = new AdjudicationComponent();
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return t;
}
public AddedItemSubDetailComponent addAdjudication(AdjudicationComponent t) { //3
if (t == null)
return this;
if (this.adjudication == null)
this.adjudication = new ArrayList();
this.adjudication.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #adjudication}, creating it if it does not already exist {3}
*/
public AdjudicationComponent getAdjudicationFirstRep() {
if (getAdjudication().isEmpty()) {
addAdjudication();
}
return getAdjudication().get(0);
}
protected void listChildren(List