Example #1
0
 /// <summary> Formats a Message object into an HL7 message string using the given
 /// encoding.
 /// </summary>
 /// <throws>  HL7Exception if the data fields in the message do not permit encoding </throws>
 /// <summary>     (e.g. required fields are null)
 /// </summary>
 /// <throws>  EncodingNotSupportedException if the requested encoding is not </throws>
 /// <summary>     supported by this parser.
 /// </summary>
 protected internal override System.String doEncode(Message source, System.String encoding)
 {
     System.String ret = null;
     if (encoding == null)
     {
         encoding = "";                 //prevent null pointer exception
     }
     if (encoding.ToUpper().Equals("VB".ToUpper()))
     {
         ret = pipeParser.doEncode(source);
     }
     else if (encoding.ToUpper().Equals("XML".ToUpper()))
     {
         ret = xmlParser.doEncode(source);
     }
     else
     {
         throw new NuGenEncodingNotSupportedException("The encoding " + encoding + " is not supported by " + this.GetType().FullName);
     }
     return(ret);
 }
Example #2
0
 /// <seealso cref="Genetibase.NuGenHL7.parser.Parser.encode(Genetibase.NuGenHL7.model.Message, java.lang.String)">
 /// </seealso>
 protected internal override System.String doEncode(Message source, System.String encoding)
 {
     return(myPipeParser.doEncode(source, encoding));
 }