//
// 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;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;all>
 *         &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" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="patientInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="otherPatientInstructions" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="otherPatientInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="expandedPatientInstructions" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="expandedPatientInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="pharmacyInstructions" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="pharmacyInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="sigs" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="sig" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &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="originalDispense" type="{Pharmacy}OutpatientMedicationDispense" minOccurs="0"/>
 *         &lt;element name="cancel" type="{Pharmacy}CancelAct" minOccurs="0"/>
 *         &lt;element name="finisher" type="{Common}PractitionerParticipationLite" minOccurs="0"/>
 *         &lt;element name="recordSource" type="{Basedatatypes}HL72FacilityIdentifier" minOccurs="0"/>
 *         &lt;element name="recordVersion" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         &lt;element name="recordUpdateTime" type="{Basedatatypes}PointInTime" minOccurs="0"/>
 *         &lt;element name="treatmentFactors" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="treatmentFactor" type="{Common}TreatmentFactor" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="activitiesLog" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="activityLog" type="{Pharmacy}ActivityLog" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="refillDispenses" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="refillDispense" type="{Pharmacy}OutpatientMedicationDispense" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="medicationInstructions" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="medicationInstruction" type="{Pharmacy}MedicationInstructionComponent" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="partialDispenses" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="partialDispense" type="{Pharmacy}OutpatientMedicationDispense" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="recordIdentifier" type="{Basedatatypes}HL72EntityIdentifier"/>
 *         &lt;element name="pdtsPrescriptionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="prescriptionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="pharmacyPatientType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="specialDrugTracking" type="{Pharmacy}SpecialDrugTracking" minOccurs="0"/>
 *         &lt;element name="dataEnterer" type="{Common}PractitionerParticipationLite" minOccurs="0"/>
 *         &lt;element name="pharmacyRequest" type="{Pharmacy}PharmacyRequest" minOccurs="0"/>
 *       &lt;/all>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlRootElement( name = "outpatientMedicationPromise" )
@XmlAccessorType( XmlAccessType.FIELD )
@XmlType( name = "OutpatientMedicationPromise1", propOrder = { "patient", "expirationDate", "lastDispenseDate", "numberOfRefillsAuthorized",
                "patientInstructions", "otherPatientInstructions", "expandedPatientInstructions", "pharmacyInstructions", "sigs",
                "digitalSignatureIndicator", "copayTransactionType", "transitionalRxBenefit", "treatmentFactors", "originalDispense",
                "refillDispenses", "partialDispenses", "cancel", "medicationInstructions", "finisher", "activitiesLog", "recordSource",
                "recordVersion", "recordUpdateTime", "requestId", "id" } )
