コード例 #1
0
        /// <summary>
        /// Returns a single repetition of Patient ID (Internal ID)(PID-3). throws HL7Exception if the
        /// repetition number is invalid.
        /// </summary>
        ///
        /// <exception cref="Exception">    Thrown when an exception error condition occurs. </exception>
        ///
        /// <param name="rep">  The repetition number (this is a repeating field) </param>
        ///
        /// <returns>   The patient identifier internal identifier. </returns>

        public CM_PAT_ID GetPatientIDInternalID(int rep)
        {
            CM_PAT_ID ret = null;

            try
            {
                IType t = this.GetField(3, rep);
                ret = (CM_PAT_ID)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);
        }
コード例 #2
0
ファイル: PID.cs プロジェクト: carlhuth/GenXSource
        /// <summary> Returns a single repetition of Patient ID (Internal ID) (PID-3).</summary>
        /// <param name="rep">the repetition number (this is a repeating field)
        /// </param>
        /// <throws>  HL7Exception if the repetition number is invalid. </throws>
        public virtual CM_PAT_ID getPatientIDInternalID(int rep)
        {
            CM_PAT_ID ret = null;

            try
            {
                Type t = this.getField(3, rep);
                ret = (CM_PAT_ID)t;
            }
            catch (System.InvalidCastException)
            {
                throw new Exception();
            }
            return(ret);
        }
コード例 #3
0
        /// <summary> Returns all repetitions of Patient ID (Internal ID) (PID-3). </summary>
        ///
        /// <exception cref="Exception">  Thrown when an exception error condition occurs. </exception>
        ///
        /// <returns> An array of centimetres pattern identifier. </returns>

        public CM_PAT_ID[] GetPatientIDInternalID()
        {
            CM_PAT_ID[] ret = null;
            try {
                IType[] t = this.GetField(3);
                ret = new CM_PAT_ID[t.Length];
                for (int i = 0; i < ret.Length; i++)
                {
                    ret[i] = (CM_PAT_ID)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);
        }
コード例 #4
0
ファイル: PID.cs プロジェクト: carlhuth/GenXSource
 /// <summary> Returns all repetitions of Patient ID (Internal ID) (PID-3).</summary>
 public virtual CM_PAT_ID[] getPatientIDInternalID()
 {
     CM_PAT_ID[] ret = null;
     try
     {
         Type[] t = this.getField(3);
         ret = new CM_PAT_ID[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (CM_PAT_ID)t[i];
         }
     }
     catch (System.InvalidCastException)
     {
         throw new Exception();
     }
     catch (NuGenHL7Exception)
     {
         throw new Exception();
     }
     return(ret);
 }