Exemplo n.º 1
0
	///<summary>
	/// Returns a single repetition of Contact Identifiers(CTD-7).
	/// throws HL7Exception if the repetition number is invalid.
	/// <param name="rep">The repetition number (this is a repeating field)</param>
	///</summary>
	public PLN GetContactIdentifiers(int rep)
	{
			PLN ret = null;
			try
			{
			IType t = this.GetField(7, rep);
				ret = (PLN)t;
		} catch (System.Exception ex) {
			HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value.  This is a bug.", ex);
				throw new System.Exception("An unexpected error ocurred", ex);
    }
			return ret;
  }
Exemplo n.º 2
0
        /**
         * Returns a single repetition of Practitioner ID Numbers(PRA-6).
         * @param rep the repetition number (this is a repeating field)
         * @throws HL7Exception if the repetition number is invalid.
         */
        public PLN getPractitionerIDNumbers(int rep)
        {
            PLN ret = null;

            try
            {
                Type t = this.getField(6, rep);
                ret = (PLN)t;
            } catch (System.Exception ex) {
                HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", ex);
                throw new System.Exception("An unexpected error ocurred", ex);
            }
            return(ret);
        }
Exemplo n.º 3
0
        public PLN Map(MultiPolygon polygon, BoundaryType type, string name)
        {
            var isoPolygon = new PLN
            {
                A = ConvertPolygonType(type),
                B = name
            };
            var exteriors = polygon.Polygons.Select(p => p.ExteriorRing).SelectMany(x => Map(x, LSGA.Item1));
            var interiors = polygon.Polygons.SelectMany(p => p.InteriorRings).SelectMany(x => Map(x, LSGA.Item2));

            isoPolygon.Items = exteriors.Concat(interiors).ToArray();

            return(isoPolygon);
        }
Exemplo n.º 4
0
        /// <summary> Returns a single repetition of Practitioner ID Numbers (PRA-6).</summary>
        /// <param name="rep">the repetition number (this is a repeating field)
        /// </param>
        /// <throws>  HL7Exception if the repetition number is invalid. </throws>
        public virtual PLN getPractitionerIDNumbers(int rep)
        {
            PLN ret = null;

            try
            {
                Type t = this.getField(6, rep);
                ret = (PLN)t;
            }
            catch (System.InvalidCastException)
            {
                throw new Exception();
            }
            return(ret);
        }
Exemplo n.º 5
0
        /// <summary> Returns a single repetition of Provider Identifiers (PRD-7).</summary>
        /// <param name="rep">the repetition number (this is a repeating field)
        /// </param>
        /// <throws>  HL7Exception if the repetition number is invalid. </throws>
        public virtual PLN getProviderIdentifiers(int rep)
        {
            PLN ret = null;

            try
            {
                Type t = this.getField(7, rep);
                ret = (PLN)t;
            }
            catch (System.InvalidCastException)
            {
                throw new Exception();
            }
            return(ret);
        }
Exemplo n.º 6
0
  ///<summary>
  /// Returns all repetitions of Contact Identifiers (CTD-7).
   ///</summary>
  public PLN[] GetContactIdentifiers() {
     PLN[] ret = null;
    try {
        IType[] t = this.GetField(7);  
        ret = new PLN[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (PLN)t[i];
        }
    } catch (HL7Exception he) {
        HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } catch (System.Exception cce) {
        HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value.  This is a bug.", cce);
        throw new System.Exception("An unexpected error ocurred", cce);
  }
 return ret;
}
Exemplo n.º 7
0
 /**
  * Returns all repetitions of Practitioner ID Numbers (PRA-6).
  */
 public PLN[] getPractitionerIDNumbers()
 {
     PLN[] ret = null;
     try {
         Type[] t = this.getField(6);
         ret = new PLN[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (PLN)t[i];
         }
     } catch (HL7Exception he) {
         HapiLogFactory.getHapiLog(this.GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
         throw new System.Exception("An unexpected error ocurred", he);
     } catch (System.Exception cce) {
         HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", cce);
         throw new System.Exception("An unexpected error ocurred", cce);
     }
     return(ret);
 }
Exemplo n.º 8
0
 /// <summary> Returns all repetitions of Practitioner ID Numbers (PRA-6).</summary>
 public virtual PLN[] getPractitionerIDNumbers()
 {
     PLN[] ret = null;
     try
     {
         Type[] t = this.getField(6);
         ret = new PLN[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (PLN)t[i];
         }
     }
     catch (System.InvalidCastException)
     {
         throw new Exception();
     }
     catch (NuGenHL7Exception)
     {
         throw new Exception();
     }
     return(ret);
 }
Exemplo n.º 9
0
 public void Setup()
 {
     _pln        = new PLN();
     _output     = new StringBuilder();
     _xmlBuilder = XmlWriter.Create(_output);
 }