//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2015.03.31 at 03:45:08 PM MDT 
//


package gov.va.med.cds.template.generated.pharmacy;


import gov.va.med.cds.clinicaldata.ClinicalRecordInterface;
import gov.va.med.cds.template.generated.basedatatypes.HL72CodedElementLite;
import gov.va.med.cds.template.generated.basedatatypes.HL72FacilityIdentifier;
import gov.va.med.cds.template.generated.basedatatypes.PointInTime;
import gov.va.med.cds.template.generated.common.PatientLite;
import gov.va.med.cds.template.generated.common.PractitionerParticipationLite;
import gov.va.med.cds.template.generated.common.TreatmentFactor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for OutpatientMedicationPromise complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="OutpatientMedicationPromise">
 *   &lt;complexContent>
 *     &lt;extension base="{Pharmacy}MedicationPromise">
 *       &lt;sequence>
 *         &lt;element name="patient" type="{Common}PatientLite"/>
 *         &lt;element name="expirationDate" type="{Basedatatypes}PointInTime" minOccurs="0"/>
 *         &lt;element name="lastDispenseDate" type="{Basedatatypes}PointInTime" minOccurs="0"/>
 *         &lt;element name="numberOfRefillsAuthorized" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         &lt;element name="patientInstructions" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="otherPatientInstructions" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="expandedPatientInstructions" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="pharmacyInstructions" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="sig" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="digitalSignatureIndicator" type="{Basedatatypes}HL72CodedElementLite" minOccurs="0"/>
 *         &lt;element name="copayTransactionType" type="{Basedatatypes}HL72CodedElementLite" minOccurs="0"/>
 *         &lt;element name="transitionalRxBenefit" type="{Basedatatypes}HL72CodedElementLite" minOccurs="0"/>
 *         &lt;element name="treatmentFactor" type="{Common}TreatmentFactor" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="originalDispense" type="{Pharmacy}OutpatientMedicationDispense" minOccurs="0"/>
 *         &lt;element name="refillDispense" type="{Pharmacy}OutpatientMedicationDispense" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="partialDispense" type="{Pharmacy}OutpatientMedicationDispense" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="cancel" type="{Pharmacy}CancelAct" minOccurs="0"/>
 *         &lt;element name="medicationInstructions" type="{Pharmacy}MedicationInstructionComponent" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="finisher" type="{Common}PractitionerParticipationLite" minOccurs="0"/>
 *         &lt;element name="activityLog" type="{Pharmacy}ActivityLog" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="recordSource" type="{Basedatatypes}HL72FacilityIdentifier"/>
 *         &lt;element name="recordVersion" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="recordUpdateTime" type="{Basedatatypes}PointInTime"/>
 *       &lt;/sequence>
 *     &lt;/extension>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlRootElement( name = "outpatientMedicationPromises" )
@XmlAccessorType( XmlAccessType.FIELD )
@XmlType( name = "OutpatientMedicationPromise", propOrder = { "patient", "expirationDate", "lastDispenseDate", "numberOfRefillsAuthorized",
                "patientInstructions", "otherPatientInstructions", "expandedPatientInstructions", "pharmacyInstructions", "sig",
                "digitalSignatureIndicator", "copayTransactionType", "transitionalRxBenefit", "treatmentFactor", "originalDispense",
                "refillDispense", "partialDispense", "cancel", "medicationInstructions", "finisher", "activityLog", "recordSource", "recordVersion",
                "recordUpdateTime", "requestId", "id" } )
