Are there any restrictions on the Segments that should be used for a Specific message type? For Ex: If I have to create a sample HL7 ADT^A05 or REF message.. Can I include a
There are restrictions defined by HL7 on the segment to use. That being said, your messages will also be defined by the data exchange needs of the systems you are interfacing, and for that you should develop a specification.
The specification (conformance profile) would contain:
This article explains what goes into a spec: http://caristix.com/blog/2013/02/hl7-survival-guide-chapter-6-hl7-interface-specifications/. It gives several reference sources.