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;
/**
* A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.
*/
@ResourceDef(name="Claim", profile="http://hl7.org/fhir/StructureDefinition/Claim")
public class Claim extends DomainResource {
@Block()
public static class RelatedClaimComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Reference to a related claim.
*/
@Child(name = "claim", type = {Claim.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Reference to the related claim", formalDefinition="Reference to a related claim." )
protected Reference claim;
/**
* A code to convey how the claims are related.
*/
@Child(name = "relationship", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="How the reference claim is related", formalDefinition="A code to convey how the claims are related." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/related-claim-relationship")
protected CodeableConcept relationship;
/**
* An alternate organizational reference to the case or file to which this particular claim pertains.
*/
@Child(name = "reference", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="File or case reference", formalDefinition="An alternate organizational reference to the case or file to which this particular claim pertains." )
protected Identifier reference;
private static final long serialVersionUID = 1047077926L;
/**
* Constructor
*/
public RelatedClaimComponent() {
super();
}
/**
* @return {@link #claim} (Reference to a related claim.)
*/
public Reference getClaim() {
if (this.claim == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create RelatedClaimComponent.claim");
else if (Configuration.doAutoCreate())
this.claim = new Reference(); // cc
return this.claim;
}
public boolean hasClaim() {
return this.claim != null && !this.claim.isEmpty();
}
/**
* @param value {@link #claim} (Reference to a related claim.)
*/
public RelatedClaimComponent setClaim(Reference value) {
this.claim = value;
return this;
}
/**
* @return {@link #relationship} (A code to convey how the claims are related.)
*/
public CodeableConcept getRelationship() {
if (this.relationship == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create RelatedClaimComponent.relationship");
else if (Configuration.doAutoCreate())
this.relationship = new CodeableConcept(); // cc
return this.relationship;
}
public boolean hasRelationship() {
return this.relationship != null && !this.relationship.isEmpty();
}
/**
* @param value {@link #relationship} (A code to convey how the claims are related.)
*/
public RelatedClaimComponent setRelationship(CodeableConcept value) {
this.relationship = value;
return this;
}
/**
* @return {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains.)
*/
public Identifier getReference() {
if (this.reference == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create RelatedClaimComponent.reference");
else if (Configuration.doAutoCreate())
this.reference = new Identifier(); // cc
return this.reference;
}
public boolean hasReference() {
return this.reference != null && !this.reference.isEmpty();
}
/**
* @param value {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains.)
*/
public RelatedClaimComponent setReference(Identifier value) {
this.reference = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("claim", "Reference(Claim)", "Reference to a related claim.", 0, 1, claim));
children.add(new Property("relationship", "CodeableConcept", "A code to convey how the claims are related.", 0, 1, relationship));
children.add(new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains.", 0, 1, reference));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 94742588: /*claim*/ return new Property("claim", "Reference(Claim)", "Reference to a related claim.", 0, 1, claim);
case -261851592: /*relationship*/ return new Property("relationship", "CodeableConcept", "A code to convey how the claims are related.", 0, 1, relationship);
case -925155509: /*reference*/ return new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains.", 0, 1, reference);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 94742588: /*claim*/ return this.claim == null ? new Base[0] : new Base[] {this.claim}; // Reference
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept
case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Identifier
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 94742588: // claim
this.claim = TypeConvertor.castToReference(value); // Reference
return value;
case -261851592: // relationship
this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -925155509: // reference
this.reference = TypeConvertor.castToIdentifier(value); // Identifier
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("claim")) {
this.claim = TypeConvertor.castToReference(value); // Reference
} else if (name.equals("relationship")) {
this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("reference")) {
this.reference = TypeConvertor.castToIdentifier(value); // Identifier
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("claim")) {
this.claim = null;
} else if (name.equals("relationship")) {
this.relationship = null;
} else if (name.equals("reference")) {
this.reference = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 94742588: return getClaim();
case -261851592: return getRelationship();
case -925155509: return getReference();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 94742588: /*claim*/ return new String[] {"Reference"};
case -261851592: /*relationship*/ return new String[] {"CodeableConcept"};
case -925155509: /*reference*/ return new String[] {"Identifier"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("claim")) {
this.claim = new Reference();
return this.claim;
}
else if (name.equals("relationship")) {
this.relationship = new CodeableConcept();
return this.relationship;
}
else if (name.equals("reference")) {
this.reference = new Identifier();
return this.reference;
}
else
return super.addChild(name);
}
public RelatedClaimComponent copy() {
RelatedClaimComponent dst = new RelatedClaimComponent();
copyValues(dst);
return dst;
}
public void copyValues(RelatedClaimComponent dst) {
super.copyValues(dst);
dst.claim = claim == null ? null : claim.copy();
dst.relationship = relationship == null ? null : relationship.copy();
dst.reference = reference == null ? null : reference.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof RelatedClaimComponent))
return false;
RelatedClaimComponent o = (RelatedClaimComponent) other_;
return compareDeep(claim, o.claim, true) && compareDeep(relationship, o.relationship, true) && compareDeep(reference, o.reference, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof RelatedClaimComponent))
return false;
RelatedClaimComponent o = (RelatedClaimComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(claim, relationship, reference
);
}
public String fhirType() {
return "Claim.related";
}
}
@Block()
public static class PayeeComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Type of Party to be reimbursed: subscriber, provider, other.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Category of recipient", formalDefinition="Type of Party to be reimbursed: subscriber, provider, other." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/payeetype")
protected CodeableConcept type;
/**
* Reference to the individual or organization to whom any payment will be made.
*/
@Child(name = "party", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Recipient reference", formalDefinition="Reference to the individual or organization to whom any payment will be made." )
protected Reference party;
private static final long serialVersionUID = -1948897146L;
/**
* Constructor
*/
public PayeeComponent() {
super();
}
/**
* Constructor
*/
public PayeeComponent(CodeableConcept type) {
super();
this.setType(type);
}
/**
* @return {@link #type} (Type of Party to be reimbursed: subscriber, provider, other.)
*/
public CodeableConcept getType() {
if (this.type == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PayeeComponent.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} (Type of Party to be reimbursed: subscriber, provider, other.)
*/
public PayeeComponent setType(CodeableConcept value) {
this.type = value;
return this;
}
/**
* @return {@link #party} (Reference to the individual or organization to whom any payment will be made.)
*/
public Reference getParty() {
if (this.party == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PayeeComponent.party");
else if (Configuration.doAutoCreate())
this.party = new Reference(); // cc
return this.party;
}
public boolean hasParty() {
return this.party != null && !this.party.isEmpty();
}
/**
* @param value {@link #party} (Reference to the individual or organization to whom any payment will be made.)
*/
public PayeeComponent setParty(Reference value) {
this.party = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("type", "CodeableConcept", "Type of Party to be reimbursed: subscriber, provider, other.", 0, 1, type));
children.add(new Property("party", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson)", "Reference to the individual or organization to whom any payment will be made.", 0, 1, party));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Type of Party to be reimbursed: subscriber, provider, other.", 0, 1, type);
case 106437350: /*party*/ return new Property("party", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson)", "Reference to the individual or organization to whom any payment will be made.", 0, 1, party);
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 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference
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 106437350: // party
this.party = TypeConvertor.castToReference(value); // Reference
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("party")) {
this.party = TypeConvertor.castToReference(value); // Reference
} 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("party")) {
this.party = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType();
case 106437350: return getParty();
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 106437350: /*party*/ return new String[] {"Reference"};
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("party")) {
this.party = new Reference();
return this.party;
}
else
return super.addChild(name);
}
public PayeeComponent copy() {
PayeeComponent dst = new PayeeComponent();
copyValues(dst);
return dst;
}
public void copyValues(PayeeComponent dst) {
super.copyValues(dst);
dst.type = type == null ? null : type.copy();
dst.party = party == null ? null : party.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PayeeComponent))
return false;
PayeeComponent o = (PayeeComponent) other_;
return compareDeep(type, o.type, true) && compareDeep(party, o.party, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PayeeComponent))
return false;
PayeeComponent o = (PayeeComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, party);
}
public String fhirType() {
return "Claim.payee";
}
}
@Block()
public static class ClaimEventComponent 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 ClaimEventComponent() {
super();
}
/**
* Constructor
*/
public ClaimEventComponent(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 ClaimEventComponent.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 ClaimEventComponent 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 ClaimEventComponent setWhen(DataType value) {
if (value != null && !(value instanceof DateTimeType || value instanceof Period))
throw new FHIRException("Not the right type for Claim.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 ClaimEventComponent copy() {
ClaimEventComponent dst = new ClaimEventComponent();
copyValues(dst);
return dst;
}
public void copyValues(ClaimEventComponent 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 ClaimEventComponent))
return false;
ClaimEventComponent o = (ClaimEventComponent) 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 ClaimEventComponent))
return false;
ClaimEventComponent o = (ClaimEventComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, when);
}
public String fhirType() {
return "Claim.event";
}
}
@Block()
public static class CareTeamComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify care team entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Order of care team", formalDefinition="A number to uniquely identify care team entries." )
protected PositiveIntType sequence;
/**
* Member of the team who provided the product or service.
*/
@Child(name = "provider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Practitioner or organization", formalDefinition="Member of the team who provided the product or service." )
protected Reference provider;
/**
* The party who is billing and/or responsible for the claimed products or services.
*/
@Child(name = "responsible", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Indicator of the lead practitioner", formalDefinition="The party who is billing and/or responsible for the claimed products or services." )
protected BooleanType responsible;
/**
* The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.
*/
@Child(name = "role", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Function within the team", formalDefinition="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-careteamrole")
protected CodeableConcept role;
/**
* The specialization of the practitioner or provider which is applicable for this service.
*/
@Child(name = "specialty", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Practitioner or provider specialization", formalDefinition="The specialization of the practitioner or provider which is applicable for this service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/provider-qualification")
protected CodeableConcept specialty;
private static final long serialVersionUID = 1238813503L;
/**
* Constructor
*/
public CareTeamComponent() {
super();
}
/**
* Constructor
*/
public CareTeamComponent(int sequence, Reference provider) {
super();
this.setSequence(sequence);
this.setProvider(provider);
}
/**
* @return {@link #sequence} (A number to uniquely identify care team entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CareTeamComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify care team entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public CareTeamComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify care team entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify care team entries.
*/
public CareTeamComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.setValue(value);
return this;
}
/**
* @return {@link #provider} (Member of the team who provided the product or service.)
*/
public Reference getProvider() {
if (this.provider == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CareTeamComponent.provider");
else if (Configuration.doAutoCreate())
this.provider = new Reference(); // cc
return this.provider;
}
public boolean hasProvider() {
return this.provider != null && !this.provider.isEmpty();
}
/**
* @param value {@link #provider} (Member of the team who provided the product or service.)
*/
public CareTeamComponent setProvider(Reference value) {
this.provider = value;
return this;
}
/**
* @return {@link #responsible} (The party who is billing and/or responsible for the claimed products or services.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value
*/
public BooleanType getResponsibleElement() {
if (this.responsible == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CareTeamComponent.responsible");
else if (Configuration.doAutoCreate())
this.responsible = new BooleanType(); // bb
return this.responsible;
}
public boolean hasResponsibleElement() {
return this.responsible != null && !this.responsible.isEmpty();
}
public boolean hasResponsible() {
return this.responsible != null && !this.responsible.isEmpty();
}
/**
* @param value {@link #responsible} (The party who is billing and/or responsible for the claimed products or services.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value
*/
public CareTeamComponent setResponsibleElement(BooleanType value) {
this.responsible = value;
return this;
}
/**
* @return The party who is billing and/or responsible for the claimed products or services.
*/
public boolean getResponsible() {
return this.responsible == null || this.responsible.isEmpty() ? false : this.responsible.getValue();
}
/**
* @param value The party who is billing and/or responsible for the claimed products or services.
*/
public CareTeamComponent setResponsible(boolean value) {
if (this.responsible == null)
this.responsible = new BooleanType();
this.responsible.setValue(value);
return this;
}
/**
* @return {@link #role} (The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.)
*/
public CodeableConcept getRole() {
if (this.role == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CareTeamComponent.role");
else if (Configuration.doAutoCreate())
this.role = new CodeableConcept(); // cc
return this.role;
}
public boolean hasRole() {
return this.role != null && !this.role.isEmpty();
}
/**
* @param value {@link #role} (The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.)
*/
public CareTeamComponent setRole(CodeableConcept value) {
this.role = value;
return this;
}
/**
* @return {@link #specialty} (The specialization of the practitioner or provider which is applicable for this service.)
*/
public CodeableConcept getSpecialty() {
if (this.specialty == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create CareTeamComponent.specialty");
else if (Configuration.doAutoCreate())
this.specialty = new CodeableConcept(); // cc
return this.specialty;
}
public boolean hasSpecialty() {
return this.specialty != null && !this.specialty.isEmpty();
}
/**
* @param value {@link #specialty} (The specialization of the practitioner or provider which is applicable for this service.)
*/
public CareTeamComponent setSpecialty(CodeableConcept value) {
this.specialty = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify care team entries.", 0, 1, sequence));
children.add(new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "Member of the team who provided the product or service.", 0, 1, provider));
children.add(new Property("responsible", "boolean", "The party who is billing and/or responsible for the claimed products or services.", 0, 1, responsible));
children.add(new Property("role", "CodeableConcept", "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", 0, 1, role));
children.add(new Property("specialty", "CodeableConcept", "The specialization of the practitioner or provider which is applicable for this service.", 0, 1, specialty));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify care team entries.", 0, 1, sequence);
case -987494927: /*provider*/ return new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "Member of the team who provided the product or service.", 0, 1, provider);
case 1847674614: /*responsible*/ return new Property("responsible", "boolean", "The party who is billing and/or responsible for the claimed products or services.", 0, 1, responsible);
case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", 0, 1, role);
case -1694759682: /*specialty*/ return new Property("specialty", "CodeableConcept", "The specialization of the practitioner or provider which is applicable for this service.", 0, 1, specialty);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference
case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // BooleanType
case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
case -1694759682: /*specialty*/ return this.specialty == null ? new Base[0] : new Base[] {this.specialty}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case -987494927: // provider
this.provider = TypeConvertor.castToReference(value); // Reference
return value;
case 1847674614: // responsible
this.responsible = TypeConvertor.castToBoolean(value); // BooleanType
return value;
case 3506294: // role
this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -1694759682: // specialty
this.specialty = 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("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("provider")) {
this.provider = TypeConvertor.castToReference(value); // Reference
} else if (name.equals("responsible")) {
this.responsible = TypeConvertor.castToBoolean(value); // BooleanType
} else if (name.equals("role")) {
this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("specialty")) {
this.specialty = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("provider")) {
this.provider = null;
} else if (name.equals("responsible")) {
this.responsible = null;
} else if (name.equals("role")) {
this.role = null;
} else if (name.equals("specialty")) {
this.specialty = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case -987494927: return getProvider();
case 1847674614: return getResponsibleElement();
case 3506294: return getRole();
case -1694759682: return getSpecialty();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case -987494927: /*provider*/ return new String[] {"Reference"};
case 1847674614: /*responsible*/ return new String[] {"boolean"};
case 3506294: /*role*/ return new String[] {"CodeableConcept"};
case -1694759682: /*specialty*/ return new String[] {"CodeableConcept"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.careTeam.sequence");
}
else if (name.equals("provider")) {
this.provider = new Reference();
return this.provider;
}
else if (name.equals("responsible")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.careTeam.responsible");
}
else if (name.equals("role")) {
this.role = new CodeableConcept();
return this.role;
}
else if (name.equals("specialty")) {
this.specialty = new CodeableConcept();
return this.specialty;
}
else
return super.addChild(name);
}
public CareTeamComponent copy() {
CareTeamComponent dst = new CareTeamComponent();
copyValues(dst);
return dst;
}
public void copyValues(CareTeamComponent dst) {
super.copyValues(dst);
dst.sequence = sequence == null ? null : sequence.copy();
dst.provider = provider == null ? null : provider.copy();
dst.responsible = responsible == null ? null : responsible.copy();
dst.role = role == null ? null : role.copy();
dst.specialty = specialty == null ? null : specialty.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof CareTeamComponent))
return false;
CareTeamComponent o = (CareTeamComponent) other_;
return compareDeep(sequence, o.sequence, true) && compareDeep(provider, o.provider, true) && compareDeep(responsible, o.responsible, true)
&& compareDeep(role, o.role, true) && compareDeep(specialty, o.specialty, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof CareTeamComponent))
return false;
CareTeamComponent o = (CareTeamComponent) other_;
return compareValues(sequence, o.sequence, true) && compareValues(responsible, o.responsible, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, provider, responsible
, role, specialty);
}
public String fhirType() {
return "Claim.careTeam";
}
}
@Block()
public static class SupportingInformationComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify supporting information entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Information instance identifier", formalDefinition="A number to uniquely identify supporting information entries." )
protected PositiveIntType sequence;
/**
* The general class of the information supplied: information; exception; accident, employment; onset, etc.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Classification of the supplied information", formalDefinition="The general class of the information supplied: information; exception; accident, employment; onset, etc." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-informationcategory")
protected CodeableConcept category;
/**
* System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.
*/
@Child(name = "code", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Type of information", formalDefinition="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-exception")
protected CodeableConcept code;
/**
* The date when or period to which this information refers.
*/
@Child(name = "timing", type = {DateType.class, Period.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When it occurred", formalDefinition="The date when or period to which this information refers." )
protected DataType timing;
/**
* Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.
*/
@Child(name = "value", type = {BooleanType.class, StringType.class, Quantity.class, Attachment.class, Reference.class, Identifier.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Data to be provided", formalDefinition="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data." )
protected DataType value;
/**
* Provides the reason in the situation where a reason code is required in addition to the content.
*/
@Child(name = "reason", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Explanation for the information", formalDefinition="Provides the reason in the situation where a reason code is required in addition to the content." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/missing-tooth-reason")
protected CodeableConcept reason;
private static final long serialVersionUID = 2028146236L;
/**
* Constructor
*/
public SupportingInformationComponent() {
super();
}
/**
* Constructor
*/
public SupportingInformationComponent(int sequence, CodeableConcept category) {
super();
this.setSequence(sequence);
this.setCategory(category);
}
/**
* @return {@link #sequence} (A number to uniquely identify supporting information entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SupportingInformationComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify supporting information entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public SupportingInformationComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify supporting information entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify supporting information entries.
*/
public SupportingInformationComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.setValue(value);
return this;
}
/**
* @return {@link #category} (The general class of the information supplied: information; exception; accident, employment; onset, etc.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SupportingInformationComponent.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} (The general class of the information supplied: information; exception; accident, employment; onset, etc.)
*/
public SupportingInformationComponent setCategory(CodeableConcept value) {
this.category = value;
return this;
}
/**
* @return {@link #code} (System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.)
*/
public CodeableConcept getCode() {
if (this.code == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SupportingInformationComponent.code");
else if (Configuration.doAutoCreate())
this.code = new CodeableConcept(); // cc
return this.code;
}
public boolean hasCode() {
return this.code != null && !this.code.isEmpty();
}
/**
* @param value {@link #code} (System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.)
*/
public SupportingInformationComponent setCode(CodeableConcept value) {
this.code = value;
return this;
}
/**
* @return {@link #timing} (The date when or period to which this information refers.)
*/
public DataType getTiming() {
return this.timing;
}
/**
* @return {@link #timing} (The date when or period to which this information refers.)
*/
public DateType getTimingDateType() throws FHIRException {
if (this.timing == null)
this.timing = new DateType();
if (!(this.timing instanceof DateType))
throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.timing.getClass().getName()+" was encountered");
return (DateType) this.timing;
}
public boolean hasTimingDateType() {
return this != null && this.timing instanceof DateType;
}
/**
* @return {@link #timing} (The date when or period to which this information refers.)
*/
public Period getTimingPeriod() throws FHIRException {
if (this.timing == null)
this.timing = new Period();
if (!(this.timing instanceof Period))
throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered");
return (Period) this.timing;
}
public boolean hasTimingPeriod() {
return this != null && this.timing instanceof Period;
}
public boolean hasTiming() {
return this.timing != null && !this.timing.isEmpty();
}
/**
* @param value {@link #timing} (The date when or period to which this information refers.)
*/
public SupportingInformationComponent setTiming(DataType value) {
if (value != null && !(value instanceof DateType || value instanceof Period))
throw new FHIRException("Not the right type for Claim.supportingInfo.timing[x]: "+value.fhirType());
this.timing = value;
return this;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public DataType getValue() {
return this.value;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public BooleanType getValueBooleanType() throws FHIRException {
if (this.value == null)
this.value = new BooleanType();
if (!(this.value instanceof BooleanType))
throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
return (BooleanType) this.value;
}
public boolean hasValueBooleanType() {
return this != null && this.value instanceof BooleanType;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public StringType getValueStringType() throws FHIRException {
if (this.value == null)
this.value = new StringType();
if (!(this.value instanceof StringType))
throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
return (StringType) this.value;
}
public boolean hasValueStringType() {
return this != null && this.value instanceof StringType;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public Quantity getValueQuantity() throws FHIRException {
if (this.value == null)
this.value = new Quantity();
if (!(this.value instanceof Quantity))
throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
return (Quantity) this.value;
}
public boolean hasValueQuantity() {
return this != null && this.value instanceof Quantity;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public Attachment getValueAttachment() throws FHIRException {
if (this.value == null)
this.value = new Attachment();
if (!(this.value instanceof Attachment))
throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
return (Attachment) this.value;
}
public boolean hasValueAttachment() {
return this != null && this.value instanceof Attachment;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public Reference getValueReference() throws FHIRException {
if (this.value == null)
this.value = new Reference();
if (!(this.value instanceof Reference))
throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
return (Reference) this.value;
}
public boolean hasValueReference() {
return this != null && this.value instanceof Reference;
}
/**
* @return {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public Identifier getValueIdentifier() throws FHIRException {
if (this.value == null)
this.value = new Identifier();
if (!(this.value instanceof Identifier))
throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered");
return (Identifier) this.value;
}
public boolean hasValueIdentifier() {
return this != null && this.value instanceof Identifier;
}
public boolean hasValue() {
return this.value != null && !this.value.isEmpty();
}
/**
* @param value {@link #value} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
*/
public SupportingInformationComponent setValue(DataType value) {
if (value != null && !(value instanceof BooleanType || value instanceof StringType || value instanceof Quantity || value instanceof Attachment || value instanceof Reference || value instanceof Identifier))
throw new FHIRException("Not the right type for Claim.supportingInfo.value[x]: "+value.fhirType());
this.value = value;
return this;
}
/**
* @return {@link #reason} (Provides the reason in the situation where a reason code is required in addition to the content.)
*/
public CodeableConcept getReason() {
if (this.reason == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SupportingInformationComponent.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} (Provides the reason in the situation where a reason code is required in addition to the content.)
*/
public SupportingInformationComponent setReason(CodeableConcept value) {
this.reason = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify supporting information entries.", 0, 1, sequence));
children.add(new Property("category", "CodeableConcept", "The general class of the information supplied: information; exception; accident, employment; onset, etc.", 0, 1, category));
children.add(new Property("code", "CodeableConcept", "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", 0, 1, code));
children.add(new Property("timing[x]", "date|Period", "The date when or period to which this information refers.", 0, 1, timing));
children.add(new Property("value[x]", "boolean|string|Quantity|Attachment|Reference(Any)|Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value));
children.add(new Property("reason", "CodeableConcept", "Provides the reason in the situation where a reason code is required in addition to the content.", 0, 1, reason));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify supporting information entries.", 0, 1, sequence);
case 50511102: /*category*/ return new Property("category", "CodeableConcept", "The general class of the information supplied: information; exception; accident, employment; onset, etc.", 0, 1, category);
case 3059181: /*code*/ return new Property("code", "CodeableConcept", "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", 0, 1, code);
case 164632566: /*timing[x]*/ return new Property("timing[x]", "date|Period", "The date when or period to which this information refers.", 0, 1, timing);
case -873664438: /*timing*/ return new Property("timing[x]", "date|Period", "The date when or period to which this information refers.", 0, 1, timing);
case 807935768: /*timingDate*/ return new Property("timing[x]", "date", "The date when or period to which this information refers.", 0, 1, timing);
case -615615829: /*timingPeriod*/ return new Property("timing[x]", "Period", "The date when or period to which this information refers.", 0, 1, timing);
case -1410166417: /*value[x]*/ return new Property("value[x]", "boolean|string|Quantity|Attachment|Reference(Any)|Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case 111972721: /*value*/ return new Property("value[x]", "boolean|string|Quantity|Attachment|Reference(Any)|Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case -1424603934: /*valueString*/ return new Property("value[x]", "string", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case 1755241690: /*valueReference*/ return new Property("value[x]", "Reference(Any)", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case -130498310: /*valueIdentifier*/ return new Property("value[x]", "Identifier", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, value);
case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "Provides the reason in the situation where a reason code is required in addition to the content.", 0, 1, reason);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // DataType
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 50511102: // category
this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 3059181: // code
this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -873664438: // timing
this.timing = TypeConvertor.castToType(value); // DataType
return value;
case 111972721: // value
this.value = TypeConvertor.castToType(value); // DataType
return value;
case -934964668: // reason
this.reason = 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("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("category")) {
this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("code")) {
this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("timing[x]")) {
this.timing = TypeConvertor.castToType(value); // DataType
} else if (name.equals("value[x]")) {
this.value = TypeConvertor.castToType(value); // DataType
} else if (name.equals("reason")) {
this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("category")) {
this.category = null;
} else if (name.equals("code")) {
this.code = null;
} else if (name.equals("timing[x]")) {
this.timing = null;
} else if (name.equals("value[x]")) {
this.value = null;
} else if (name.equals("reason")) {
this.reason = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case 50511102: return getCategory();
case 3059181: return getCode();
case 164632566: return getTiming();
case -873664438: return getTiming();
case -1410166417: return getValue();
case 111972721: return getValue();
case -934964668: return getReason();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 50511102: /*category*/ return new String[] {"CodeableConcept"};
case 3059181: /*code*/ return new String[] {"CodeableConcept"};
case -873664438: /*timing*/ return new String[] {"date", "Period"};
case 111972721: /*value*/ return new String[] {"boolean", "string", "Quantity", "Attachment", "Reference", "Identifier"};
case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.supportingInfo.sequence");
}
else if (name.equals("category")) {
this.category = new CodeableConcept();
return this.category;
}
else if (name.equals("code")) {
this.code = new CodeableConcept();
return this.code;
}
else if (name.equals("timingDate")) {
this.timing = new DateType();
return this.timing;
}
else if (name.equals("timingPeriod")) {
this.timing = new Period();
return this.timing;
}
else if (name.equals("valueBoolean")) {
this.value = new BooleanType();
return this.value;
}
else if (name.equals("valueString")) {
this.value = new StringType();
return this.value;
}
else if (name.equals("valueQuantity")) {
this.value = new Quantity();
return this.value;
}
else if (name.equals("valueAttachment")) {
this.value = new Attachment();
return this.value;
}
else if (name.equals("valueReference")) {
this.value = new Reference();
return this.value;
}
else if (name.equals("valueIdentifier")) {
this.value = new Identifier();
return this.value;
}
else if (name.equals("reason")) {
this.reason = new CodeableConcept();
return this.reason;
}
else
return super.addChild(name);
}
public SupportingInformationComponent copy() {
SupportingInformationComponent dst = new SupportingInformationComponent();
copyValues(dst);
return dst;
}
public void copyValues(SupportingInformationComponent dst) {
super.copyValues(dst);
dst.sequence = sequence == null ? null : sequence.copy();
dst.category = category == null ? null : category.copy();
dst.code = code == null ? null : code.copy();
dst.timing = timing == null ? null : timing.copy();
dst.value = value == null ? null : value.copy();
dst.reason = reason == null ? null : reason.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof SupportingInformationComponent))
return false;
SupportingInformationComponent o = (SupportingInformationComponent) other_;
return compareDeep(sequence, o.sequence, true) && compareDeep(category, o.category, true) && compareDeep(code, o.code, true)
&& compareDeep(timing, o.timing, true) && compareDeep(value, o.value, true) && compareDeep(reason, o.reason, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof SupportingInformationComponent))
return false;
SupportingInformationComponent o = (SupportingInformationComponent) other_;
return compareValues(sequence, o.sequence, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, category, code
, timing, value, reason);
}
public String fhirType() {
return "Claim.supportingInfo";
}
}
@Block()
public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify diagnosis entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Diagnosis instance identifier", formalDefinition="A number to uniquely identify diagnosis entries." )
protected PositiveIntType sequence;
/**
* The nature of illness or problem in a coded form or as a reference to an external defined Condition.
*/
@Child(name = "diagnosis", type = {CodeableConcept.class, Condition.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Nature of illness or problem", formalDefinition="The nature of illness or problem in a coded form or as a reference to an external defined Condition." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/icd-10")
protected DataType diagnosis;
/**
* When the condition was observed or the relative ranking.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Timing or nature of the diagnosis", formalDefinition="When the condition was observed or the relative ranking." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-diagnosistype")
protected List type;
/**
* Indication of whether the diagnosis was present on admission to a facility.
*/
@Child(name = "onAdmission", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Present on admission", formalDefinition="Indication of whether the diagnosis was present on admission to a facility." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission")
protected CodeableConcept onAdmission;
private static final long serialVersionUID = -320261526L;
/**
* Constructor
*/
public DiagnosisComponent() {
super();
}
/**
* Constructor
*/
public DiagnosisComponent(int sequence, DataType diagnosis) {
super();
this.setSequence(sequence);
this.setDiagnosis(diagnosis);
}
/**
* @return {@link #sequence} (A number to uniquely identify diagnosis entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosisComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify diagnosis entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public DiagnosisComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify diagnosis entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify diagnosis entries.
*/
public DiagnosisComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.setValue(value);
return this;
}
/**
* @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
*/
public DataType getDiagnosis() {
return this.diagnosis;
}
/**
* @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
*/
public CodeableConcept getDiagnosisCodeableConcept() throws FHIRException {
if (this.diagnosis == null)
this.diagnosis = new CodeableConcept();
if (!(this.diagnosis instanceof CodeableConcept))
throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.diagnosis.getClass().getName()+" was encountered");
return (CodeableConcept) this.diagnosis;
}
public boolean hasDiagnosisCodeableConcept() {
return this != null && this.diagnosis instanceof CodeableConcept;
}
/**
* @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
*/
public Reference getDiagnosisReference() throws FHIRException {
if (this.diagnosis == null)
this.diagnosis = new Reference();
if (!(this.diagnosis instanceof Reference))
throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.diagnosis.getClass().getName()+" was encountered");
return (Reference) this.diagnosis;
}
public boolean hasDiagnosisReference() {
return this != null && this.diagnosis instanceof Reference;
}
public boolean hasDiagnosis() {
return this.diagnosis != null && !this.diagnosis.isEmpty();
}
/**
* @param value {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
*/
public DiagnosisComponent setDiagnosis(DataType value) {
if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
throw new FHIRException("Not the right type for Claim.diagnosis.diagnosis[x]: "+value.fhirType());
this.diagnosis = value;
return this;
}
/**
* @return {@link #type} (When the condition was observed or the relative ranking.)
*/
public List getType() {
if (this.type == null)
this.type = new ArrayList();
return this.type;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public DiagnosisComponent setType(List theType) {
this.type = theType;
return this;
}
public boolean hasType() {
if (this.type == null)
return false;
for (CodeableConcept item : this.type)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addType() { //3
CodeableConcept t = new CodeableConcept();
if (this.type == null)
this.type = new ArrayList();
this.type.add(t);
return t;
}
public DiagnosisComponent addType(CodeableConcept t) { //3
if (t == null)
return this;
if (this.type == null)
this.type = new ArrayList();
this.type.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return {@link #onAdmission} (Indication of whether the diagnosis was present on admission to a facility.)
*/
public CodeableConcept getOnAdmission() {
if (this.onAdmission == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DiagnosisComponent.onAdmission");
else if (Configuration.doAutoCreate())
this.onAdmission = new CodeableConcept(); // cc
return this.onAdmission;
}
public boolean hasOnAdmission() {
return this.onAdmission != null && !this.onAdmission.isEmpty();
}
/**
* @param value {@link #onAdmission} (Indication of whether the diagnosis was present on admission to a facility.)
*/
public DiagnosisComponent setOnAdmission(CodeableConcept value) {
this.onAdmission = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify diagnosis entries.", 0, 1, sequence));
children.add(new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis));
children.add(new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type));
children.add(new Property("onAdmission", "CodeableConcept", "Indication of whether the diagnosis was present on admission to a facility.", 0, 1, onAdmission));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify diagnosis entries.", 0, 1, sequence);
case -1487009809: /*diagnosis[x]*/ return new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
case 1196993265: /*diagnosis*/ return new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
case 277781616: /*diagnosisCodeableConcept*/ return new Property("diagnosis[x]", "CodeableConcept", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
case 2050454362: /*diagnosisReference*/ return new Property("diagnosis[x]", "Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
case 3575610: /*type*/ return new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type);
case -3386134: /*onAdmission*/ return new Property("onAdmission", "CodeableConcept", "Indication of whether the diagnosis was present on admission to a facility.", 0, 1, onAdmission);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : new Base[] {this.diagnosis}; // DataType
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case -3386134: /*onAdmission*/ return this.onAdmission == null ? new Base[0] : new Base[] {this.onAdmission}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 1196993265: // diagnosis
this.diagnosis = TypeConvertor.castToType(value); // DataType
return value;
case 3575610: // type
this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case -3386134: // onAdmission
this.onAdmission = 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("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("diagnosis[x]")) {
this.diagnosis = TypeConvertor.castToType(value); // DataType
} else if (name.equals("type")) {
this.getType().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("onAdmission")) {
this.onAdmission = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("diagnosis[x]")) {
this.diagnosis = null;
} else if (name.equals("type")) {
this.getType().remove(value);
} else if (name.equals("onAdmission")) {
this.onAdmission = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case -1487009809: return getDiagnosis();
case 1196993265: return getDiagnosis();
case 3575610: return addType();
case -3386134: return getOnAdmission();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 1196993265: /*diagnosis*/ return new String[] {"CodeableConcept", "Reference"};
case 3575610: /*type*/ return new String[] {"CodeableConcept"};
case -3386134: /*onAdmission*/ return new String[] {"CodeableConcept"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.diagnosis.sequence");
}
else if (name.equals("diagnosisCodeableConcept")) {
this.diagnosis = new CodeableConcept();
return this.diagnosis;
}
else if (name.equals("diagnosisReference")) {
this.diagnosis = new Reference();
return this.diagnosis;
}
else if (name.equals("type")) {
return addType();
}
else if (name.equals("onAdmission")) {
this.onAdmission = new CodeableConcept();
return this.onAdmission;
}
else
return super.addChild(name);
}
public DiagnosisComponent copy() {
DiagnosisComponent dst = new DiagnosisComponent();
copyValues(dst);
return dst;
}
public void copyValues(DiagnosisComponent dst) {
super.copyValues(dst);
dst.sequence = sequence == null ? null : sequence.copy();
dst.diagnosis = diagnosis == null ? null : diagnosis.copy();
if (type != null) {
dst.type = new ArrayList();
for (CodeableConcept i : type)
dst.type.add(i.copy());
};
dst.onAdmission = onAdmission == null ? null : onAdmission.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof DiagnosisComponent))
return false;
DiagnosisComponent o = (DiagnosisComponent) other_;
return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(type, o.type, true)
&& compareDeep(onAdmission, o.onAdmission, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof DiagnosisComponent))
return false;
DiagnosisComponent o = (DiagnosisComponent) other_;
return compareValues(sequence, o.sequence, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, diagnosis, type
, onAdmission);
}
public String fhirType() {
return "Claim.diagnosis";
}
}
@Block()
public static class ProcedureComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify procedure entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Procedure instance identifier", formalDefinition="A number to uniquely identify procedure entries." )
protected PositiveIntType sequence;
/**
* When the condition was observed or the relative ranking.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Category of Procedure", formalDefinition="When the condition was observed or the relative ranking." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-procedure-type")
protected List type;
/**
* Date and optionally time the procedure was performed.
*/
@Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When the procedure was performed", formalDefinition="Date and optionally time the procedure was performed." )
protected DateTimeType date;
/**
* The code or reference to a Procedure resource which identifies the clinical intervention performed.
*/
@Child(name = "procedure", type = {CodeableConcept.class, Procedure.class}, order=4, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Specific clinical procedure", formalDefinition="The code or reference to a Procedure resource which identifies the clinical intervention performed." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/icd-10-procedures")
protected DataType procedure;
/**
* Unique Device Identifiers associated with this line item.
*/
@Child(name = "udi", type = {Device.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." )
protected List udi;
private static final long serialVersionUID = 1165684715L;
/**
* Constructor
*/
public ProcedureComponent() {
super();
}
/**
* Constructor
*/
public ProcedureComponent(int sequence, DataType procedure) {
super();
this.setSequence(sequence);
this.setProcedure(procedure);
}
/**
* @return {@link #sequence} (A number to uniquely identify procedure entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ProcedureComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify procedure entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public ProcedureComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify procedure entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify procedure entries.
*/
public ProcedureComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.setValue(value);
return this;
}
/**
* @return {@link #type} (When the condition was observed or the relative ranking.)
*/
public List getType() {
if (this.type == null)
this.type = new ArrayList();
return this.type;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ProcedureComponent setType(List theType) {
this.type = theType;
return this;
}
public boolean hasType() {
if (this.type == null)
return false;
for (CodeableConcept item : this.type)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addType() { //3
CodeableConcept t = new CodeableConcept();
if (this.type == null)
this.type = new ArrayList();
this.type.add(t);
return t;
}
public ProcedureComponent addType(CodeableConcept t) { //3
if (t == null)
return this;
if (this.type == null)
this.type = new ArrayList();
this.type.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
*/
public CodeableConcept getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return {@link #date} (Date and optionally time the procedure was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public DateTimeType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ProcedureComponent.date");
else if (Configuration.doAutoCreate())
this.date = new DateTimeType(); // bb
return this.date;
}
public boolean hasDateElement() {
return this.date != null && !this.date.isEmpty();
}
public boolean hasDate() {
return this.date != null && !this.date.isEmpty();
}
/**
* @param value {@link #date} (Date and optionally time the procedure was performed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public ProcedureComponent setDateElement(DateTimeType value) {
this.date = value;
return this;
}
/**
* @return Date and optionally time the procedure was performed.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
}
/**
* @param value Date and optionally time the procedure was performed.
*/
public ProcedureComponent setDate(Date value) {
if (value == null)
this.date = null;
else {
if (this.date == null)
this.date = new DateTimeType();
this.date.setValue(value);
}
return this;
}
/**
* @return {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.)
*/
public DataType getProcedure() {
return this.procedure;
}
/**
* @return {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.)
*/
public CodeableConcept getProcedureCodeableConcept() throws FHIRException {
if (this.procedure == null)
this.procedure = new CodeableConcept();
if (!(this.procedure instanceof CodeableConcept))
throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.procedure.getClass().getName()+" was encountered");
return (CodeableConcept) this.procedure;
}
public boolean hasProcedureCodeableConcept() {
return this != null && this.procedure instanceof CodeableConcept;
}
/**
* @return {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.)
*/
public Reference getProcedureReference() throws FHIRException {
if (this.procedure == null)
this.procedure = new Reference();
if (!(this.procedure instanceof Reference))
throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.procedure.getClass().getName()+" was encountered");
return (Reference) this.procedure;
}
public boolean hasProcedureReference() {
return this != null && this.procedure instanceof Reference;
}
public boolean hasProcedure() {
return this.procedure != null && !this.procedure.isEmpty();
}
/**
* @param value {@link #procedure} (The code or reference to a Procedure resource which identifies the clinical intervention performed.)
*/
public ProcedureComponent setProcedure(DataType value) {
if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
throw new FHIRException("Not the right type for Claim.procedure.procedure[x]: "+value.fhirType());
this.procedure = value;
return this;
}
/**
* @return {@link #udi} (Unique Device Identifiers associated with this line item.)
*/
public List getUdi() {
if (this.udi == null)
this.udi = new ArrayList();
return this.udi;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ProcedureComponent setUdi(List theUdi) {
this.udi = theUdi;
return this;
}
public boolean hasUdi() {
if (this.udi == null)
return false;
for (Reference item : this.udi)
if (!item.isEmpty())
return true;
return false;
}
public Reference addUdi() { //3
Reference t = new Reference();
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return t;
}
public ProcedureComponent addUdi(Reference t) { //3
if (t == null)
return this;
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3}
*/
public Reference getUdiFirstRep() {
if (getUdi().isEmpty()) {
addUdi();
}
return getUdi().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify procedure entries.", 0, 1, sequence));
children.add(new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type));
children.add(new Property("date", "dateTime", "Date and optionally time the procedure was performed.", 0, 1, date));
children.add(new Property("procedure[x]", "CodeableConcept|Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure));
children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify procedure entries.", 0, 1, sequence);
case 3575610: /*type*/ return new Property("type", "CodeableConcept", "When the condition was observed or the relative ranking.", 0, java.lang.Integer.MAX_VALUE, type);
case 3076014: /*date*/ return new Property("date", "dateTime", "Date and optionally time the procedure was performed.", 0, 1, date);
case 1640074445: /*procedure[x]*/ return new Property("procedure[x]", "CodeableConcept|Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure);
case -1095204141: /*procedure*/ return new Property("procedure[x]", "CodeableConcept|Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure);
case -1284783026: /*procedureCodeableConcept*/ return new Property("procedure[x]", "CodeableConcept", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure);
case 881809848: /*procedureReference*/ return new Property("procedure[x]", "Reference(Procedure)", "The code or reference to a Procedure resource which identifies the clinical intervention performed.", 0, 1, procedure);
case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : new Base[] {this.procedure}; // DataType
case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 3575610: // type
this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case 3076014: // date
this.date = TypeConvertor.castToDateTime(value); // DateTimeType
return value;
case -1095204141: // procedure
this.procedure = TypeConvertor.castToType(value); // DataType
return value;
case 115642: // udi
this.getUdi().add(TypeConvertor.castToReference(value)); // Reference
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("type")) {
this.getType().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("date")) {
this.date = TypeConvertor.castToDateTime(value); // DateTimeType
} else if (name.equals("procedure[x]")) {
this.procedure = TypeConvertor.castToType(value); // DataType
} else if (name.equals("udi")) {
this.getUdi().add(TypeConvertor.castToReference(value));
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("type")) {
this.getType().remove(value);
} else if (name.equals("date")) {
this.date = null;
} else if (name.equals("procedure[x]")) {
this.procedure = null;
} else if (name.equals("udi")) {
this.getUdi().remove(value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case 3575610: return addType();
case 3076014: return getDateElement();
case 1640074445: return getProcedure();
case -1095204141: return getProcedure();
case 115642: return addUdi();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 3575610: /*type*/ return new String[] {"CodeableConcept"};
case 3076014: /*date*/ return new String[] {"dateTime"};
case -1095204141: /*procedure*/ return new String[] {"CodeableConcept", "Reference"};
case 115642: /*udi*/ return new String[] {"Reference"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.procedure.sequence");
}
else if (name.equals("type")) {
return addType();
}
else if (name.equals("date")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.procedure.date");
}
else if (name.equals("procedureCodeableConcept")) {
this.procedure = new CodeableConcept();
return this.procedure;
}
else if (name.equals("procedureReference")) {
this.procedure = new Reference();
return this.procedure;
}
else if (name.equals("udi")) {
return addUdi();
}
else
return super.addChild(name);
}
public ProcedureComponent copy() {
ProcedureComponent dst = new ProcedureComponent();
copyValues(dst);
return dst;
}
public void copyValues(ProcedureComponent dst) {
super.copyValues(dst);
dst.sequence = sequence == null ? null : sequence.copy();
if (type != null) {
dst.type = new ArrayList();
for (CodeableConcept i : type)
dst.type.add(i.copy());
};
dst.date = date == null ? null : date.copy();
dst.procedure = procedure == null ? null : procedure.copy();
if (udi != null) {
dst.udi = new ArrayList();
for (Reference i : udi)
dst.udi.add(i.copy());
};
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof ProcedureComponent))
return false;
ProcedureComponent o = (ProcedureComponent) other_;
return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(date, o.date, true)
&& compareDeep(procedure, o.procedure, true) && compareDeep(udi, o.udi, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof ProcedureComponent))
return false;
ProcedureComponent o = (ProcedureComponent) other_;
return compareValues(sequence, o.sequence, true) && compareValues(date, o.date, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, type, date, procedure
, udi);
}
public String fhirType() {
return "Claim.procedure";
}
}
@Block()
public static class InsuranceComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Insurance instance identifier", formalDefinition="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order." )
protected PositiveIntType sequence;
/**
* A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.
*/
@Child(name = "focal", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Coverage to be used for adjudication", formalDefinition="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true." )
protected BooleanType focal;
/**
* The business identifier to be used when the claim is sent for adjudication against this insurance policy.
*/
@Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Pre-assigned Claim number", formalDefinition="The business identifier to be used when the claim is sent for adjudication against this insurance policy." )
protected Identifier identifier;
/**
* Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.
*/
@Child(name = "coverage", type = {Coverage.class}, order=4, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Insurance information", formalDefinition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." )
protected Reference coverage;
/**
* A business agreement number established between the provider and the insurer for special business processing purposes.
*/
@Child(name = "businessArrangement", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Additional provider contract number", formalDefinition="A business agreement number established between the provider and the insurer for special business processing purposes." )
protected StringType businessArrangement;
/**
* Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.
*/
@Child(name = "preAuthRef", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Prior authorization reference number", formalDefinition="Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization." )
protected List preAuthRef;
/**
* The result of the adjudication of the line items for the Coverage specified in this insurance.
*/
@Child(name = "claimResponse", type = {ClaimResponse.class}, order=7, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Adjudication results", formalDefinition="The result of the adjudication of the line items for the Coverage specified in this insurance." )
protected Reference claimResponse;
private static final long serialVersionUID = 481628099L;
/**
* Constructor
*/
public InsuranceComponent() {
super();
}
/**
* Constructor
*/
public InsuranceComponent(int sequence, boolean focal, Reference coverage) {
super();
this.setSequence(sequence);
this.setFocal(focal);
this.setCoverage(coverage);
}
/**
* @return {@link #sequence} (A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create InsuranceComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public InsuranceComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.
*/
public InsuranceComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.setValue(value);
return this;
}
/**
* @return {@link #focal} (A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value
*/
public BooleanType getFocalElement() {
if (this.focal == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create InsuranceComponent.focal");
else if (Configuration.doAutoCreate())
this.focal = new BooleanType(); // bb
return this.focal;
}
public boolean hasFocalElement() {
return this.focal != null && !this.focal.isEmpty();
}
public boolean hasFocal() {
return this.focal != null && !this.focal.isEmpty();
}
/**
* @param value {@link #focal} (A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value
*/
public InsuranceComponent setFocalElement(BooleanType value) {
this.focal = value;
return this;
}
/**
* @return A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.
*/
public boolean getFocal() {
return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue();
}
/**
* @param value A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.
*/
public InsuranceComponent setFocal(boolean value) {
if (this.focal == null)
this.focal = new BooleanType();
this.focal.setValue(value);
return this;
}
/**
* @return {@link #identifier} (The business identifier to be used when the claim is sent for adjudication against this insurance policy.)
*/
public Identifier getIdentifier() {
if (this.identifier == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create InsuranceComponent.identifier");
else if (Configuration.doAutoCreate())
this.identifier = new Identifier(); // cc
return this.identifier;
}
public boolean hasIdentifier() {
return this.identifier != null && !this.identifier.isEmpty();
}
/**
* @param value {@link #identifier} (The business identifier to be used when the claim is sent for adjudication against this insurance policy.)
*/
public InsuranceComponent setIdentifier(Identifier value) {
this.identifier = value;
return this;
}
/**
* @return {@link #coverage} (Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.)
*/
public Reference getCoverage() {
if (this.coverage == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create InsuranceComponent.coverage");
else if (Configuration.doAutoCreate())
this.coverage = new Reference(); // cc
return this.coverage;
}
public boolean hasCoverage() {
return this.coverage != null && !this.coverage.isEmpty();
}
/**
* @param value {@link #coverage} (Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.)
*/
public InsuranceComponent setCoverage(Reference value) {
this.coverage = value;
return this;
}
/**
* @return {@link #businessArrangement} (A business agreement number established between the provider and the insurer for special business processing purposes.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value
*/
public StringType getBusinessArrangementElement() {
if (this.businessArrangement == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create InsuranceComponent.businessArrangement");
else if (Configuration.doAutoCreate())
this.businessArrangement = new StringType(); // bb
return this.businessArrangement;
}
public boolean hasBusinessArrangementElement() {
return this.businessArrangement != null && !this.businessArrangement.isEmpty();
}
public boolean hasBusinessArrangement() {
return this.businessArrangement != null && !this.businessArrangement.isEmpty();
}
/**
* @param value {@link #businessArrangement} (A business agreement number established between the provider and the insurer for special business processing purposes.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value
*/
public InsuranceComponent setBusinessArrangementElement(StringType value) {
this.businessArrangement = value;
return this;
}
/**
* @return A business agreement number established between the provider and the insurer for special business processing purposes.
*/
public String getBusinessArrangement() {
return this.businessArrangement == null ? null : this.businessArrangement.getValue();
}
/**
* @param value A business agreement number established between the provider and the insurer for special business processing purposes.
*/
public InsuranceComponent setBusinessArrangement(String value) {
if (Utilities.noString(value))
this.businessArrangement = null;
else {
if (this.businessArrangement == null)
this.businessArrangement = new StringType();
this.businessArrangement.setValue(value);
}
return this;
}
/**
* @return {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.)
*/
public List getPreAuthRef() {
if (this.preAuthRef == null)
this.preAuthRef = new ArrayList();
return this.preAuthRef;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public InsuranceComponent setPreAuthRef(List thePreAuthRef) {
this.preAuthRef = thePreAuthRef;
return this;
}
public boolean hasPreAuthRef() {
if (this.preAuthRef == null)
return false;
for (StringType item : this.preAuthRef)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.)
*/
public StringType addPreAuthRefElement() {//2
StringType t = new StringType();
if (this.preAuthRef == null)
this.preAuthRef = new ArrayList();
this.preAuthRef.add(t);
return t;
}
/**
* @param value {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.)
*/
public InsuranceComponent addPreAuthRef(String value) { //1
StringType t = new StringType();
t.setValue(value);
if (this.preAuthRef == null)
this.preAuthRef = new ArrayList();
this.preAuthRef.add(t);
return this;
}
/**
* @param value {@link #preAuthRef} (Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.)
*/
public boolean hasPreAuthRef(String value) {
if (this.preAuthRef == null)
return false;
for (StringType v : this.preAuthRef)
if (v.getValue().equals(value)) // string
return true;
return false;
}
/**
* @return {@link #claimResponse} (The result of the adjudication of the line items for the Coverage specified in this insurance.)
*/
public Reference getClaimResponse() {
if (this.claimResponse == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create InsuranceComponent.claimResponse");
else if (Configuration.doAutoCreate())
this.claimResponse = new Reference(); // cc
return this.claimResponse;
}
public boolean hasClaimResponse() {
return this.claimResponse != null && !this.claimResponse.isEmpty();
}
/**
* @param value {@link #claimResponse} (The result of the adjudication of the line items for the Coverage specified in this insurance.)
*/
public InsuranceComponent setClaimResponse(Reference value) {
this.claimResponse = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", 0, 1, sequence));
children.add(new Property("focal", "boolean", "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", 0, 1, focal));
children.add(new Property("identifier", "Identifier", "The business identifier to be used when the claim is sent for adjudication against this insurance policy.", 0, 1, identifier));
children.add(new Property("coverage", "Reference(Coverage)", "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", 0, 1, coverage));
children.add(new Property("businessArrangement", "string", "A business agreement number established between the provider and the insurer for special business processing purposes.", 0, 1, businessArrangement));
children.add(new Property("preAuthRef", "string", "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", 0, java.lang.Integer.MAX_VALUE, preAuthRef));
children.add(new Property("claimResponse", "Reference(ClaimResponse)", "The result of the adjudication of the line items for the Coverage specified in this insurance.", 0, 1, claimResponse));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", 0, 1, sequence);
case 97604197: /*focal*/ return new Property("focal", "boolean", "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", 0, 1, focal);
case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "The business identifier to be used when the claim is sent for adjudication against this insurance policy.", 0, 1, identifier);
case -351767064: /*coverage*/ return new Property("coverage", "Reference(Coverage)", "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", 0, 1, coverage);
case 259920682: /*businessArrangement*/ return new Property("businessArrangement", "string", "A business agreement number established between the provider and the insurer for special business processing purposes.", 0, 1, businessArrangement);
case 522246568: /*preAuthRef*/ return new Property("preAuthRef", "string", "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", 0, java.lang.Integer.MAX_VALUE, preAuthRef);
case 689513629: /*claimResponse*/ return new Property("claimResponse", "Reference(ClaimResponse)", "The result of the adjudication of the line items for the Coverage specified in this insurance.", 0, 1, claimResponse);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case 97604197: /*focal*/ return this.focal == null ? new Base[0] : new Base[] {this.focal}; // BooleanType
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference
case 259920682: /*businessArrangement*/ return this.businessArrangement == null ? new Base[0] : new Base[] {this.businessArrangement}; // StringType
case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : this.preAuthRef.toArray(new Base[this.preAuthRef.size()]); // StringType
case 689513629: /*claimResponse*/ return this.claimResponse == null ? new Base[0] : new Base[] {this.claimResponse}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 97604197: // focal
this.focal = TypeConvertor.castToBoolean(value); // BooleanType
return value;
case -1618432855: // identifier
this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
return value;
case -351767064: // coverage
this.coverage = TypeConvertor.castToReference(value); // Reference
return value;
case 259920682: // businessArrangement
this.businessArrangement = TypeConvertor.castToString(value); // StringType
return value;
case 522246568: // preAuthRef
this.getPreAuthRef().add(TypeConvertor.castToString(value)); // StringType
return value;
case 689513629: // claimResponse
this.claimResponse = TypeConvertor.castToReference(value); // Reference
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("focal")) {
this.focal = TypeConvertor.castToBoolean(value); // BooleanType
} else if (name.equals("identifier")) {
this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
} else if (name.equals("coverage")) {
this.coverage = TypeConvertor.castToReference(value); // Reference
} else if (name.equals("businessArrangement")) {
this.businessArrangement = TypeConvertor.castToString(value); // StringType
} else if (name.equals("preAuthRef")) {
this.getPreAuthRef().add(TypeConvertor.castToString(value));
} else if (name.equals("claimResponse")) {
this.claimResponse = TypeConvertor.castToReference(value); // Reference
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("focal")) {
this.focal = null;
} else if (name.equals("identifier")) {
this.identifier = null;
} else if (name.equals("coverage")) {
this.coverage = null;
} else if (name.equals("businessArrangement")) {
this.businessArrangement = null;
} else if (name.equals("preAuthRef")) {
this.getPreAuthRef().remove(value);
} else if (name.equals("claimResponse")) {
this.claimResponse = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case 97604197: return getFocalElement();
case -1618432855: return getIdentifier();
case -351767064: return getCoverage();
case 259920682: return getBusinessArrangementElement();
case 522246568: return addPreAuthRefElement();
case 689513629: return getClaimResponse();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 97604197: /*focal*/ return new String[] {"boolean"};
case -1618432855: /*identifier*/ return new String[] {"Identifier"};
case -351767064: /*coverage*/ return new String[] {"Reference"};
case 259920682: /*businessArrangement*/ return new String[] {"string"};
case 522246568: /*preAuthRef*/ return new String[] {"string"};
case 689513629: /*claimResponse*/ return new String[] {"Reference"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.insurance.sequence");
}
else if (name.equals("focal")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.insurance.focal");
}
else if (name.equals("identifier")) {
this.identifier = new Identifier();
return this.identifier;
}
else if (name.equals("coverage")) {
this.coverage = new Reference();
return this.coverage;
}
else if (name.equals("businessArrangement")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.insurance.businessArrangement");
}
else if (name.equals("preAuthRef")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.insurance.preAuthRef");
}
else if (name.equals("claimResponse")) {
this.claimResponse = new Reference();
return this.claimResponse;
}
else
return super.addChild(name);
}
public InsuranceComponent copy() {
InsuranceComponent dst = new InsuranceComponent();
copyValues(dst);
return dst;
}
public void copyValues(InsuranceComponent dst) {
super.copyValues(dst);
dst.sequence = sequence == null ? null : sequence.copy();
dst.focal = focal == null ? null : focal.copy();
dst.identifier = identifier == null ? null : identifier.copy();
dst.coverage = coverage == null ? null : coverage.copy();
dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy();
if (preAuthRef != null) {
dst.preAuthRef = new ArrayList();
for (StringType i : preAuthRef)
dst.preAuthRef.add(i.copy());
};
dst.claimResponse = claimResponse == null ? null : claimResponse.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof InsuranceComponent))
return false;
InsuranceComponent o = (InsuranceComponent) other_;
return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(identifier, o.identifier, true)
&& compareDeep(coverage, o.coverage, true) && compareDeep(businessArrangement, o.businessArrangement, true)
&& compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof InsuranceComponent))
return false;
InsuranceComponent o = (InsuranceComponent) other_;
return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true)
&& compareValues(preAuthRef, o.preAuthRef, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, focal, identifier
, coverage, businessArrangement, preAuthRef, claimResponse);
}
public String fhirType() {
return "Claim.insurance";
}
}
@Block()
public static class AccidentComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Date of an accident event related to the products and services contained in the claim.
*/
@Child(name = "date", type = {DateType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="When the incident occurred", formalDefinition="Date of an accident event related to the products and services contained in the claim." )
protected DateType date;
/**
* The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The nature of the accident", formalDefinition="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActIncidentCode")
protected CodeableConcept type;
/**
* The physical location of the accident event.
*/
@Child(name = "location", type = {Address.class, Location.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Where the event occurred", formalDefinition="The physical location of the accident event." )
protected DataType location;
private static final long serialVersionUID = 11882722L;
/**
* Constructor
*/
public AccidentComponent() {
super();
}
/**
* Constructor
*/
public AccidentComponent(Date date) {
super();
this.setDate(date);
}
/**
* @return {@link #date} (Date of an accident event related to the products and services contained in the claim.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public DateType getDateElement() {
if (this.date == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AccidentComponent.date");
else if (Configuration.doAutoCreate())
this.date = new DateType(); // bb
return this.date;
}
public boolean hasDateElement() {
return this.date != null && !this.date.isEmpty();
}
public boolean hasDate() {
return this.date != null && !this.date.isEmpty();
}
/**
* @param value {@link #date} (Date of an accident event related to the products and services contained in the claim.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
*/
public AccidentComponent setDateElement(DateType value) {
this.date = value;
return this;
}
/**
* @return Date of an accident event related to the products and services contained in the claim.
*/
public Date getDate() {
return this.date == null ? null : this.date.getValue();
}
/**
* @param value Date of an accident event related to the products and services contained in the claim.
*/
public AccidentComponent setDate(Date value) {
if (this.date == null)
this.date = new DateType();
this.date.setValue(value);
return this;
}
/**
* @return {@link #type} (The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.)
*/
public CodeableConcept getType() {
if (this.type == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create AccidentComponent.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} (The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.)
*/
public AccidentComponent setType(CodeableConcept value) {
this.type = value;
return this;
}
/**
* @return {@link #location} (The physical location of the accident event.)
*/
public DataType getLocation() {
return this.location;
}
/**
* @return {@link #location} (The physical location of the accident event.)
*/
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} (The physical location of the accident event.)
*/
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} (The physical location of the accident event.)
*/
public AccidentComponent setLocation(DataType value) {
if (value != null && !(value instanceof Address || value instanceof Reference))
throw new FHIRException("Not the right type for Claim.accident.location[x]: "+value.fhirType());
this.location = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("date", "date", "Date of an accident event related to the products and services contained in the claim.", 0, 1, date));
children.add(new Property("type", "CodeableConcept", "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", 0, 1, type));
children.add(new Property("location[x]", "Address|Reference(Location)", "The physical location of the accident event.", 0, 1, location));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 3076014: /*date*/ return new Property("date", "date", "Date of an accident event related to the products and services contained in the claim.", 0, 1, date);
case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", 0, 1, type);
case 552316075: /*location[x]*/ return new Property("location[x]", "Address|Reference(Location)", "The physical location of the accident event.", 0, 1, location);
case 1901043637: /*location*/ return new Property("location[x]", "Address|Reference(Location)", "The physical location of the accident event.", 0, 1, location);
case -1280020865: /*locationAddress*/ return new Property("location[x]", "Address", "The physical location of the accident event.", 0, 1, location);
case 755866390: /*locationReference*/ return new Property("location[x]", "Reference(Location)", "The physical location of the accident event.", 0, 1, location);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateType
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // DataType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3076014: // date
this.date = TypeConvertor.castToDate(value); // DateType
return value;
case 3575610: // type
this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 1901043637: // location
this.location = 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("date")) {
this.date = TypeConvertor.castToDate(value); // DateType
} else if (name.equals("type")) {
this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("location[x]")) {
this.location = 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("date")) {
this.date = null;
} else if (name.equals("type")) {
this.type = null;
} else if (name.equals("location[x]")) {
this.location = null;
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3076014: return getDateElement();
case 3575610: return getType();
case 552316075: return getLocation();
case 1901043637: return getLocation();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3076014: /*date*/ return new String[] {"date"};
case 3575610: /*type*/ return new String[] {"CodeableConcept"};
case 1901043637: /*location*/ return new String[] {"Address", "Reference"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("date")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.accident.date");
}
else if (name.equals("type")) {
this.type = new CodeableConcept();
return this.type;
}
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
return super.addChild(name);
}
public AccidentComponent copy() {
AccidentComponent dst = new AccidentComponent();
copyValues(dst);
return dst;
}
public void copyValues(AccidentComponent dst) {
super.copyValues(dst);
dst.date = date == null ? null : date.copy();
dst.type = type == null ? null : type.copy();
dst.location = location == null ? null : location.copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof AccidentComponent))
return false;
AccidentComponent o = (AccidentComponent) other_;
return compareDeep(date, o.date, true) && compareDeep(type, o.type, true) && compareDeep(location, o.location, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof AccidentComponent))
return false;
AccidentComponent o = (AccidentComponent) other_;
return compareValues(date, o.date, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(date, type, location);
}
public String fhirType() {
return "Claim.accident";
}
}
@Block()
public static class ItemComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify item entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Item instance identifier", formalDefinition="A number to uniquely identify item entries." )
protected PositiveIntType sequence;
/**
* 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;
/**
* CareTeam members related to this service or product.
*/
@Child(name = "careTeamSequence", type = {PositiveIntType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable careTeam members", formalDefinition="CareTeam members related to this service or product." )
protected List careTeamSequence;
/**
* Diagnosis applicable for this service or product.
*/
@Child(name = "diagnosisSequence", type = {PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable diagnoses", formalDefinition="Diagnosis applicable for this service or product." )
protected List diagnosisSequence;
/**
* Procedures applicable for this service or product.
*/
@Child(name = "procedureSequence", type = {PositiveIntType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable procedures", formalDefinition="Procedures applicable for this service or product." )
protected List procedureSequence;
/**
* Exceptions, special conditions and supporting information applicable for this service or product.
*/
@Child(name = "informationSequence", type = {PositiveIntType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Applicable exception and supporting information", formalDefinition="Exceptions, special conditions and supporting information applicable for this service or product." )
protected List informationSequence;
/**
* The type of revenue or cost center providing the product and/or service.
*/
@Child(name = "revenue", type = {CodeableConcept.class}, order=7, 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;
/**
* Code to identify the general type of benefits under which products and services are provided.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory")
protected CodeableConcept category;
/**
* 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=9, 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=10, 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=11, 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=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Product or service 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=13, 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=14, 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=15, 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 amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.
*/
@Child(name = "patientPaid", type = {Money.class}, order=16, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." )
protected Money patientPaid;
/**
* The number of repetitions of a service or product.
*/
@Child(name = "quantity", type = {Quantity.class}, order=17, 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=18, 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=19, 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=20, 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 line item. Net = unit price * quantity * factor.
*/
@Child(name = "net", type = {Money.class}, order=21, 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 line item. Net = unit price * quantity * factor." )
protected Money net;
/**
* Unique Device Identifiers associated with this line item.
*/
@Child(name = "udi", type = {Device.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." )
protected List udi;
/**
* Physical location where the service is performed or applies.
*/
@Child(name = "bodySite", type = {}, order=23, 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;
/**
* Healthcare encounters related to this claim.
*/
@Child(name = "encounter", type = {Encounter.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Encounters associated with the listed treatments", formalDefinition="Healthcare encounters related to this claim." )
protected List encounter;
/**
* A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.
*/
@Child(name = "detail", type = {}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Product or service provided", formalDefinition="A claim detail line. 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 = -1174144448L;
/**
* Constructor
*/
public ItemComponent() {
super();
}
/**
* Constructor
*/
public ItemComponent(int sequence) {
super();
this.setSequence(sequence);
}
/**
* @return {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public ItemComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify item entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify item entries.
*/
public ItemComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.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 #careTeamSequence} (CareTeam members related to this service or product.)
*/
public List getCareTeamSequence() {
if (this.careTeamSequence == null)
this.careTeamSequence = new ArrayList();
return this.careTeamSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setCareTeamSequence(List theCareTeamSequence) {
this.careTeamSequence = theCareTeamSequence;
return this;
}
public boolean hasCareTeamSequence() {
if (this.careTeamSequence == null)
return false;
for (PositiveIntType item : this.careTeamSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #careTeamSequence} (CareTeam members related to this service or product.)
*/
public PositiveIntType addCareTeamSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.careTeamSequence == null)
this.careTeamSequence = new ArrayList();
this.careTeamSequence.add(t);
return t;
}
/**
* @param value {@link #careTeamSequence} (CareTeam members related to this service or product.)
*/
public ItemComponent addCareTeamSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.careTeamSequence == null)
this.careTeamSequence = new ArrayList();
this.careTeamSequence.add(t);
return this;
}
/**
* @param value {@link #careTeamSequence} (CareTeam members related to this service or product.)
*/
public boolean hasCareTeamSequence(int value) {
if (this.careTeamSequence == null)
return false;
for (PositiveIntType v : this.careTeamSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #diagnosisSequence} (Diagnosis applicable for this service or product.)
*/
public List getDiagnosisSequence() {
if (this.diagnosisSequence == null)
this.diagnosisSequence = new ArrayList();
return this.diagnosisSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setDiagnosisSequence(List theDiagnosisSequence) {
this.diagnosisSequence = theDiagnosisSequence;
return this;
}
public boolean hasDiagnosisSequence() {
if (this.diagnosisSequence == null)
return false;
for (PositiveIntType item : this.diagnosisSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #diagnosisSequence} (Diagnosis applicable for this service or product.)
*/
public PositiveIntType addDiagnosisSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.diagnosisSequence == null)
this.diagnosisSequence = new ArrayList();
this.diagnosisSequence.add(t);
return t;
}
/**
* @param value {@link #diagnosisSequence} (Diagnosis applicable for this service or product.)
*/
public ItemComponent addDiagnosisSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.diagnosisSequence == null)
this.diagnosisSequence = new ArrayList();
this.diagnosisSequence.add(t);
return this;
}
/**
* @param value {@link #diagnosisSequence} (Diagnosis applicable for this service or product.)
*/
public boolean hasDiagnosisSequence(int value) {
if (this.diagnosisSequence == null)
return false;
for (PositiveIntType v : this.diagnosisSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #procedureSequence} (Procedures applicable for this service or product.)
*/
public List getProcedureSequence() {
if (this.procedureSequence == null)
this.procedureSequence = new ArrayList();
return this.procedureSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setProcedureSequence(List theProcedureSequence) {
this.procedureSequence = theProcedureSequence;
return this;
}
public boolean hasProcedureSequence() {
if (this.procedureSequence == null)
return false;
for (PositiveIntType item : this.procedureSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #procedureSequence} (Procedures applicable for this service or product.)
*/
public PositiveIntType addProcedureSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.procedureSequence == null)
this.procedureSequence = new ArrayList();
this.procedureSequence.add(t);
return t;
}
/**
* @param value {@link #procedureSequence} (Procedures applicable for this service or product.)
*/
public ItemComponent addProcedureSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.procedureSequence == null)
this.procedureSequence = new ArrayList();
this.procedureSequence.add(t);
return this;
}
/**
* @param value {@link #procedureSequence} (Procedures applicable for this service or product.)
*/
public boolean hasProcedureSequence(int value) {
if (this.procedureSequence == null)
return false;
for (PositiveIntType v : this.procedureSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @return {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.)
*/
public List getInformationSequence() {
if (this.informationSequence == null)
this.informationSequence = new ArrayList();
return this.informationSequence;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setInformationSequence(List theInformationSequence) {
this.informationSequence = theInformationSequence;
return this;
}
public boolean hasInformationSequence() {
if (this.informationSequence == null)
return false;
for (PositiveIntType item : this.informationSequence)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.)
*/
public PositiveIntType addInformationSequenceElement() {//2
PositiveIntType t = new PositiveIntType();
if (this.informationSequence == null)
this.informationSequence = new ArrayList();
this.informationSequence.add(t);
return t;
}
/**
* @param value {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.)
*/
public ItemComponent addInformationSequence(int value) { //1
PositiveIntType t = new PositiveIntType();
t.setValue(value);
if (this.informationSequence == null)
this.informationSequence = new ArrayList();
this.informationSequence.add(t);
return this;
}
/**
* @param value {@link #informationSequence} (Exceptions, special conditions and supporting information applicable for this service or product.)
*/
public boolean hasInformationSequence(int value) {
if (this.informationSequence == null)
return false;
for (PositiveIntType v : this.informationSequence)
if (v.getValue().equals(value)) // positiveInt
return true;
return false;
}
/**
* @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 ItemComponent.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 ItemComponent setRevenue(CodeableConcept value) {
this.revenue = value;
return this;
}
/**
* @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemComponent.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} (Code to identify the general type of benefits under which products and services are provided.)
*/
public ItemComponent setCategory(CodeableConcept value) {
this.category = 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 ItemComponent.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 ItemComponent 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 ItemComponent.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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent setServiced(DataType value) {
if (value != null && !(value instanceof DateType || value instanceof Period))
throw new FHIRException("Not the right type for Claim.item.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 ItemComponent setLocation(DataType value) {
if (value != null && !(value instanceof CodeableConcept || value instanceof Address || value instanceof Reference))
throw new FHIRException("Not the right type for Claim.item.location[x]: "+value.fhirType());
this.location = value;
return this;
}
/**
* @return {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.)
*/
public Money getPatientPaid() {
if (this.patientPaid == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemComponent.patientPaid");
else if (Configuration.doAutoCreate())
this.patientPaid = new Money(); // cc
return this.patientPaid;
}
public boolean hasPatientPaid() {
return this.patientPaid != null && !this.patientPaid.isEmpty();
}
/**
* @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.)
*/
public ItemComponent setPatientPaid(Money value) {
this.patientPaid = 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 ItemComponent.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 ItemComponent 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 ItemComponent.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 ItemComponent 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 ItemComponent.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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent 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 ItemComponent.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 ItemComponent setTax(Money value) {
this.tax = value;
return this;
}
/**
* @return {@link #net} (The total amount claimed for the group (if a grouper) or the line item. Net = unit price * quantity * factor.)
*/
public Money getNet() {
if (this.net == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create ItemComponent.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 line item. Net = unit price * quantity * factor.)
*/
public ItemComponent setNet(Money value) {
this.net = value;
return this;
}
/**
* @return {@link #udi} (Unique Device Identifiers associated with this line item.)
*/
public List getUdi() {
if (this.udi == null)
this.udi = new ArrayList();
return this.udi;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setUdi(List theUdi) {
this.udi = theUdi;
return this;
}
public boolean hasUdi() {
if (this.udi == null)
return false;
for (Reference item : this.udi)
if (!item.isEmpty())
return true;
return false;
}
public Reference addUdi() { //3
Reference t = new Reference();
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return t;
}
public ItemComponent addUdi(Reference t) { //3
if (t == null)
return this;
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3}
*/
public Reference getUdiFirstRep() {
if (getUdi().isEmpty()) {
addUdi();
}
return getUdi().get(0);
}
/**
* @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 ItemComponent 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 ItemComponent 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 #encounter} (Healthcare encounters related to this claim.)
*/
public List getEncounter() {
if (this.encounter == null)
this.encounter = new ArrayList();
return this.encounter;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public ItemComponent setEncounter(List theEncounter) {
this.encounter = theEncounter;
return this;
}
public boolean hasEncounter() {
if (this.encounter == null)
return false;
for (Reference item : this.encounter)
if (!item.isEmpty())
return true;
return false;
}
public Reference addEncounter() { //3
Reference t = new Reference();
if (this.encounter == null)
this.encounter = new ArrayList();
this.encounter.add(t);
return t;
}
public ItemComponent addEncounter(Reference t) { //3
if (t == null)
return this;
if (this.encounter == null)
this.encounter = new ArrayList();
this.encounter.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #encounter}, creating it if it does not already exist {3}
*/
public Reference getEncounterFirstRep() {
if (getEncounter().isEmpty()) {
addEncounter();
}
return getEncounter().get(0);
}
/**
* @return {@link #detail} (A claim detail line. 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 (DetailComponent item : this.detail)
if (!item.isEmpty())
return true;
return false;
}
public DetailComponent addDetail() { //3
DetailComponent t = new DetailComponent();
if (this.detail == null)
this.detail = new ArrayList();
this.detail.add(t);
return t;
}
public ItemComponent addDetail(DetailComponent 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 DetailComponent getDetailFirstRep() {
if (getDetail().isEmpty()) {
addDetail();
}
return getDetail().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence));
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("careTeamSequence", "positiveInt", "CareTeam members related to this service or product.", 0, java.lang.Integer.MAX_VALUE, careTeamSequence));
children.add(new Property("diagnosisSequence", "positiveInt", "Diagnosis applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, diagnosisSequence));
children.add(new Property("procedureSequence", "positiveInt", "Procedures applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, procedureSequence));
children.add(new Property("informationSequence", "positiveInt", "Exceptions, special conditions and supporting information applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, informationSequence));
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("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category));
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("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid));
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 line item. Net = unit price * quantity * factor.", 0, 1, net));
children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi));
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("encounter", "Reference(Encounter)", "Healthcare encounters related to this claim.", 0, java.lang.Integer.MAX_VALUE, encounter));
children.add(new Property("detail", "", "A claim detail line. 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 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence);
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 1070083823: /*careTeamSequence*/ return new Property("careTeamSequence", "positiveInt", "CareTeam members related to this service or product.", 0, java.lang.Integer.MAX_VALUE, careTeamSequence);
case -909769262: /*diagnosisSequence*/ return new Property("diagnosisSequence", "positiveInt", "Diagnosis applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, diagnosisSequence);
case -808920140: /*procedureSequence*/ return new Property("procedureSequence", "positiveInt", "Procedures applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, procedureSequence);
case -702585587: /*informationSequence*/ return new Property("informationSequence", "positiveInt", "Exceptions, special conditions and supporting information applicable for this service or product.", 0, java.lang.Integer.MAX_VALUE, informationSequence);
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 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category);
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 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid);
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 line item. Net = unit price * quantity * factor.", 0, 1, net);
case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi);
case 1702620169: /*bodySite*/ return new Property("bodySite", "", "Physical location where the service is performed or applies.", 0, java.lang.Integer.MAX_VALUE, bodySite);
case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "Healthcare encounters related to this claim.", 0, java.lang.Integer.MAX_VALUE, encounter);
case -1335224239: /*detail*/ return new Property("detail", "", "A claim detail line. 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 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
case 82505966: /*traceNumber*/ return this.traceNumber == null ? new Base[0] : this.traceNumber.toArray(new Base[this.traceNumber.size()]); // Identifier
case 1070083823: /*careTeamSequence*/ return this.careTeamSequence == null ? new Base[0] : this.careTeamSequence.toArray(new Base[this.careTeamSequence.size()]); // PositiveIntType
case -909769262: /*diagnosisSequence*/ return this.diagnosisSequence == null ? new Base[0] : this.diagnosisSequence.toArray(new Base[this.diagnosisSequence.size()]); // PositiveIntType
case -808920140: /*procedureSequence*/ return this.procedureSequence == null ? new Base[0] : this.procedureSequence.toArray(new Base[this.procedureSequence.size()]); // PositiveIntType
case -702585587: /*informationSequence*/ return this.informationSequence == null ? new Base[0] : this.informationSequence.toArray(new Base[this.informationSequence.size()]); // PositiveIntType
case 1099842588: /*revenue*/ return this.revenue == null ? new Base[0] : new Base[] {this.revenue}; // CodeableConcept
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // 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 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money
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 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference
case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // BodySiteComponent
case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : this.encounter.toArray(new Base[this.encounter.size()]); // Reference
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // DetailComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case 1070083823: // careTeamSequence
this.getCareTeamSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -909769262: // diagnosisSequence
this.getDiagnosisSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -808920140: // procedureSequence
this.getProcedureSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case -702585587: // informationSequence
this.getInformationSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
return value;
case 1099842588: // revenue
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 50511102: // category
this.category = 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 525514609: // patientPaid
this.patientPaid = TypeConvertor.castToMoney(value); // Money
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 115642: // udi
this.getUdi().add(TypeConvertor.castToReference(value)); // Reference
return value;
case 1702620169: // bodySite
this.getBodySite().add((BodySiteComponent) value); // BodySiteComponent
return value;
case 1524132147: // encounter
this.getEncounter().add(TypeConvertor.castToReference(value)); // Reference
return value;
case -1335224239: // detail
this.getDetail().add((DetailComponent) value); // DetailComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else if (name.equals("traceNumber")) {
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value));
} else if (name.equals("careTeamSequence")) {
this.getCareTeamSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("diagnosisSequence")) {
this.getDiagnosisSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("procedureSequence")) {
this.getProcedureSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("informationSequence")) {
this.getInformationSequence().add(TypeConvertor.castToPositiveInt(value));
} else if (name.equals("revenue")) {
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("category")) {
this.category = 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("patientPaid")) {
this.patientPaid = TypeConvertor.castToMoney(value); // Money
} 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("udi")) {
this.getUdi().add(TypeConvertor.castToReference(value));
} else if (name.equals("bodySite")) {
this.getBodySite().add((BodySiteComponent) value);
} else if (name.equals("encounter")) {
this.getEncounter().add(TypeConvertor.castToReference(value));
} else if (name.equals("detail")) {
this.getDetail().add((DetailComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("careTeamSequence")) {
this.getCareTeamSequence().remove(value);
} else if (name.equals("diagnosisSequence")) {
this.getDiagnosisSequence().remove(value);
} else if (name.equals("procedureSequence")) {
this.getProcedureSequence().remove(value);
} else if (name.equals("informationSequence")) {
this.getInformationSequence().remove(value);
} else if (name.equals("revenue")) {
this.revenue = null;
} else if (name.equals("category")) {
this.category = 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("patientPaid")) {
this.patientPaid = 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("udi")) {
this.getUdi().remove(value);
} else if (name.equals("bodySite")) {
this.getBodySite().remove((BodySiteComponent) value);
} else if (name.equals("encounter")) {
this.getEncounter().remove(value);
} else if (name.equals("detail")) {
this.getDetail().remove((DetailComponent) value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case 82505966: return addTraceNumber();
case 1070083823: return addCareTeamSequenceElement();
case -909769262: return addDiagnosisSequenceElement();
case -808920140: return addProcedureSequenceElement();
case -702585587: return addInformationSequenceElement();
case 1099842588: return getRevenue();
case 50511102: return getCategory();
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 525514609: return getPatientPaid();
case -1285004149: return getQuantity();
case -486196699: return getUnitPrice();
case -1282148017: return getFactorElement();
case 114603: return getTax();
case 108957: return getNet();
case 115642: return addUdi();
case 1702620169: return addBodySite();
case 1524132147: return addEncounter();
case -1335224239: return addDetail();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case 1070083823: /*careTeamSequence*/ return new String[] {"positiveInt"};
case -909769262: /*diagnosisSequence*/ return new String[] {"positiveInt"};
case -808920140: /*procedureSequence*/ return new String[] {"positiveInt"};
case -702585587: /*informationSequence*/ return new String[] {"positiveInt"};
case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"};
case 50511102: /*category*/ 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 525514609: /*patientPaid*/ return new String[] {"Money"};
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 115642: /*udi*/ return new String[] {"Reference"};
case 1702620169: /*bodySite*/ return new String[] {};
case 1524132147: /*encounter*/ return new String[] {"Reference"};
case -1335224239: /*detail*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.sequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("careTeamSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.careTeamSequence");
}
else if (name.equals("diagnosisSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.diagnosisSequence");
}
else if (name.equals("procedureSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.procedureSequence");
}
else if (name.equals("informationSequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.informationSequence");
}
else if (name.equals("revenue")) {
this.revenue = new CodeableConcept();
return this.revenue;
}
else if (name.equals("category")) {
this.category = new CodeableConcept();
return this.category;
}
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("patientPaid")) {
this.patientPaid = new Money();
return this.patientPaid;
}
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 Claim.item.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("udi")) {
return addUdi();
}
else if (name.equals("bodySite")) {
return addBodySite();
}
else if (name.equals("encounter")) {
return addEncounter();
}
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.sequence = sequence == null ? null : sequence.copy();
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
if (careTeamSequence != null) {
dst.careTeamSequence = new ArrayList();
for (PositiveIntType i : careTeamSequence)
dst.careTeamSequence.add(i.copy());
};
if (diagnosisSequence != null) {
dst.diagnosisSequence = new ArrayList();
for (PositiveIntType i : diagnosisSequence)
dst.diagnosisSequence.add(i.copy());
};
if (procedureSequence != null) {
dst.procedureSequence = new ArrayList();
for (PositiveIntType i : procedureSequence)
dst.procedureSequence.add(i.copy());
};
if (informationSequence != null) {
dst.informationSequence = new ArrayList();
for (PositiveIntType i : informationSequence)
dst.informationSequence.add(i.copy());
};
dst.revenue = revenue == null ? null : revenue.copy();
dst.category = category == null ? null : category.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.patientPaid = patientPaid == null ? null : patientPaid.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 (udi != null) {
dst.udi = new ArrayList();
for (Reference i : udi)
dst.udi.add(i.copy());
};
if (bodySite != null) {
dst.bodySite = new ArrayList();
for (BodySiteComponent i : bodySite)
dst.bodySite.add(i.copy());
};
if (encounter != null) {
dst.encounter = new ArrayList();
for (Reference i : encounter)
dst.encounter.add(i.copy());
};
if (detail != null) {
dst.detail = new ArrayList();
for (DetailComponent 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(sequence, o.sequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(careTeamSequence, o.careTeamSequence, true) && compareDeep(diagnosisSequence, o.diagnosisSequence, true)
&& compareDeep(procedureSequence, o.procedureSequence, true) && compareDeep(informationSequence, o.informationSequence, true)
&& compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, 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(patientPaid, o.patientPaid, 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(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true)
&& compareDeep(encounter, o.encounter, 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(sequence, o.sequence, true) && compareValues(careTeamSequence, o.careTeamSequence, true)
&& compareValues(diagnosisSequence, o.diagnosisSequence, true) && compareValues(procedureSequence, o.procedureSequence, true)
&& compareValues(informationSequence, o.informationSequence, true) && compareValues(factor, o.factor, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, traceNumber, careTeamSequence
, diagnosisSequence, procedureSequence, informationSequence, revenue, category, productOrService
, productOrServiceEnd, request, modifier, programCode, serviced, location, patientPaid
, quantity, unitPrice, factor, tax, net, udi, bodySite, encounter, detail
);
}
public String fhirType() {
return "Claim.item";
}
}
@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 "Claim.item.bodySite";
}
}
@Block()
public static class DetailComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify item entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Item instance identifier", formalDefinition="A number to uniquely identify item entries." )
protected PositiveIntType sequence;
/**
* 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 type of revenue or cost center providing the product and/or service.
*/
@Child(name = "revenue", type = {CodeableConcept.class}, order=3, 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;
/**
* Code to identify the general type of benefits under which products and services are provided.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory")
protected CodeableConcept category;
/**
* 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=5, 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=6, 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=7, 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=8, 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 amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.
*/
@Child(name = "patientPaid", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." )
protected Money patientPaid;
/**
* The number of repetitions of a service or product.
*/
@Child(name = "quantity", type = {Quantity.class}, order=10, 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=11, 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=12, 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=13, 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 line item.detail. Net = unit price * quantity * factor.
*/
@Child(name = "net", type = {Money.class}, order=14, 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 line item.detail. Net = unit price * quantity * factor." )
protected Money net;
/**
* Unique Device Identifiers associated with this line item.
*/
@Child(name = "udi", type = {Device.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." )
protected List udi;
/**
* A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.
*/
@Child(name = "subDetail", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Product or service provided", formalDefinition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." )
protected List subDetail;
private static final long serialVersionUID = -733030497L;
/**
* Constructor
*/
public DetailComponent() {
super();
}
/**
* Constructor
*/
public DetailComponent(int sequence) {
super();
this.setSequence(sequence);
}
/**
* @return {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DetailComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public DetailComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify item entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify item entries.
*/
public DetailComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.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 DetailComponent 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 DetailComponent 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 DetailComponent.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 DetailComponent setRevenue(CodeableConcept value) {
this.revenue = value;
return this;
}
/**
* @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DetailComponent.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} (Code to identify the general type of benefits under which products and services are provided.)
*/
public DetailComponent setCategory(CodeableConcept value) {
this.category = 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 DetailComponent.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 DetailComponent 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 DetailComponent.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 DetailComponent 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 DetailComponent 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 DetailComponent 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 DetailComponent 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 DetailComponent 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 #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.)
*/
public Money getPatientPaid() {
if (this.patientPaid == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DetailComponent.patientPaid");
else if (Configuration.doAutoCreate())
this.patientPaid = new Money(); // cc
return this.patientPaid;
}
public boolean hasPatientPaid() {
return this.patientPaid != null && !this.patientPaid.isEmpty();
}
/**
* @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.)
*/
public DetailComponent setPatientPaid(Money value) {
this.patientPaid = 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 DetailComponent.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 DetailComponent 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 DetailComponent.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 DetailComponent 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 DetailComponent.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 DetailComponent 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 DetailComponent 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 DetailComponent 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 DetailComponent 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 DetailComponent.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 DetailComponent setTax(Money value) {
this.tax = value;
return this;
}
/**
* @return {@link #net} (The total amount claimed for the group (if a grouper) or the line item.detail. Net = unit price * quantity * factor.)
*/
public Money getNet() {
if (this.net == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create DetailComponent.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 line item.detail. Net = unit price * quantity * factor.)
*/
public DetailComponent setNet(Money value) {
this.net = value;
return this;
}
/**
* @return {@link #udi} (Unique Device Identifiers associated with this line item.)
*/
public List getUdi() {
if (this.udi == null)
this.udi = new ArrayList();
return this.udi;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public DetailComponent setUdi(List theUdi) {
this.udi = theUdi;
return this;
}
public boolean hasUdi() {
if (this.udi == null)
return false;
for (Reference item : this.udi)
if (!item.isEmpty())
return true;
return false;
}
public Reference addUdi() { //3
Reference t = new Reference();
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return t;
}
public DetailComponent addUdi(Reference t) { //3
if (t == null)
return this;
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3}
*/
public Reference getUdiFirstRep() {
if (getUdi().isEmpty()) {
addUdi();
}
return getUdi().get(0);
}
/**
* @return {@link #subDetail} (A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.)
*/
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 DetailComponent 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 DetailComponent 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("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence));
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("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category));
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("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode));
children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid));
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 line item.detail. Net = unit price * quantity * factor.", 0, 1, net));
children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi));
children.add(new Property("subDetail", "", "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 0, java.lang.Integer.MAX_VALUE, subDetail));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence);
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 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category);
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 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode);
case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid);
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 line item.detail. Net = unit price * quantity * factor.", 0, 1, net);
case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi);
case -828829007: /*subDetail*/ return new Property("subDetail", "", "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", 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 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
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 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // 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 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept
case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money
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 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference
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 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case 1099842588: // revenue
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 50511102: // category
this.category = 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 1010065041: // programCode
this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case 525514609: // patientPaid
this.patientPaid = TypeConvertor.castToMoney(value); // Money
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 115642: // udi
this.getUdi().add(TypeConvertor.castToReference(value)); // Reference
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("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else 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("category")) {
this.category = 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("programCode")) {
this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("patientPaid")) {
this.patientPaid = TypeConvertor.castToMoney(value); // Money
} 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("udi")) {
this.getUdi().add(TypeConvertor.castToReference(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("sequence")) {
this.sequence = null;
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("revenue")) {
this.revenue = null;
} else if (name.equals("category")) {
this.category = 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("programCode")) {
this.getProgramCode().remove(value);
} else if (name.equals("patientPaid")) {
this.patientPaid = 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("udi")) {
this.getUdi().remove(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 1349547969: return getSequenceElement();
case 82505966: return addTraceNumber();
case 1099842588: return getRevenue();
case 50511102: return getCategory();
case 1957227299: return getProductOrService();
case -717476168: return getProductOrServiceEnd();
case -615513385: return addModifier();
case 1010065041: return addProgramCode();
case 525514609: return getPatientPaid();
case -1285004149: return getQuantity();
case -486196699: return getUnitPrice();
case -1282148017: return getFactorElement();
case 114603: return getTax();
case 108957: return getNet();
case 115642: return addUdi();
case -828829007: return addSubDetail();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"};
case 50511102: /*category*/ 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 1010065041: /*programCode*/ return new String[] {"CodeableConcept"};
case 525514609: /*patientPaid*/ return new String[] {"Money"};
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 115642: /*udi*/ return new String[] {"Reference"};
case -828829007: /*subDetail*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.detail.sequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("revenue")) {
this.revenue = new CodeableConcept();
return this.revenue;
}
else if (name.equals("category")) {
this.category = new CodeableConcept();
return this.category;
}
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("programCode")) {
return addProgramCode();
}
else if (name.equals("patientPaid")) {
this.patientPaid = new Money();
return this.patientPaid;
}
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 Claim.item.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("udi")) {
return addUdi();
}
else if (name.equals("subDetail")) {
return addSubDetail();
}
else
return super.addChild(name);
}
public DetailComponent copy() {
DetailComponent dst = new DetailComponent();
copyValues(dst);
return dst;
}
public void copyValues(DetailComponent dst) {
super.copyValues(dst);
dst.sequence = sequence == null ? null : sequence.copy();
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
dst.revenue = revenue == null ? null : revenue.copy();
dst.category = category == null ? null : category.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());
};
if (programCode != null) {
dst.programCode = new ArrayList();
for (CodeableConcept i : programCode)
dst.programCode.add(i.copy());
};
dst.patientPaid = patientPaid == null ? null : patientPaid.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 (udi != null) {
dst.udi = new ArrayList();
for (Reference i : udi)
dst.udi.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 DetailComponent))
return false;
DetailComponent o = (DetailComponent) other_;
return compareDeep(sequence, o.sequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) && compareDeep(productOrService, o.productOrService, true)
&& compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true)
&& compareDeep(programCode, o.programCode, true) && compareDeep(patientPaid, o.patientPaid, 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(udi, o.udi, true)
&& compareDeep(subDetail, o.subDetail, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof DetailComponent))
return false;
DetailComponent o = (DetailComponent) other_;
return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, traceNumber, revenue
, category, productOrService, productOrServiceEnd, modifier, programCode, patientPaid
, quantity, unitPrice, factor, tax, net, udi, subDetail);
}
public String fhirType() {
return "Claim.item.detail";
}
}
@Block()
public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A number to uniquely identify item entries.
*/
@Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Item instance identifier", formalDefinition="A number to uniquely identify item entries." )
protected PositiveIntType sequence;
/**
* 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 type of revenue or cost center providing the product and/or service.
*/
@Child(name = "revenue", type = {CodeableConcept.class}, order=3, 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;
/**
* Code to identify the general type of benefits under which products and services are provided.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory")
protected CodeableConcept category;
/**
* 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=5, 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=6, 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=7, 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=8, 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 amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.
*/
@Child(name = "patientPaid", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Paid by the patient", formalDefinition="The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services." )
protected Money patientPaid;
/**
* The number of repetitions of a service or product.
*/
@Child(name = "quantity", type = {Quantity.class}, order=10, 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=11, 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=12, 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=13, 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 line item.detail.subDetail. Net = unit price * quantity * factor.
*/
@Child(name = "net", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Total item cost", formalDefinition="The total amount claimed for line item.detail.subDetail. Net = unit price * quantity * factor." )
protected Money net;
/**
* Unique Device Identifiers associated with this line item.
*/
@Child(name = "udi", type = {Device.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Unique device identifier", formalDefinition="Unique Device Identifiers associated with this line item." )
protected List udi;
private static final long serialVersionUID = -2049468862L;
/**
* Constructor
*/
public SubDetailComponent() {
super();
}
/**
* Constructor
*/
public SubDetailComponent(int sequence) {
super();
this.setSequence(sequence);
}
/**
* @return {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public PositiveIntType getSequenceElement() {
if (this.sequence == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SubDetailComponent.sequence");
else if (Configuration.doAutoCreate())
this.sequence = new PositiveIntType(); // bb
return this.sequence;
}
public boolean hasSequenceElement() {
return this.sequence != null && !this.sequence.isEmpty();
}
public boolean hasSequence() {
return this.sequence != null && !this.sequence.isEmpty();
}
/**
* @param value {@link #sequence} (A number to uniquely identify item entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
*/
public SubDetailComponent setSequenceElement(PositiveIntType value) {
this.sequence = value;
return this;
}
/**
* @return A number to uniquely identify item entries.
*/
public int getSequence() {
return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
}
/**
* @param value A number to uniquely identify item entries.
*/
public SubDetailComponent setSequence(int value) {
if (this.sequence == null)
this.sequence = new PositiveIntType();
this.sequence.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 #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 SubDetailComponent.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 SubDetailComponent setRevenue(CodeableConcept value) {
this.revenue = value;
return this;
}
/**
* @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SubDetailComponent.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} (Code to identify the general type of benefits under which products and services are provided.)
*/
public SubDetailComponent setCategory(CodeableConcept value) {
this.category = 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 SubDetailComponent.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 SubDetailComponent 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 SubDetailComponent.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 SubDetailComponent 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 SubDetailComponent 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 SubDetailComponent 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 SubDetailComponent 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 SubDetailComponent 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 #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.)
*/
public Money getPatientPaid() {
if (this.patientPaid == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SubDetailComponent.patientPaid");
else if (Configuration.doAutoCreate())
this.patientPaid = new Money(); // cc
return this.patientPaid;
}
public boolean hasPatientPaid() {
return this.patientPaid != null && !this.patientPaid.isEmpty();
}
/**
* @param value {@link #patientPaid} (The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.)
*/
public SubDetailComponent setPatientPaid(Money value) {
this.patientPaid = 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 SubDetailComponent.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 SubDetailComponent 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 SubDetailComponent.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 SubDetailComponent 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 SubDetailComponent.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 SubDetailComponent 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 SubDetailComponent 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 SubDetailComponent 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 SubDetailComponent 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 SubDetailComponent.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 SubDetailComponent setTax(Money value) {
this.tax = value;
return this;
}
/**
* @return {@link #net} (The total amount claimed for line item.detail.subDetail. Net = unit price * quantity * factor.)
*/
public Money getNet() {
if (this.net == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create SubDetailComponent.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 line item.detail.subDetail. Net = unit price * quantity * factor.)
*/
public SubDetailComponent setNet(Money value) {
this.net = value;
return this;
}
/**
* @return {@link #udi} (Unique Device Identifiers associated with this line item.)
*/
public List getUdi() {
if (this.udi == null)
this.udi = new ArrayList();
return this.udi;
}
/**
* @return Returns a reference to this for easy method chaining
*/
public SubDetailComponent setUdi(List theUdi) {
this.udi = theUdi;
return this;
}
public boolean hasUdi() {
if (this.udi == null)
return false;
for (Reference item : this.udi)
if (!item.isEmpty())
return true;
return false;
}
public Reference addUdi() { //3
Reference t = new Reference();
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return t;
}
public SubDetailComponent addUdi(Reference t) { //3
if (t == null)
return this;
if (this.udi == null)
this.udi = new ArrayList();
this.udi.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #udi}, creating it if it does not already exist {3}
*/
public Reference getUdiFirstRep() {
if (getUdi().isEmpty()) {
addUdi();
}
return getUdi().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence));
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("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category));
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("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode));
children.add(new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid));
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 line item.detail.subDetail. Net = unit price * quantity * factor.", 0, 1, net));
children.add(new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 1349547969: /*sequence*/ return new Property("sequence", "positiveInt", "A number to uniquely identify item entries.", 0, 1, sequence);
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 50511102: /*category*/ return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category);
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 1010065041: /*programCode*/ return new Property("programCode", "CodeableConcept", "Identifies the program under which this may be recovered.", 0, java.lang.Integer.MAX_VALUE, programCode);
case 525514609: /*patientPaid*/ return new Property("patientPaid", "Money", "The amount paid by the patient, in total at the claim claim level or specifically for the item and detail level, to the provider for goods and services.", 0, 1, patientPaid);
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 line item.detail.subDetail. Net = unit price * quantity * factor.", 0, 1, net);
case 115642: /*udi*/ return new Property("udi", "Reference(Device)", "Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
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 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // 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 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // CodeableConcept
case 525514609: /*patientPaid*/ return this.patientPaid == null ? new Base[0] : new Base[] {this.patientPaid}; // Money
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 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1349547969: // sequence
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
return value;
case 82505966: // traceNumber
this.getTraceNumber().add(TypeConvertor.castToIdentifier(value)); // Identifier
return value;
case 1099842588: // revenue
this.revenue = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 50511102: // category
this.category = 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 1010065041: // programCode
this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
return value;
case 525514609: // patientPaid
this.patientPaid = TypeConvertor.castToMoney(value); // Money
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 115642: // udi
this.getUdi().add(TypeConvertor.castToReference(value)); // Reference
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
} else 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("category")) {
this.category = 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("programCode")) {
this.getProgramCode().add(TypeConvertor.castToCodeableConcept(value));
} else if (name.equals("patientPaid")) {
this.patientPaid = TypeConvertor.castToMoney(value); // Money
} 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("udi")) {
this.getUdi().add(TypeConvertor.castToReference(value));
} else
return super.setProperty(name, value);
return value;
}
@Override
public void removeChild(String name, Base value) throws FHIRException {
if (name.equals("sequence")) {
this.sequence = null;
} else if (name.equals("traceNumber")) {
this.getTraceNumber().remove(value);
} else if (name.equals("revenue")) {
this.revenue = null;
} else if (name.equals("category")) {
this.category = 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("programCode")) {
this.getProgramCode().remove(value);
} else if (name.equals("patientPaid")) {
this.patientPaid = 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("udi")) {
this.getUdi().remove(value);
} else
super.removeChild(name, value);
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: return getSequenceElement();
case 82505966: return addTraceNumber();
case 1099842588: return getRevenue();
case 50511102: return getCategory();
case 1957227299: return getProductOrService();
case -717476168: return getProductOrServiceEnd();
case -615513385: return addModifier();
case 1010065041: return addProgramCode();
case 525514609: return getPatientPaid();
case -1285004149: return getQuantity();
case -486196699: return getUnitPrice();
case -1282148017: return getFactorElement();
case 114603: return getTax();
case 108957: return getNet();
case 115642: return addUdi();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
case 82505966: /*traceNumber*/ return new String[] {"Identifier"};
case 1099842588: /*revenue*/ return new String[] {"CodeableConcept"};
case 50511102: /*category*/ 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 1010065041: /*programCode*/ return new String[] {"CodeableConcept"};
case 525514609: /*patientPaid*/ return new String[] {"Money"};
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 115642: /*udi*/ return new String[] {"Reference"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("sequence")) {
throw new FHIRException("Cannot call addChild on a singleton property Claim.item.detail.subDetail.sequence");
}
else if (name.equals("traceNumber")) {
return addTraceNumber();
}
else if (name.equals("revenue")) {
this.revenue = new CodeableConcept();
return this.revenue;
}
else if (name.equals("category")) {
this.category = new CodeableConcept();
return this.category;
}
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("programCode")) {
return addProgramCode();
}
else if (name.equals("patientPaid")) {
this.patientPaid = new Money();
return this.patientPaid;
}
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 Claim.item.detail.subDetail.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("udi")) {
return addUdi();
}
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.sequence = sequence == null ? null : sequence.copy();
if (traceNumber != null) {
dst.traceNumber = new ArrayList();
for (Identifier i : traceNumber)
dst.traceNumber.add(i.copy());
};
dst.revenue = revenue == null ? null : revenue.copy();
dst.category = category == null ? null : category.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());
};
if (programCode != null) {
dst.programCode = new ArrayList();
for (CodeableConcept i : programCode)
dst.programCode.add(i.copy());
};
dst.patientPaid = patientPaid == null ? null : patientPaid.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 (udi != null) {
dst.udi = new ArrayList();
for (Reference i : udi)
dst.udi.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(sequence, o.sequence, true) && compareDeep(traceNumber, o.traceNumber, true)
&& compareDeep(revenue, o.revenue, true) && compareDeep(category, o.category, true) && compareDeep(productOrService, o.productOrService, true)
&& compareDeep(productOrServiceEnd, o.productOrServiceEnd, true) && compareDeep(modifier, o.modifier, true)
&& compareDeep(programCode, o.programCode, true) && compareDeep(patientPaid, o.patientPaid, 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(udi, o.udi, 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(sequence, o.sequence, true) && compareValues(factor, o.factor, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, traceNumber, revenue
, category, productOrService, productOrServiceEnd, modifier, programCode, patientPaid
, quantity, unitPrice, factor, tax, net, udi);
}
public String fhirType() {
return "Claim.item.detail.subDetail";
}
}
/**
* A unique identifier assigned to this claim.
*/
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Business Identifier for claim", formalDefinition="A unique identifier assigned to this claim." )
protected List identifier;
/**
* 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 status of the resource instance.
*/
@Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
@Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status")
protected Enumeration status;
/**
* The category of claim, e.g. oral, pharmacy, vision, institutional, professional.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="Category or discipline", formalDefinition="The category of claim, e.g. oral, pharmacy, vision, institutional, professional." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-type")
protected CodeableConcept type;
/**
* A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.
*/
@Child(name = "subType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="More granular claim type", formalDefinition="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-subtype")
protected CodeableConcept subType;
/**
* A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.
*/
@Child(name = "use", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true)
@Description(shortDefinition="claim | preauthorization | predetermination", formalDefinition="A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-use")
protected Enumeration