RXA.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 » RXA.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 RXA message segment. 
/// This segment has the following fields:<ol>
///<li>RXA-1: Give Sub-ID Counter (NM)</li>
///<li>RXA-2: Administration Sub-ID Counter (NM)</li>
///<li>RXA-3: Date/Time Start of Administration (TS)</li>
///<li>RXA-4: Date/Time End of Administration (TS)</li>
///<li>RXA-5: Administered Code (CE)</li>
///<li>RXA-6: Administered Amount (NM)</li>
///<li>RXA-7: Administered Units (CE)</li>
///<li>RXA-8: Administered Dosage Form (CE)</li>
///<li>RXA-9: Administration Notes (CE)</li>
///<li>RXA-10: Administering Provider (XCN)</li>
///<li>RXA-11: Administered-at Location (LA2)</li>
///<li>RXA-12: Administered Per (Time Unit) (ST)</li>
///<li>RXA-13: Administered Strength (NM)</li>
///<li>RXA-14: Administered Strength Units (CE)</li>
///<li>RXA-15: Substance Lot Number (ST)</li>
///<li>RXA-16: Substance Expiration Date (TS)</li>
///<li>RXA-17: Substance Manufacturer Name (CE)</li>
///<li>RXA-18: Substance/Treatment Refusal Reason (CE)</li>
///<li>RXA-19: Indication (CE)</li>
///<li>RXA-20: Completion Status (ID)</li>
///<li>RXA-21: Action Code - RXA (ID)</li>
///<li>RXA-22: System Entry Date/Time (TS)</li>
///<li>RXA-23: Administered Drug Strength Volume (NM)</li>
///<li>RXA-24: Administered Drug Strength Volume Units (CWE)</li>
///<li>RXA-25: Administered Barcode Identifier (CWE)</li>
///<li>RXA-26: Pharmacy Order Type (ID)</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 RXA : AbstractSegment  {

  /**
   * Creates a RXA (Pharmacy/Treatment Administration) segment object that belongs to the given 
   * message.  
   */
  public RXA(IGroup parent, IModelClassFactory factory) : base(parent,factory) {
  IMessage message = Message;
    try {
       this.add(typeof(NM), true, 1, 4, new System.Object[]{message}, "Give Sub-ID Counter");
       this.add(typeof(NM), true, 1, 4, new System.Object[]{message}, "Administration Sub-ID Counter");
       this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Date/Time Start of Administration");
       this.add(typeof(TS), true, 1, 26, new System.Object[]{message}, "Date/Time End of Administration");
       this.add(typeof(CE), true, 1, 250, new System.Object[]{message}, "Administered Code");
       this.add(typeof(NM), true, 1, 20, new System.Object[]{message}, "Administered Amount");
       this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Administered Units");
       this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Administered Dosage Form");
       this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Administration Notes");
       this.add(typeof(XCN), false, 0, 250, new System.Object[]{message}, "Administering Provider");
       this.add(typeof(LA2), false, 1, 200, new System.Object[]{message}, "Administered-at Location");
       this.add(typeof(ST), false, 1, 20, new System.Object[]{message}, "Administered Per (Time Unit)");
       this.add(typeof(NM), false, 1, 20, new System.Object[]{message}, "Administered Strength");
       this.add(typeof(CE), false, 1, 250, new System.Object[]{message}, "Administered Strength Units");
       this.add(typeof(ST), false, 0, 20, new System.Object[]{message}, "Substance Lot Number");
       this.add(typeof(TS), false, 0, 26, new System.Object[]{message}, "Substance Expiration Date");
       this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Substance Manufacturer Name");
       this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Substance/Treatment Refusal Reason");
       this.add(typeof(CE), false, 0, 250, new System.Object[]{message}, "Indication");
       this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 322}, "Completion Status");
       this.add(typeof(ID), false, 1, 2, new System.Object[]{message, 323}, "Action Code - RXA");
       this.add(typeof(TS), false, 1, 26, new System.Object[]{message}, "System Entry Date/Time");
       this.add(typeof(NM), false, 1, 5, new System.Object[]{message}, "Administered Drug Strength Volume");
       this.add(typeof(CWE), false, 1, 250, new System.Object[]{message}, "Administered Drug Strength Volume Units");
       this.add(typeof(CWE), false, 1, 60, new System.Object[]{message}, "Administered Barcode Identifier");
       this.add(typeof(ID), false, 1, 1, new System.Object[]{message, 480}, "Pharmacy Order Type");
    } catch (HL7Exception he) {
        HapiLogFactory.getHapiLog(GetType()).error("Can't instantiate " + GetType().Name, he);
    }
  }

  ///<summary>
  /// Returns Give Sub-ID Counter(RXA-1).
  ///</summary>
  public NM GiveSubIDCounter
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(1, 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 Administration Sub-ID Counter(RXA-2).
  ///</summary>
  public NM AdministrationSubIDCounter
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(2, 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 Date/Time Start of Administration(RXA-3).
  ///</summary>
  public TS DateTimeStartOfAdministration
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(3, 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 Date/Time End of Administration(RXA-4).
  ///</summary>
  public TS DateTimeEndOfAdministration
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(4, 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 Administered Code(RXA-5).
  ///</summary>
  public CE AdministeredCode
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(5, 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 Administered Amount(RXA-6).
  ///</summary>
  public NM AdministeredAmount
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(6, 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 Administered Units(RXA-7).
  ///</summary>
  public CE AdministeredUnits
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(7, 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 Administered Dosage Form(RXA-8).
  ///</summary>
  public CE AdministeredDosageForm
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(8, 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 Administration Notes(RXA-9).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CE GetAdministrationNotes(int rep)
  {
      CE ret = null;
      try
      {
      IType t = this.GetField(9, 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 Administration Notes (RXA-9).
   ///</summary>
  public CE[] GetAdministrationNotes() {
     CE[] ret = null;
    try {
        IType[] t = this.GetField(9);  
        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 Administration Notes (RXA-9).
   ///</summary>
  public int AdministrationNotesRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(9);
    }
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 Administering Provider(RXA-10).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public XCN GetAdministeringProvider(int rep)
  {
      XCN ret = null;
      try
      {
      IType t = this.GetField(10, 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 Administering Provider (RXA-10).
   ///</summary>
  public XCN[] GetAdministeringProvider() {
     XCN[] ret = null;
    try {
        IType[] t = this.GetField(10);  
        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 Administering Provider (RXA-10).
   ///</summary>
  public int AdministeringProviderRepetitionsUsed
{
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 Administered-at Location(RXA-11).
  ///</summary>
  public LA2 AdministeredAtLocation
  {
    get{
      LA2 ret = null;
      try
      {
      IType t = this.GetField(11, 0);
        ret = (LA2)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 Administered Per (Time Unit)(RXA-12).
  ///</summary>
  public ST AdministeredPerTimeUnit
  {
    get{
      ST ret = null;
      try
      {
      IType t = this.GetField(12, 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 Administered Strength(RXA-13).
  ///</summary>
  public NM AdministeredStrength
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(13, 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 Administered Strength Units(RXA-14).
  ///</summary>
  public CE AdministeredStrengthUnits
  {
    get{
      CE ret = null;
      try
      {
      IType t = this.GetField(14, 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 Substance Lot Number(RXA-15).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public ST GetSubstanceLotNumber(int rep)
  {
      ST ret = null;
      try
      {
      IType t = this.GetField(15, rep);
        ret = (ST)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 Substance Lot Number (RXA-15).
   ///</summary>
  public ST[] GetSubstanceLotNumber() {
     ST[] ret = null;
    try {
        IType[] t = this.GetField(15);  
        ret = new ST[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (ST)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 Substance Lot Number (RXA-15).
   ///</summary>
  public int SubstanceLotNumberRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(15);
    }
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 Substance Expiration Date(RXA-16).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public TS GetSubstanceExpirationDate(int rep)
  {
      TS ret = null;
      try
      {
      IType t = this.GetField(16, rep);
        ret = (TS)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 Substance Expiration Date (RXA-16).
   ///</summary>
  public TS[] GetSubstanceExpirationDate() {
     TS[] ret = null;
    try {
        IType[] t = this.GetField(16);  
        ret = new TS[t.Length];
        for (int i = 0; i < ret.Length; i++) {
            ret[i] = (TS)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 Substance Expiration Date (RXA-16).
   ///</summary>
  public int SubstanceExpirationDateRepetitionsUsed
{
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 Substance Manufacturer Name(RXA-17).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CE GetSubstanceManufacturerName(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 Substance Manufacturer Name (RXA-17).
   ///</summary>
  public CE[] GetSubstanceManufacturerName() {
     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 Substance Manufacturer Name (RXA-17).
   ///</summary>
  public int SubstanceManufacturerNameRepetitionsUsed
{
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 Substance/Treatment Refusal Reason(RXA-18).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CE GetSubstanceTreatmentRefusalReason(int rep)
  {
      CE ret = null;
      try
      {
      IType t = this.GetField(18, 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 Substance/Treatment Refusal Reason (RXA-18).
   ///</summary>
  public CE[] GetSubstanceTreatmentRefusalReason() {
     CE[] ret = null;
    try {
        IType[] t = this.GetField(18);  
        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 Substance/Treatment Refusal Reason (RXA-18).
   ///</summary>
  public int SubstanceTreatmentRefusalReasonRepetitionsUsed
{
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 a single repetition of Indication(RXA-19).
  /// throws HL7Exception if the repetition number is invalid.
  /// <param name="rep">The repetition number (this is a repeating field)</param>
  ///</summary>
  public CE GetIndication(int rep)
  {
      CE ret = null;
      try
      {
      IType t = this.GetField(19, 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 Indication (RXA-19).
   ///</summary>
  public CE[] GetIndication() {
     CE[] ret = null;
    try {
        IType[] t = this.GetField(19);  
        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 Indication (RXA-19).
   ///</summary>
  public int IndicationRepetitionsUsed
{
get{
    try {
  return GetTotalFieldRepetitionsUsed(19);
    }
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 Completion Status(RXA-20).
  ///</summary>
  public ID CompletionStatus
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(20, 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 Action Code - RXA(RXA-21).
  ///</summary>
  public ID ActionCodeRXA
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(21, 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 System Entry Date/Time(RXA-22).
  ///</summary>
  public TS SystemEntryDateTime
  {
    get{
      TS ret = null;
      try
      {
      IType t = this.GetField(22, 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 Administered Drug Strength Volume(RXA-23).
  ///</summary>
  public NM AdministeredDrugStrengthVolume
  {
    get{
      NM ret = null;
      try
      {
      IType t = this.GetField(23, 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 Administered Drug Strength Volume Units(RXA-24).
  ///</summary>
  public CWE AdministeredDrugStrengthVolumeUnits
  {
    get{
      CWE ret = null;
      try
      {
      IType t = this.GetField(24, 0);
        ret = (CWE)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 Administered Barcode Identifier(RXA-25).
  ///</summary>
  public CWE AdministeredBarcodeIdentifier
  {
    get{
      CWE ret = null;
      try
      {
      IType t = this.GetField(25, 0);
        ret = (CWE)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 Pharmacy Order Type(RXA-26).
  ///</summary>
  public ID PharmacyOrderType
  {
    get{
      ID ret = null;
      try
      {
      IType t = this.GetField(26, 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;
  }
  }


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