com.mmm.cms.homehealth.io
Interface OasisRecordConverterIF

All Known Implementing Classes:
Oasis_B_RecordUtil, Oasis_C_RecordUtil

public interface OasisRecordConverterIF

This provides definitions for testing if a record converted is appropriate and then to actually convert a record. Converters should be able to convert from and to an OASIS related string format. However, since the focus of the HHRG is only a subset of the OASIS record, converting to an OASIS string format does not have to guarantee all the fields that were originally available in an original source OASIS string. For example, the HHRG is not concerned with the patient's name, address, etc. and therefore a converter does not have to read those fields when converting to an internal HomeHealthRecordIF. Conversely, when converting from an internal HomeHealthRecordIF, the converter does not have to output those fields either. So, an input OASIS record is only guaranteed to look like the output OASIS record where the fields related to HHRG are concerned. All other fields may be a space.


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(HomeHealthRecordIF homeHealthRecord, java.lang.String delimiter)
          Converts an OASIS record extended from the HomeHealth Record to a String using the delimiter to separate the values
 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 Body record using the generic Home Health Record interface.
 java.lang.String formatDiagnosisCode(Icd9DiagnosisCodeIF dxcode)
          Ensures that a diagnosis code is 7 character long, padded with spaces where necessary
 java.lang.String getSharedString(java.lang.String str)
          This method returns a String object that is already used for reading an Oasis record in order to reduce the memory required to process large data sets.
 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.String justifyRight(java.lang.String str, int length, char fillchar)
          This method returns a String that is right justified for the given length.
 java.lang.StringBuilder toHeaderOasisRecDelimeted(java.lang.String delimiter)
          Builds a header record explaining the format of the OASIS record.
 

Method Detail

isRecordConvertable

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.

Parameters:
record -
Returns:

convertFromHomeHealthRec

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. no delimiter

Parameters:
homeHealthRecord -
Returns:
See Also:
static StringBuilder convertFromHomeHealthRecDelimeted(HomeHealthRecordIF homeHealthRecord, String delimiter) {

convertFromHomeHealthRecDelimeted

java.lang.StringBuilder convertFromHomeHealthRecDelimeted(HomeHealthRecordIF homeHealthRecord,
                                                          java.lang.String delimiter)
Converts an OASIS record extended from the HomeHealth Record to a String using the delimiter to separate the values

Parameters:
homeHealthRecord -
delimiter -
Returns:

convertToHomeHealthRec

HomeHealthRecordIF convertToHomeHealthRec(java.lang.String strRecord,
                                          int recNum)
                                          throws java.text.ParseException
Converts a string to a Home Health record, using the 3 parameter converter

Parameters:
strRecord -
recNum -
Returns:
Throws:
java.text.ParseException
See Also:
static HomeHealthRecordIF convertToHomeHealthRec(String strRecord, int recNum, boolean skipPassthru) throws ParseException

convertToHomeHealthRec

HomeHealthRecordIF convertToHomeHealthRec(java.lang.String strRecord,
                                          int recNum,
                                          boolean skipPassthru)
                                          throws java.text.ParseException
Converts an OASIS string record to an OASIS Body 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

Parameters:
strRecord -
recNum -
skipPassthru -
Returns:
Throws:
java.text.ParseException

formatDiagnosisCode

java.lang.String formatDiagnosisCode(Icd9DiagnosisCodeIF dxcode)
Ensures that a diagnosis code is 7 character long, padded with spaces where necessary

Parameters:
dxcode -
Returns:

getSharedString

java.lang.String getSharedString(java.lang.String str)
This method returns a String object that is already used for reading an Oasis record in order to reduce the memory required to process large data sets.

Parameters:
str -
Returns:

justifyRight

java.lang.String justifyRight(java.lang.String str,
                              int length,
                              char fillchar)
This method returns a String that is right justified for the given length.

Parameters:
str -
length -
Returns:

toHeaderOasisRecDelimeted

java.lang.StringBuilder toHeaderOasisRecDelimeted(java.lang.String delimiter)
Builds a header record explaining the format of the OASIS record. Usually used at the top of a text file.

Parameters:
delimiter -
Returns: