com.ibm.jzos.sample.fields
Class MedicareRecord
- java.lang.Object
-
- com.ibm.jzos.sample.fields.MedicareRecord
-
public class MedicareRecord extends java.lang.ObjectA class which maps a fictional Medicare Record.This class demonstrates how a COBOL copybook can be represented in Java using the JZOS
Fieldclasses. An instance of theCobolDatatypeFactoryis 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 Summary
Fields Modifier and Type Field and Description static intBUF_LEN
-
Constructor Summary
Constructors Constructor and Description MedicareRecord()MedicareRecord(byte[] buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetAdmissionDate()java.lang.StringgetAutoAdjustmentInd()intgetBenefitsExhaustInd()intgetBenefitsPayInd()intgetBillSource()java.math.BigDecimalgetBloodDed()intgetBloodPintsFurnished()intgetBloodPintsReplaced()byte[]getBytes()Answer the underlying byte array mapped by this object.java.lang.StringgetClaimNumber()Get the ClaimNumber.intgetCoinsuranceDays()Get the CoinsuranceDays.intgetDischargeDate()Get the DischargeDate.intgetFromDate()Get the FromDate.intgetFullDays()Get the FullDays.java.math.BigDecimalgetInpatientDed()Get the InpatientDed.java.lang.StringgetIntermediaryCtrlNum()Get the IntermediaryCtrlNum.longgetIntermediaryNum()Get the IntermediaryNum.intgetLifetimeResDays()Get the LifetimeResDays.java.lang.StringgetMedicareProvider()Get the MedicareProvider.java.lang.StringgetPatientStatus()Get the PatientStatus.intgetSequenceCounter()Get the SequenceCounter.intgetThruDate()Get the ThruDate.java.math.BigDecimalgetTotalCharges()Get the TotalCharges.intgetTransactionInd()Get the TransactionInd.voidsetAdmissionDate(int admissionDate)voidsetAutoAdjustmentInd(java.lang.String autoAdjustmentInd)voidsetBenefitsExhaustInd(int benefitsExhaustInd)voidsetBenefitsPayInd(int benefitsPayInd)voidsetBillSource(int billSource)voidsetBloodDed(java.math.BigDecimal bloodDed)voidsetBloodPintsFurnished(int bloodPintsFurnished)voidsetBloodPintsReplaced(int bloodPintsReplaced)voidsetBytes(byte[] buffer)voidsetClaimNumber(java.lang.String claimNumber)voidsetCoinsuranceDays(int coinsuranceDays)voidsetDischargeDate(int dischargeDate)voidsetFromDate(int fromDate)voidsetFullDays(int fullDays)voidsetInpatientDed(java.math.BigDecimal inpatientDed)voidsetIntermediaryCtrlNum(java.lang.String intermediaryCtrlNum)voidsetIntermediaryNum(long intermediaryNum)voidsetLifetimeResDays(int lifetimeResDays)voidsetMedicareProvider(java.lang.String medicareProvider)voidsetPatientStatus(java.lang.String patientStatus)voidsetSequenceCounter(int sequenceCounter)voidsetThruDate(int thruDate)voidsetTotalCharges(java.math.BigDecimal totalCharges)voidsetTransactionInd(int transactionInd)
-
-
-
Field Detail
-
BUF_LEN
public static final int BUF_LEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MedicareRecord
public MedicareRecord()
-
MedicareRecord
public MedicareRecord(byte[] buffer)
-
-
Method Detail
-
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 java.lang.String getAutoAdjustmentInd()
-
setAutoAdjustmentInd
public void setAutoAdjustmentInd(java.lang.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 java.math.BigDecimal getBloodDed()
-
setBloodDed
public void setBloodDed(java.math.BigDecimal bloodDed)
-
getBloodPintsFurnished
public int getBloodPintsFurnished()
-
setBloodPintsFurnished
public void setBloodPintsFurnished(int bloodPintsFurnished)
-
getBloodPintsReplaced
public int getBloodPintsReplaced()
-
setBloodPintsReplaced
public void setBloodPintsReplaced(int bloodPintsReplaced)
-
getClaimNumber
public java.lang.String getClaimNumber()
Get the ClaimNumber.05 ClaimNumber PIC X(19).
- Returns:
- String the ClaimNumber
-
setClaimNumber
public void setClaimNumber(java.lang.String claimNumber)
- See Also:
getClaimNumber()
-
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:
getCoinsuranceDays()
-
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:
getDischargeDate()
-
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:
getFromDate()
-
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:
getFullDays()
-
getInpatientDed
public java.math.BigDecimal getInpatientDed()
Get the InpatientDed.05 InpatientDed PACKED-DECIMAL PIC S9(4)V99.
- Returns:
- BigDecimal the InpatientDed
-
setInpatientDed
public void setInpatientDed(java.math.BigDecimal inpatientDed)
- See Also:
getInpatientDed()
-
getIntermediaryCtrlNum
public java.lang.String getIntermediaryCtrlNum()
Get the IntermediaryCtrlNum.05 IntermediaryCtrlNum PIC X(23).
- Returns:
- String the IntermediaryCtrlNum
-
setIntermediaryCtrlNum
public void setIntermediaryCtrlNum(java.lang.String intermediaryCtrlNum)
- See Also:
getIntermediaryCtrlNum()
-
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:
getIntermediaryNum()
-
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:
getLifetimeResDays()
-
getMedicareProvider
public java.lang.String getMedicareProvider()
Get the MedicareProvider.05 MedicareProvider PIC X(13).
- Returns:
- int the MedicareProvider
-
setMedicareProvider
public void setMedicareProvider(java.lang.String medicareProvider)
- See Also:
getMedicareProvider()
-
getPatientStatus
public java.lang.String getPatientStatus()
Get the PatientStatus.05 PatientStatus PIC X(2).
- Returns:
- String the PatientStatus
-
setPatientStatus
public void setPatientStatus(java.lang.String patientStatus)
- See Also:
getPatientStatus()
-
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:
getSequenceCounter()
-
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:
getThruDate()
-
getTotalCharges
public java.math.BigDecimal getTotalCharges()
Get the TotalCharges.05 TotalCharges PIC S9(7)V99 DISPLAY SIGN LEADING.
- Returns:
- BigDecimal the TotalCharges
-
setTotalCharges
public void setTotalCharges(java.math.BigDecimal totalCharges)
- See Also:
getTotalCharges()
-
getTransactionInd
public int getTransactionInd()
Get the TransactionInd.05 TransactionInd PIC 9.
- Returns:
- int the TransactionInd
-
setTransactionInd
public void setTransactionInd(int transactionInd)
- See Also:
getTransactionInd()
-
-