OBX.cs :  » Network-Clients » nHapi » NHapi » Model » V251 » Segment » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Network Clients » nHapi 
nHapi » NHapi » Model » V251 » Segment » OBX.cs
using System;
using NHapi.Base;
using NHapi.Base.Parser;
using NHapi.Base.Model;
using NHapi.Model.V251.Datatype;
using NHapi.Base.Log;

namespace NHapi.Model.V251.Segment{

///<summary>
/// Represents an HL7 OBX message segment. 
/// This segment has the following fields:<ol>
///<li>OBX-1: Set ID - OBX (SI)</li>
///<li>OBX-2: Value Type (ID)</li>
///<li>OBX-3: Observation Identifier (CE)</li>
///<li>OBX-4: Observation Sub-ID (ST)</li>
///<li>OBX-5: Observation Value (varies)</li>
///<li>OBX-6: Units (CE)</li>
///<li>OBX-7: References Range (ST)</li>
///<li>OBX-8: Abnormal Flags (IS)</li>
///<li>OBX-9: Probability (NM)</li>
///<li>OBX-10: Nature of Abnormal Test (ID)</li>
///<li>OBX-11: Observation Result Status (ID)</li>
///<li>OBX-12: Effective Date of Reference Range Values (TS)</li>
///<li>OBX-13: User Defined Access Checks (ST)</li>
///<li>OBX-14: Date/Time of the Observation (TS)</li>
///<li>OBX-15: Producer's Reference (CE)</li>
///<li>OBX-16: Responsible Observer (XCN)</li>
///<li>OBX-17: Observation Method (CE)</li>
///<li>OBX-18: Equipment Instance Identifier (EI)</li>
///<li>OBX-19: Date/Time of the Analysis (TS)</li>
///<li>OBX-20: Reserved for harmonization with V2.6 (varies)</li>
///<li>OBX-21: Reserved for harmonization with V2.6 (varies)</li>
///<li>OBX-22: Reserved for harmonization with V2.6 (varies)</li>
///<li>OBX-23: Performing Organization Name (XON)</li>
///<li>OBX-24: Performing Organization Address (XAD)</li>
///<li>OBX-25: Performing Organization Medical Director (XCN)</li>
///</ol>
/// The get...() methods return data from individual fields.  These methods 
/// do not throw exceptions and may therefore have to handle exceptions internally.  
/// If an exception is handled internally, it is logged and null is returned.  
/// This is not expected to happen - if it does happen this indicates not so much 
/// an exceptional circumstance as a bug in the code for this class.
///</summary>
[Serializable]
public class OBX : AbstractSegment  {

