org.hl7.fhir.ClaimSubDetail Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.06.14 at 01:52:11 PM MDT
//
package org.hl7.fhir;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.
*
* Java class for Claim.SubDetail complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Claim.SubDetail">
* <complexContent>
* <extension base="{http://hl7.org/fhir}BackboneElement">
* <sequence>
* <element name="sequence" type="{http://hl7.org/fhir}positiveInt"/>
* <element name="type" type="{http://hl7.org/fhir}Coding"/>
* <element name="service" type="{http://hl7.org/fhir}Coding"/>
* <element name="programCode" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
* <element name="quantity" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
* <element name="unitPrice" type="{http://hl7.org/fhir}Money" minOccurs="0"/>
* <element name="factor" type="{http://hl7.org/fhir}decimal" minOccurs="0"/>
* <element name="points" type="{http://hl7.org/fhir}decimal" minOccurs="0"/>
* <element name="net" type="{http://hl7.org/fhir}Money" minOccurs="0"/>
* <element name="udi" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Claim.SubDetail", propOrder = {
"sequence",
"type",
"service",
"programCode",
"quantity",
"unitPrice",
"factor",
"points",
"net",
"udi"
})
public class ClaimSubDetail
extends BackboneElement
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected PositiveInt sequence;
@XmlElement(required = true)
protected Coding type;
@XmlElement(required = true)
protected Coding service;
protected List programCode;
protected SimpleQuantity quantity;
protected Money unitPrice;
protected Decimal factor;
protected Decimal points;
protected Money net;
protected List udi;
/**
* Gets the value of the sequence property.
*
* @return
* possible object is
* {@link PositiveInt }
*
*/
public PositiveInt getSequence() {
return sequence;
}
/**
* Sets the value of the sequence property.
*
* @param value
* allowed object is
* {@link PositiveInt }
*
*/
public void setSequence(PositiveInt value) {
this.sequence = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link Coding }
*
*/
public Coding getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link Coding }
*
*/
public void setType(Coding value) {
this.type = value;
}
/**
* Gets the value of the service property.
*
* @return
* possible object is
* {@link Coding }
*
*/
public Coding getService() {
return service;
}
/**
* Sets the value of the service property.
*
* @param value
* allowed object is
* {@link Coding }
*
*/
public void setService(Coding value) {
this.service = value;
}
/**
* Gets the value of the programCode property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the programCode property.
*
*
* For example, to add a new item, do as follows:
*
* getProgramCode().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Coding }
*
*
*/
public List getProgramCode() {
if (programCode == null) {
programCode = new ArrayList();
}
return this.programCode;
}
/**
* Gets the value of the quantity property.
*
* @return
* possible object is
* {@link SimpleQuantity }
*
*/
public SimpleQuantity getQuantity() {
return quantity;
}
/**
* Sets the value of the quantity property.
*
* @param value
* allowed object is
* {@link SimpleQuantity }
*
*/
public void setQuantity(SimpleQuantity value) {
this.quantity = value;
}
/**
* Gets the value of the unitPrice property.
*
* @return
* possible object is
* {@link Money }
*
*/
public Money getUnitPrice() {
return unitPrice;
}
/**
* Sets the value of the unitPrice property.
*
* @param value
* allowed object is
* {@link Money }
*
*/
public void setUnitPrice(Money value) {
this.unitPrice = value;
}
/**
* Gets the value of the factor property.
*
* @return
* possible object is
* {@link Decimal }
*
*/
public Decimal getFactor() {
return factor;
}
/**
* Sets the value of the factor property.
*
* @param value
* allowed object is
* {@link Decimal }
*
*/
public void setFactor(Decimal value) {
this.factor = value;
}
/**
* Gets the value of the points property.
*
* @return
* possible object is
* {@link Decimal }
*
*/
public Decimal getPoints() {
return points;
}
/**
* Sets the value of the points property.
*
* @param value
* allowed object is
* {@link Decimal }
*
*/
public void setPoints(Decimal value) {
this.points = value;
}
/**
* Gets the value of the net property.
*
* @return
* possible object is
* {@link Money }
*
*/
public Money getNet() {
return net;
}
/**
* Sets the value of the net property.
*
* @param value
* allowed object is
* {@link Money }
*
*/
public void setNet(Money value) {
this.net = value;
}
/**
* Gets the value of the udi property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the udi property.
*
*
* For example, to add a new item, do as follows:
*
* getUdi().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getUdi() {
if (udi == null) {
udi = new ArrayList();
}
return this.udi;
}
public ClaimSubDetail withSequence(PositiveInt value) {
setSequence(value);
return this;
}
public ClaimSubDetail withType(Coding value) {
setType(value);
return this;
}
public ClaimSubDetail withService(Coding value) {
setService(value);
return this;
}
public ClaimSubDetail withProgramCode(Coding... values) {
if (values!= null) {
for (Coding value: values) {
getProgramCode().add(value);
}
}
return this;
}
public ClaimSubDetail withProgramCode(Collection values) {
if (values!= null) {
getProgramCode().addAll(values);
}
return this;
}
public ClaimSubDetail withQuantity(SimpleQuantity value) {
setQuantity(value);
return this;
}
public ClaimSubDetail withUnitPrice(Money value) {
setUnitPrice(value);
return this;
}
public ClaimSubDetail withFactor(Decimal value) {
setFactor(value);
return this;
}
public ClaimSubDetail withPoints(Decimal value) {
setPoints(value);
return this;
}
public ClaimSubDetail withNet(Money value) {
setNet(value);
return this;
}
public ClaimSubDetail withUdi(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getUdi().add(value);
}
}
return this;
}
public ClaimSubDetail withUdi(Collection values) {
if (values!= null) {
getUdi().addAll(values);
}
return this;
}
@Override
public ClaimSubDetail withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public ClaimSubDetail withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public ClaimSubDetail withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public ClaimSubDetail withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public ClaimSubDetail withId(java.lang.String value) {
setId(value);
return this;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final ClaimSubDetail that = ((ClaimSubDetail) object);
{
PositiveInt lhsSequence;
lhsSequence = this.getSequence();
PositiveInt rhsSequence;
rhsSequence = that.getSequence();
if (!strategy.equals(LocatorUtils.property(thisLocator, "sequence", lhsSequence), LocatorUtils.property(thatLocator, "sequence", rhsSequence), lhsSequence, rhsSequence, (this.sequence!= null), (that.sequence!= null))) {
return false;
}
}
{
Coding lhsType;
lhsType = this.getType();
Coding rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) {
return false;
}
}
{
Coding lhsService;
lhsService = this.getService();
Coding rhsService;
rhsService = that.getService();
if (!strategy.equals(LocatorUtils.property(thisLocator, "service", lhsService), LocatorUtils.property(thatLocator, "service", rhsService), lhsService, rhsService, (this.service!= null), (that.service!= null))) {
return false;
}
}
{
List lhsProgramCode;
lhsProgramCode = (((this.programCode!= null)&&(!this.programCode.isEmpty()))?this.getProgramCode():null);
List rhsProgramCode;
rhsProgramCode = (((that.programCode!= null)&&(!that.programCode.isEmpty()))?that.getProgramCode():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "programCode", lhsProgramCode), LocatorUtils.property(thatLocator, "programCode", rhsProgramCode), lhsProgramCode, rhsProgramCode, ((this.programCode!= null)&&(!this.programCode.isEmpty())), ((that.programCode!= null)&&(!that.programCode.isEmpty())))) {
return false;
}
}
{
SimpleQuantity lhsQuantity;
lhsQuantity = this.getQuantity();
SimpleQuantity rhsQuantity;
rhsQuantity = that.getQuantity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity, (this.quantity!= null), (that.quantity!= null))) {
return false;
}
}
{
Money lhsUnitPrice;
lhsUnitPrice = this.getUnitPrice();
Money rhsUnitPrice;
rhsUnitPrice = that.getUnitPrice();
if (!strategy.equals(LocatorUtils.property(thisLocator, "unitPrice", lhsUnitPrice), LocatorUtils.property(thatLocator, "unitPrice", rhsUnitPrice), lhsUnitPrice, rhsUnitPrice, (this.unitPrice!= null), (that.unitPrice!= null))) {
return false;
}
}
{
Decimal lhsFactor;
lhsFactor = this.getFactor();
Decimal rhsFactor;
rhsFactor = that.getFactor();
if (!strategy.equals(LocatorUtils.property(thisLocator, "factor", lhsFactor), LocatorUtils.property(thatLocator, "factor", rhsFactor), lhsFactor, rhsFactor, (this.factor!= null), (that.factor!= null))) {
return false;
}
}
{
Decimal lhsPoints;
lhsPoints = this.getPoints();
Decimal rhsPoints;
rhsPoints = that.getPoints();
if (!strategy.equals(LocatorUtils.property(thisLocator, "points", lhsPoints), LocatorUtils.property(thatLocator, "points", rhsPoints), lhsPoints, rhsPoints, (this.points!= null), (that.points!= null))) {
return false;
}
}
{
Money lhsNet;
lhsNet = this.getNet();
Money rhsNet;
rhsNet = that.getNet();
if (!strategy.equals(LocatorUtils.property(thisLocator, "net", lhsNet), LocatorUtils.property(thatLocator, "net", rhsNet), lhsNet, rhsNet, (this.net!= null), (that.net!= null))) {
return false;
}
}
{
List lhsUdi;
lhsUdi = (((this.udi!= null)&&(!this.udi.isEmpty()))?this.getUdi():null);
List rhsUdi;
rhsUdi = (((that.udi!= null)&&(!that.udi.isEmpty()))?that.getUdi():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "udi", lhsUdi), LocatorUtils.property(thatLocator, "udi", rhsUdi), lhsUdi, rhsUdi, ((this.udi!= null)&&(!this.udi.isEmpty())), ((that.udi!= null)&&(!that.udi.isEmpty())))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
PositiveInt theSequence;
theSequence = this.getSequence();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sequence", theSequence), currentHashCode, theSequence, (this.sequence!= null));
}
{
Coding theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
{
Coding theService;
theService = this.getService();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "service", theService), currentHashCode, theService, (this.service!= null));
}
{
List theProgramCode;
theProgramCode = (((this.programCode!= null)&&(!this.programCode.isEmpty()))?this.getProgramCode():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "programCode", theProgramCode), currentHashCode, theProgramCode, ((this.programCode!= null)&&(!this.programCode.isEmpty())));
}
{
SimpleQuantity theQuantity;
theQuantity = this.getQuantity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity, (this.quantity!= null));
}
{
Money theUnitPrice;
theUnitPrice = this.getUnitPrice();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "unitPrice", theUnitPrice), currentHashCode, theUnitPrice, (this.unitPrice!= null));
}
{
Decimal theFactor;
theFactor = this.getFactor();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "factor", theFactor), currentHashCode, theFactor, (this.factor!= null));
}
{
Decimal thePoints;
thePoints = this.getPoints();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "points", thePoints), currentHashCode, thePoints, (this.points!= null));
}
{
Money theNet;
theNet = this.getNet();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "net", theNet), currentHashCode, theNet, (this.net!= null));
}
{
List theUdi;
theUdi = (((this.udi!= null)&&(!this.udi.isEmpty()))?this.getUdi():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "udi", theUdi), currentHashCode, theUdi, ((this.udi!= null)&&(!this.udi.isEmpty())));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
PositiveInt theSequence;
theSequence = this.getSequence();
strategy.appendField(locator, this, "sequence", buffer, theSequence, (this.sequence!= null));
}
{
Coding theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
Coding theService;
theService = this.getService();
strategy.appendField(locator, this, "service", buffer, theService, (this.service!= null));
}
{
List theProgramCode;
theProgramCode = (((this.programCode!= null)&&(!this.programCode.isEmpty()))?this.getProgramCode():null);
strategy.appendField(locator, this, "programCode", buffer, theProgramCode, ((this.programCode!= null)&&(!this.programCode.isEmpty())));
}
{
SimpleQuantity theQuantity;
theQuantity = this.getQuantity();
strategy.appendField(locator, this, "quantity", buffer, theQuantity, (this.quantity!= null));
}
{
Money theUnitPrice;
theUnitPrice = this.getUnitPrice();
strategy.appendField(locator, this, "unitPrice", buffer, theUnitPrice, (this.unitPrice!= null));
}
{
Decimal theFactor;
theFactor = this.getFactor();
strategy.appendField(locator, this, "factor", buffer, theFactor, (this.factor!= null));
}
{
Decimal thePoints;
thePoints = this.getPoints();
strategy.appendField(locator, this, "points", buffer, thePoints, (this.points!= null));
}
{
Money theNet;
theNet = this.getNet();
strategy.appendField(locator, this, "net", buffer, theNet, (this.net!= null));
}
{
List theUdi;
theUdi = (((this.udi!= null)&&(!this.udi.isEmpty()))?this.getUdi():null);
strategy.appendField(locator, this, "udi", buffer, theUdi, ((this.udi!= null)&&(!this.udi.isEmpty())));
}
return buffer;
}
public void setProgramCode(List value) {
this.programCode = value;
}
public void setUdi(List value) {
this.udi = value;
}
}