cdac.medinfo.sdk.hl7282.baselibs.segments

## Class MFE

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.segments.Segment
  - - cdac.medinfo.sdk.hl7282.baselibs.segments.MFE

- All Implemented Interfaces:
    ISegment

      public class MFE
      extends Segment

  MFE - Master File Entry Segment.

  The Technical Steward for the MFE segment is CQ.

  Represents an HL7 MFE message segment. This segment has the following fields:

  MFE-1: Record-Level Event Code (ID)Required
  MFE-2: MFN Control ID (ST)Conditional
  MFE-3: Effective Date/Time (DTM)Optional
  MFE-4: Primary Key Value - MFE (Varies)Required
  MFE-5: Primary Key Value Type (ID)Required
  MFE-6: Entered Date/Time (DTM)Optional
  MFE-7: Entered By (XCN)Optional

  This class provides mechanism to validate message against HL7 v 2.8.2 standard. The class provides accessors & mutators for the elements mentioned above. The class has validate method which validates Message against HL7 v 2.8.2 standard.

  User can also create Segment through `SegmentFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MFE()` Constructs the MFE segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addprimaryKeyValueMFE(IDataType objPrimaryKeyValueMFE)` Add the Primary Key Value MFE.
    `void` | `addPrimaryKeyValueType(ID objtempPrimaryKeyValueType)` Add the Primary Key Value Type.
    `void` | `addPrimaryKeyValueType(java.lang.String strCharacterSet)` Add the Primary Key Value Type.
    `DTM` | `getEffectiveDateTime()` Retrieves the Effective Date Time.
    `XCN` | `getEnteredBy()` Retrieves the Entered By.
    `DTM` | `getEnteredDateTime()` Retrieves the Entered Date/Time.
    `ST` | `getMFNControlID()` Retrieves the MFN Control ID.
    `ISingleCollection<IDataType>` | `getPrimaryKeyValueMFE()` Retrieves the Primary Key Value MFE.
    `ISingleCollection<ID>` | `getPrimaryKeyValueType()` Retrieves the Primary Key Value Type.
    `ID` | `getRecordLevelEventCode()` Retrieves the Record Level Event Code.
    `int` | `parse(java.lang.String strSegmentStream, IDelimiter objIDelimiter)` Parses HL7 Segment Strings from any Stream into HL7 Segment object.
    `void` | `setEffectiveDateTime(DTM objeffectiveDateTime)` Sets the Effective Date Time
    `void` | `setEffectiveDateTime(java.lang.String strTime)` Set the Effective Date Time.
    `void` | `setEnteredBy(java.lang.String strIDNumber, FN objFamilyName, java.lang.String strGivenName, java.lang.String strSecondAndFurtherGivenNamesOrInitialsThereof, java.lang.String strSuffix, java.lang.String strPrefix, CWE objSourceTable, HD objAssigningAuthority, java.lang.String strNameTypeCode, java.lang.String strIdentifierCheckDigit, java.lang.String strCheckDigitScheme, java.lang.String strIdentifierTypeCode, HD objAssigningFacility, java.lang.String strNameRepresentationCode, CWE objNameContext, java.lang.String strNameAssemblyOrder, java.lang.String strEffectiveDate, java.lang.String strExpirationDate, java.lang.String strProfessionalSuffix, CWE objAssigningJurisdiction, CWE objAssigningAgencyOrDepratment, java.lang.String strSecurityCheck, java.lang.String strSecurityCheckScheme)` Set the Entered By.
    `void` | `setEnteredBy(XCN objEnteredBy)` Set the Entered By.
    `void` | `setEnteredDateTime(DTM objEnteredDateTime)` Set the Entered Date/Time.
    `void` | `setEnteredDateTime(java.lang.String strTime)` Set the Entered Date/Time.
    `void` | `setMFNControlID(ST objmFNControlID)` Set the MFN Control ID.
    `void` | `setMFNControlID(java.lang.String strAccidentDecription)` Set the MFN Control ID.
    `void` | `setprimaryKeyValueMFE(ISingleCollection<IDataType> objPrimaryKeyValueMFEList)` Set the Primary Key Value MFE.
    `void` | `setPrimaryKeyValueType(ISingleCollection<ID> objtempPrimaryKeyValueTypeList)` Set the Primary Key Value Type.
    `void` | `setRecordLevelEventCode(ID objrecordLevelEventCode)` Set the Record Level Event Code.
    `void` | `setRecordLevelEventCode(java.lang.String strQueryResponseStatus)` Set the Record Level Event Code.
    `boolean` | `validate()` Validates HL7 Message objects .

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.segments.Segment

      `addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXML`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MFE

          public MFE()

      Constructs the MFE segment.

  - ### Method Detail

    - #### getEffectiveDateTime

          public DTM getEffectiveDateTime()

      Retrieves the Effective Date Time. This date/time the originating system expects that the event is to have been completed on the receiving system.
      Returns:
        DTM - effectiveDateTime

    - #### getMFNControlID

          public ST getMFNControlID()

      Retrieves the MFN Control ID. This field uniquely identify this change to this record from the point of view of the originating system.
      Returns:
        ST - mFNControlID

    - #### getPrimaryKeyValueMFE

          public ISingleCollection<IDataType> getPrimaryKeyValueMFE()

      Retrieves the Primary Key Value MFE. This field uniquely identify the record of the master file.
      Returns:
        ISingleCollection - primaryKeyValueMFE

    - #### getPrimaryKeyValueType

          public ISingleCollection<ID> getPrimaryKeyValueType()

      Retrieves the Primary Key Value Type.
      Returns:
        ISingleCollection - primaryKeyValueType

    - #### getRecordLevelEventCode

          public ID getRecordLevelEventCode()

      Retrieves the Record Level Event Code. This field defines the record-level event for the master file record identified by the MFI segment and the primary key field in this segment.
      Returns:
        ID - recordLevelEventCode

    - #### getEnteredDateTime

          public DTM getEnteredDateTime()

      Retrieves the Entered Date/Time. This field contains the date and time of the last change of the record.
      Returns:
        DTM - EnteredDateTime

    - #### getEnteredBy

          public XCN getEnteredBy()

      Retrieves the Entered By. This field contains the identity of the person who actually keyed the master file entry into the application.
      Returns:
        XCN - EnteredBy

    - #### addprimaryKeyValueMFE

          public void addprimaryKeyValueMFE(IDataType objPrimaryKeyValueMFE)

      Add the Primary Key Value MFE. This field uniquely identify the record of the master file.
      Parameters:
        `objPrimaryKeyValueMFE` - Used as PrimaryKeyValueMFE.

    - #### setprimaryKeyValueMFE

          public void setprimaryKeyValueMFE(ISingleCollection<IDataType> objPrimaryKeyValueMFEList)

      Set the Primary Key Value MFE. This field uniquely identify the record of the master file.
      Parameters:
        `objPrimaryKeyValueMFEList` - List Used as PrimaryKeyValueMFE.

    - #### setEffectiveDateTime

          public void setEffectiveDateTime(java.lang.String strTime)

      Set the Effective Date Time. This date/time the originating system expects that the event is to have been completed on the receiving system.
      Parameters:
        `strTime` - Specifies a point in time using a 24-hour clock notation.
        `strDegreeOfPrecision` - The degree of precision of the time stamp .Suggested Values Y,L,D,H,M,S [Refer to HL7 Table 0529].

    - #### setEffectiveDateTime

          public void setEffectiveDateTime(DTM objeffectiveDateTime)

      Sets the Effective Date Time
      Parameters:
        `objeffectiveDateTime` - object of Effective Date Time

    - #### setMFNControlID

          public void setMFNControlID(java.lang.String strAccidentDecription)

      Set the MFN Control ID. This field uniquely identify this change to this record from the point of view of the originating system.
      Parameters:
        `strAccidentDecription` - Used as AccidentDecription.

    - #### setMFNControlID

          public void setMFNControlID(ST objmFNControlID)

      Set the MFN Control ID. This field uniquely identify this change to this record from the point of view of the originating system.
      Parameters:
        `objmFNControlID` - object of MFN Control ID.

    - #### addPrimaryKeyValueType

          public void addPrimaryKeyValueType(java.lang.String strCharacterSet)

      Add the Primary Key Value Type.
      Parameters:
        `strCharacterSet` - USed as CharacterSet.

    - #### addPrimaryKeyValueType

          public void addPrimaryKeyValueType(ID objtempPrimaryKeyValueType)

      Add the Primary Key Value Type.
      Parameters:
        `objtempPrimaryKeyValueType` - object of Primary Key Value Type.

    - #### setPrimaryKeyValueType

          public void setPrimaryKeyValueType(ISingleCollection<ID> objtempPrimaryKeyValueTypeList)

      Set the Primary Key Value Type.
      Parameters:
        `objtempPrimaryKeyValueTypeList` - List of Primary Key Value Type.

    - #### setRecordLevelEventCode

          public void setRecordLevelEventCode(java.lang.String strQueryResponseStatus)

      Set the Record Level Event Code. This field defines the record-level event for the master file record identified by the MFI segment and the primary key field in this segment.
      Parameters:
        `strQueryResponseStatus` - Used as QueryResponseStatus.

    - #### setRecordLevelEventCode

          public void setRecordLevelEventCode(ID objrecordLevelEventCode)

      Set the Record Level Event Code. This field defines the record-level event for the master file record identified by the MFI segment and the primary key field in this segment.
      Parameters:
        `objrecordLevelEventCode` - object of Record Level Event Code.

    - #### setEnteredBy

          public void setEnteredBy(java.lang.String strIDNumber,
                          FN objFamilyName,
                          java.lang.String strGivenName,
                          java.lang.String strSecondAndFurtherGivenNamesOrInitialsThereof,
                          java.lang.String strSuffix,
                          java.lang.String strPrefix,
                          CWE objSourceTable,
                          HD objAssigningAuthority,
                          java.lang.String strNameTypeCode,
                          java.lang.String strIdentifierCheckDigit,
                          java.lang.String strCheckDigitScheme,
                          java.lang.String strIdentifierTypeCode,
                          HD objAssigningFacility,
                          java.lang.String strNameRepresentationCode,
                          CWE objNameContext,
                          java.lang.String strNameAssemblyOrder,
                          java.lang.String strEffectiveDate,
                          java.lang.String strExpirationDate,
                          java.lang.String strProfessionalSuffix,
                          CWE objAssigningJurisdiction,
                          CWE objAssigningAgencyOrDepratment,
                          java.lang.String strSecurityCheck,
                          java.lang.String strSecurityCheckScheme)

      Set the Entered By. This field contains the identity of the person who actually keyed the master file entry into the application.
      Parameters:
        `strIDNumber` - Refers to the coded ID according to a user-defined table
        `objFamilyName` - Specifies the surname of a person.
        `strGivenName` - Specifies First name.
        `strSecondAndFurtherGivenNamesOrInitialsThereof` - Specifies multiple middle names that may be included by separating them with spaces.
        `strSuffix` - Used to specify a name suffix (e.g., Jr. or III).
        `strPrefix` - Used to specify a name prefix (e.g., Dr.).
        `strSourceTable` - Used as the HL7 identifier for the user-defined table of values for this component. [Refer User-defined Table 0297 - CN ID.]
        `objAssigningAuthority` - Specifies a unique identifier of the system (or organization or agency of department) that creates the data. [Refer User-defined Table 0363 - Assigning authority]
        `strNameTypeCode` - Specifies a code that represents the type of name.
        `strIdentifierCheckDigit` - Specifies part of the identifying number used in the sending application.
        `strCheckDigitScheme` - Specifies the code identifying the check digit scheme employed.[Refer HL7 Table 0061 - Check digit scheme].
        `strIdentifierTypeCode` - Specifies A code corresponding to the type of identifier.[Refer HL7 Table 0203 - Identifier type].
        `objAssigningFacility` - Specifies the place or location identifier where the identifier was first assigned to the person
        `strNameRepresentationCode` - Provides an indication of the representation provided by the data item.
        `objNameContext` - Designates the context in which a name is used. [Refer User-defined Table 0448 ]
        `strNameAssemblyOrder` - Specifies a code that represents the preferred display order of the components of this person name. Suggested values are G,F[Refer table 0444.]
        `strEffectiveDate` - Specifies the first date, if known, on which the address is valid and active.
        `strExpirationDate` - Specifies the last date, if known, on which the address is valid and active.
        `strProfessionalSuffix` - Used to specify an abbreviation, or a string of abbreviations, denoting qualifications that support the person's profession, (e.g., licenses).
        `objAssigningJurisdiction` - Specifies the geo-political body that assigned the identifier.
        `objAssigningAgencyOrDepratment` - Specifies the agency or department that assigned the identifier
        `strSecurityCheck` - Specifies the version code that may be assigned to the person identifier
        `strSecurityCheckScheme` - Specifies the check digit scheme.

    - #### setEnteredBy

          public void setEnteredBy(XCN objEnteredBy)

      Set the Entered By. This field contains the identity of the person who actually keyed the master file entry into the application.
      Parameters:
        `objEnteredBy` -

    - #### parse

          public int parse(java.lang.String strSegmentStream,
                  IDelimiter objIDelimiter)
                    throws InvalidSegmentException,
                           java.io.IOException

      Parses HL7 Segment Strings from any Stream into HL7 Segment object. This method checks for the Repetition of the fields in the Segment. It also checks for the optionality of the fields as whether they are mandatory or optional. Successful parsing of the segment populates the object with the data present on the stream and provides easy accessor and mutator methods to navigate the message. It also leads to failure if version of given HL7 Message is not 2.8.2. This method raises exception if there is Segment which is not valid as per HL7 v 2.8.2 standard.
      Specified by:
        `parse` in interface `ISegment`
      Overrides:
        `parse` in class `Segment`
      Parameters:
        `strHL7segmentString` - Object of HL7Stream.
        `objIDelimiter` - Object of class Delimiter.
      Returns:
        int - Success if segment is valid. - Fail if segment in not valid.
      Throws:
        `InvalidSegmentException` - Thrown when Segment Validation Fails.
        `java.io.IOException` - Signals that an I/O exception of some sort has occurred.

    - #### setEnteredDateTime

          public void setEnteredDateTime(java.lang.String strTime)

      Set the Entered Date/Time. This field contains the date and time of the last change of the record.
      Parameters:
        `strTime` - The point in time

    - #### setEnteredDateTime

          public void setEnteredDateTime(DTM objEnteredDateTime)

      Set the Entered Date/Time. This field contains the date and time of the last change of the record.
      Parameters:
        `objEnteredDateTime` -

    - #### validate

          public boolean validate()
                           throws InvalidSegmentException

      Validates HL7 Message objects . Validate method checks for validation each and every segments in side the Message object against specified message Structure. Validation chcecks include optionality of segment or group. It also verifies the number of times segment or group is repeated in message. e.g {PSH} while parsing PSH segment validate method will check for its mandatory presence. [PSH] in this case validate will throw exception if one tries to enter more than one PSH segment.
      Specified by:
        `validate` in interface `ISegment`
      Overrides:
        `validate` in class `Segment`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidSegmentException` - Throws when Segment Validation fails