public class OutpatientMedicationPromise
    extends
        MedicationPromise
    implements
        ClinicalRecordInterface
{

    @XmlElement( required = true )
    protected PatientLite patient;
    protected PointInTime expirationDate;
    protected PointInTime lastDispenseDate;
    protected Integer numberOfRefillsAuthorized;
    @XmlElement( required = false, nillable = false )
    protected List<String> patientInstructions;
    @XmlElement( required = false, nillable = false )
    protected List<String> otherPatientInstructions;
    @XmlElement( required = false, nillable = false )
    protected List<String> expandedPatientInstructions;
    @XmlElement( required = false, nillable = false )
    protected List<String> pharmacyInstructions;
    @XmlElement( required = false, nillable = false )
    protected List<String> sig;
    protected HL72CodedElementLite digitalSignatureIndicator;
    protected HL72CodedElementLite copayTransactionType;
    protected HL72CodedElementLite transitionalRxBenefit;
    @XmlElement( required = false, nillable = false )
    protected List<TreatmentFactor> treatmentFactor;
    protected OutpatientMedicationDispense originalDispense;
    @XmlElement( required = false, nillable = false )
    protected List<OutpatientMedicationDispense> refillDispense;
    @XmlElement( required = false, nillable = false )
    protected List<OutpatientMedicationDispense> partialDispense;
    protected CancelAct cancel;
    @XmlElement( required = false, nillable = false )
    protected List<MedicationInstructionComponent> medicationInstructions;
    protected PractitionerParticipationLite finisher;
    @XmlElement( required = false, nillable = false )
    protected List<ActivityLog> activityLog;
    @XmlElement( required = true, nillable = false )
    protected HL72FacilityIdentifier recordSource;
    protected Integer recordVersion;
    @XmlElement( required = true, nillable = false )
    protected PointInTime recordUpdateTime;
    protected String requestId;
    protected Long id;
    @XmlTransient
    protected List<OutpatientMedicationDispense> originalDispenseSet;
    @XmlTransient
    protected String singlePatientInstruction;
    @XmlTransient
    protected String singleOtherPatientInstruction;
    @XmlTransient
    protected String singleExpandedPatientInstruction;
    @XmlTransient
    protected String singlePharmacyInstruction;
    @XmlTransient
    protected String singleSig;
    @XmlTransient
    protected BigDecimal idV;


    /**
     * Gets the value of the patient property.
     * 
     * @return
     *     possible object is
     *     {@link PatientLite }
     *     
     */
    public PatientLite getPatient( )
    {
        return patient;
    }


    /**
     * Sets the value of the patient property.
     * 
     * @param value
     *     allowed object is
     *     {@link PatientLite }
     *     
     */
    public void setPatient( PatientLite value )
    {
        this.patient = value;
    }


    /**
     * Gets the value of the expirationDate property.
     * 
     * @return
     *     possible object is
     *     {@link PointInTime }
     *     
     */
    public PointInTime getExpirationDate( )
    {
        return expirationDate;
    }


    /**
     * Sets the value of the expirationDate property.
     * 
     * @param value
     *     allowed object is
     *     {@link PointInTime }
     *     
     */
    public void setExpirationDate( PointInTime value )
    {
        this.expirationDate = value;
    }


    /**
     * Gets the value of the lastDispenseDate property.
     * 
     * @return
     *     possible object is
     *     {@link PointInTime }
     *     
     */
    public PointInTime getLastDispenseDate( )
    {
        return lastDispenseDate;
    }


    /**
     * Sets the value of the lastDispenseDate property.
     * 
     * @param value
     *     allowed object is
     *     {@link PointInTime }
     *     
     */
    public void setLastDispenseDate( PointInTime value )
    {
        this.lastDispenseDate = value;
    }


    /**
     * Gets the value of the numberOfRefillsAuthorized property.
     * 
     * @return
     *     possible object is
     *     {@link Integer }
     *     
     */
    public Integer getNumberOfRefillsAuthorized( )
    {
        return numberOfRefillsAuthorized;
    }


    /**
     * Sets the value of the numberOfRefillsAuthorized property.
     * 
     * @param value
     *     allowed object is
     *     {@link Integer }
     *     
     */
    public void setNumberOfRefillsAuthorized( Integer value )
    {
        this.numberOfRefillsAuthorized = value;
    }


    /**
     * Gets the value of the patientInstructions property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the patientInstructions property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getPatientInstructions().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getPatientInstructions( )
    {
        if ( patientInstructions == null )
        {
            patientInstructions = new ArrayList<String>();
        }

        return this.patientInstructions;
    }


    public void setPatientInstructions( List<String> patientInstructions )
    {
        this.patientInstructions = patientInstructions;
    }


    public String getSinglePatientInstruction( )
    {

        return this.singlePatientInstruction;
    }


    public void setSinglePatientInstruction( String singleInstruction )
    {
        this.getPatientInstructions().add( singleInstruction );
    }


    /**
     * Gets the value of the otherPatientInstructions property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the otherPatientInstructions property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getOtherPatientInstructions().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getOtherPatientInstructions( )
    {
        if ( otherPatientInstructions == null )
        {
            otherPatientInstructions = new ArrayList<String>();
        }
        return this.otherPatientInstructions;
    }


    public void setOtherPatientInstructions( List<String> otherPatientInstructions )
    {
        this.otherPatientInstructions = otherPatientInstructions;
    }


    public String getSingleOtherPatientInstruction( )
    {

        return this.singleOtherPatientInstruction;
    }


    public void setSingleOtherPatientInstruction( String singleInstruction )
    {
        this.getOtherPatientInstructions().add( singleInstruction );
    }


    /**
     * Gets the value of the expandedPatientInstructions property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the expandedPatientInstructions property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getExpandedPatientInstructions().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getExpandedPatientInstructions( )
    {
        if ( expandedPatientInstructions == null )
        {
            expandedPatientInstructions = new ArrayList<String>();
        }

        return this.expandedPatientInstructions;
    }


    public void setExpandedPatientInstructions( List<String> expandedPatientInstructions )
    {
        this.expandedPatientInstructions = expandedPatientInstructions;
    }


    public String getSingleExpandedPatientInstruction( )
    {

        return this.singleExpandedPatientInstruction;
    }


    public void setSingleExpandedPatientInstruction( String singleInstruction )
    {
        this.getExpandedPatientInstructions().add( singleInstruction );
    }


    /**
     * Gets the value of the pharmacyInstructions property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the pharmacyInstructions property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getPharmacyInstructions().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getPharmacyInstructions( )
    {
        if ( pharmacyInstructions == null )
        {
            pharmacyInstructions = new ArrayList<String>();
        }
        return this.pharmacyInstructions;
    }


    public void setPharmacyInstructions( List<String> pharmacyInstructions )
    {
        this.pharmacyInstructions = pharmacyInstructions;
    }


    public String getSinglePharmacyInstruction( )
    {

        return this.singlePharmacyInstruction;
    }


    public void setSinglePharmacyInstruction( String singleInstruction )
    {
        this.getPharmacyInstructions().add( singleInstruction );
    }


    /**
     * Gets the value of the sig property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the sig property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getSig().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getSig( )
    {
        if ( sig == null )
        {
            sig = new ArrayList<String>();
        }
        return this.sig;
    }


    public void setSig( List<String> sig )
    {
        this.sig = sig;
    }


    public String getSingleSig( )
    {

        return this.singleSig;
    }


    public void setSingleSig( String singleSig )
    {

        this.getSig().add( singleSig );
    }


    /**
     * Gets the value of the digitalSignatureIndicator property.
     * 
     * @return
     *     possible object is
     *     {@link HL72CodedElementLite }
     *     
     */
    public HL72CodedElementLite getDigitalSignatureIndicator( )
    {
        return digitalSignatureIndicator;
    }


    /**
     * Sets the value of the digitalSignatureIndicator property.
     * 
     * @param value
     *     allowed object is
     *     {@link HL72CodedElementLite }
     *     
     */
    public void setDigitalSignatureIndicator( HL72CodedElementLite value )
    {
        this.digitalSignatureIndicator = value;
    }


    /**
     * Gets the value of the copayTransactionType property.
     * 
     * @return
     *     possible object is
     *     {@link HL72CodedElementLite }
     *     
     */
    public HL72CodedElementLite getCopayTransactionType( )
    {
        return copayTransactionType;
    }


    /**
     * Sets the value of the copayTransactionType property.
     * 
     * @param value
     *     allowed object is
     *     {@link HL72CodedElementLite }
     *     
     */
    public void setCopayTransactionType( HL72CodedElementLite value )
    {
        this.copayTransactionType = value;
    }


    /**
     * Gets the value of the transitionalRxBenefit property.
     * 
     * @return
     *     possible object is
     *     {@link HL72CodedElementLite }
     *     
     */
    public HL72CodedElementLite getTransitionalRxBenefit( )
    {
        return transitionalRxBenefit;
    }


    /**
     * Sets the value of the transitionalRxBenefit property.
     * 
     * @param value
     *     allowed object is
     *     {@link HL72CodedElementLite }
     *     
     */
    public void setTransitionalRxBenefit( HL72CodedElementLite value )
    {
        this.transitionalRxBenefit = value;
    }


    /**
     * Gets the value of the treatmentFactor property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the treatmentFactor property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getTreatmentFactor().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link TreatmentFactor }
     * 
     * 
     */
    public List<TreatmentFactor> getTreatmentFactor( )
    {
        if ( treatmentFactor == null )
        {
            treatmentFactor = new ArrayList<TreatmentFactor>();
        }
        return this.treatmentFactor;
    }


    public void setTreatmentFactor( List<TreatmentFactor> treatmentFactor )
    {
        this.treatmentFactor = treatmentFactor;
    }


    /**
     * Gets the value of the originalDispense property.
     * 
     * @return
     *     possible object is
     *     {@link OutpatientMedicationDispense }
     *     
     */
    public OutpatientMedicationDispense getOriginalDispense( )
    {
        return originalDispense;
    }


    /**
     * Sets the value of the originalDispense property.
     * 
     * @param value
     *     allowed object is
     *     {@link OutpatientMedicationDispense }
     *     
     */
    public void setOriginalDispense( OutpatientMedicationDispense value )
    {
        this.originalDispense = value;
    }


    /**
     * Gets the value of the refillDispense property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the refillDispense property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getRefillDispense().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link OutpatientMedicationDispense }
     * 
     * 
     */
    public List<OutpatientMedicationDispense> getRefillDispense( )
    {

        if ( refillDispense == null )
        {
            refillDispense = new ArrayList<OutpatientMedicationDispense>();
        }

        return this.refillDispense;
    }


    public void setRefillDispense( List<OutpatientMedicationDispense> refillDispense )
    {
        if ( ( originalDispense != null ) && ( originalDispense.getNumberOfRefillsRemaining() == null ) )
        {
            // Find number of refills from the Refill list object
            int numOfRefillsFromList = 0;

            for ( OutpatientMedicationDispense outpatientMedicationDispense : refillDispense )
            {
                if ( outpatientMedicationDispense == null )
                {

                }
                else
                {
                    numOfRefillsFromList++ ;
                }
            }

            if ( this.originalDispense != null )
            {
                this.originalDispense.setNumberOfRefillsRemaining( numberOfRefillsAuthorized - numOfRefillsFromList );
            }

        }

        this.refillDispense = refillDispense;
    }


    /**
     * Gets the value of the partialDispense property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the partialDispense property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getPartialDispense().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link OutpatientMedicationDispense }
     * 
     * 
     */
    public List<OutpatientMedicationDispense> getPartialDispense( )
    {
        if ( partialDispense == null )
        {
            partialDispense = new ArrayList<OutpatientMedicationDispense>();
        }
        return this.partialDispense;
    }


    public void setPartialDispense( List<OutpatientMedicationDispense> partialDispense )
    {
        this.partialDispense = partialDispense;
    }


    /**
     * Gets the value of the cancel property.
     * 
     * @return
     *     possible object is
     *     {@link CancelAct }
     *     
     */
    public CancelAct getCancel( )
    {
        return cancel;
    }


    /**
     * Sets the value of the cancel property.
     * 
     * @param value
     *     allowed object is
     *     {@link CancelAct }
     *     
     */
    public void setCancel( CancelAct value )
    {
        this.cancel = value;
    }


    /**
     * Gets the value of the medicationInstructions property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the medicationInstructions property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getMedicationInstructions().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link MedicationInstructionComponent }
     * 
     * 
     */
    public List<MedicationInstructionComponent> getMedicationInstructions( )
    {
        if ( medicationInstructions == null )
        {
            medicationInstructions = new ArrayList<MedicationInstructionComponent>();
        }
        return this.medicationInstructions;
    }


    public void setMedicationInstructions( List<MedicationInstructionComponent> medicationInstructions )
    {
        this.medicationInstructions = medicationInstructions;
    }


    /**
     * Gets the value of the finisher property.
     * 
     * @return
     *     possible object is
     *     {@link PractitionerParticipationLite }
     *     
     */
    public PractitionerParticipationLite getFinisher( )
    {
        return finisher;
    }


    /**
     * Sets the value of the finisher property.
     * 
     * @param value
     *     allowed object is
     *     {@link PractitionerParticipationLite }
     *     
     */
    public void setFinisher( PractitionerParticipationLite value )
    {
        this.finisher = value;
    }


    /**
     * Gets the value of the activityLog property.
     * 
     * <p>
     * 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 JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the activityLog property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getActivityLog().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link ActivityLog }
     * 
     * 
     */
    public List<ActivityLog> getActivityLog( )
    {
        if ( activityLog == null )
        {
            activityLog = new ArrayList<ActivityLog>();
        }
        return this.activityLog;
    }


    public void setActivityLog( List<ActivityLog> activityLog )
    {
        this.activityLog = activityLog;
    }


    /**
     * Gets the value of the recordSource property.
     * 
     * @return
     *     possible object is
     *     {@link HL72FacilityIdentifier }
     *     
     */
    public HL72FacilityIdentifier getRecordSource( )
    {
        return recordSource;
    }


    /**
     * Sets the value of the recordSource property.
     * 
     * @param value
     *     allowed object is
     *     {@link HL72FacilityIdentifier }
     *     
     */
    public void setRecordSource( HL72FacilityIdentifier value )
    {
        this.recordSource = value;
    }


    /**
     * Gets the value of the recordVersion property.
     * 
     */
    public int getRecordVersion( )
    {
        return recordVersion;
    }


    /**
     * Sets the value of the recordVersion property.
     * 
     */
    public void setRecordVersion( Integer value )
    {
        this.recordVersion = value;
    }


    /**
     * Gets the value of the recordUpdateTime property.
     * 
     * @return
     *     possible object is
     *     {@link PointInTime }
     *     
     */
    public PointInTime getRecordUpdateTime( )
    {
        return recordUpdateTime;
    }


    /**
     * Sets the value of the recordUpdateTime property.
     * 
     * @param value
     *     allowed object is
     *     {@link PointInTime }
     *     
     */
    public void setRecordUpdateTime( PointInTime value )
    {
        this.recordUpdateTime = value;
    }


    public void setRequestId( String requestId )
    {
        this.requestId = requestId;

    }


    public String getRequestId( )
    {
        return this.requestId;
    }


    public Long getId( )
    {
        return id;
    }


    public void setId( Long id )
    {
        this.id = id;
    }


    public BigDecimal getIdV( )
    {
        return idV;
    }


    public void setIdV( BigDecimal id )
    {
        this.idV = id;
    }


    /*originalDispenseSet list was added to support the one-to-many database relationship between OutpatientMedicationPromise parent and the MedicationDispense child - however
    the originalDispense is always a one-to-one relationship, we need to make sure the originalDispense is populated so the pojo marshals to XML correctly*/
    public List<OutpatientMedicationDispense> getOriginalDispenseSet( )
    {
        if ( originalDispenseSet == null )
        {
            originalDispenseSet = new ArrayList<OutpatientMedicationDispense>();
            if ( originalDispense != null )
            {
                originalDispenseSet.add( originalDispense );
            }
        }
        else if ( originalDispenseSet.size() == 0 && originalDispense != null )
        {
            originalDispenseSet.add( originalDispense );
        }
        return this.originalDispenseSet;
    }


    public void setOriginalDispenseSet( List<OutpatientMedicationDispense> originalDispenseSet )
    {
        this.originalDispenseSet = originalDispenseSet;
        if ( originalDispenseSet.size() > 0 )
        {
            this.originalDispense = this.originalDispenseSet.get( 0 );
        }
    }

}
