public class MRG extends Segment
MRG segment provides receiving applications with information necessary to initiate the merging of patient data as well as groups of records. It is intended that this segment be used throughout the Standard to allow the merging of registration, accounting, and clinical records within specific applications.
Represents an HL7 MRG message segment. This segment has the following fields:
MRG-1: Prior Patient Identifier List (CX)Required
MRG-2: Prior Alternate Patient ID (CX)Withdrawn
MRG-3: Prior Patient Account Number (CX)Optional
MRG-4: Prior Patient ID (CX)Withdrawn
MRG-5: Prior Visit Number (CX)Optional
MRG-6: Prior Alternate Visit ID (CX)Optional
MRG-7: Prior Patient Name (XPN)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 and Description |
|---|
MRG()
Constructs the MRG segment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPriorAlternateVisitID(CX objpriorAlternateVisitID)
Sets the Prior Alternate Visit ID.
|
void |
addPriorAlternateVisitID(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
Set the Prior AlternateVisit ID.
|
void |
addPriorPatientIdentifierList(CX objpriorPatientIdentifier)
Set the Prior Patient Identifier.
|
void |
addPriorPatientIdentifierList(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
Set the Prior Patient Identifier List.
|
void |
addPriorPatientName(FN objFamilyName,
java.lang.String strGivenName,
java.lang.String strSecondAndFurtherGivenNamesOrInitialsThereof,
java.lang.String strSuffix,
java.lang.String strPrefix,
java.lang.String strNameTypeCode,
java.lang.String strNameRepresentationCode,
CWE objNameContext,
java.lang.String strNameAssemblyOrder,
DTM objEffectiveDate,
DTM objExpirationDate,
java.lang.String strProfessionalSuffix,
java.lang.String strCalledBy)
Set the Prior Patient Name.
|
void |
addPriorPatientName(XPN objPriorPatientNameID)
Sets the Prior Patient Name.
|
ISingleCollection<CX> |
getPriorAlternateVisitID()
Retrieves the Prior Alternate Visit ID.
|
CX |
getPriorPatientAccountNumber()
Retrieves the Prior Patient Account Number.
|
ISingleCollection<CX> |
getPriorPatientIdentifierList()
Retrieves the Prior Patient Identifier List.
|
ISingleCollection<XPN> |
getPriorPatientName()
Retrieves the Prior Patient Name.
|
CX |
getPriorVisitNumber()
Retrieves the Prior Visit Number.
|
void |
setPriorAlternateVisitID(ISingleCollection<CX> objPriorPatientNameList)
Set the Prior Alternate Visit ID.
|
void |
setPriorPatientAccountNumber(CX objpriorPatientAccountNumber)
Set the Prior Patient Account Number.
|
void |
setPriorPatientAccountNumber(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
Set the Prior Patient Account Number.
|
void |
setPriorPatientIdentifierList(ISingleCollection<CX> objPriorPatientIdentifierList)
Set the Patient Identifier.
|
void |
setPriorPatientName(ISingleCollection<XPN> objPriorPatientNameList)
Set the Prior Patient Name.
|
void |
setPriorVisitNumber(CX objPriorPatientNameID)
Sets the Prior Visit Number.
|
void |
setPriorVisitNumber(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
Set the Prior Visit Number.
|
boolean |
validate()
Validates HL7 Message objects .
|
addUnRecognizedField, dumpSegment, getFields, getName, getUnrecognizedFields, moveToNextSegment, parse, removeDataElement, removeDataElement, serialize, setName, setUnRecognizedField, updateDataElement, updateDataElement, writeToXMLpublic ISingleCollection<CX> getPriorAlternateVisitID()
public CX getPriorPatientAccountNumber()
public ISingleCollection<CX> getPriorPatientIdentifierList()
public ISingleCollection<XPN> getPriorPatientName()
public CX getPriorVisitNumber()
public void setPriorPatientAccountNumber(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
strIDNumber - Specifies the value of the identifier itself.strCheckDigit - It is part of the identifying number used in the sending application.strCheckDigitScheme - Contains the code identifying the check digit scheme employed.
Suggested Values NP,ISO,M10,M11.[Refer table No.0061].objAssigningAuthority - The assigning authority is a unique name of the system (or organization or agency
or department) that creates the data. .strIdentifierTypeCode - Specifies a code corresponding to the type of identifier.In some cases, this code may be
used as a qualifier to the "Assigning authority" component.[Refer table No 0203]objAssigningFacility - Specifies the place or location identifier where the identifier was first assigned
to the patient.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.objAssigningJurisdiction - Specifies the geo-political body that assigned the identifier.objAssigningAgencyOrDepartment - Specifies agency or department that assigned the identifier.strSecurityCheck - is used to communicate the version code.objSecurityCheckSCheme - is used to transmit information intended to validate veracity of the supplied identifierpublic void setPriorPatientAccountNumber(CX objpriorPatientAccountNumber)
objpriorPatientAccountNumber - object of Patient Account Number.public void addPriorPatientIdentifierList(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
strIDNumber - Specifies the value of the identifier itself.strCheckDigit - It is part of the identifying number used in the sending application.strCheckDigitScheme - Contains the code identifying the check digit scheme employed.
Suggested Values NP,ISO,M10,M11.[Refer table No.0061].objAssigningAuthority - The assigning authority is a unique name of the system (or organization or agency
or department) that creates the data. .strIdentifierTypeCode - Specifies a code corresponding to the type of identifier.In some cases, this code may be
used as a qualifier to the "Assigning authority" component.[Refer table No 0203]objAssigningFacility - Specifies the place or location identifier where the identifier was first assigned
to the patient.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.objAssigningJurisdiction - Specifies the geo-political body that assigned the identifier.objAssigningAgencyOrDepartment - Specifies agency or department that assigned the identifier.strSecurityCheck - is used to communicate the version code.objSecurityCheckSCheme - is used to transmit information intended to validate veracity of the supplied identifierpublic void addPriorPatientIdentifierList(CX objpriorPatientIdentifier)
objpriorPatientIdentifier - object of Prior Patient Identifier.public void setPriorPatientIdentifierList(ISingleCollection<CX> objPriorPatientIdentifierList)
objPriorPatientIdentifierList - List of Patient Identifier.public void addPriorAlternateVisitID(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
strIDNumber - Specifies the value of the identifier itself.strCheckDigit - It is part of the identifying number used in the sending application.strCheckDigitScheme - Contains the code identifying the check digit scheme employed.
Suggested Values NP,ISO,M10,M11.[Refer table No.0061].objAssigningAuthority - The assigning authority is a unique name of the system (or organization or agency
or department) that creates the data. .strIdentifierTypeCode - Specifies a code corresponding to the type of identifier.In some cases, this code may be
used as a qualifier to the "Assigning authority" component.[Refer table No 0203]objAssigningFacility - Specifies the place or location identifier where the identifier was first assigned
to the patient.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.objAssigningJurisdiction - Specifies the geo-political body that assigned the identifier.objAssigningAgencyOrDepartment - Specifies agency or department that assigned the identifier.strSecurityCheck - is used to communicate the version code.objSecurityCheckSCheme - is used to transmit information intended to validate veracity of the supplied identifierpublic void addPriorAlternateVisitID(CX objpriorAlternateVisitID)
objpriorAlternateVisitID - object of Prior Alternate Visit ID.public void setPriorAlternateVisitID(ISingleCollection<CX> objPriorPatientNameList)
objPriorAlternateVisitID - List of Prior Patient Name.public void addPriorPatientName(FN objFamilyName, java.lang.String strGivenName, java.lang.String strSecondAndFurtherGivenNamesOrInitialsThereof, java.lang.String strSuffix, java.lang.String strPrefix, java.lang.String strNameTypeCode, java.lang.String strNameRepresentationCode, CWE objNameContext, java.lang.String strNameAssemblyOrder, DTM objEffectiveDate, DTM objExpirationDate, java.lang.String strProfessionalSuffix, java.lang.String strCalledBy)
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.).strNameTypeCode - Specifies a code that represents the type of name. Suggested values are A,B,C,D,I,L,M,N,P,R,S,T,U...[Refer table 0200.]strNameRepresentationCode - Specifies representations of the same name/address Suggested values are I,A,P [Refer table 0465]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.]objEffectiveDate - Specifies the first date, if known, on which the address is valid and active.objExpirationDate - 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).strCalledBy - Used to specify the called name.public void addPriorPatientName(XPN objPriorPatientNameID)
objPriorPatientNameID - object of Prior Patient Name.public void setPriorPatientName(ISingleCollection<XPN> objPriorPatientNameList)
objPriorPatientNameList - List of Prior Patient Name.public void setPriorVisitNumber(java.lang.String strIDNumber,
java.lang.String strCheckDigit,
java.lang.String strCheckDigitScheme,
HD objAssigningAuthority,
java.lang.String strIdentifierTypeCode,
HD objAssigningFacility,
java.lang.String strEffectiveDate,
java.lang.String strExpirationDate,
CWE objAssigningJurisdiction,
CWE objAssigningAgencyOrDepartment,
java.lang.String strSecurityCheck,
java.lang.String strSecurityCheckScheme)
strIDNumber - Specifies the value of the identifier itself.strCheckDigit - It is part of the identifying number used in the sending application.strCheckDigitScheme - Contains the code identifying the check digit scheme employed.
Suggested Values NP,ISO,M10,M11.[Refer table No.0061].objAssigningAuthority - The assigning authority is a unique name of the system (or organization or agency
or department) that creates the data. .strIdentifierTypeCode - Specifies a code corresponding to the type of identifier.In some cases, this code may be
used as a qualifier to the "Assigning authority" component.[Refer table No 0203]objAssigningFacility - Specifies the place or location identifier where the identifier was first assigned
to the patient.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.objAssigningJurisdiction - Specifies the geo-political body that assigned the identifier.objAssigningAgencyOrDepartment - Specifies agency or department that assigned the identifier.strSecurityCheck - is used to communicate the version code.objSecurityCheckSCheme - is used to transmit information intended to validate veracity of the supplied identifierpublic void setPriorVisitNumber(CX objPriorPatientNameID)
objPriorPatientNameID - object of Prior Visit Number.public boolean validate()
throws InvalidSegmentException
validate in interface ISegmentvalidate in class SegmentInvalidSegmentException - Throws when Segment Validation fails