public class OutpatientMedicationPromise1
    extends
        MedicationPromise
    implements
        ClinicalRecordInterface
{

    @XmlElement( required = true )
    protected PatientLite patient;
    protected PointInTime expirationDate;
    protected PointInTime lastDispenseDate;
    protected Integer numberOfRefillsAuthorized;
    protected OutpatientMedicationPromise1.PatientInstructions patientInstructions;
    protected OutpatientMedicationPromise1.OtherPatientInstructions otherPatientInstructions;
    protected OutpatientMedicationPromise1.ExpandedPatientInstructions expandedPatientInstructions;
    protected OutpatientMedicationPromise1.PharmacyInstructions pharmacyInstructions;
    @XmlElement( required = false, nillable = false )
    protected OutpatientMedicationPromise1.Sigs sigs;
    protected HL72CodedElementLite digitalSignatureIndicator;
    protected HL72CodedElementLite copayTransactionType;
    protected HL72CodedElementLite transitionalRxBenefit;
    protected OutpatientMedicationPromise1.TreatmentFactors treatmentFactors;
    protected OutpatientMedicationDispense1 originalDispense;
    @XmlElement( required = false, nillable = false )
    protected OutpatientMedicationPromise1.RefillDispenses refillDispenses;
    @XmlElement( required = false, nillable = false )
    protected OutpatientMedicationPromise1.PartialDispenses partialDispenses;
    protected CancelAct1 cancel;
    protected OutpatientMedicationPromise1.MedicationInstructions medicationInstructions;
    protected PractitionerParticipationLite finisher;
    protected OutpatientMedicationPromise1.ActivitiesLog activitiesLog;
    @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<OutpatientMedicationDispense1> originalDispenseSet;


    /**
     * 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;
    }


    public PatientInstructions getPatientInstructions( )
    {

        return this.patientInstructions;
    }


    public void setPatientInstructions( PatientInstructions patientInstructions )
    {
        this.patientInstructions = patientInstructions;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="patientInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "patientInstruction" } )
    public static class PatientInstructions
    {
        @XmlElement( required = false, nillable = false )
        protected List<String> patientInstruction;
        @XmlTransient
        protected String singleInstruction;


        /**
         * Gets the value of the patientInstruction 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 patientInstruction property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getPatientInstruction().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link String }
         * 
         * 
         */
        public List<String> getPatientInstruction( )
        {
            if ( patientInstruction == null )
            {
                patientInstruction = new ArrayList<String>();
            }
            return this.patientInstruction;
        }


        public void setPatientInstruction( List<String> patientInstruction )
        {
            this.patientInstruction = patientInstruction;
        }


        public void setSingleInstruction( String singleInstruction )
        {
            this.getPatientInstruction().add( singleInstruction );
        }


        public String getSingleInstruction( )
        {
            return this.singleInstruction;
        }

    }


    public OtherPatientInstructions getOtherPatientInstructions( )
    {

        return this.otherPatientInstructions;
    }


    public void setOtherPatientInstructions( OtherPatientInstructions otherPatientInstructions )
    {
        this.otherPatientInstructions = otherPatientInstructions;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="otherPatientInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "otherPatientInstruction", "singleInstruction" } )
    public static class OtherPatientInstructions
    {
        @XmlElement( required = false, nillable = false )
        protected List<String> otherPatientInstruction;
        protected String singleInstruction;


        /**
         * Gets the value of the otherPatientInstruction 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 otherPatientInstruction property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getOtherPatientInstruction().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link String }
         * 
         * 
         */
        public List<String> getOtherPatientInstruction( )
        {
            if ( otherPatientInstruction == null )
            {
                otherPatientInstruction = new ArrayList<String>();
            }
            return this.otherPatientInstruction;
        }


        public void setOtherPatientInstruction( List<String> otherPatientInstruction )
        {
            this.otherPatientInstruction = otherPatientInstruction;
        }


        public void setSingleInstruction( String singleInstruction )
        {
            this.getOtherPatientInstruction().add( singleInstruction );
        }


        public String getSingleInstruction( )
        {
            return this.singleInstruction;
        }

    }


    public ExpandedPatientInstructions getExpandedPatientInstructions( )
    {
        return this.expandedPatientInstructions;
    }


    public void setExpandedPatientInstructions( ExpandedPatientInstructions expandedPatientInstructions )
    {
        this.expandedPatientInstructions = expandedPatientInstructions;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="expandedPatientInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "expandedPatientInstruction", "singleInstruction" } )
    public static class ExpandedPatientInstructions
    {
        @XmlElement( required = false, nillable = false )
        protected List<String> expandedPatientInstruction;
        protected String singleInstruction;


        /**
         * Gets the value of the expandedPatientInstruction 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 expandedPatientInstruction property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getExpandedPatientInstruction().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link String }
         * 
         * 
         */
        public List<String> getExpandedPatientInstruction( )
        {
            if ( expandedPatientInstruction == null )
            {
                expandedPatientInstruction = new ArrayList<String>();
            }
            return this.expandedPatientInstruction;
        }


        public void setExpandedPatientInstruction( List<String> expandedPatientInstruction )
        {
            this.expandedPatientInstruction = expandedPatientInstruction;
        }


        public void setSingleInstruction( String singleInstruction )
        {
            this.getExpandedPatientInstruction().add( singleInstruction );
        }


        public String getSingleInstruction( )
        {
            return this.singleInstruction;
        }

    }


    public PharmacyInstructions getPharmacyInstructions( )
    {
        return this.pharmacyInstructions;
    }


    public void setPharmacyInstructions( PharmacyInstructions pharmacyInstructions )
    {
        this.pharmacyInstructions = pharmacyInstructions;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="pharmacyInstruction" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "pharmacyInstruction", "singleInstruction" } )
    public static class PharmacyInstructions
    {
        @XmlElement( required = false, nillable = false )
        protected List<String> pharmacyInstruction;
        protected String singleInstruction;


        /**
         * Gets the value of the pharmacyInstruction 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 pharmacyInstruction property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getPharmacyInstruction().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link String }
         * 
         * 
         */
        public List<String> getPharmacyInstruction( )
        {
            if ( pharmacyInstruction == null )
            {
                pharmacyInstruction = new ArrayList<String>();
            }
            return this.pharmacyInstruction;
        }


        public void setPharmacyInstruction( List<String> pharmacyInstruction )
        {
            this.pharmacyInstruction = pharmacyInstruction;
        }


        public void setSingleInstruction( String singleInstruction )
        {
            this.getPharmacyInstruction().add( singleInstruction );
        }


        public String getSingleInstruction( )
        {
            return this.singleInstruction;
        }

    }


    public Sigs getSigs( )
    {
        return this.sigs;
    }


    public void setSigs( Sigs sigs )
    {

        this.sigs = sigs;
    }


    /**
     * 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;
    }


    public TreatmentFactors getTreatmentFactors( )
    {
        return this.treatmentFactors;
    }


    public void setTreatmentFactors( TreatmentFactors treatmentFactors )
    {
        this.treatmentFactors = treatmentFactors;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="treatmentFactor" type="{Common}TreatmentFactor" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "treatmentFactor" } )
    public static class TreatmentFactors
    {
        @XmlElement( required = false, nillable = false )
        protected List<TreatmentFactor> treatmentFactor;


        /**
         * 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> treatFactr )
        {
            this.treatmentFactor = treatFactr;
        }

    }


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


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


    public RefillDispenses getRefillDispenses( )
    {

        return this.refillDispenses;
    }


    public void setRefillDispenses( RefillDispenses refillDispenses )
    {
        if ( ( originalDispense != null ) && ( originalDispense.getNumberOfRefillsRemaining() == null ) )
        {
            // Find number of refills from the Refill list object
            int numOfRefillsFromList = 0;

            for ( OutpatientMedicationDispense1 outpatientMedicationDispense1 : refillDispenses.getRefillDispense() )
            {
                if ( outpatientMedicationDispense1 == null )
                {

                }
                else
                {
                    numOfRefillsFromList++ ;
                }
            }

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

        this.refillDispenses = refillDispenses;
    }


    public PartialDispenses getPartialDispenses( )
    {
        return this.partialDispenses;
    }


    public void setPartialDispenses( PartialDispenses partialDispenses )
    {
        this.partialDispenses = partialDispenses;
    }


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


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


    public MedicationInstructions getMedicationInstructions( )
    {
        return this.medicationInstructions;
    }


    public void setMedicationInstructions( MedicationInstructions medicationInstructions )
    {
        this.medicationInstructions = medicationInstructions;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="medicationInstruction" type="{Pharmacy}MedicationInstructionComponent" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlRootElement( name = "medicationInstructions" )
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "medicationInstruction", "prescription" } )
    public static class MedicationInstructions
    {
        @XmlElement( required = false, nillable = false )
        protected List<MedicationInstructionComponent> medicationInstruction;
        @XmlTransient
        protected Object id;
        protected BigDecimal prescription;
        @XmlTransient
        protected MedicationInstructionComponent singleInstruction;


        /**
         * Gets the value of the medicationInstruction 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 medicationInstruction property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getMedicationInstruction().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link MedicationInstructionComponent }
         * 
         * 
         */
        public List<MedicationInstructionComponent> getMedicationInstruction( )
        {
            if ( medicationInstruction == null )
            {
                medicationInstruction = new ArrayList<MedicationInstructionComponent>();
            }
            return this.medicationInstruction;
        }


        public void setMedicationInstruction( List<MedicationInstructionComponent> medicationInstruction )
        {
            this.medicationInstruction = medicationInstruction;

        }


        public Object getId( )
        {
            return id;
        }


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


        public BigDecimal getPrescription( )
        {
            return prescription;
        }


        public void setPrescription( BigDecimal prescription )
        {
            this.prescription = prescription;
        }


        public void setSingleInstruction( MedicationInstructionComponent singleInstruction )
        {
            this.getMedicationInstruction().add( singleInstruction );
        }


        public MedicationInstructionComponent getSingleInstruction( )
        {
            return this.singleInstruction;
        }

    }


    /**
     * 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;
    }


    public ActivitiesLog getActivitiesLog( )
    {
        return this.activitiesLog;
    }


    public void setActivitiesLog( ActivitiesLog activityLogs )
    {
        this.activitiesLog = activityLogs;
    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="activityLog" type="{Pharmacy}ActivityLog" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlRootElement( name = "activitiesLog" )
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "activityLog", "prescription" } )
    public static class ActivitiesLog
    {
        @XmlElement( required = false, nillable = false )
        protected List<ActivityLog> activityLog;
        @XmlTransient
        protected Object id;
        protected BigDecimal prescription;
        @XmlTransient
        protected ActivityLog singleLog;


        /**
         * 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;
        }


        public Object getId( )
        {
            return id;
        }


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


        public BigDecimal getPrescription( )
        {
            return prescription;
        }


        public void setPrescription( BigDecimal prescription )
        {
            this.prescription = prescription;
        }


        public void setSingleLog( ActivityLog singleLog )
        {
            this.getActivityLog().add( singleLog );
        }


        public ActivityLog getSingleLog( )
        {
            return this.singleLog;
        }

    }


    /**
     * 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;
    }


    /*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<OutpatientMedicationDispense1> getOriginalDispenseSet( )
    {
        if ( originalDispenseSet == null )
        {
            originalDispenseSet = new ArrayList<OutpatientMedicationDispense1>();
            if ( originalDispense != null )
            {
                originalDispenseSet.add( originalDispense );
            }
        }
        else if ( originalDispenseSet.size() == 0 && originalDispense != null )
        {
            originalDispenseSet.add( originalDispense );
        }
        return this.originalDispenseSet;
    }


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

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="refillDispense" type="{Pharmacy}OutpatientMedicationDispense" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlRootElement( name = "refillDispenses" )
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "refillDispense", "prescription" } )
    public static class RefillDispenses
    {

        @XmlElement( required = false, nillable = false )
        protected List<OutpatientMedicationDispense1> refillDispense;
        @XmlTransient
        protected Object id;
        protected BigDecimal prescription;
        @XmlTransient
        protected OutpatientMedicationDispense1 singleDispense;


        /**
         * 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 OutpatientMedicationDispense1 }
         * 
         * 
         */
        public List<OutpatientMedicationDispense1> getRefillDispense( )
        {
            if ( refillDispense == null )
            {
                refillDispense = new ArrayList<OutpatientMedicationDispense1>();
            }
            return this.refillDispense;
        }


        public void setRefillDispense( List<OutpatientMedicationDispense1> refillDispense )
        {
            this.refillDispense = refillDispense;
        }


        public Object getId( )
        {
            return id;
        }


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


        public BigDecimal getPrescription( )
        {
            return prescription;
        }


        public void setPrescription( BigDecimal prescription )
        {
            this.prescription = prescription;
        }


        public void setSingleDispense( OutpatientMedicationDispense1 singleDispense )
        {
            this.getRefillDispense().add( singleDispense );
        }


        public OutpatientMedicationDispense1 getSingleDispense( )
        {
            return this.singleDispense;
        }

    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="refillDispense" type="{Pharmacy}OutpatientMedicationDispense" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlRootElement( name = "partialDispenses" )
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "partialDispense", "prescription" } )
    public static class PartialDispenses
    {
        @XmlElement( required = false, nillable = false )
        protected List<OutpatientMedicationDispense1> partialDispense;
        @XmlTransient
        protected Object id;
        protected BigDecimal prescription;
        @XmlTransient
        protected OutpatientMedicationDispense1 singleDispense;


        /**
         * 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 OutpatientMedicationDispense1 }
         * 
         * 
         */
        public List<OutpatientMedicationDispense1> getPartialDispense( )
        {
            if ( partialDispense == null )
            {
                partialDispense = new ArrayList<OutpatientMedicationDispense1>();
            }
            return this.partialDispense;
        }


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


        public Object getId( )
        {
            return id;
        }


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


        public BigDecimal getPrescription( )
        {
            return prescription;
        }


        public void setPrescription( BigDecimal prescription )
        {
            this.prescription = prescription;
        }


        public void setSingleDispense( OutpatientMedicationDispense1 singleDispense )
        {
            this.getPartialDispense().add( singleDispense );
        }


        public OutpatientMedicationDispense1 getSingleDispense( )
        {
            return this.singleDispense;
        }

    }

    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="sig" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType( XmlAccessType.FIELD )
    @XmlType( name = "", propOrder = { "sig", "singleSig" } )
    public static class Sigs
    {
        @XmlElement( required = false, nillable = false )
        protected List<String> sig;
        protected String singleSig;


        /**
         * 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 void setSingleSig( String singleSig )
        {
            this.getSig().add( singleSig );
        }


        public String getSingleSig( )
        {
            return this.singleSig;
        }

    }

}
