Set the segments map
            :param segmentNameCount: a dict with the segment name and the total number of segments with this name
            :param lineMap: a list with the concerned segment. If the PV1 segment is the third if the HL7 message,
            the element in the lineMap list at the third index will be PV1. If there are 3 SPM segments (line 9,10,11)
            in the HL7 message, this list contains 3 elements SPM at index 9,10,11.

def setSegmentsMap(self, segmentNameCount, lineMap):
        """
            Set the segments map
            :param segmentNameCount: a dict with the segment name and the total number of segments with this name
            :param lineMap: a list with the concerned segment. If the PV1 segment is the third if the HL7 message,
            the element in the lineMap list at the third index will be PV1. If there are 3 SPM segments (line 9,10,11)
            in the HL7 message, this list contains 3 elements SPM at index 9,10,11.
        """
        self.segmentNameCount = segmentNameCount
        self.lineMap = lineMap

        #Build an alias map for simplicity in get
        # PID is an alias of PID[1] if only 1 PID segment is present
        for segName in segmentNameCount.keys():
            if segmentNameCount[segName] == 1:
                self.aliasSegmentName[segName] = segName+"[1]"
                self.aliasSegmentName[segName+"[1]"] = segName