com.mmm.cms.homehealth.io
Class Oasis_C_RecordUtil

java.lang.Object
  extended by com.mmm.cms.homehealth.io.Oasis_B_RecordUtil
      extended by com.mmm.cms.homehealth.io.Oasis_C_RecordUtil
All Implemented Interfaces:
OasisRecordConverterIF

public class Oasis_C_RecordUtil
extends Oasis_B_RecordUtil
implements OasisRecordConverterIF

This Utility converts between the OASIS-C formatted data and the internal HomeHealtRecord_C_IF data formats. It can be used in conjunction with the OasisRecordFactory, which queries this utility to determine if a specific OASIS record format can be converted using this utility.

See Also:
OasisReaderFactory

Field Summary
 
Fields inherited from class com.mmm.cms.homehealth.io.Oasis_B_RecordUtil
dateFormat, intFormat2, intFormat3, sharedObjects, strDate
 
Constructor Summary
Oasis_C_RecordUtil()
           
 
Method Summary
 java.lang.StringBuilder convertFromHomeHealthRec(HomeHealthRecordIF homeHealthRecord)
          Converts an OASIS record extended from the HomeHealth Record to a String that is a continous set of characters, i.e.
 java.lang.StringBuilder convertFromHomeHealthRecDelimeted(HomeHealthRecord_C_IF homeHealthRecord, java.lang.String delimiter)
           
 HomeHealthRecordIF convertToHomeHealthRec(java.lang.String strRecord, int recNum)
          Converts a string to a Home Health record, using the 3 parameter converter
 HomeHealthRecordIF convertToHomeHealthRec(java.lang.String strRecord, int recNum, boolean skipPassthru)
          Converts an OASIS string record to an OASIS-C related Home Health record using the generic Home Health Record interface.
 boolean isRecordConvertable(java.lang.String record)
          Given an OASIS 1448 or 1446 length string, determines if the converter can actually convert the record to its supported object.
 java.lang.StringBuilder toHeaderOasisRecDelimeted(java.lang.String delimiter)
          Builds a header record explaining the format of the OASIS record.
 
Methods inherited from class com.mmm.cms.homehealth.io.Oasis_B_RecordUtil
convertFromHomeHealthRecDelimeted, formatDiagnosisCode, getSharedString, justifyRight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.mmm.cms.homehealth.io.OasisRecordConverterIF
convertFromHomeHealthRecDelimeted, formatDiagnosisCode, getSharedString, justifyRight
 

Constructor Detail

Oasis_C_RecordUtil

public Oasis_C_RecordUtil()
Method Detail

isRecordConvertable

public boolean isRecordConvertable(java.lang.String record)
Given an OASIS 1448 or 1446 length string, determines if the converter can actually convert the record to its supported object. This will check the Version_CD1 field for the following values: as well at the Date Assessment Completed. Ensuring that the record is on or before December 31, 2009. The Version_CD1 field starts at position 23 (offset 22), with a length of 12, Left justified, any letters must be upper case. The Date Assessment Complete starts at position 302 (offset 301), with a length of 8 and a format of YYYYMMDD.

Specified by:
isRecordConvertable in interface OasisRecordConverterIF
Overrides:
isRecordConvertable in class Oasis_B_RecordUtil
Parameters:
record -
Returns:

convertFromHomeHealthRec

public java.lang.StringBuilder convertFromHomeHealthRec(HomeHealthRecordIF homeHealthRecord)
Description copied from class: Oasis_B_RecordUtil
Converts an OASIS record extended from the HomeHealth Record to a String that is a continous set of characters, i.e. no delimiter

Specified by:
convertFromHomeHealthRec in interface OasisRecordConverterIF
Overrides:
convertFromHomeHealthRec in class Oasis_B_RecordUtil
Returns:
See Also:
static StringBuilder convertFromHomeHealthRecDelimeted(HomeHealthRecordIF homeHealthRecord, String delimiter) {

convertFromHomeHealthRecDelimeted

public java.lang.StringBuilder convertFromHomeHealthRecDelimeted(HomeHealthRecord_C_IF homeHealthRecord,
                                                                 java.lang.String delimiter)

convertToHomeHealthRec

public HomeHealthRecordIF convertToHomeHealthRec(java.lang.String strRecord,
                                                 int recNum)
                                          throws java.text.ParseException
Description copied from class: Oasis_B_RecordUtil
Converts a string to a Home Health record, using the 3 parameter converter

Specified by:
convertToHomeHealthRec in interface OasisRecordConverterIF
Overrides:
convertToHomeHealthRec in class Oasis_B_RecordUtil
Returns:
Throws:
java.text.ParseException
See Also:
static HomeHealthRecordIF convertToHomeHealthRec(String strRecord, int recNum, boolean skipPassthru) throws ParseException

convertToHomeHealthRec

public HomeHealthRecordIF convertToHomeHealthRec(java.lang.String strRecord,
                                                 int recNum,
                                                 boolean skipPassthru)
                                          throws java.text.ParseException
Converts an OASIS string record to an OASIS-C related Home Health record using the generic Home Health Record interface. Since much of the OASIS information is not needed for Home Health grouping, this method can ignore them or store them with the record using the skipPassthru parameter.

Specified by:
convertToHomeHealthRec in interface OasisRecordConverterIF
Overrides:
convertToHomeHealthRec in class Oasis_B_RecordUtil
Parameters:
strRecord -
recNum -
skipPassthru -
Returns:
Throws:
java.text.ParseException

toHeaderOasisRecDelimeted

public java.lang.StringBuilder toHeaderOasisRecDelimeted(java.lang.String delimiter)
Description copied from class: Oasis_B_RecordUtil
Builds a header record explaining the format of the OASIS record. Usually used at the top of a text file.

Specified by:
toHeaderOasisRecDelimeted in interface OasisRecordConverterIF
Overrides:
toHeaderOasisRecDelimeted in class Oasis_B_RecordUtil
Returns: