I have a requirement of finding the posituion of standard segments in the HL7 script for each transaction type(A01,A02).I currently use :
ADT_A03 a03 = new ADT_A03();
a03.initQuickstart("ADT", "A03", "P");
String msgStructureA03= a03.printStructure();
and then process it to get the position of each Standard segment.Since i have to do a hell lot of string manipulation to find the Segement position i need a way out.Do we have any library function that i can use to find the position of standard segmements or there is any other efficient mechaninsm.please reply as soon as possible.
please solve my query
Reading javadocs is recommended when looking for library functions.
getNames() returns what you want.
Note that messages may contain groups that again contain groups or segments, i.e. messages do not just contain a linear structure of segments.