  /**
   * Creates a OBX (Observation/Result) segment object that belongs to the given 
   * message.  
   */
  public OBX(IGroup parent, IModelClassFactory factory) : base(parent,factory) {
  IMessage message = Message;
    try {
       this.add(typeof(SI), false, 1, 4, new System.Object[]{message}, "Set ID - OBX");
       this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 125}, "Value Type");
       this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Observation Identifier");
       this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "Observation Sub-ID");
       this.add(typeof(Varies), false, 0, 99999, new System.Object[]{message}, "Observation Value");
       this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Units");
       this.add(typeof(ST), false, 1, 60, new System.Object[]{message}, "References Range");
       this.add(typeof(IS), false, 0, 5, new System.Object[]{message, 78}, "Abnormal Flags");
       this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Probability");
       this.add(typeof(ID), false, 0, 2, new System.Object[]{message, 80}, "Nature of Abnormal Test");
       this.add(typeof(ID), true, 1, 1, new System.Object[]{message, 85}, "Observation Result Status");
       this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Effective Date of Reference Range Values");
       this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "User Defined Access Checks");
       this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Observation");
       this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Producer's Reference");
       this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Responsible Observer");
       this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Observation Method");
       this.add(typeof(EI), false, 0, 22, new System.Object[]{message}, "Equipment Instance Identifier");
       this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "Date/Time of the Analysis");
       this.add(typeof(Varies), false, 1, 0, new System.Object[]{message}, "Reserved for harmonization with V2.6");
       this.add(typeof(Varies), false, 1, 0, new System.Object[]{message}, "Reserved for harmonization with V2.6");
       this.add(typeof(Varies), false, 1, 0, new System.Object[]{message}, "Reserved for harmonization with V2.6");
       this.add(typeof(XON), false, 1, 567, new System.Object[]{message}, "Performing Organization Name");
       this.add(typeof(XAD), false, 1, 631, new System.Object[]{message}, "Performing Organization Address");
       this.add(typeof(XCN), false, 1, 3002, new System.Object[]{message}, "Performing Organization Medical Director");
    } catch (HL7Exception he) {
        HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + GetType().Name, he);
    }
  }

  ///<summary>
  /// Returns Set ID - OBX(OBX-1).
  ///</summary>
  public SI SetIDOBX
  {
    get{
      SI ret = null;
      try
      {
      IType t = this.GetField(1, 0);
        ret = (SI)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Value Type(OBX-2).
  ///</summary>
  public ID ValueType
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(2, 0);
        ret = (ID)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Observation Identifier(OBX-3).
  ///</summary>
  public CE ObservationIdentifier
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(3, 0);
        ret = (CE)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Observation Sub-ID(OBX-4).
  ///</summary>
  public ST ObservationSubID
  {
    get{
      ST ret = null;
      try
      {
      IType t = this.GetField(4, 0);
        ret = (ST)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns a single repetition of Observation Value(OBX-5).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public Varies GetObservationValue(int rep)
  {
      Varies ret = null;
      try
      {
      IType t = this.GetField(5, rep);
        ret = (Varies)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;
  }

  ///<summary>
  /// Returns all repetitions of Observation Value (OBX-5).
   ///</summary>
  public Varies[] GetObservationValue() {
     Varies[] ret = null;
    try {
        IType[] t = this.GetField(5);  
        ret = new Varies[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (Varies)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;
}

  ///<summary>
  /// Returns the total repetitions of Observation Value (OBX-5).
   ///</summary>
  public int ObservationValueRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(5);
    }
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);
}
}
}
  ///<summary>
  /// Returns Units(OBX-6).
  ///</summary>
  public CE Units
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(6, 0);
        ret = (CE)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns References Range(OBX-7).
  ///</summary>
  public ST ReferencesRange
  {
    get{
      ST ret = null;
      try
      {
      IType t = this.GetField(7, 0);
        ret = (ST)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns a single repetition of Abnormal Flags(OBX-8).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public IS GetAbnormalFlags(int rep)
  {
      IS ret = null;
      try
      {
      IType t = this.GetField(8, rep);
        ret = (IS)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;
  }

  ///<summary>
  /// Returns all repetitions of Abnormal Flags (OBX-8).
   ///</summary>
  public IS[] GetAbnormalFlags() {
     IS[] ret = null;
    try {
        IType[] t = this.GetField(8);  
        ret = new IS[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (IS)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;
}

  ///<summary>
  /// Returns the total repetitions of Abnormal Flags (OBX-8).
   ///</summary>
  public int AbnormalFlagsRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(8);
    }
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);
}
}
}
  ///<summary>
  /// Returns Probability(OBX-9).
  ///</summary>
  public NM Probability
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(9, 0);
        ret = (NM)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns a single repetition of Nature of Abnormal Test(OBX-10).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ID GetNatureOfAbnormalTest(int rep)
  {
      ID ret = null;
      try
      {
      IType t = this.GetField(10, rep);
        ret = (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;
  }

  ///<summary>
  /// Returns all repetitions of Nature of Abnormal Test (OBX-10).
   ///</summary>
  public ID[] GetNatureOfAbnormalTest() {
     ID[] ret = null;
    try {
        IType[] t = this.GetField(10);  
        ret = new ID[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (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;
}

  ///<summary>
  /// Returns the total repetitions of Nature of Abnormal Test (OBX-10).
   ///</summary>
  public int NatureOfAbnormalTestRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(10);
    }
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);
}
}
}
  ///<summary>
  /// Returns Observation Result Status(OBX-11).
  ///</summary>
  public ID ObservationResultStatus
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(11, 0);
        ret = (ID)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Effective Date of Reference Range Values(OBX-12).
  ///</summary>
  public TS EffectiveDateOfReferenceRangeValues
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(12, 0);
        ret = (TS)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns User Defined Access Checks(OBX-13).
  ///</summary>
  public ST UserDefinedAccessChecks
  {
    get{
      ST ret = null;
      try
      {
      IType t = this.GetField(13, 0);
        ret = (ST)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Date/Time of the Observation(OBX-14).
  ///</summary>
  public TS DateTimeOfTheObservation
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(14, 0);
        ret = (TS)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Producer's Reference(OBX-15).
  ///</summary>
  public CE ProducerSReference
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(15, 0);
        ret = (CE)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns a single repetition of Responsible Observer(OBX-16).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public XCN GetResponsibleObserver(int rep)
  {
      XCN ret = null;
      try
      {
      IType t = this.GetField(16, rep);
        ret = (XCN)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;
  }

  ///<summary>
  /// Returns all repetitions of Responsible Observer (OBX-16).
   ///</summary>
  public XCN[] GetResponsibleObserver() {
     XCN[] ret = null;
    try {
        IType[] t = this.GetField(16);  
        ret = new XCN[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (XCN)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;
}

  ///<summary>
  /// Returns the total repetitions of Responsible Observer (OBX-16).
   ///</summary>
  public int ResponsibleObserverRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(16);
    }
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);
}
}
}
  ///<summary>
  /// Returns a single repetition of Observation Method(OBX-17).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CE GetObservationMethod(int rep)
  {
      CE ret = null;
      try
      {
      IType t = this.GetField(17, rep);
        ret = (CE)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;
  }

  ///<summary>
  /// Returns all repetitions of Observation Method (OBX-17).
   ///</summary>
  public CE[] GetObservationMethod() {
     CE[] ret = null;
    try {
        IType[] t = this.GetField(17);  
        ret = new CE[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (CE)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;
}

  ///<summary>
  /// Returns the total repetitions of Observation Method (OBX-17).
   ///</summary>
  public int ObservationMethodRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(17);
    }
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);
}
}
}
  ///<summary>
  /// Returns a single repetition of Equipment Instance Identifier(OBX-18).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public EI GetEquipmentInstanceIdentifier(int rep)
  {
      EI ret = null;
      try
      {
      IType t = this.GetField(18, rep);
        ret = (EI)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;
  }

  ///<summary>
  /// Returns all repetitions of Equipment Instance Identifier (OBX-18).
   ///</summary>
  public EI[] GetEquipmentInstanceIdentifier() {
     EI[] ret = null;
    try {
        IType[] t = this.GetField(18);  
        ret = new EI[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (EI)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;
}

  ///<summary>
  /// Returns the total repetitions of Equipment Instance Identifier (OBX-18).
   ///</summary>
  public int EquipmentInstanceIdentifierRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(18);
    }
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);
}
}
}
  ///<summary>
  /// Returns Date/Time of the Analysis(OBX-19).
  ///</summary>
  public TS DateTimeOfTheAnalysis
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(19, 0);
        ret = (TS)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Reserved for harmonization with V2.6(OBX-20).
  ///</summary>
  public Varies ReservedForHarmonizationWithV26_OBX20
  {
    get{
      Varies ret = null;
      try
      {
      IType t = this.GetField(20, 0);
        ret = (Varies)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Reserved for harmonization with V2.6(OBX-21).
  ///</summary>
  public Varies ReservedForHarmonizationWithV26_OBX21
  {
    get{
      Varies ret = null;
      try
      {
      IType t = this.GetField(21, 0);
        ret = (Varies)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Reserved for harmonization with V2.6(OBX-22).
  ///</summary>
  public Varies ReservedForHarmonizationWithV26_OBX22
  {
    get{
      Varies ret = null;
      try
      {
      IType t = this.GetField(22, 0);
        ret = (Varies)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Performing Organization Name(OBX-23).
  ///</summary>
  public XON PerformingOrganizationName
  {
    get{
      XON ret = null;
      try
      {
      IType t = this.GetField(23, 0);
        ret = (XON)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Performing Organization Address(OBX-24).
  ///</summary>
  public XAD PerformingOrganizationAddress
  {
    get{
      XAD ret = null;
      try
      {
      IType t = this.GetField(24, 0);
        ret = (XAD)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }

  ///<summary>
  /// Returns Performing Organization Medical Director(OBX-25).
  ///</summary>
  public XCN PerformingOrganizationMedicalDirector
  {
    get{
      XCN ret = null;
      try
      {
      IType t = this.GetField(25, 0);
        ret = (XCN)t;
      }
       catch (HL7Exception he) {
      HapiLogFactory.getHapiLog(GetType()).error("Unexpected problem obtaining field value.  This is a bug.", he);
        throw new System.Exception("An unexpected error ocurred", he);
    } 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;
  }
  }


}}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.