Are there any guides out there where i learn more about how to integrate hl7 2.x protocol with openemr?
Any sample programs would really be helpful.
I presume you have already looked at https://sourceforge.net/p/openemr/discussion/202506/thread/e00ef571/ There is a reference there to "mith" which should be "mirth", an open source interface engine. Some basic understanding of HL7 v2 is necessary. See https://en.wikipedia.org/wiki/Mirth_Connect. The user guide is available at https://bridge.nextgen.com/media/3244/mirth-data-sheet-mirth-connect-3-4-user-guide.pdf
If you are looking for basic information on HL7, then much of the information is available free to nonmembers at hl7.org. The version 2 specs are free, although the license is not strictly open source. The organization also offers tutorial classes, although not free.