Class MedicareRecord

java.lang.Object
com.ibm.jzos.sample.fields.MedicareRecord

public class MedicareRecord extends Object
A class which maps a fictional Medicare Record.

This class demonstrates how a COBOL copybook can be represented in Java using the JZOS Field classes. An instance of the CobolDatatypeFactory is used to construct static member fields which represent the various fields from the copybook. The actual copybook field definitions are included as comments prior to each Java field definition.

Instances of this class accept a byte array (either on the constructor or via the method setBytes(byte[]). This byte array represents a COBOL record matching the MedicareRecord described by the copybook. Individual fields can be accessed via the supplied getter and setter methods.

Since:
2.1.0
  • Field Details

  • Constructor Details

    • MedicareRecord

      public MedicareRecord()
    • MedicareRecord

      public MedicareRecord(byte[] buffer)
  • Method Details

    • getBytes

      public byte[] getBytes()
      Answer the underlying byte array mapped by this object.
      Returns:
      byte[]
    • setBytes

      public void setBytes(byte[] buffer)
    • getAdmissionDate

      public int getAdmissionDate()
    • setAdmissionDate

      public void setAdmissionDate(int admissionDate)
    • getAutoAdjustmentInd

      public String getAutoAdjustmentInd()
    • setAutoAdjustmentInd

      public void setAutoAdjustmentInd(String autoAdjustmentInd)
    • getBenefitsExhaustInd

      public int getBenefitsExhaustInd()
    • setBenefitsExhaustInd

      public void setBenefitsExhaustInd(int benefitsExhaustInd)
    • getBenefitsPayInd

      public int getBenefitsPayInd()
    • setBenefitsPayInd

      public void setBenefitsPayInd(int benefitsPayInd)
    • getBillSource

      public int getBillSource()
    • setBillSource

      public void setBillSource(int billSource)
    • getBloodDed

      public BigDecimal getBloodDed()
    • setBloodDed

      public void setBloodDed(BigDecimal bloodDed)
    • getBloodPintsFurnished

      public int getBloodPintsFurnished()
    • setBloodPintsFurnished

      public void setBloodPintsFurnished(int bloodPintsFurnished)
    • getBloodPintsReplaced

      public int getBloodPintsReplaced()
    • setBloodPintsReplaced

      public void setBloodPintsReplaced(int bloodPintsReplaced)
    • getClaimNumber

      public String getClaimNumber()
      Get the ClaimNumber.
       05 ClaimNumber                        PIC X(19).
       
      Returns:
      String the ClaimNumber
    • setClaimNumber

      public void setClaimNumber(String claimNumber)
      See Also:
    • getCoinsuranceDays

      public int getCoinsuranceDays()
      Get the CoinsuranceDays.
       05 CoinsuranceDays     BINARY         PIC 9(4).
       
      Returns:
      int the CoinsuranceDays
    • setCoinsuranceDays

      public void setCoinsuranceDays(int coinsuranceDays)
      See Also:
    • getDischargeDate

      public int getDischargeDate()
      Get the DischargeDate.
       05 DischargeDate       PACKED-DECIMAL PIC S9(7).
       
      Returns:
      int the DischargeDate
    • setDischargeDate

      public void setDischargeDate(int dischargeDate)
      See Also:
    • getFromDate

      public int getFromDate()
      Get the FromDate.
       05 FromDate            PACKED-DECIMAL PIC S9(7).
       
      Returns:
      int the FromDate
    • setFromDate

      public void setFromDate(int fromDate)
      See Also:
    • getFullDays

      public int getFullDays()
      Get the FullDays.
       05 FullDays            PACKED-DECIMAL PIC S9(5).
       
      Returns:
      int the FullDays
    • setFullDays

      public void setFullDays(int fullDays)
      See Also:
    • getInpatientDed

      public BigDecimal getInpatientDed()
      Get the InpatientDed.
       05 InpatientDed        PACKED-DECIMAL PIC S9(4)V99.
       
      Returns:
      BigDecimal the InpatientDed
    • setInpatientDed

      public void setInpatientDed(BigDecimal inpatientDed)
      See Also:
    • getIntermediaryCtrlNum

      public String getIntermediaryCtrlNum()
      Get the IntermediaryCtrlNum.
       05 IntermediaryCtrlNum                PIC X(23).
       
      Returns:
      String the IntermediaryCtrlNum
    • setIntermediaryCtrlNum

      public void setIntermediaryCtrlNum(String intermediaryCtrlNum)
      See Also:
    • getIntermediaryNum

      public long getIntermediaryNum()
      Get the IntermediaryNum.
       05 IntermediaryNum     BINARY         PIC 9(10).
       
      Returns:
      String the IntermediaryNum
    • setIntermediaryNum

      public void setIntermediaryNum(long intermediaryNum)
      See Also:
    • getLifetimeResDays

      public int getLifetimeResDays()
      Get the LifetimeResDays.
       05 LifetimeResDays     BINARY         PIC 9(6).
       
      Returns:
      int the LifetimeResDays
    • setLifetimeResDays

      public void setLifetimeResDays(int lifetimeResDays)
      See Also:
    • getMedicareProvider

      public String getMedicareProvider()
      Get the MedicareProvider.
       05 MedicareProvider                   PIC X(13).
       
      Returns:
      int the MedicareProvider
    • setMedicareProvider

      public void setMedicareProvider(String medicareProvider)
      See Also:
    • getPatientStatus

      public String getPatientStatus()
      Get the PatientStatus.
       05 PatientStatus                      PIC X(2).
       
      Returns:
      String the PatientStatus
    • setPatientStatus

      public void setPatientStatus(String patientStatus)
      See Also:
    • getSequenceCounter

      public int getSequenceCounter()
      Get the SequenceCounter.
       05 SequenceCounter     BINARY         PIC 9(3).
       
      Returns:
      int the SequenceCounter
    • setSequenceCounter

      public void setSequenceCounter(int sequenceCounter)
      See Also:
    • getThruDate

      public int getThruDate()
      Get the ThruDate.
       05 ThruDate            PACKED-DECIMAL PIC S9(7).
       
      Returns:
      int the ThruDate
    • setThruDate

      public void setThruDate(int thruDate)
      See Also:
    • getTotalCharges

      public BigDecimal getTotalCharges()
      Get the TotalCharges.
       05 TotalCharges                       PIC S9(7)V99 DISPLAY SIGN LEADING.
       
      Returns:
      BigDecimal the TotalCharges
    • setTotalCharges

      public void setTotalCharges(BigDecimal totalCharges)
      See Also:
    • getTransactionInd

      public int getTransactionInd()
      Get the TransactionInd.
       05 TransactionInd                     PIC 9.
       
      Returns:
      int the TransactionInd
    • setTransactionInd

      public void setTransactionInd(int transactionInd)
      See Also: